var $main=$cloud=mainwidth=mainheight=null,offset1=Math.round(1500*Math.random()),offset2=Math.round(1500*Math.random()),offset3=Math.round(1500*Math.random()),offsetbg=0;$(document).ready(function(){$.extend({box:{initCss:function(o,t){var i={"z-index":"6666",top:"50%",left:"50%",position:"fixed","margin-left":"-100px","margin-top":"-50px"},n=$.extend(i,o);$("#"+t).css(n),document.all&&($("#"+t).css("position","absolute"),location.href=location.href.search(/\?/)>0?location.href.substring(0,location.href.indexOf("#")):location.href+"#")},initBox:function(o,t){var i=$("#"+o),n=-i.width()/2+"px",e=-i.height()/2+"px";if(this.initCss({"margin-left":n,"margin-top":e},o),void 0!=t&&null==$("body").find("#WindowBg").html()){var a='
';$("body").append(a)}},close:function(o,t){$("#"+o).fadeOut(),void 0!=t&&$("#WindowBg").hide("450").remove()},open:function(o,t){this.initBox(o,t),$("#"+o).fadeIn(1500)}}}),$.box.open("login",void 0),$(".validateCode").click(),$("#login_form").Validform({tiptype:3}),$main=$("#mainBody"),$body=$("body"),$cloud1=$("#cloud1"),$cloud2=$("#cloud2"),mainwidth=$main.outerWidth(),mainheight=$main.outerHeight(),$(".loginbox").css({position:"absolute",left:(mainwidth-680)/2,top:(mainheight-600)/2}),setInterval(function(){offset1>=mainwidth&&(offset1=-Math.round(200*Math.random())),offset2>=mainheight&&(offset2=-Math.round(200*Math.random())),offset3<-200&&(offset3=Math.round(1500*Math.random())),offset1+=1.1,offset2+=1,offset3-=1,$cloud1.css("background-position",offset1+"px "+offset3+"px"),$cloud2.css("background-position",offset2+"px "+offset2+"px")},70)});