

/* MÓDULOS LEFTHIDDEN & RIGHTHIDDEN*/
jQuery(function(){
                            
//QueryLoader.selectorPreload = "#zona-x";
//QueryLoader.init();
			/* MODULO LEFTHIDDEN  

                         
			jQuery('div#leftbar').toggle(function() {
			    if(lefthidden == 0){ 
				jQuery('#overlay-left').css({display: 'block'});
				jQuery(this).animate({"marginLeft": "+=250px"}, "fast");
				jQuery('#content-left').animate({"marginLeft": "0px"}, 100);
                         }var lefthidden = 1;
			},
			function() {
			   if(lefthidden == 1){ 
                            jQuery('#content-left').stop();
				jQuery('#content-left').animate({"marginLeft": "-250px"}, 100);
				//jQuery(this).animate({"marginLeft": "-=260px"}, "slow").animate({"marginLeft": "+=5px"}, "fast");
				jQuery(this).animate({"marginLeft": "-2px"}, "fast");
				jQuery('#overlay-left').css({display: 'none'});
                        }
			   var lefthidden = 0;
			});
*/			


			/* MODULO RIGHTHIDEN  */
			jQuery('div#content-right').hover(function() {
				jQuery('#overlay-right').css({display: 'block'});
				//jQuery(this).animate({"marginRight": "-=5px"}, "fast");
				//jQuery('#content-right').animate({"marginRight": "-=0px"}, "fast");
				//jQuery(this).animate({"marginRight": "+=260px"}, "slow");
				jQuery('#content-right').animate({"marginRight": "0px"}, 100);
			},
			function() {
                                jQuery('#content-right').stop();
				jQuery('#content-right').animate({"marginRight": "-224px"}, 100);
				//jQuery(this).animate({"marginRight": "-=260px"}, "slow").animate({"marginRight": "+=5px"}, "fast");
				jQuery('#overlay-right').css({display: 'none'});
			});
			
			/* SPRITELY*/
			jQuery('#nubes').pan({fps: 100, speed: 0.4, dir: 'left', depth: 20}); 
			jQuery('#avioneta').pan({fps: 30, speed: 2, dir: 'right', depth: 30}).delay(5000);      
			/*jQuery('#artistas')
					.sprite({fps: 9, no_of_frames: 5})
					.spRandom({top: 50, bottom: 2000, left: 300, right: 320})
					.isDraggable()
					.activeOnClick()
					.active();
            */

   });
 
 
  /*MENU SUPERIOR*/
 jQuery(function(){
                 var d=1000;
                jQuery('#menu span').each(function(){
                    jQuery('#menu').slideUp(1500);
                    jQuery(this).stop().animate({'top':'-127px'},d+=250);
                    jQuery('#menuswitch').animate({'top':'0px'},'fast');
                });

                jQuery('#menuswitch').toggle(function(){
                    jQuery('#menuswitch').animate({'top':'48px'},'fast');
                    jQuery('#menu').slideDown('fast');
                    
                    }, function(){
                    jQuery('#menu').slideUp('fast');
                    jQuery('#menuswitch').animate({'top':'0px'},'fast');
                    }
               );

                jQuery('#menu > li').hover(
                function () {
                    var $this = $(this);
                    jQuery('a',$this).addClass('hover');
                    jQuery('span',$this).stop().animate({'top':'50px'},50).css({'zIndex':'10'});
                },
                function () {
                    var $this = jQuery(this);
                    jQuery('a',$this).removeClass('hover');
                    jQuery('span',$this).stop().animate({'top':'-127px'},800).css({'zIndex':'-1'});
                }
            );
			
			
			/* EVENTOS CLIC SUPERIOR*/
			jQuery('#menutop-fotos').click(function(){
				/*jQuery('#zona-z').css({'display':'block'});
				jQuery.scrollTo('#fotos',800);*/
				jQuery('#dialog-fotos').dialog('open').html('<iframe style="background: black; margin:0; padding:0; border:none;" width="820" height="720" src="http://www.reyderocha.com.co/ImageGallery/index.php" scrolling="no"></iframe>'); return false;
			});
			
			jQuery('#menutop-volumenes').click(function(){
				jQuery.scrollTo('#zona-y',800);
			});
			jQuery('#menutop-musica').click(function(){
				jQuery.scrollTo('#zona-y',800);
			});
				
			jQuery('#menutop-chat').click(function(){
				jQuery.scrollTo('#zona-y',800);
			});

			jQuery('#menutop-biografias').click(function(){
				jQuery('#dialog-mensaje').dialog('open').html('Espera pronto Biograf&iacute;as de los integrantes del Rey de Rocha.<br/><img src="http://www.reyderocha.com.co/templates/reyultimate/images/spritely/artistas.png"/>'); return false;
			});

 		     /***** Dialog Mensaje *******/
                    jQuery('#dialog-mensaje').dialog({
                        autoOpen: false,
			   width: 480, 
			   modal: true, zIndex:9999999,
                        height:240, resizable:false,
                        className: "ui-effects-transfer",
			   position: 'center',
			   buttons: {
				Ok: function() { 
					jQuery(this).dialog("close");
				}
			   }
		      });

			/***** Mensaje Box *******/
                    jQuery('#dialog-fotos').dialog({
                        autoOpen: false,
			   width: 870, zIndex:9999999, modal: true,
                        height:620,
                        className: "ui-effects-transfer",
			   position: 'center',
		      });
			

                        /* CLIC BOTON SUBIR*/
			jQuery('#up').click(function(){
				jQuery.scrollTo('#zona-x',800);
			});

                    /* CLIC BOTON AL DIA*/
			jQuery('#aldia').click(function(){
				jQuery.scrollTo('#left-3',800);
			});


                        /* OCULTAR-MOSTRAR MENU EMISORA*/
                        jQuery('#menutop > span').hover(function(){

                            jQuery(this).animate({'top':'0px'},100);

                            }, function(){                              
                                jQuery(this).stop();
                                jQuery(this).animate({'top':'-100px'},100).st;
                            }
                         );
						 
						/* OCULTAR-MOSTRAR MENU CHAT
                        jQuery('#menutop-chat').hover(function(){

                            jQuery(this).animate({'top':'0px'},100);

                            }, function(){                              
                                jQuery(this).stop();
                                jQuery(this).animate({'top':'-100px'},100).st;
                            }
                         );*/
			
   });

