$(document).ready(function(){	/* Ресайз превью при наведении в портфолио на главной */	$(".main-content .portfolio ul li").hover(function() {	$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/		.animate({			marginTop: '-101px', /* The next 4 lines will vertically align this image */			marginLeft: '-101px',			top: '50%',			left: '50%',			width: '180px', /* Set new width */			height: '180px', /* Set new height */			padding: '3px'		}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */	} , function() {	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/		.animate({			marginTop: '0', /* Set alignment back to default */			marginLeft: '0',			top: '0',			left: '0',			width: '97px', /* Set width back to default */			height: '97px', /* Set height back to default */			padding: '2px'		}, 400);	});	/* Ховер для курсоров в портфолио на главной */	$('.cursors a.c-up').hover(		function(){			$(this).parent('div').css({'background-position' : '-101px 0px'});		},		function(){			$(this).parent('div').css({'background-position' : '0px 0px'});		}	 );	 $('.cursors a.c-down').hover(		function(){			$(this).parent('div').css({'background-position' : '-202px 0px'});		},		function(){			$(this).parent('div').css({'background-position' : '0px 0px'});		}	 );	 $('.cursors a.c-prev').hover(		function(){			$(this).parent('div').css({'background-position' : '-404px 0px'});		},		function(){			$(this).parent('div').css({'background-position' : '0px 0px'});		}	 );	 $('.cursors a.c-next').hover(		function(){			$(this).parent('div').css({'background-position' : '-303px 0px'});		},		function(){			$(this).parent('div').css({'background-position' : '0px 0px'});		}	 );     /* Скролл */	 $('.scroll-pane').jScrollPane({showArrows:true, scrollbarWidth:19, dragMaxHeight:52});     /* Контакты */	 $('.main-content .contacts h2 a').click (		function(){            if($(this).hasClass('active')){            	$(this).parent('h2').parent('div').parent('div').parent('div').animate( { height:"22px", marginTop: "0px" }, { queue:false, duration:600 } );         	   	$('#main-content .scroll-wrap').animate( { height:"280px" }, { queue:false, duration:600 } );               	$(this).removeClass('active');               	//$(this).attr('title','Посмотреть контакты');            } else {         	   	$(this).parent('h2').parent('div').parent('div').parent('div').animate( { height:"89px", marginTop: "-67px" }, { queue:false, duration:600 } );         	   //	$('#main-content .scroll-wrap').animate( { height:"213px" }, { queue:false, duration:600 } );              	$(this).addClass('active');                //$(this).attr('title','Скрыть блок контактов');            }            return false;      	}	 );     /* Меню */	 $('.menu li a').hover(		function(){			if (!$(this).parent("li").hasClass("active")){				$(this).children('span').fadeOut(400);				$(this).children('span.hover').fadeIn(400);			}		},		function(){			if (!$(this).parent("li").hasClass("active")){				$(this).children('span').fadeIn(400);	        	$(this).children('span.hover').fadeOut(400);	        }		}	 );		/* Ресайз превью при наведении в портфолио на главной */	$("#jscarousel li a").hover(function() {	$(this).css({'width' : '114px', 'padding' : '5px'}); /*Add a higher z-index value so this image stays on top*/	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/		.animate({			marginTop: '-5px', /* Set alignment back to default */			marginLeft: '-5px',			marginBottom: '-5px',			top: '0',			left: '0',			width: '120px' /* Set new width */		}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */	} , function() {	$(this).css({'width' : '114px', 'padding' : '5px'}); /* Set z-index back to 0 */	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/		.animate({			marginTop: '0', /* Set alignment back to default */			marginLeft: '0',			marginBottom: '0',			top: '0',			left: '0',			width: '110px' /* Set width back to default */		}, 400);	});	/*$("#jscarousel a").click(function(){ 		var largePath = $(this).attr("href");   		var largeTitle = $(this).attr("title");     		$(".large-thumbs ul li:eq(0) img").attr({ src: largePath, alt: largeTitle, title: largeTitle });     		$(".large-thumbs h1").html(largeTitle);       		return false;     	});*/	$('a.nyroModal').nyroModal({bgColor: '#e3edf6', padding: 0});	/* Скролл */	 $('#catalog .scroll-pane').jScrollPane({showArrows:true, scrollbarWidth:19, dragMaxHeight: 36});});