(function($){$.fn.fullBg=function(){var bgImg=$(this);function resizeImg(){var ratio=bgImg.attr("data-height")/bgImg.attr("data-width");var browserwidth=$(window).width();var browserheight=$(window).height();if((browserheight/browserwidth)>ratio){bgImg.height(browserheight);bgImg.width(browserheight/ratio);}else{bgImg.width(browserwidth);bgImg.height(browserwidth*ratio);}
bgImg.css('left',(browserwidth-bgImg.width())/2);bgImg.css('top',(browserheight-bgImg.height())/2);bgImg.attr('left',(browserwidth-bgImg.width())/2);bgImg.attr('top',(browserheight-bgImg.height())/2);}
resizeImg();$(window).resize(function(){resizeImg();windowheight=$(document).height();windowwidth=$(document).width();heightadjusted=$("#content").height();widthadjusted=$("#content").width();if(heightadjusted>0&&heightadjusted>windowheight){$("#backgroundstarter").css("height",(heightadjusted+$("#header").height()+1)+"px");}
else
$("#backgroundstarter").css("height",(windowheight-$("#header").height()-1)+"px");if(widthadjusted>0&&widthadjusted>windowheight){$("#header").css("width","100%");$("#backgroundstarter").css("width",widthadjusted+"px");}
else{$("#header").css("width","100%");$("#backgroundstarter").css("width",windowwidth+"px");}});};})(jQuery)
