$(function () {
    // Expand Login Panel
    $("#open").click(function () {
        $("div#panel").slideDown("slow");
        return false;
    });

    // Collapse Login Panel
    $("#close").click(function () {
        $("div#panel").slideUp("slow");
    });

    // Switch buttons from "Log In | Register" to "Close Panel" on click
    $("#toggle a").click(function () {
        $("#toggle a").toggle();
        return false;
    });

    // IE7 z-index fix - NO ONE CAN HELP MICROSOFT
    if($.browser.msie && $.browser.version=="7.0") {
     $(function() {
        var zIndexNumber = 500;
        $('div').each(function() {
        $(this).css('zIndex', zIndexNumber);
        zIndexNumber -= 5;
        });
     }); 
    } 
    
    // Footer navigation customization
    $('.footer_nav ul li a:last').css('border-right','none');
    $('.footer_nav ul li a:first').css('padding-left','0');

    // Breadcrumb navigation customization
    $('.breadcrumbs li:last').css('background','none');
    $('.breadcrumbs li.pointer').css({'background':'none'}, {'padding-right':'0px;'});

    // Product table customization ( every forth td element in the row )
    $('.product_list tr td:nth-child(4)').css('border-right','none');
    $('.product_list tr td').has('span').next('td:nth-child(1)').css('border-top','none');
    $('td.paginate_data_wrap').css('border-right','none');
	$('.also_viewed_items tr td:nth-child(6)').css('background','none');
	$('tr.nb td').css('background','none');

    // Image hover effect for home page category boxes
    $( function() {  
        $( ".product_list tr td img, .home_page_boxes img, .post_entry img" ).mouseover( function() {  
            $( this ).stop( true, true ).animate({  
                opacity: 0.6  
            }, 100, "swing", function() {  
                $( this ).animate({  
                    opacity: 1  
                }, 200 );  
            });  
        });
    });
});

