$(document).ready(function() {
	$('HTML').addClass('JS');  


	/*Sidebar stuff -start*/
	$(".sidebar ul div ul, .sidebar ul div form").hide();
	
	
	$(".sidebar ul div h3").click(function () {
		$(this).next().toggle();
	});
	
	$("#close-button").show();
	
	$("#close-button").click(function () {
		$(this).hide();
		$("#show-button").show();
		$(".sidebar").css("height","17px");
		$(".sidebar").css("opacity","0.3");
		$(".sidebar ul div h3:first").text("Vis");
	});
	
	$("#show-button").click(function () {
		$(this).hide();
		$("#close-button").show();
		$(".sidebar").css("height","auto");
		$(".sidebar").css("opacity","1");
		$(".sidebar ul div h3:first").text("Siste kommentarer");
	});
	
	$(".sidebar").hover(function(){
    	if($(this).css("height") == "17px"){
      		$(this).stop(true).animate({"opacity": 1});
    	}
  		},function(){
    	if($(this).css("height") == "17px"){
      		$(this).stop(true).animate({"opacity": 0.3});
    	}
  	});
	/*Sidebar stuff -end*/

	
	
/*
  $(function() {
     var date = new Date(); // Now
     var dow = date.getDay(); // Day of week
     if (dow != 5 || date.getHours() > 22) { // Not Friday before 23:00
         date.setDate(date.getDate() + (dow < 5 ? 5 : 12) - dow); // Move to next Friday
     }
     date.setHours(20); // Set time to 20:00
     date.setMinutes(0);
     date.setSeconds(0);
     date.setMilliseconds(0);
     $('#countdown').countdown({
       until: date, 
       format: 'DHMSms', 
       layout: '<div id="dagnr">{dn}</div> <div id="dagtekst">{dl},</div> <div id="timenr">{hn}</div> <div id="timetekst">{hl},</div> <div id="minuttnr">{mn}</div> <div id="minutttekst">{ml} og</div> <div id="sekundnr">{sn}</div> <div id="sekundtekst">{sl} te klubben starte!</div>', 
       expiryText: '<div id="dagnr">Nå e d klubb!</div>', 
       alwaysExpire: true
       }); // And use it
  });
*/

});
