!function(e,t,a){e.popup={numbers:0,index:1e3,domname:["","alert","confirm","prompt","layer","iframe","loading","taps"]};var o=function(e){var a=this,o={addtarget:t("body"),type:1,cname:"",shade:{yes:1,bgcolor:"#000000",opacity:.5,animate:{type:1,target:.2},close:!1},area:{w:"auto",h:"auto"},offset:{fix:1,t:"auto",r:"auto",b:"auto",l:"auto"},zindex:{yes:0,val:1e3},animate:{type:1,target:1},autoclose:{yes:0,time:0},move:{yes:1,handle:".evpopuphead"},head:{yes:1,text:"ϵͳ��ʾ"},opbut:{yes:1,close:1,min:0,max:0},con:{text:[1,"��ʾ��ϣ"],img:[1,"wran"],src:"http://www.evyun.cn",html:"

����html����

"},but:{yes:0,button:{}},bfun:function(){}};switch(e.type){case 1:o.but.yes=1,o.but.button={but_1:{text:"ȷ��",fun:function(){}}};break;case 2:case 3:o.but.yes=1,o.but.button={but_1:{text:"ȷ��",fun:function(){}},but_2:{text:"ȡ��",fun:function(){}}};break;case 4:case 5:break;case 6:o.head.yes=0,o.opbut.yes=0,o.con.img[0]=1,o.con.img[1]="loading";break;case 7:o.head.yes=0,o.opbut.yes=0}a.j=t.extend(!0,{},o,e),popup.numbers++,a.numbers=popup.numbers,a.j.zindex.yes?a.index=a.j.zindex.val:a.index=math.max.apply(null,t.map(t("body > *"),function(e,a){var o=parseint(t(e).css("z-index"));return o>2e9&&(o=1e3),o||1e3})),a.createdom()};(o.pt=o.prototype).winattr=function(a){this.winw=t(e).width(),this.winh=t(e).height(),this.domw=t(document).width(),this.domh=t(document).height(),this.domst=t(document).scrolltop(),this.domsl=t(document).scrollleft(),this.popupw=a.width(),this.popuph=a.height()},o.pt.createdom=function(){var e=this,a=e.j,o=t('
'),i=t('
'),p=t(''),n=t(''),s=t(''),d=t('
'),u=t('

'+a.head.text+'

'),c=t('
'),r=t('
'),v=t('
');if(o.data("dataindex",e.numbers).addclass("evshade"+popup.domname[a.type]).css({"z-index":++e.index,"background-color":a.shade.bgcolor,opacity:a.shade.opacity}).attr("data-dataindex",e.numbers),i.data("dataindex",e.numbers).addclass("evpopup"+popup.domname[a.type]+" "+a.cname).css({"z-index":++e.index}).attr("data-dataindex",e.numbers),p.data("dataindex",e.numbers).on("click",function(){e.closeanimate(o,a.shade.animate),e.closeanimate(i,a.animate)}).appendto(i),n.data("dataindex",e.numbers).on("click",function(){e.popuphide(o),e.popuphide(i)}).appendto(i),s.data("dataindex",e.numbers).on("click",function(){e.popupshow(o),e.popupshow(i)}).appendto(i),popup.index+=2,a.opbut.yes){if(a.opbut.close)t('').attr({title:"�ر�"}).data("dataindex",e.numbers).on({mouseenter:function(){t(this).addclass("evopbutclosehover")},mouseleave:function(){t(this).removeclass("evopbutclosehover")},click:function(){p.trigger("click")}}).appendto(d);if(a.opbut.min)(h=t('')).attr({title:"��с��"}).data("dataindex",e.numbers).on({mouseenter:function(){t(this).addclass("evopbutminhover")},mouseleave:function(){t(this).removeclass("evopbutminhover")},click:function(){}}).appendto(d);if(a.opbut.max){var h=t(''),m=t('');h.attr({title:"���"}).data("dataindex",e.numbers).on({mouseenter:function(){t(this).addclass("evopbutmanhover")},mouseleave:function(){t(this).removeclass("evopbutmanhover")},click:function(){}}).appendto(d),m.attr({title:"��ԭ"}).data("dataindex",e.numbers).on({mouseenter:function(){t(this).addclass("evopbutmanminhover")},mouseleave:function(){t(this).removeclass("evopbutmanminhover")},click:function(){}}).appendto(d)}d.appendto(i)}switch(a.type){case 1:case 2:var l=1==a.con.text[0]?''+a.con.text[1]+"":"";x=1==a.con.img[0]?'':"";r.append(x,l);break;case 3:var f=t('
');1==a.con.text[0]&&f.find("input").attr("placeholder",a.con.text[1]),r.append(f);break;case 4:var y="object"==typeof a.con.html?a.con.html.html():a.con.html;r.append(y);break;case 5:t('').css({height:"auto"}).appendto(r);break;case 6:var b=t('
'),x=t('');r.append(b.append(x));break;case 7:var g=t('

'+a.con.text[1]+"

");r.append(g)}if(c.find(".evpopupbodycc").append(r),a.but.yes){if(1==a.type||2==a.type||3==a.type){var w=0,p=null,b=null,t=null;t.each(a.but.button,function(e,a){w++,p=a.cname||"",a.href&&1===a.href.yes?(b=a.href.url,t='target="'+(a.href.target||"_blank")+'"'):(b="javascript:;",t=""),t(''+a.text+"").data("data-name",e).appendto(v.children(".evpopupbut"))}),v.find(".popupbut").each(function(){t(this).width(100/w+"%")}),v.on({click:function(){var e=t(this).data("data-name");"function"==typeof a.but.button[e].fun&&a.but.button[e].fun(),p.trigger("click")}},".popupbut")}v.appendto(i)}a.shade.yes&&(o.appendto(a.addtarget),e.shadecountwh(o),e.openanimate(o,a.shade.animate),a.shade.close&&o.on("click",function(){e.closeanimate(o,a.shade.animate),e.closeanimate(i,a.animate)})),a.head.yes&&u.prependto(i),i.append(c).appendto(a.addtarget),e.popupcountwh(i),e.winattr(i),e.popupoffset(i),e.openanimate(i,a.animate),a.autoclose.yes&&settimeout(function(){p.trigger("click")},1e3*a.autoclose.time),a.move.yes&&e.popupmove(i)},o.pt.popupcountwh=function(e){var a=this,o=a.j,i=0,p=0,n=0,s=e.find(".evpopupbodycc");if(o.head.yes){var d=(i=e.find(".evpopuphead").height())-e.children("div.evpopupbody").children("div.evpopupbodyt").height();s.css({"padding-top":d+"px"}),n-=i}if(o.but.yes&&(p=e.find(".evpopupbutarea").height(),s.css({"padding-bottom":p+"px"}),n-=p),"auto"!=o.area.w&&e.css({width:o.area.w+"px"}),"auto"!=o.area.h?(e.css({height:o.area.h+"px"}),n=o.area.h-e.children("div.evpopupbody").children("div.evpopupbodyt").height()-e.children("div.evpopupbody").children(".evpopupbodyb").height()+n):n=e.height()-e.children("div.evpopupbody").children("div.evpopupbodyt").height()-e.children("div.evpopupbody").children(".evpopupbodyb").height()+n,s.css({height:n+"px"}),5==o.type)if("auto"==o.area.w&&"auto"==o.area.h){var u=t('
'),c=s.outerheight(),r=s.find("iframe");u.css({height:c+"px"}).appendto(s),r.load(function(){u.remove(),r[0].contentwindow.iframenumber=a.numbers;var t=r.contents().width(),o=r.contents().height();s.children("div.eviframecon").css({width:t+"px",height:o+"px"}),r.css({width:t+"px",height:o+"px"});var i=e.find(".evpopupbodyc").outerwidth();e.css({width:i+"px"}),a.winattr(e),a.popupoffset(e)})}else{var v=e.children(".evpopupbody").find("div.eviframecon").width(),h=e.children(".evpopupbody").find("div.eviframecon").height();u=t('
'),c=s.outerheight(),r=s.find("iframe");u.css({height:c+"px",width:"100%"}).appendto(s),r.css({width:v+"px",height:h+"px",top:"10px"}),r.load(function(){r[0].contentwindow.iframenumber=a.numbers,u.remove()})}else if(t.browser.msie&&(7==t.browser.version||6==t.browser.version)){var m=e.find(".evpopupbodyc").outerwidth();e.css({width:m+10+"px"})}if(6==o.type&&"auto"==o.area.w&&"auto"==o.area.h){var l=s.find("img");l.load(function(){var t=l.width(),o=l.width();s.children("div.evloadingcon").css({width:t+"px",height:o+"px"}),a.winattr(e),a.popupoffset(e)})}},o.pt.shadecountwh=function(e){var t=this;t.j.offset.fix?e.css({position:"fixed",left:"0px",top:"0px",width:t.winw+"px",height:t.winh+"px"}):e.css({position:"absolute",left:"0px",top:"0px",width:t.winw+"px",height:t.domh+"px"})},o.pt.popupoffset=function(e){var t=this,a=t.j,o=0,i=0;a.offset.fix?(e.css({position:"fixed"}),o="auto"==a.offset.t?(t.winh-t.popuph)/2:a.offset.t):o="auto"==a.offset.t?t.domst+(t.winh-t.popuph)/2:t.domst+a.offset.t,i="auto"!=a.offset.l?a.offset.l:(t.winw-t.popupw)/2,o<0&&(o=0),e.css({left:i+"px",top:o+"px"})},o.pt.openanimate=function(e,t){switch(t.type){case 0:break;case 1:e.css({opacity:0}),e.animate({opacity:t.target},300);break;case 2:var a=e.height();e.css({"margin-top":-a+"px",opacity:0}),e.animate({margintop:0,opacity:1},300);break;case 3:var o=e.width();e.css({"margin-left":o+"px",opacity:0}),e.animate({marginleft:0,opacity:1},300);break;case 4:a=e.height();e.css({"margin-top":a+"px",opacity:0}),e.animate({margintop:0,opacity:1},300);break;case 5:o=e.width();e.css({"margin-left":-o+"px",opacity:0}),e.animate({marginleft:0,opacity:1},300)}},o.pt.closeanimate=function(e,t){switch(t.type){case 0:e.remove();break;case 1:e.animate({opacity:0},300,function(){e.remove()});break;case 2:var a=e.height();e.animate({margintop:-a,opacity:0},300,function(){e.remove()});break;case 3:var o=e.width();e.animate({marginleft:o,opacity:0},300,function(){e.remove()});break;case 4:a=e.height();e.animate({margintop:a,opacity:0},300,function(){e.remove()});break;case 5:o=e.width();e.animate({marginleft:-o,opacity:0},300,function(){e.remove()})}},o.pt.popupmove=function(a){var o=this,i=o.j;a.find(i.move.handle).on({mousedown:function(p){o.winattr(a);p=p||e.event;var n=a.width(),s=a.height(),d=a.offset().left,u=a.offset().top,c=1*a.css("z-index")+1,r=p.pagex,v=p.pagey,h=r-d,m=v-u,l=0,f=0,y=0,b=0,x=0,g=t('
');return g.css({width:n+"px",height:s+"px",left:d+"px",top:u+"px","z-index":c}).children("div").css({height:s-2+"px"}),t(document).on({mousemove:function(a){a=a||e.event;return(x=math.abs(a.pagex-r))>1&&(1!=g.data("data-have")&&(g.appendto(i.addtarget),g.data("data-have",1)),t(document).find("body").css({cursor:"move"}),y=l=a.pagex-h,b=f=a.pagey-m,l<0?(l=0,y=0):l>o.winw-n&&(l=o.winw-n,y=o.winw-n),i.offset.fix?(b=a.pagey-m-o.domst,fo.domst+o.winh-s&&(f=o.domst+o.winh-s,b=f-o.domst)):f<0?(f=0,b=0):f>o.domh-s&&(f=o.domh-s,b=o.domh-s),g.css({left:l+"px",top:f+"px"})),!1},mouseup:function(){x>1&&(g.remove(),t(this).off("mousemove mouseup"),a.css({left:y+"px",top:b+"px"}),t(document).find("body").css({cursor:"default"})),t(this).off("mousemove mouseup")}}),!1}})},o.pt.popuphide=function(e){e.css({display:"none"})},o.pt.popupshow=function(e){e.css({display:"block"})},t.popup=function(e){return new o(e).numbers},t.popupclose=function(e){e*=1,t("body").children("div.evpopup").each(function(a,o){1*(o=t(o)).data("dataindex")===e&&o.children("small.rmovepopup").trigger("click")})},t.popuphide=function(e){t("body").children("div.evpopup").each(function(a,o){1*(o=t(o)).data("dataindex")===e&&o.children("small.hidepopup").trigger("click")})},t.popupshow=function(e){t("body").children("div.evpopup").each(function(a,o){1*(o=t(o)).data("dataindex")===e&&o.children("small.showpopup").trigger("click")})}}(window,jquery);