if(!sp){var sp={}}(function(){sp.Reg={};sp.Reg.initBackground=function(){$(window).resize(A);$(window).trigger("resize")};var A=function(){if($("#background img").height()==0||$("#background img").width()==0){setTimeout(function(){$(window).trigger("resize")},100);return}if($("#background").hasClass("horizontal")){if($("#background img").height()<$("#background").height()){$("#background").addClass("vertical").removeClass("horizontal");$("#background img").css("marginLeft",-1*parseInt($("#background img").width()/2))}else{$("#background").addClass("horizontal").removeClass("vertical");$("#background img").css("marginLeft",0)}}else{if($("#background img").width()<$("#background").width()){$("#background").addClass("horizontal").removeClass("vertical");$("#background img").css("marginLeft",0)}else{$("#background").addClass("vertical").removeClass("horizontal");$("#background img").css("marginLeft",-1*parseInt($("#background img").width()/2))}}}})();
