$(document).ready(function () {
	/*var boxStatus = 0;

	$("a.filterBoxLink").each(function () {
		var boxID = $(this).attr("rel");
		var offSet = $("#" + boxID).children("li:eq(5)").position().top;
		var offSet = offSet - 10;
		$("#" + boxID).css({'height' : offSet});
    });
	

    $("a.filterBoxLink").each(function () {
    	var boxID = $(this).attr("rel");
    	$(this).click(function () {
    		var countFilters = $("#" + boxID).children("li").length;

    		var offSetClose = $("#" + boxID).children("li:eq(5)").position().top;
    		var offSetClose = offSetClose - 10;
    		
    		var offSetOpen = $("#" + boxID).children("li:last").position().top;
    		var offSetOpen = offSetOpen + 27;
    		
    		if (boxStatus != 0) {
    			$("#" + boxID).animate({'height' : offSetClose });
    			boxStatus = 0;
    			$(this).children("span").html("Meer");
    		} else {
    			$("#" + boxID).animate({'height' : offSetOpen });
    			boxStatus = 1;
    			$(this).children("span").html("Minder");
    		}
    		
		});
    });*/
    
    $('#shopLeft').css({'paddingBottom' : '15px'});
    
    $('ul.filters').each(function(){
    	$(this).css({'height' : '20px', 'overflow' : 'hidden'});
    	$(this).attr({'rel' : 'closed'});
    	
    	$(this).addClass('catclosed');
    	
    	$(this).click(function(){
    		if($(this).attr('rel') == 'closed'){
    			var innerheight = $(this).children('span:first').height() + 30;
    			//alert(innerheight);
    			$(this).animate({'height' : innerheight + 'px'}, 'fast');
    			$(this).attr({'rel' : 'open'});
    			$(this).addClass('catopen');
    		} else {
    			$(this).animate({'height' : '20px'}, 'fast');
    			$(this).attr({'rel' : 'closed'});
    			$(this).removeClass('catopen');
    		}
    	});
    });
    
    
});
