$(window).load(function(){scrolling();});
$(window).resize(function(){scrolling();});

$(document).ready(function(){	
	jQuery.each($('#flashHead'),function(){this.flashInit();}); 	
	jQuery.each($('#countdown'),function(){this.flashInit();}); 	
	$(".slideshow").cjSimpleSlideShow();	
});
function scrolling(){

		var eHtml      = $('html');        		
        var eBody       = $('body');
		var eIdBody     = $('#body');
        var eFooter     = $('#footer');		
		var eHeader		= $('#header');		
		
		var contentHeight = $(eIdBody).outerHeight() + $(eFooter).height();	
		
		if($(window).height() > contentHeight)
		{		
			//$(eIdBody).css('padding-bottom','0px');
			var footerOffset = $(eIdBody).outerHeight();
			$(eFooter).css({top:footerOffset});		
		}	        
		else
		{
			//$(eIdBody).css('padding-bottom','20px');
			$(eFooter).css({top:''});
			$(eFooter).css({bottom:'0px'});	
		}

}