$(document).ready(function () {

    $(function () {
        $(".slider").carouFredSel({
            scroll: 4,
            circular: false,
            infinite: false,
            auto: false,
            prev: {
                button: "#foo2_prev",
                key: "left"
            },
            next: {
                button: "#foo2_next",
                key: "right"
            }
        });
    });

    // Using custom configuration
    $(".imageSlider").carouFredSel({
        circular: true,
        infinite: false,
        items: 1,
        direction: "left",
        scroll: {
            items: 1,
            effect: "easeOutBounce",
            duration: 'slow',
            pauseOnHover: true
        },
        pagination: "#pag",
        auto: {
            pauseDuration: 20000
        }
    });

    //Homepage carousel for best sellers
    $('.slider li').hover(function () {
        $(this).find('.quickTip').stop(true, false).animate({ bottom: '0' }, 'fast');
    }, function () {
        $(this).find('.quickTip').stop(true, false).animate({ bottom: '-54px' }, 'fast');
    });
    $('.menFall2011 img:last').addClass('hover');

    //Callout 1 transition animation
    $('.menFall2011').hover(
		function () {
		    //$(this).stop(true, false).animate({zIndex: '#323338'}, 300);
		    $(this).find('img:first').stop(true, false).animate({ opacity: 0 }, 'slow');
		},
		function () {
		    //$(this).stop(true, false).animate({backgroundColor: '#D55E8E'}, 300);
		    $(this).find('img:first').stop(true, false).animate({ opacity: 1 }, 'slow');
		}
	); //Callout 1 transition ends

    //Callout 1 transition animation
    $('.hatsOnSale').hover(
		function () {
		    $(this).stop(true, false).animate({ backgroundColor: '#323338' }, 300);
		    $(this).find('h2').stop(true, false).animate({ color: '#d55e8e' }, 300);
		},
		function () {
		    $(this).stop(true, false).animate({ backgroundColor: '#000000' }, 300);
		    $(this).find('h2').stop(true, false).animate({ color: '#d55e8e' }, 300);
		}
	); //Callout 1 transition ends


    //Callout 1 transition animation
    $('.thisWeekWrap img:last').addClass('hover');
    $('.thisWeekWrap').hover(
		function () {
		    //$(this).stop(true, false).animate({zIndex: '#323338'}, 300);
		    $(this).find('img:first').stop(true, false).animate({ opacity: 0 }, 'slow');
		},
		function () {
		    //$(this).stop(true, false).animate({backgroundColor: '#D55E8E'}, 300);
		    $(this).find('img:first').stop(true, false).animate({ opacity: 1 }, 'slow');
		}
	); //Callout 1 transition ends

    $('.slideShowHead').hover(function () {
        $(this).toggleClass('hover');
    });

    //MENS FALl INPISRATION transition animation
    $('.fallInspiration').hover(
		function () { $(this).stop(true, false).animate({ color: '#D55E8E' }, 300); },
		function () { $(this).stop(true, false).animate({ color: '#ffffff' }, 300); }
	); //MENS FALl INPISRATION transition transition ends

    //Sweaters this week interaction
    $('.thisWeekWrap').hover(
		function () {
		    $('.thisWeek').stop(true, true).fadeOut(600);
		    $('.thisWeekHover').stop(true, true).fadeIn(600);
		},
		function () {
		    $('.thisWeek').stop(true, true).fadeIn(600);
		    $('.thisWeekHover').stop(true, true).fadeOut(600);
		}
	);

    $('.lookBookWrap').hover(
		function () {
		    $('.lookBook').stop(true, true).fadeOut(600);
		    $('.lookBookHover').stop(true, true).fadeIn(600);
		},
		function () {
		    $('.lookBook').stop(true, true).fadeIn(600);
		    $('.lookBookHover').stop(true, true).fadeOut(600);
		}
	);

    //Callout 1 transition animation
    $('.carousel h2').hover(
		function () {
		    $(this).stop(true, false).animate({ backgroundColor: '#323338' }, 300);
		    $(this).find('a').stop(true, false).animate({ color: '#d55e8e' }, 300);
		},
		function () {
		    $(this).stop(true, false).animate({ backgroundColor: '#cc5b89' }, 300);
		    $(this).find('a').stop(true, false).animate({ color: '#fff' }, 300);
		}
	); //Callout 1 transition ends

}); //document ready function
