﻿// Replace thumbnails in product list with larger images, giving the appearance that the
// thumbnail grows when the mouse hovers above it.
function pageLoad() {
    $("a.pl_link").hover(function() {
        $(this).find('img.pl_hover')
			.css({ 'z-index': '10' })
			.stop()
			.show()
			.animate({
			    marginTop: '-28px',
			    marginLeft: '-18px',
			    width: '80px',
			    height: '80px'
			}, 200)
			.parent().find('img.pl_nohover').hide();
    }, function() {
        $(this).find('img.pl_hover')
				.stop()
				.animate({
				    marginTop: '0',
				    marginLeft: '0',
				    width: '32px',
				    height: '32px'
				}, 200, "", function() {
				    $("a.pl_link img.pl_nohover").show();
				    $("a.pl_link img.pl_hover").hide();
				})
				.css({ 'z-index': '0' });
    });

    //-- ProductFilter advanced search slide toggle
    var $div = $('#AdvancedProductFilterLayer');
    $('.close').unbind();
    $('.close').click(function() {
        $div.hide();

        //change close links css-class
        //        $('#supersearch').addClass('open-search');
        //        $('#supersearch').removeClass('close-search');
    });

    $('.open-search').unbind();
    $('.open-search').click(function() {

        if ($div.is(':visible')) {
            $div.hide();

            //change supersearch link css-class
            //            $('#supersearch').addClass('open-search');
            //            $('#supersearch').removeClass('close-search');

        } else {

            $div.show();
            //change supersearch link css-class
            //            $('#supersearch').addClass('close-search');
        }
    });
    //-- ProductFilter advanced search slide toggle
}