// jQuery Classes
$(document).ready(function(){
	$(".gallery li").each(function(index){
		if(index%4==3) $(this).addClass("fix");
	});
	$(".userPhotos li").each(function(index){
		if(index%4==3) $(this).addClass("fix");
	});
	$("#disco ul li").each(function(index){
		if(index%3==2) $(this).addClass("fix");
		if(index%3==2) $(this).after("<li class='breaker cleaner'>&nbsp;</li>");
	});
	$("#videos li:last").addClass("fix");
	$("#photos .entry:nth-child(3n)").after("<br class='cleaner' />");
	$("#tour .noContent").css("margin-right", "45px");
	$("#blog li.noContent").css("margin-right", "45px");
	
	if ($.cookie('dashboard_open') == 1) {
		$('#dashboard').css('margin-top','0px');
	}
	
	$("#toggle").toggle(
		function(){
			$('#dashboard').animate({marginTop: '-42px'}, 300);
			$.cookie('dashboard_open', 0, { expires: 7, path: '/' });
		}, 
		function() {
			$('#dashboard').animate({marginTop: '0px'}, 300);
			$.cookie('dashboard_open', 1, { expires: 7, path: '/' });
		}
	);
});

