$(document).ready(function() {
	$('#footer p:last-child').addClass('copyright');
	
	$("#PlugSide div.plugin:has('object')").addClass('player_container');
	
	$('#main').addClass('clearfix');
	
	// adjust PlugBottom images margin when h3 has more than one line
	$('#PlugBottom .plugin .newsimage').each(
		function( intIndex ){
			var new_margin_top;
			new_margin_top=$(this).parent().prev('h3').height()+3;
			$(this).css("margin-top","-"+new_margin_top+"px");
			if($(this).parent().height()<=32){
				$(this).parent().css("margin-bottom",30+48-$(this).parent().height()+"px");
			}
			
		} 
	)
	// adjust PlugBottom images margin when h3 has more than one line
	
	// extend the page to full length
		var header_height=$('#header').height();
		var footer_height=$('#footer').height();
		var content_height=$('body').height()-header_height-footer_height-20; // 20=#main padding + #footer padding
		$('#main').css('min-height',content_height+'px');
	// extend the page to full length
	
	
	
});
