/* Declare a namespace for the site */
var Site = window.Site || {};

/* Create a closure to maintain scope of the '$'
   and remain compatible with other frameworks.  */
(function($) {
	
	//same as $(document).ready();
	$(function() {
		
		var lastBlock = $("#stands");
		var maxWidth = 434;
		var minWidth = 124;	
		
		$("#acordio3 li a.ultimss").hover(
		  function(){
		    $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
			$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
			lastBlock = this;
		  }
		);
		
		$('#ultims').loopedSlider({
			containerClick:false,
			autoStart:6000,
			slidespeed:800
		});
		
		$('.gallery').loopedSlider({
			autoStart:5000,
			containerClick:false,
			addPagination:true
		});
		
		$("a.youtubelink").click(function() {
		                 $.fancybox({
		                  'padding'             : 0,
		                  'autoScale'   : false,
		                  'transitionIn'        : 'none',
		                  'transitionOut'       : 'none',
		                  'title'               : this.title,
		                  'width'               : 680,
		                  'height'              : 495,
		                  'href'                : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
		                  'type'                : 'swf',    // <--add a comma here
		                  'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here
		                  });
		                 return false;
		
		            }); 

	});


	$(window).bind("load", function() {
		
		
	
	});
	
})(jQuery);
