// JavaScript Document


    $(document).ready(function() {
        $(".button:not(.dohref)").click(function() {
            $(".product_category_information").hide();//fadeOut("fast");
			$(".product_category").addClass("shrinking");
            showCollection($(this).parent());
			
            return false;
        });
		
		$(".product_line_close").click(function() {$(".product_category_collection").fadeOut("fast", showAll)});
		
		$(".product_category_expand").click(function() {
			$(".expanded").addClass("closed");
			$(".expanded .product_category_close").hide();
			$(".expanded").removeClass("expanded");
			$(".product_category_collection").hide();
			showCollection($(this));
		});
    });
    
    function handleShowCollectionClick(sender) {
		$(".product_category_information").hide();//fadeOut("fast");
		$(".product_category").addClass("shrinking");
        $(".product_category_image").fadeOut("fast", showCollection($(sender).parent()));
		
      	//$(".product_category_close").show();
		
		//$("inner_nav").slideUp(1000, $(".active_accordion").removeClass);
      
        return false;
    }
    
	function showCollection(elem) {
		$(".product_category").addClass("closed");
		$(".shrinking").removeClass("shrinking");
		$(elem).parent().addClass("expanded");
		$(".expanded").removeClass("closed");
		$(".product_category_collection").fadeIn();
		$(".product_category_expand").fadeIn();
		$(".product_line_close").show();
		$(".expanded .product_category_expand").hide();
		$(".expanded .product_category_close").show();
	}
	
	function showAll() {
		$(".expanded").removeClass("expanded");
		$(".closed").removeClass("closed");
		$(".product_category_close").hide();
		$(".product_category_expand").hide();
		$(".product_category_image").fadeIn();
		$(".product_category_information").fadeIn();
	}
