$(document).ready(function(){						 				$('.lightbox').lightbox();
		
		/*VIMEO */
		
		
		$(".thumbsWrapperVimeo > ul").width($(".thumbsWrapperVimeo > ul").find('li').length * 73);		$('.nextVimeo').click(function(){
			
			if(Math.abs(parseInt($(".thumbsWrapperVimeo > ul").css('left'))) < ($(".thumbsWrapperVimeo > ul").width() - 286))
			{
				$(".thumbsWrapperVimeo > ul").animate({left: '-=144px'},500)
			}
		})
		$('.prevVimeo').click(function(){
			if(parseInt($(".thumbsWrapperVimeo > ul").css('left')) < 0)
			{
				$(".thumbsWrapperVimeo > ul").animate({left: '+=144px'},500)
			}
		})						   	// ROLLOVER NAVBAR		/*	$("#navbar>img").each(function() {			// Set the original src			rollsrc = $(this).attr("src");			rollON = rollsrc.replace(/.png$/ig,"_push.png");			$("<img>").attr("src", rollON);		});				// Navigation rollovers		$("#navbar a").mouseover(function(){			imgsrc = $(this).children("img").attr("src");			matches = imgsrc.match(/_push/);						// don't do the rollover if state is already ON			if (!matches) {			imgsrcON = imgsrc.replace(/.png$/ig,"_push.png"); // strip off extension			$(this).children("img").attr("src", imgsrcON);			}					});				$("#navbar a").mouseout(function(){			$(this).children("img").attr("src", imgsrc);		});					// ROLLOVER LANGUAGES			   			   $(".imgover").mouseover(function(){						 $(this).css("border", "1px solid #fba919");					});*/							//Caption Sliding (Partially Hidden to Visible)				$('.boxgrid.caption').hover(function(){					$(".cover", this).stop().animate({top:'50px'},{queue:false,duration:160});				}, function() {					$(".cover", this).stop().animate({top:'135px'},{queue:false,duration:160});				});	//Allarga il click dell'href al div precedente	$(document).find(".linkToDiv").each(function(){		var url = $(this).attr('href');		$(this).parent().css('cursor','pointer');		$(this).parent().click(function(){			window.location.href = url;		})	})		});


/* MENU */$(function() {		$('#sdt_menu > li').bind('mouseenter',function(){		var $elem = $(this);				$elem.find('.sdt_descr')			 .stop(true)			 .show()			 .animate({'margin-left':'10px'},500,'easeOutBack');			 		$elem.find('.sdt_link')			.stop(true)			.animate({'margin-left':'10px'},500,'easeOutBack');					$elem.find('.sdt_h5')			.stop(true)			.animate({'font-size':'23px'},500,'easeOutBack')			.css({'color':'white'});							$elem.find('img')			 .stop(true)			 .animate({				'width':'170px',				'height':'170px',				'left':'0px'			 },300,'easeOutBack')			 .andSelf()			 .find('.sdt_wrap')			 .stop(true)			 .animate({'top':'170px'},300,'easeOutBack')			 .andSelf()			 .find('.sdt_active')			 .stop(true)			 .animate({'height':'170px'},300,function(){			var $sub_menu = $elem.find('.sdt_box');			if($sub_menu.length){				var left = '170px';				if($elem.parent().children().length == $elem.index()+1)					left = '-170px';				$sub_menu.show().animate({'left':left},200);			}					});			}).bind('mouseleave',function(){		var $elem = $(this);		$elem.find('.sdt_descr')			 .stop(true)			 .hide();		$elem.find('.sdt_h5')			.stop(true)			.animate({'font-size':'15px'},400,'easeOutBack')			.css({'color':'#3e3e3e'});		$elem.find('.sdt_link')			.stop(true)			.animate({'margin-left':'40px'},400,'easeOutBack');		var $sub_menu = $elem.find('.sdt_box');		if($sub_menu.length)			$sub_menu.hide().css('left','0px');				$elem.find('.sdt_active')			 .stop(true)			 .animate({'height':'0px'},250)			 .andSelf().find('img')			 .stop(true)			 .animate({				'width':'0px',				'height':'0px',				'left':'85px'},300)			 .andSelf()			 .find('.sdt_wrap')			 .stop(true)			 .animate({'top':'13px'},400);	});});
