// 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;
        });
		
		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();
		}
		
		$(".product_line_close").click(function() {$(".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));
		});
    });