// JavaScript Document


    $(document).ready(function() {
        $(".button:not(.dohref)").click(function() {
            $(".product_category_information").hide();//fadeOut("fast");
			$(".product_category").addClass("shrinking");
            $(".product_category_image").fadeOut("fast", showCollection($(this).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");
			$(".expanded .product_category_collection").fadeIn();
			$(".product_category_expand").fadeIn();
			$(".expanded .product_category_expand").hide();
			$(".expanded .product_category_close").show();
		}
		
		$(".product_category_close").click(function() {$(".expanded .product_category_collection").fadeOut("fast", showAll)});
		
		function showAll() {
			$(".expanded").removeClass("expanded");
			$(".closed").removeClass("closed");
			$(".product_category_close").hide();
			$(".product_category_expand").hide();
			$(".product_category_image").fadeIn();
			$(".product_category_information").fadeIn();
		}
		
		$(".product_category_expand").click(function() {
			$(".expanded").addClass("closed");
			$(".expanded .product_category_close").hide();
			$(".expanded").removeClass("expanded");
			$(".product_category_collection").hide();
			showCollection($(this));
		});
    });