function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


$(function(){
// карусель
    jQuery('#mycarousel').jcarousel({
        scroll:1,
        auto: 4,
        animation: 'slow',
        wrap: 'circular',

       initCallback: mycarousel_initCallback
    });
	
    jQuery('#mycarousel_2').jcarousel({
        scroll:5,
        auto: 5,
        animation: 'slow',
        wrap: 'circular',

        initCallback: mycarousel_initCallback
    });
	
	
	
	
// все остальное
	$("a#single_image").fancybox();



	$('.header_menu .item').hover(
		function () {
			$(this).addClass("act");
  		}, 
  		function () {
		$(this).removeClass("act");
		}
	);

	$('.header_menu .cjs').hover(
		function () {
			$('.menu_2_wrap',this).show();
  		}, 
  		function () {
			$('.menu_2_wrap',this).hide();
		}
	);



	$('.left_images ul a:first').addClass('act');
	$('.left_images ul a').click(function() {
		$('.catalog_big_img img').attr('src','/th' + $(this).attr('href') + '-thumb(300,auto).jpg');
		$('#single_image').attr('href',$(this).attr('href'));
		$('.left_images ul a').removeClass("act");
		$(this).addClass("act");
		return false;
	});
	$('.icons img').removeAttr("alt");
	$('.icons img').removeAttr("title");
	$('.icons li').hover(function () {
		$("div",this).css('display','block');
	},
	function () {
		$("div",this).css('display','none');
	});
});
