$(window).load(function() {
	$("#background").fullBg();
});
$(document).ready(function() {
//	$('#mainContainer').css('height',getFullHeight() + 3);
 var docHeight = $(document).height();
 // setTimeout("$('#mainContainer').css('height',$(document).height())",00);
  //alert();
	$("#header ul.topMenu li:last, #leftMenu ul li:last").addClass('last');
	var liWidth = $('#featured').width()/5;
	var imgWidth = $('#featured').width()/5 -40;
	var wrapWidth = $('#featured').width()/5 -40;
	$("#featured li").css('width',liWidth);
	$("#featured li img").css('width',imgWidth);
	$('#featured li img').each(function(i) {
		 var imgHref = $(this).attr('dynsrc');
		 $(this).wrap("<a class='imgWrapper' href='"+imgHref+"'/>");
		 $("#featured li .imgWrapper").css('width',wrapWidth);
  });
  $('#featured li .imgWrapper').each(function(i) {
		 var imgAlt = $(this).find('img').attr('alt');
		$("<span class='title'>" + imgAlt +"</span>").appendTo(this);
  });
  $("#header ul.topMenu li").hover(
  function () {
    $(this).find('ul').css('display','block');
	 $(this).addClass('active');
  }, 
  function () {
   $(this).find('ul').css('display','none');
   $(this).removeClass('active');
  });
 
});
