//Call function when the dom is ready
$(function() {

$("#content").css({paddingTop:getcp(),paddingBottom:getcp()})

$("#channels a").fadeIn("slow");

$("#channels ul").hover(
     function () {
		//do nothing
      }, 
      function () {
		$(this).find('a').stop().fadeTo( "fast", 1);
	  }
    );

$("#channels a").hover(
     function () {
		$(this).addClass('active');
		$(this).stop().fadeTo( "fast", 1);
	
		$("#channels a:not(.active)").stop().fadeTo( "fast", 0.3);
      }, 
      function () {
		$(this).removeClass('active');
      }
    );

});

$(window).resize(function(){
	$("#content").stop().animate({paddingTop:getcp(),paddingBottom:getcp()},250)
});

function getcp(){ //get content padding
	var padding = ($("html").height() - 512) / 2;
	return padding;
}