		
        jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
			return -c * ((t=t/d-1)*t*t*t - 1) + b;
		};

jQuery().ready(function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort1_big.jpg)"}    );
    
    jQuery("#tort1").click( function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort1_big.jpg)"}    );
	jQuery("img").css(  {borderWidth: "0px", borderColor: "red"}    );
	jQuery("#tort1").css(  {borderStyle: "solid", borderWidth: "1px", borderColor: "red"}    );
    jQuery("#tort_type").text("Торт1");
    jQuery("#tort_capt").text("«Свадебный1»");
    jQuery("#tort_descr").text("Состав1: бизе, сливки, бисквит, фрукты.");
    jQuery("#tort_price").text("Цена1: 1000 р.");
	});

    jQuery("#tort2").click( function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort2_big.jpg)"}    );
	jQuery("img").css(  {borderWidth: "0px", borderColor: "red"}    );
	jQuery("#tort2").css(  {borderStyle: "solid", borderWidth: "1px", borderColor: "red"}    );
    jQuery("#tort_type").text("Торт2");
    jQuery("#tort_capt").text("«Свадебный2»");
    jQuery("#tort_descr").text("Состав2: бизе, сливки, бисквит, фрукты.");
    jQuery("#tort_price").text("Цена2: 1000 р.");
	});

    jQuery("#tort3").click( function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort3_big.jpg)"}    );
	jQuery("img").css(  {borderWidth: "0px", borderColor: "red"}    );
	jQuery("#tort3").css(  {borderStyle: "solid", borderWidth: "1px", borderColor: "red"}    );
    jQuery("#tort_type").text("Торт3");
    jQuery("#tort_capt").text("«Свадебный3»");
    jQuery("#tort_descr").text("Состав3: бизе, сливки, бисквит, фрукты.");
    jQuery("#tort_price").text("Цена3: 1000 р.");
	});

    jQuery("#tort4").click( function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort4_big.jpg)"}    );
	jQuery("img").css(  {borderWidth: "0px", borderColor: "red"}    );
	jQuery("#tort4").css(  {borderStyle: "solid", borderWidth: "1px", borderColor: "red"}    );
    jQuery("#tort_type").text("Торт4");
    jQuery("#tort_capt").text("«Свадебный4»");
    jQuery("#tort_descr").text("Состав4: бизе, сливки, бисквит, фрукты.");
    jQuery("#tort_price").text("Цена4: 1000 р.");
	});

    jQuery("#tort5").click( function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort5_big.jpg)"}    );
	jQuery("img").css(  {borderWidth: "0px", borderColor: "red"}    );
	jQuery("#tort5").css(  {borderStyle: "solid", borderWidth: "1px", borderColor: "red"}    );
    jQuery("#tort_type").text("Торт5");
    jQuery("#tort_capt").text("«Свадебный5»");
    jQuery("#tort_descr").text("Состав5: бизе, сливки, бисквит, фрукты.");
    jQuery("#tort_price").text("Цена5: 1000 р.");
	});
    
    jQuery("#tort6").click( function(){
	jQuery("#main_picture").css(  {backgroundImage: "url(gallery/slider/tort6_big.jpg)"}    );
	jQuery("img").css(  {borderWidth: "0px", borderColor: "red"}    );
	jQuery("#tort6").css(  {borderStyle: "solid", borderWidth: "1px", borderColor: "red"}    );
    jQuery("#tort_type").text("Торт6");
    jQuery("#tort_capt").text("«Свадебный6»");
    jQuery("#tort_descr").text("Состав6: бизе, сливки, бисквит, фрукты.");
    jQuery("#tort_price").text("Цена6: 1000 р.");
	});
    
jQuery("#slideshow_gal").serialScroll({
items:"li",
prev:"#imgprev_gal",
next:"#imgnext_gal",
axis:"xy",
offset:0, //when scrolling to photo, stop 230 before reaching it (from the left)
start:0, //as we are centering it, start at the 2nd
duration:1200,
force:true,
stop:true,
lock:false,
cycle:true, //dont pull back once you reach the end
step:2,
easing:"easeOutQuart", //use this easing equation for a funny effect
jump: false //click on the images to scroll to them
});

});
