function swipehandle(q,f){var g=function(){};var z=function(h){settimeout(h||g,0)};var g={addeventlistener:!!window.addeventlistener,touch:("ontouchstart" in window)||window.documenttouch&&document instanceof documenttouch,transitions:(function(h){var j=["transitionproperty","webkittransition","moztransition","otransition","mstransition"];for(var i in j){if(h.style[j[i]]!==undefined){return true}}return false})(document.createelement("swipe"))};if(!q){return}var c=q.children[0];var w,d,v,h;f=f||{};var o=parseint(f.startslide,10)||0;var a=f.speed||300;f.continuous=f.continuous!==undefined?f.continuous:true;function r(){w=c.children;h=w.length;if(w.length<2){f.continuous=false}if(g.transitions&&f.continuous&&w.length<3){c.appendchild(w[0].clonenode(true));c.appendchild(c.children[1].clonenode(true));w=c.children}d=new array(w.length);v=q.getboundingclientrect().width||q.offsetwidth||320;if(w.length!==0){c.style.width=(w.length*v)+"px"}var k=w.length;while(k--){var i=w[k];i.style.width=v+"px";i.setattribute("data-index",k);if(g.transitions){i.style.left=(k*-v)+"px";u(k,o>k?-v:(oo?l:o)-j-1),v*k,0)}l=k(l);u(o,v*k,i||a);u(l,0,i||a);if(f.continuous){u(k(l-k),-(v*k),0)}}else{l=k(l);l(o*-v,l*-v,i||a)}o=l;z(f.callback&&f.callback(o,w[o]))}function u(h,j,i){p(h,j,i);d[h]=j}function p(i,l,k){var h=w[i];var j=h&&h.style;if(!j){return}j.webkittransitionduration=j.moztransitionduration=j.mstransitionduration=j.otransitionduration=j.transitionduration=k+"ms";j.webkittransform="translate("+l+"px,0)translatez(0)";j.mstransform=j.moztransform=j.otransform="translatex("+l+"px)"}function l(l,k,h){if(!h){c.style.left=k+"px";return}var j=+new date;var i=setinterval(function(){var m=+new date-j;if(m>h){c.style.left=k+"px";if(f){c()}f.transitionend&&f.transitionend.call(event,o,w[o]);clearinterval(i);return}c.style.left=(((k-l)*(math.floor((m/h)*100)/100))+l)+"px"},4)}var f=f.auto||0;var b;function c(){b=settimeout(t,f)}function x(){f=0;cleartimeout(b)}var i={};var d={};var e;var b={handleevent:function(h){switch(h.type){case"touchstart":this.start(h);break;case"touchmove":this.move(h);break;case"touchend":z(this.end(h));break;case"webkittransitionend":case"mstransitionend":case"otransitionend":case"otransitionend":case"transitionend":z(this.transitionend(h));break;case"resize":z(r.call());break}if(f.stoppropagation){h.stoppropagation()}},start:function(h){var i=h.touches[0];i={x:i.pagex,y:i.pagey,time:+new date};e=undefined;d={};c.addeventlistener("touchmove",this,false);c.addeventlistener("touchend",this,false)},move:function(h){if(h.touches.length>1||h.scale&&h.scale!==1){return}if(f.disablescroll){h.preventdefault()}var i=h.touches[0];d={x:i.pagex-i.x,y:i.pagey-i.y};if(typeof e=="undefined"){e=!!(e||math.abs(d.x)0||o==w.length-1&&d.x<0)?(math.abs(d.x)/v+1):1);p(o-1,d.x+d[o-1],0);p(o,d.x+d[o],0);p(o+1,d.x+d[o+1],0)}}},end:function(j){var l=+new date-i.time;var i=number(l)<250&&math.abs(d.x)>20||math.abs(d.x)>v/2;var h=!o&&d.x>0||o==w.length-1&&d.x<0;if(f.continuous){h=false}var k=d.x<0;if(!e){if(i&&!h){if(k){if(f.continuous){u(k(o-1),-v,0);u(k(o+2),v,0)}else{u(o-1,-v,0)}u(o,d[o]-v,a);u(k(o+1),d[k(o+1)]-v,a);o=k(o+1)}else{if(f.continuous){u(k(o+1),v,0);u(k(o-2),-v,0)}else{u(o+1,v,0)}u(o,d[o]+v,a);u(k(o-1),d[k(o-1)]+v,a);o=k(o-1)}f.callback&&f.callback(o,w[o])}else{if(f.continuous){u(k(o-1),-v,a);u(o,0,a);u(k(o+1),v,a)}else{u(o-1,-v,a);u(o,0,a);u(o+1,v,a)}}}c.removeeventlistener("touchmove",b,false);c.removeeventlistener("touchend",b,false)},transitionend:function(h){if(parseint(h.target.getattribute("data-index"),10)==o){if(f){c()}f.transitionend&&f.transitionend.call(h,o,w[o])}}};r();if(f){c()}if(g.addeventlistener){if(g.touch){c.addeventlistener("touchstart",b,false)}if(g.transitions){c.addeventlistener("webkittransitionend",b,false);c.addeventlistener("mstransitionend",b,false);c.addeventlistener("otransitionend",b,false);c.addeventlistener("otransitionend",b,false);c.addeventlistener("transitionend",b,false)}}else{}return{setup:function(){r()},slide:function(i,h){x();a(i,h)},prev:function(){x();s()},next:function(){x();t()},getpos:function(){return o},getnumslides:function(){return h},kill:function(){x();c.style.width="auto";c.style.left=0;var i=w.length;while(i--){var h=w[i];h.style.width="100%";h.style.left=0;if(g.transitions){p(i,0,0)}}if(g.addeventlistener){c.removeeventlistener("touchstart",b,false);c.removeeventlistener("webkittransitionend",b,false);c.removeeventlistener("mstransitionend",b,false);c.removeeventlistener("otransitionend",b,false);c.removeeventlistener("otransitionend",b,false);c.removeeventlistener("transitionend",b,false);window.removeeventlistener("resize",b,false)}else{window.onresize=null}}}}(function(a){a.fn.swipehandle=function(b,c){return new swipehandle(b,c)}})(jm);(function(f){function p(v,a){var z=(v&65535)+(a&65535),w=(v>>16)+(a>>16)+(z>>16);return(w<<16)|(z&65535)}function t(v,w){return(v<>>(32-w))}function c(b,y,w,v,a,z){return p(t(p(p(y,b),p(v,z)),a),w)}function b(y,w,c,b,v,a,z){return c((w&c)|((~w)&b),y,w,v,a,z)}function h(y,w,c,b,v,a,z){return c((w&b)|(c&(~b)),y,w,v,a,z)}function o(y,w,c,b,v,a,z){return c(w^c^b,y,w,v,a,z)}function a(y,w,c,b,v,a,z){return c(c^(w|(~b)),y,w,v,a,z)}function d(g,b){g[b>>5]|=128<<((b)%32);g[(((b+64)>>>9)<<4)+14]=b;var y,a,z,w,v,f=1732584193,e=-271733879,d=-1732584194,c=271733878;for(y=0;y>5]>>>(x%32))&255)}return v}function i(w){var x,v=[];v[(w.length>>2)-1]=undefined;for(x=0;x>5]|=(w.charcodeat(x/8)&255)<<(x%32)}return v}function k(v){return q(d(i(v),v.length*8))}function e(x,a){var w,z=i(x),v=[],y=[],b;v[15]=y[15]=undefined;if(z.length>16){z=d(z,x.length*8)}for(w=0;w<16;w+=1){v[w]=z[w]^909522486;y[w]=z[w]^1549556828}b=d(v.concat(i(a)),512+a.length*8);return q(d(y.concat(b),512+128))}function u(y){var a="0123456789abcdef",w="",v,z;for(z=0;z>>4)&15)+a.charat(v&15)}return w}function m(v){return unescape(encodeuricomponent(v))}function r(v){return k(m(v))}function l(v){return u(r(v))}function g(v,w){return e(m(v),m(w))}function s(v,w){return u(g(v,w))}f.md5=function(w,x,v){if(!x){if(!v){return l(w)}else{return r(w)}}if(!v){return s(x,w)}else{return g(x,w)}}})(jm);(function(f){var a=[];var b=function(k){if(!k.jqmcss3animateid){k.jqmcss3animateid=f.uuid()}return k.jqmcss3animateid};var d=function(k){if(typeof k=="string"||k instanceof string){return document.getelementbyid(k)}else{if(f.is$(k)){return k[0]}else{return k}}};var i=function(o,k){var l,p,m=d(o);p=b(m);if(a[p]){a[p].animate(k);l=a[p]}else{l=g(m,k);a[p]=l}return l};f.fn.css3animate=function(m){if(!m.complete&&m.callback){m.complete=m.callback}var l=i(this[0],m);m.complete=null;m.sucess=null;m.failure=null;for(var k=1;k0){m.complete=function(o){if(!o){l.run()}}}g(document.getelementbyid(m.id),m)},shift:function(){return this.elements.shift()}}}})(jm);(function(b){b.fn.drawer=function(e){var d;for(var c=0;c17){if(i>0){m.y=this.maxtop}}else{if(math.floor(this.maxtop/l)>2){m.y=0}}}else{var i=-this.hdistancemoved;var h=math.ceil(math.abs(i)/math.abs(this.maxleft)*100);var g=numonly(b.getcssmatrix(this.el).e);if(h>17){if(i>0){m.x=this.maxleft}else{m.x=0}}else{if(math.floor(this.maxleft/g)>2){m.y=0}else{m.x=this.maxleft}}}if(m.y>0||m.x>0){this.el.zindex="9999"}else{this.el.zindex=this.zindex}this.drawermove(this.currentdrawer,m,300,"ease-out");this.currentdrawer=null}this.vdistancemoved=0;f=false},drawermove:function(g,k,i,h){if(!i){i=0}if(!h){h="linear"}g.style[b.feat.cssprefix+"transform"]="translate"+d+k.x+"px,"+k.y+"px"+c;g.style[b.feat.cssprefix+"transitionduration"]=i+"ms";g.style[b.feat.cssprefix+"backfacevisibility"]="hidden";g.style[b.feat.cssprefix+"transformstyle"]="preserve-3d";g.style[b.feat.cssprefix+"transitiontimingfunction"]=h}};return e})()})(jm);(function(d){var b=[];var c=function(f){if(!f.jqmcarouselid){f.jqmcarouselid=d.uuid()}return f.jqmcarouselid};d.fn.carousel=function(h){var g,k;for(var f=0;f0){var k=p.splice(0,1);k=s.find(k);if(k.get()==l){continue}t.append(k.get())}if(this.horizontal){l.style.display="block";l.style["float"]="left"}else{l.style.display="block"}this.el=l;this.refreshitems();var m=jm(l);m.bind("touchmove",function(u){r.touchmove(u)});m.bind("touchend",function(u){r.touchend(u)});m.bind("touchstart",function(u){r.touchstart(u)});this.orientationhandler=function(){r.onmoveindex(r.carouselindex,0)};window.addeventlistener("orientationchange",this.orientationhandler,false)};h.prototype={startx:0,starty:0,dx:0,dy:0,glue:false,mydivwidth:0,mydivheight:0,cssmovestart:0,childrencount:0,carouselindex:0,vertical:false,horizontal:true,el:null,movingelement:false,container:null,lockmove:false,oktomove:false,photoalljson:[],photolistdetailshowdom:null,moduleid:null,switchjump:null,touchstart:function(m){this.oktomove=false;this.mydivwidth=numonly(this.container.clientwidth);this.mydivheight=numonly(this.container.clientheight);this.lockmove=false;if(m.touches[0].target&&m.touches[0].target.type!==undefined){var l=m.touches[0].target.tagname.tolowercase();if(l==="select"||l==="input"||l==="button"){return}}if(m.touches.length===1){this.movingelement=true;this.starty=m.touches[0].pagey;this.startx=m.touches[0].pagex;var i=d.getcssmatrix(this.el);if(this.vertical){try{this.cssmovestart=numonly(i.f)}catch(k){this.cssmovestart=0}}else{try{this.cssmovestart=numonly(i.e)}catch(k){this.cssmovestart=0}}}},touchmove:function(l){if(!this.movingelement){return}if(l.touches.length>1){return this.touchend(l)}var m={x:l.touches[0].pagex-this.startx,y:l.touches[0].pagey-this.starty};if(this.vertical){var k={x:0,y:0};this.dy=l.touches[0].pagey-this.starty;this.dy+=this.cssmovestart;k.y=this.dy;l.preventdefault()}else{if((!this.lockmove&&a(m.x,m.y))||math.abs(this.dx)>5){var k={x:0,y:0};this.dx=l.touches[0].pagex-this.startx;this.dx+=this.cssmovestart;l.preventdefault();k.x=this.dx}else{return this.lockmove=true}}var i=this.vertical?((this.dy%this.mydivheight)/this.mydivheight*100)*-1:((this.dx%this.mydivwidth)/this.mydivwidth*100)*-1;if(!this.oktomove){oldstateoktomove=this.oktomove;this.oktomove=this.glue?math.abs(i)>this.glue&&math.abs(i)<(100-this.glue):true;if(this.oktomove&&!oldstateoktomove){d.trigger(this,"movestart",[this.el])}}if(this.oktomove&&k){this.movecss3(this.el,k)}},touchend:function(r){if(!this.movingelement){return}d.trigger(this,"movestop",[this.el]);var s=false;try{var o=d.getcssmatrix(this.el);var k=this.vertical?numonly(o.f):numonly(o.e);if(1==2&&k>0){this.movecss3(this.el,{x:0,y:0},"300")}else{var i=this.vertical?((this.dy%this.mydivheight)/this.mydivheight*100)*-1:((this.dx%this.mydivwidth)/this.mydivwidth*100)*-1;var l=this.carouselindex;if(k3){l++}else{if((k>this.cssmovestart&&i<97)){l--}}var p=l;if(l>(this.childrencount-1)){l=0;p=this.childrencount}if(l<0){l=this.childrencount-1;p=-1}var m={x:0,y:0};if(this.vertical){m.y=(p*this.mydivheight*-1)}else{m.x=(p*this.mydivwidth*-1)}this.movecss3(this.el,m,"150");if(this.carouselindex!=l){s=true}this.carouselindex=l;var q=this;window.settimeout(function(){q.onmoveindex(l,"1ms",q.photoalljson[l])},155)}}catch(r){console.log(r)}this.dx=0;this.movingelement=false;this.startx=0;this.dy=0;this.starty=0},onmoveindex:function(k,m,r){this.mydivwidth=numonly(this.container.clientwidth);this.mydivheight=numonly(this.container.clientheight);var p=this.mydivheight/this.mydivwidth;if(r){var i=r.width,y=r.height,x=y/i,q=this.container.queryselectorall("img")[k],w='
';if(this.mydivwidth>i&&this.mydivheight>y){var t=this.mydivwidth/i>this.mydivheight/y?this.mydivheight/y:this.mydivwidth/i;q.style.width=i*t+"px";q.style.height=y*t+"px"}if(!q.src){jm(q.parentnode).append(w);q.src=r.picpath}jm(q).load(function(){jm(document.getelementbyid("photolistdetailloadingdom")).remove()});this.photodetailajax(this.photoalljson[k]);this.photolistdetailshowdom.queryselector(".webphotolistdetail").classname="webphotolistdetail"}var u=false;var v=math.abs(k-this.carouselindex);var l=k;if(l<0){l=0}if(l>this.childrencount-1){l=this.childrencount-1}var s={x:0,y:0};if(this.vertical){s.y=(l*this.mydivheight*-1)}else{s.x=(l*this.mydivwidth*-1)}var o=m?m:50+parseint((v*20));this.movecss3(this.el,s,o);if(this.carouselindex!=l){u=true}this.carouselindex=l},photodetailajax:function(k){if(!this.photolistdetailshowdom&&!this.moduleid){return}var i=this.photolistdetailshowdom.queryselector(".drawer_handle"),l=i.parentnode.queryselector(".handleicon");descriptiondom=document.getelementbyid("descriptiondom"+this.moduleid);if(k.detail===undefined){jm.ajax({url:"ajax/photo_h.jsp",data:"cmd=getinfo&id="+jm.encodeurl(k.id)+"&groupid="+jm.encodeurl(k.groupid),error:function(){},success:function(m){m=m.trim();i.innerhtml="";descriptiondom.innerhtml="";i.innerhtml=jm.encodehtml(k.name);descriptiondom.innerhtml=jm.encodehtml(k.basic)+(k.basic&&m?"

":"")+m;k.detail=m;if(descriptiondom.innerhtml){descriptiondom.parentnode.style.bottom=i.offsetheight*2-descriptiondom.parentnode.offsetheight+"px";l.classname="handleicon handleup"}else{descriptiondom.parentnode.style.bottom=i.offsetheight-descriptiondom.parentnode.offsetheight+"px";l.classname="handleicon"}}})}else{i.innerhtml="";descriptiondom.innerhtml="";i.innerhtml=jm.encodehtml(k.name);descriptiondom.innerhtml=jm.encodehtml(k.basic)+(k.basic&&k.detail?"

":"")+k.detail;if(descriptiondom.innerhtml){descriptiondom.parentnode.style.bottom=i.offsetheight*2-descriptiondom.parentnode.offsetheight+"px";l.classname="handleicon handleup"}else{descriptiondom.parentnode.style.bottom=i.offsetheight-descriptiondom.parentnode.offsetheight+"px";l.classname="handleicon"}}},movecss3:function(i,m,l,k){if(!l){l=0}else{l=parseint(l)}if(!k){k="linear"}i.style[d.feat.cssprefix+"transform"]="translate"+g+m.x+"px,"+m.y+"px"+f;i.style[d.feat.cssprefix+"transitionduration"]=l+"ms";i.style[d.feat.cssprefix+"backfacevisibility"]="hidden";i.style[d.feat.cssprefix+"transformstyle"]="preserve-3d";i.style[d.feat.cssprefix+"transitiontimingfunction"]=k},additem:function(i){if(i&&i.nodetype){this.container.childnodes[1].appendchild(i);this.refreshitems()}},refreshitems:function(){var u=0;var s=this;var l=this.el;d(this.container).find(".prevphoto").remove();d(this.container).find(".nextphoto").remove();n=l.childnodes[0];var p;var o="100%";var k=[];for(;n;n=n.nextsibling){if(n.nodetype===1){k.push(n);u++}}var t=document.createelement("div");t.classname="prevphoto";d(this.container).prepend(t);var r=document.createelement("div");r.classname="nextphoto";d(this.container).append(r);var m=(100/u)+"%";this.childrencount=u;p=parsefloat(100/u)+"%";for(var q=0;q(s.childrencount-1)){w=0;i=s.childrencount}if(w<0){w=s.childrencount-1;i=-1}var x={x:0,y:0};x.x=(i*s.mydivwidth*-1);s.movecss3(s.el,x,"150");if(s.carouselindex!=w){runfinal=true}s.carouselindex=w;window.settimeout(function(){s.onmoveindex(w,"1ms",s.photoalljson[w])},155)}t.onclick=function(){v(this)};r.onclick=function(){v(this)};this.movecss3(l,{x:0,y:0});l.style.width=math.ceil((this.childrencount)*100)+"%";l.style.height="100%";l.style["min-height"]="100%";this.onmoveindex(this.carouselindex)}};return h})();function a(h,f){var m=h;var l=f;var k=math.round(math.sqrt(math.pow(m,2)+math.pow(l,2)));var g=math.atan2(l,m);var i=math.round(g*180/math.pi);if(i<0){i=360-math.abs(i)}if(((i<=215)&&(i>=155))||((i<=45)&&(i>=0))||((i<=360)&&(i>=315))){return true}else{return false}}})(jm);(function(e){e.fn.calendar=function(k){return new a(this,k)};var f=["01","02","03","04","05","06","07","08","09","10","11","12"],b=["日","一","二","三","四","五","六"],i=/^(\+|\-)?(\d+)(m|y)$/i,d=function(k,l){return 32-new date(k,l,32).getdate()},g=function(k,l){return new date(k,l,1).getday()},c=function(m,k){var l=""+m;while(l.length")}k.appendto(this._options.container||(k.parent().length?"":document.body))},_eventhandler:function(r){var k=this._options,u=(this._container||this.$el).get(0),m=this,p,s,v,o,l,t,q;switch(r.type){case"swipeleft":case"swiperight":return this.switchmonthto((r.type=="swiperight"?"-":"+")+"1m");case"change":l=e(".ui-calendar-header .ui-calendar-year, .ui-calendar-header .ui-calendar-month",this._container);return this.switchmonthto(h(l.eq(1)),h(l.eq(0)));case"touchstart":k._privatedate.startx=r.pagex;if(e(r.target).closest(".ui-calendar-calendar-wrap").length>0){r.preventdefault();return false}case"touchend":k._privatedate.endx=r.pagex;t=k._privatedate.startx+k.distance<=k._privatedate.endx;q=k._privatedate.endx+k.distance<=k._privatedate.startx;if(t&&!k._privatedate.moving){k._privatedate.slideanimate=true;k._privatedate.animatedirtion="left";m.switchmonthto("-1m");r.preventdefault();return false}else{if(q&&!k._privatedate.moving){k._privatedate.slideanimate=true;k._privatedate.animatedirtion="right";m.switchmonthto("+1m");r.preventdefault();return false}}default:s=r.target;if((p=e(s).closest(".ui-calendar-calendar tbody a",u))&&p.length){r.preventdefault();v=p.parent();this._option("selecteddate",o=new date(v.attr("data-year"),v.attr("data-month"),p.text()));jm(this._container).trigger("select",o,e.calendar.formatdate(o),this);this.refresh();this._options._selectdate=this._options._selectedyear+"-"+(this._options._selectedmonth+1)+"-"+this._options._selectedday;typeof this._options.onselectdate=="function"&&this._options.onselectdate(this._options._selectdate,this);if(!this._options.showhour){this._hidedate(this._container,this);this._input.val(this._options._selectdate)}typeof this._options.onafterselectdate=="function"&&this._options.onafterselectdate(this._options._selectdate,this)}else{if((p=e(s).closest(".ui-calendar-prev, .ui-calendar-next",u))&&p.length){r.preventdefault();this.switchmonthto((p.is(".ui-calendar-prev")?"-":"+")+"1m")}else{if(((p=e(s).closest(".ui-calendar-return",u))||(p=e(s).closest(".ui-calendar-cancel",u)))&&p.length){r.preventdefault();this._hidedate(this._container,this)}}}}},_bindtimepickerevent:function(){var p=this,o=0,r=["height","margin","padding","bordertopwidth","borderbottomwidth"],l,q,s,t;var k=(function(){var v=document.createelement("_");if(!("pointerevents" in v.style)){return false}v.style.pointerevents="auto";v.style.pointerevents="x";document.body.appendchild(v);var u=getcomputedstyle(v).pointerevents==="auto";document.body.removechild(v);return u})();t=p._timepicker={};p._timepicker.container=e("#fk-timepickerpanel");p._timepicker.items=t.container.find("li").not(".fk-timeban");p._timepicker.timemarkel=e(".mobicalendarplugins .j_timemark");if(!k){p._timepicker.container.find(".j_timemaskwrap").css("z-index","0");p._timepicker.container.find(".j_timemark").addclass("f-highlight")}q=p._timepicker.items.eq(0);for(var m=0;m0?s.split(" "):["0px","0px"];o+=parsefloat(s[0].replace("px",""));if(s.length==3){o+=parsefloat(s[2].replace("px",""))}else{if(s.length==2){o+=parsefloat(s[0].replace("px",""))}}}else{s=typeof s=="string"&&s.length>0?parsefloat(s.replace("px","")):0;o+=s}}p._timepicker.itemheight=t.items[0].offsetheight+!!t.items.eq(0);l=new iscroll("fk-timepickerpanel",{vscrollbar:true,onscrollstart:function(){p._timepicker.container.removeclass("j_endtimeflag")},onscrollend:function(){if(p._timepicker.container.hasclass("j_endtimeflag")){return}var u=p._timepicker,a=u.items.eq(0),x=math.abs(a.offset().top)+parsefloat(a.height()/2),y=[],z=u.timemarkel.offset().top+t.timemarkel.height()/2,c=u.container.find("li").not(".fk-timeban"),b,w;for(var v=0;vr?o:q&&qk?o:s&&s0){y.remove();k.removeclass("fk-calendarwrapanimate");o._animaterunctrl(k,"transform","none");l._privatedate.moving=false;k=null;y=null}});settimeout(function(){o._animaterunctrl(k,"transform","translatex("+x+q+"px)")},20);l._privatedate.slideanimate=false;l._privatedate.moving=true}else{p.empty().append(this._generatehtml());p.appendto(e("#webfooterbox"))}p.find(".j_cancelbtn ").on("click",function(a){var b=l.onbeforecancel,z=o;typeof b=="function"&&b(z);a.preventdefault();z._hidedate(p,z);o=null});e(".ui-calendar-header select",p).on("change",s);l._invalid=false;l.showhour&&this._bindtimepickerevent();if(typeof w=="function"){w(this)}return this},_animaterunctrl:function(o,k,m){var p=["","-webkit-","-moz-","-ms-"],l=p.length;while(l){l--;o.css(p[l]+k,m)}},destroy:function(){var l=this._container||this.$el,m=this._input,k=this._eventhandler;this.deltargetoption(m.attr("id"));e(".ui-calendar-header select",l).off("change",k);l.remove();return this.$super("destroy")},_generatehtml:function(){var k=this._options,r=k._drawyear,v=k._drawmonth,q=new date(),z=new date(q.getfullyear(),q.getmonth(),q.getdate()),t=this.mindate(),o=this.maxdate(),x=this.selecteddate(),w="",u,s,m,a,y,l,b,p;m=(isnan(m=parseint(k.firstday,10))?0:m);w+=this._rendernavheader(k);w+=this._renderhead(k,r,v,t,o)+'
';for(u=0;u<7;u++){a=(u+m)%7;w+="=5?' class="ui-calendar-week-end"':"")+">"+b[a]+""}w+="";l=d(r,v);y=(g(r,v)-m+7)%7;b=math.ceil((y+l)/7);p=new date(r,v,1-y);for(u=0;u";for(s=0;s<7;s++){w+=this._renderday(s,p,m,v,x,z,t,o);p.setdate(p.getdate()+1)}w+=""}w+="
";w+=this._renderbottom();w+=this._rendertime();return w},_rendernavheader:function(k){return k.drawnavheaderhtml&&k.drawnavheaderhtml.length>0?k.drawnavheaderhtml:""},_renderbottom:function(){return'
'},_renderhead:function(q,m,r,o,k){var s='
',l=new date(m,r,-1),u=new date(m,r+1,1),w=(!!o&&typeof o.getfullyear=="function")?o.getfullyear():null,t=(!!o&&typeof o.getmonth=="function")?o.getmonth():null,v=p+58,v=v<=2028?v:2028,p;s+='
';if(q.yearchangeable){s+='"}else{s+=''+m+"年"}if(q.monthchangeable){s+='"}else{s+=''+f[r]+""}s+='
';return s},_renderday:function(r,o,l,s,t,u,q,k){var m=(o.getmonth()!==s),v=this._options.beforeshowday,p;p=((typeof v=="function"&&!v(o,this)))||m||(q&&ok);return""+(m?" ":(p?""+o.getdate()+"":""+o.getdate()+""))+""},_rendertime:function(){var o="",m=this._options,k=false,p=m.beforeshowtime;if(!m.showhour){o+="
";o+="
"+ls.cancel+"
";o+="
";return o}o+="
";o+="
";o+="
";o+="
";o+="
";o+="
";o+="
";o+="
    ";o+="
  •  
  • ";o+="
  •  
  • ";for(var l=0;l<=23;l++){k=typeof p=="function"&&!p(l,this);o+="
  • "+(l<10?("0"+l):l)+":00
  • "}o+="
  •  
  • ";o+="
  •  
  • ";o+="
";o+="
";o+="
";o+="
";o+="
取消
";o+="
确定
";o+="
";return o}};e.each(["maxdate","mindate","date","selecteddate"],function(l,k){a.prototype[k]=function(m){return this._option(k,m)}});e.calendar={parsedate:function(l){var k=/^(\d{4})(?:\-|\/)(\d{1,2})(?:\-|\/)(\d{1,2})$/;return object.prototype.tostring.call(l)==="[object date]"?l:k.test(l)?new date(parseint(regexp.$1,10),parseint(regexp.$2,10)-1,parseint(regexp.$3,10)):null},formatdate:function(k){return k.getfullyear()+"-"+c(k.getmonth()+1,2)+"-"+c(k.getdate(),2)}}})(jm); /*! * iscroll lite base on iscroll v4.1.6 ~ copyright (c) 2011 matteo spinelli, http://cubiq.org * released under mit license, http://cubiq.org/license */ (function(){var s=math,d=function(m){return m>>0},w=(/webkit/i).test(navigator.appversion)?"webkit":(/firefox/i).test(navigator.useragent)?"moz":"opera" in window?"o":"",x=(/android/gi).test(navigator.appversion),i=(/iphone|ipad/gi).test(navigator.appversion),c=(/playbook/gi).test(navigator.appversion),p=(/hp-tablet/gi).test(navigator.appversion),l="webkitcssmatrix" in window&&"m11" in new webkitcssmatrix(),v="ontouchstart" in window&&!p,f=w+"transform" in document.documentelement.style,g=i||c,q=(function(){return window.requestanimationframe||window.webkitrequestanimationframe||window.mozrequestanimationframe||window.orequestanimationframe||window.msrequestanimationframe||function(m){return settimeout(m,17)}})(),o=(function(){return window.cancelrequestanimationframe||window.webkitcancelanimationframe||window.webkitcancelrequestanimationframe||window.mozcancelrequestanimationframe||window.ocancelrequestanimationframe||window.mscancelrequestanimationframe||cleartimeout})(),h="onorientationchange" in window?"orientationchange":"resize",b=v?"touchstart":"mousedown",r=v?"touchmove":"mousemove",e=v?"touchend":"mouseup",u=v?"touchcancel":"mouseup",a="translate"+(l?"3d(":"("),k=l?",0)":")",t=function(z,m){var a=this,b=document,y;a.wrapper=typeof z=="object"?z:b.getelementbyid(z);a.wrapper.style.overflow="hidden";a.scroller=a.wrapper.children[0];a.options={hscroll:true,vscroll:true,x:0,y:0,bounce:true,bouncelock:false,momentum:true,lockdirection:true,usetransform:true,usetransition:false,remarkxcoordinate:false,remarknavleftright:null,onrefresh:null,onbeforescrollstart:function(c){c.preventdefault()},onscrollstart:null,onbeforescrollmove:null,onscrollmove:null,onbeforescrollend:null,onscrollend:null,ontouchend:null,ondestroy:null};for(y in m){a.options[y]=m[y]}a.x=a.options.x;a.y=a.options.y;a.options.usetransform=f?a.options.usetransform:false;a.options.hscrollbar=a.options.hscroll&&a.options.hscrollbar;a.options.vscrollbar=a.options.vscroll&&a.options.vscrollbar;a.options.usetransition=g&&a.options.usetransition;a.scroller.style[w+"transitionproperty"]=a.options.usetransform?"-"+w.tolowercase()+"-transform":"top left";a.scroller.style[w+"transitionduration"]="0ms";a.scroller.style[w+"transformorigin"]="0 0";if(a.options.usetransition){a.scroller.style[w+"transitiontimingfunction"]="cubic-bezier(0.33,0.66,0.66,1)"}if(a.options.usetransform){a.scroller.style[w+"transform"]=a+a.x+"px,"+a.y+"px"+k}else{a.scroller.style.csstext+=";position:absolute;top:"+a.y+"px;left:"+a.x+"px"}a.refresh();a._bind(h,window);a._bind(b);if(!v){a._bind("mouseout",a.wrapper)}};t.prototype={enabled:true,x:0,y:0,steps:[],scale:1,handleevent:function(y){var m=this;switch(y.type){case b:if(!v&&y.button!==0){return}m._start(y);break;case r:m._move(y);break;case e:case u:m._end(y);break;case h:m._resize();break;case"mouseout":m._mouseout(y);break;case"webkittransitionend":m._transitionend(y);break}},_resize:function(){this.refresh()},_pos:function(m,z){m=this.hscroll?m:0;z=this.vscroll?z:0;if(this.options.usetransform){this.scroller.style[w+"transform"]=a+m+"px,"+z+"px"+k+" scale("+this.scale+")"}else{m=d(m);z=d(z);this.scroller.style.left=m+"px";this.scroller.style.top=z+"px"}this.x=m;this.y=z;if(this.options.remarkxcoordinate){jm.setcookie("startx",this.x);if(object.prototype.tostring.call(this.options.remarknavleftright)==="[object function]"){this.options.remarknavleftright(this.x,this)}}},_start:function(c){var b=this,z=v?c.touches[0]:c,a,m,d;if(!b.enabled){return}if(b.options.onbeforescrollstart){b.options.onbeforescrollstart.call(b,c)}if(b.options.usetransition){b._transitiontime(0)}b.moved=false;b.animating=false;b.zoomed=false;b.distx=0;b.disty=0;b.absdistx=0;b.absdisty=0;b.dirx=0;b.diry=0;if(b.options.momentum){if(b.options.usetransform){a=getcomputedstyle(b.scroller,null)[w+"transform"].replace(/[^0-9-.,]/g,"").split(",");m=a[4]*1;d=a[5]*1}else{m=getcomputedstyle(b.scroller,null).left.replace(/[^0-9-]/g,"")*1;d=getcomputedstyle(b.scroller,null).top.replace(/[^0-9-]/g,"")*1}if(m!=b.x||d!=b.y){if(b.options.usetransition){b._unbind("webkittransitionend")}else{o(b.anitime)}b.steps=[];b._pos(m,d)}}b.startx=b.x;b.starty=b.y;b.pointx=z.pagex;b.pointy=z.pagey;b.starttime=c.timestamp||date.now();if(b.options.onscrollstart){b.options.onscrollstart.call(b,c)}b._bind(r);b._bind(e);b._bind(u)},_move:function(d){var a=this,y=v?d.touches[0]:d,z=y.pagex-a.pointx,m=y.pagey-a.pointy,e=a.x+z,c=a.y+m,b=d.timestamp||date.now();if(a.options.onbeforescrollmove){a.options.onbeforescrollmove.call(a,d)}a.pointx=y.pagex;a.pointy=y.pagey;if(e>0||e=0||a.maxscrollx>=0?0:a.maxscrollx}if(c>0||c=0||a.maxscrolly>=0?0:a.maxscrolly}a.distx+=z;a.disty+=m;a.absdistx=s.abs(a.distx);a.absdisty=s.abs(a.disty);if(a.absdistx<6&&a.absdisty<6){return}if(a.options.lockdirection){if(a.absdistx>a.absdisty+5){c=a.y;m=0}else{if(a.absdisty>a.absdistx+5){e=a.x;z=0}}}a.moved=true;a._pos(e,c);a.dirx=z>0?-1:z<0?1:0;a.diry=m>0?-1:m<0?1:0;if(b-a.starttime>300){a.starttime=b;a.startx=a.x;a.starty=a.y}if(a.options.onscrollmove){a.options.onscrollmove.call(a,d)}},_end:function(d){if(v&&d.touches.length!=0){return}var b=this,h=v?d.changedtouches[0]:d,e,g,z={dist:0,time:0},m={dist:0,time:0},a=(d.timestamp||date.now())-b.starttime,f=b.x,c=b.y,y;b._unbind(r);b._unbind(e);b._unbind(u);if(b.options.onbeforescrollend){b.options.onbeforescrollend.call(b,d)}if(!b.moved){if(v){e=h.target;while(e.nodetype!=1){e=e.parentnode}if(e.tagname!="select"&&e.tagname!="input"&&e.tagname!="textarea"){g=document.createevent("mouseevents");g.initmouseevent("click",true,true,d.view,1,h.screenx,h.screeny,h.clientx,h.clienty,d.ctrlkey,d.altkey,d.shiftkey,d.metakey,0,null);g._fake=true;e.dispatchevent(g)}}b._resetpos(200);if(b.options.ontouchend){b.options.ontouchend.call(b,d)}return}if(a<300&&b.options.momentum){z=f?b._momentum(f-b.startx,a,-b.x,b.scrollerw-b.wrapperw+b.x,b.options.bounce?b.wrapperw:0):z;m=c?b._momentum(c-b.starty,a,-b.y,(b.maxscrolly<0?b.scrollerh-b.wrapperh+b.y:0),b.options.bounce?b.wrapperh:0):m;f=b.x+z.dist;c=b.y+m.dist;if((b.x>0&&f>0)||(b.x0&&c>0)||(b.y=0?0:m.x=0||m.maxscrolly>0?0:m.y=b+c.time){d._pos(c.x,c.y);d.animating=false;if(d.options.onanimationend){d.options.onanimationend.call(d)}d._startani();return}e=(e-b)/c.time-1;a=s.sqrt(1-e*e);g=(c.x-y)*a+y;f=(c.y-m)*a+m;d._pos(g,f);if(d.animating){d.anitime=q(z)}};z()},_transitiontime:function(m){this.scroller.style[w+"transitionduration"]=m+"ms"},_momentum:function(e,y,c,m,g){var d=0.0006,z=s.abs(e)/y,a=(z*z)/(2*d),f=0,b=0;if(e>0&&a>c){b=g/(6/(a/z*d));c=c+b;z=z*c/a;a=c}else{if(e<0&&a>m){b=g/(6/(a/z*d));m=m+b;z=z*m/a;a=m}}a=a*(e<0?-1:1);f=z/d;return{dist:a,time:d(f)}},_offset:function(m){var z=-m.offsetleft,y=-m.offsettop;while(m=m.offsetparent){z-=m.offsetleft;y-=m.offsettop}return{left:z,top:y}},_bind:function(z,y,m){(y||this.scroller).addeventlistener(z,this,!!m)},_unbind:function(z,y,m){(y||this.scroller).removeeventlistener(z,this,!!m)},destroy:function(){var m=this;m.scroller.style[w+"transform"]="";m._unbind(h,window);m._unbind(b);m._unbind(r);m._unbind(e);m._unbind(u);m._unbind("mouseout",m.wrapper);if(m.options.usetransition){m._unbind("webkittransitionend")}if(m.options.ondestroy){m.options.ondestroy.call(m)}},refresh:function(){var m=this,y;m.wrapperw=m.wrapper.clientwidth;m.wrapperh=m.wrapper.clientheight;m.scrollerw=m.scroller.offsetwidth;m.scrollerh=m.scroller.offsetheight;m.maxscrollx=m.wrapperw-m.scrollerw;m.maxscrolly=m.wrapperh-m.scrollerh;m.dirx=0;m.diry=0;m.hscroll=m.options.hscroll&&m.maxscrollx<0;m.vscroll=m.options.vscroll&&(!m.options.bouncelock&&!m.hscroll||m.scrollerh>m.wrapperh);y=m._offset(m.wrapper);m.wrapperoffsetleft=-y.left;m.wrapperoffsettop=-y.top;m.scroller.style[w+"transitionduration"]="0";m._resetpos(200)},scrollto:function(m,f,e,d){var c=this,b=m,a,z;c.stop();if(!b.length){b=[{x:m,y:f,time:e,relative:d}]}for(a=0,z=b.length;a0?0:a.left0?0:a.topb.dom.windowheight())}};b.browser._detect()}(window,window.code.util));(function(a,b){b.extend(b,{events:{add:function(e,d,c){this._checkhandlersproperty(e);if(d==="mousewheel"){d=this._normalisemousewheeltype()}if(typeof e.__eventhandlers[d]==="undefined"){e.__eventhandlers[d]=[]}e.__eventhandlers[d].push(c);if(this._isbrowserobject(e)){e.addeventlistener(d,c,false)}},remove:function(h,g,f){this._checkhandlersproperty(h);if(g==="mousewheel"){g=this._normalisemousewheeltype()}if(h.__eventhandlers[g] instanceof array){var e,d,c=h.__eventhandlers[g];if(b.isnothing(f)){if(this._isbrowserobject(h)){for(e=0,d=c.length;e=1){c.removechild(c.childnodes[c.childnodes.length-1])}}},hasattribute:function(d,c){return !b.isnothing(d.getattribute(c))},getattribute:function(f,e,d){var c=f.getattribute(e);if(b.isnothing(c)&&!b.isnothing(d)){c=d}return c},setattribute:function(f,d,g){if(b.islikearray(f)){var e,c;for(e=0,c=f.length;e=1){b.dom.setstyle(e,"opacity",0)}if(b.browser.iscsstransformsupported){this._applytransition(e,"opacity",d,g,h,f)}else{if(!b.isnothing(a.jquery)){a.jquery(e).fadeto(g,d,h)}}},fadeto:function(d,c,f,g,e){this.fadein(d,f,g,e,c)},fadeout:function(c,e,f,d){if(e<=0){b.dom.setstyle(c,"opacity",0);if(!b.isnothing(f)){f(c);return}}if(b.browser.iscsstransformsupported){this._applytransition(c,"opacity",0,e,f,d)}else{a.jquery(c).fadeto(e,0,f)}},slideby:function(e,c,i,g,h,f){var d={};c=b.coalesce(c,0);i=b.coalesce(i,0);f=b.coalesce(f,"ease-out");d[this._transitionprefix+"property"]="all";d[this._transitionprefix+"delay"]="0";if(g===0){d[this._transitionprefix+"duration"]="";d[this._transitionprefix+"timingfunction"]=""}else{d[this._transitionprefix+"duration"]=g+"ms";d[this._transitionprefix+"timingfunction"]=b.coalesce(f,"ease-out");b.events.add(e,this._transitionendlabel,this._gettransitionendhandler())}d[this._transformlabel]=(b.browser.is3dsupported)?"translate3d("+c+"px, "+i+"px, 0px)":"translate("+c+"px, "+i+"px)";if(!b.isnothing(h)){e.cclallcallback=h}b.dom.setstyle(e,d);if(g===0){a.settimeout(function(){this._leavetransforms(e)}.bind(this),this._applytransitiondelay)}},resettranslate:function(e){var f=e.nodename||"",d=(f.tolowercase()==="img")?true:false,c={};if(!d){c[this._transformlabel]=c[this._transformlabel]=(b.browser.is3dsupported)?"translate3d(0px, 0px, 0px)":"translate(0px, 0px)";b.dom.setstyle(e,c)}},_applytransition:function(d,g,h,f,i,e){var c={};e=b.coalesce(e,"ease-in");c[this._transitionprefix+"property"]=g;c[this._transitionprefix+"duration"]=f+"ms";c[this._transitionprefix+"timingfunction"]=e;c[this._transitionprefix+"delay"]="0";b.events.add(d,this._transitionendlabel,this._gettransitionendhandler());b.dom.setstyle(d,c);if(!b.isnothing(i)){d["ccl"+g+"callback"]=i}a.settimeout(function(){b.dom.setstyle(d,g,h)},this._applytransitiondelay)},_ontransitionend:function(c){b.events.remove(c.currenttarget,this._transitionendlabel,this._gettransitionendhandler());this._leavetransforms(c.currenttarget)},_leavetransforms:function(f){var m=f.style[this._transitionprefix+"property"],l=(m!=="")?"ccl"+m+"callback":"cclallcallback",p,g=b.coalesce(f.style.webkittransform,f.style.moztransform,f.style.transform),i,o,k=a.parseint(b.dom.getstyle(f,"left"),0),h=a.parseint(b.dom.getstyle(f,"top"),0),e,d,c={};if(g!==""){if(b.browser.is3dsupported){i=g.match(/translate3d\((.*?)\)/)}else{i=g.match(/translate\((.*?)\)/)}if(!b.isnothing(i)){o=i[1].split(", ");e=a.parseint(o[0],0);d=a.parseint(o[1],0)}}c[this._transitionprefix+"property"]="";c[this._transitionprefix+"duration"]="";c[this._transitionprefix+"timingfunction"]="";c[this._transitionprefix+"delay"]="";b.dom.setstyle(f,c);a.settimeout(function(){if(!b.isnothing(o)){c={};c[this._transformlabel]="";c.left=(k+e)+"px";c.top=(h+d)+"px";b.dom.setstyle(f,c)}if(!b.isnothing(f[l])){p=f[l];delete f[l];p(f)}}.bind(this),this._applytransitiondelay)}}})}(window,window.code.util));(function(b,a,c){c.registernamespace("code.util.touchelement");c.touchelement.eventtypes={ontouch:"codeutiltouchelementontouch"};c.touchelement.actiontypes={touchstart:"touchstart",touchmove:"touchmove",touchend:"touchend",touchmoveend:"touchmoveend",tap:"tap",doubletap:"doubletap",swipeleft:"swipeleft",swiperight:"swiperight",swipeup:"swipeup",swipedown:"swipedown",gesturestart:"gesturestart",gesturechange:"gesturechange",gestureend:"gestureend"}}(window,window.klass,window.code.util));(function(b,a,c){c.registernamespace("code.util.touchelement");c.touchelement.touchelementclass=a({el:null,capturesettings:null,touchstartpoint:null,touchendpoint:null,touchstarttime:null,doubletaptimeout:null,touchstarthandler:null,touchmovehandler:null,touchendhandler:null,mousedownhandler:null,mousemovehandler:null,mouseuphandler:null,mouseouthandler:null,gesturestarthandler:null,gesturechangehandler:null,gestureendhandler:null,swipethreshold:null,swipetimethreshold:null,doubletapspeed:null,dispose:function(){var d;this.removeeventhandlers();for(d in this){if(c.objecthasproperty(this,d)){this[d]=null}}},initialize:function(d,e){this.el=d;this.capturesettings={swipe:false,move:false,gesture:false,doubletap:false,preventdefaulttouchevents:true};c.extend(this.capturesettings,e);this.swipethreshold=50;this.swipetimethreshold=250;this.doubletapspeed=250;this.touchstartpoint={x:0,y:0};this.touchendpoint={x:0,y:0};this.longtouchtimer},addeventhandlers:function(){if(c.isnothing(this.touchstarthandler)){this.touchstarthandler=this.ontouchstart.bind(this);this.touchmovehandler=this.ontouchmove.bind(this);this.touchendhandler=this.ontouchend.bind(this);this.mousedownhandler=this.onmousedown.bind(this);this.mousemovehandler=this.onmousemove.bind(this);this.mouseuphandler=this.onmouseup.bind(this);this.mouseouthandler=this.onmouseout.bind(this);this.gesturestarthandler=this.ongesturestart.bind(this);this.gesturechangehandler=this.ongesturechange.bind(this);this.gestureendhandler=this.ongestureend.bind(this)}c.events.add(this.el,"touchstart",this.touchstarthandler);if(this.capturesettings.move){c.events.add(this.el,"touchmove",this.touchmovehandler)}c.events.add(this.el,"touchend",this.touchendhandler);c.events.add(this.el,"mousedown",this.mousedownhandler);if(c.browser.isgesturesupported&&this.capturesettings.gesture){c.events.add(this.el,"gesturestart",this.gesturestarthandler);c.events.add(this.el,"gesturechange",this.gesturechangehandler);c.events.add(this.el,"gestureend",this.gestureendhandler)}},removeeventhandlers:function(){c.events.remove(this.el,"touchstart",this.touchstarthandler);if(this.capturesettings.move){c.events.remove(this.el,"touchmove",this.touchmovehandler)}c.events.remove(this.el,"touchend",this.touchendhandler);c.events.remove(this.el,"mousedown",this.mousedownhandler);if(c.browser.isgesturesupported&&this.capturesettings.gesture){c.events.remove(this.el,"gesturestart",this.gesturestarthandler);c.events.remove(this.el,"gesturechange",this.gesturechangehandler);c.events.remove(this.el,"gestureend",this.gestureendhandler)}},gettouchpoint:function(d){return{x:d[0].pagex,y:d[0].pagey}},firetouchevent:function(l){var k,f=0,d=0,m=0,h,g,i;f=this.touchendpoint.x-this.touchstartpoint.x;d=this.touchendpoint.y-this.touchstartpoint.y;m=math.sqrt((f*f)+(d*d));if(this.capturesettings.swipe){g=new date();i=g-this.touchstarttime;if(i<=this.swipetimethreshold){if(b.math.abs(f)>=this.swipethreshold){c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,point:this.touchendpoint,action:(f<0)?c.touchelement.actiontypes.swipeleft:c.touchelement.actiontypes.swiperight,targetel:l.target,currenttargetel:l.currenttarget});return}if(b.math.abs(d)>=this.swipethreshold){c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,point:this.touchendpoint,action:(d<0)?c.touchelement.actiontypes.swipeup:c.touchelement.actiontypes.swipedown,targetel:l.target,currenttargetel:l.currenttarget});return}}}if(m>1){c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchmoveend,point:this.touchendpoint,targetel:l.target,currenttargetel:l.currenttarget});return}if(!this.capturesettings.doubletap){c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,point:this.touchendpoint,action:c.touchelement.actiontypes.tap,targetel:l.target,currenttargetel:l.currenttarget});return}if(c.isnothing(this.doubletaptimeout)){this.doubletaptimeout=b.settimeout(function(){this.doubletaptimeout=null;c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,point:this.touchendpoint,action:c.touchelement.actiontypes.tap,targetel:l.target,currenttargetel:l.currenttarget})}.bind(this),this.doubletapspeed);return}else{b.cleartimeout(this.doubletaptimeout);this.doubletaptimeout=null;c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,point:this.touchendpoint,action:c.touchelement.actiontypes.doubletap,targetel:l.target,currenttargetel:l.currenttarget})}},ontouchstart:function(g){if(this.capturesettings.preventdefaulttouchevents){g.preventdefault()}c.events.remove(this.el,"mousedown",this.mousedownhandler);var d=c.events.gettouchevent(g),f=d.touches;if(f.length>1&&this.capturesettings.gesture){this.isgesture=true;return}this.touchstarttime=new date();this.isgesture=false;this.touchstartpoint=this.gettouchpoint(f);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchstart,point:this.touchstartpoint,targetel:g.target,currenttargetel:g.currenttarget})},ontouchmove:function(g){if(this.capturesettings.preventdefaulttouchevents){g.preventdefault()}if(this.isgesture&&this.capturesettings.gesture){return}var d=c.events.gettouchevent(g),f=d.touches;c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchmove,point:this.gettouchpoint(f),targetel:g.target,currenttargetel:g.currenttarget})},ontouchend:function(g){if(this.isgesture&&this.capturesettings.gesture){return}if(this.capturesettings.preventdefaulttouchevents){g.preventdefault()}var d=c.events.gettouchevent(g),f=(!c.isnothing(d.changedtouches))?d.changedtouches:d.touches;this.touchendpoint=this.gettouchpoint(f);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchend,point:this.touchendpoint,targetel:g.target,currenttargetel:g.currenttarget});this.firetouchevent(g)},onmousedown:function(d){d.preventdefault();c.events.remove(this.el,"touchstart",this.mousedownhandler);c.events.remove(this.el,"touchmove",this.touchmovehandler);c.events.remove(this.el,"touchend",this.touchendhandler);if(this.capturesettings.move){c.events.add(this.el,"mousemove",this.mousemovehandler)}c.events.add(this.el,"mouseup",this.mouseuphandler);c.events.add(this.el,"mouseout",this.mouseouthandler);this.touchstarttime=new date();this.isgesture=false;this.touchstartpoint=c.events.getmouseposition(d);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchstart,point:this.touchstartpoint,targetel:d.target,currenttargetel:d.currenttarget})},onmousemove:function(d){d.preventdefault();c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchmove,point:c.events.getmouseposition(d),targetel:d.target,currenttargetel:d.currenttarget})},onmouseup:function(d){d.preventdefault();if(this.capturesettings.move){c.events.remove(this.el,"mousemove",this.mousemovehandler)}c.events.remove(this.el,"mouseup",this.mouseuphandler);c.events.remove(this.el,"mouseout",this.mouseouthandler);this.touchendpoint=c.events.getmouseposition(d);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchend,point:this.touchendpoint,targetel:d.target,currenttargetel:d.currenttarget});this.firetouchevent(d)},onmouseout:function(f){var d=f.relatedtarget;if(this.el===d||c.dom.ischildof(d,this.el)){return}f.preventdefault();if(this.capturesettings.move){c.events.remove(this.el,"mousemove",this.mousemovehandler)}c.events.remove(this.el,"mouseup",this.mouseuphandler);c.events.remove(this.el,"mouseout",this.mouseouthandler);this.touchendpoint=c.events.getmouseposition(f);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.touchend,point:this.touchendpoint,targetel:f.target,currenttargetel:f.currenttarget});this.firetouchevent(f)},ongesturestart:function(f){f.preventdefault();var d=c.events.gettouchevent(f);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.gesturestart,scale:d.scale,rotation:d.rotation,targetel:f.target,currenttargetel:f.currenttarget})},ongesturechange:function(f){f.preventdefault();var d=c.events.gettouchevent(f);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.gesturechange,scale:d.scale,rotation:d.rotation,targetel:f.target,currenttargetel:f.currenttarget})},ongestureend:function(f){f.preventdefault();var d=c.events.gettouchevent(f);c.events.fire(this,{type:c.touchelement.eventtypes.ontouch,target:this,action:c.touchelement.actiontypes.gestureend,scale:d.scale,rotation:d.rotation,targetel:f.target,currenttargetel:f.currenttarget})}})}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.image");var b=c.code.photoswipe;b.image.eventtypes={onload:"onload",onerror:"onerror"}}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.image");var b=c.code.photoswipe;b.image.imageclass=a({refobj:null,imageel:null,src:null,caption:null,metadata:null,imageloadhandler:null,imageerrorhandler:null,dispose:function(){var f,e;this.shrinkimage();for(f in this){if(d.objecthasproperty(this,f)){this[f]=null}}},initialize:function(g,h,f,e){this.refobj=g;this.originalsrc=h;this.src=h;this.caption=f;this.metadata=e;this.imageel=new c.image();this.imageloadhandler=this.onimageload.bind(this);this.imageerrorhandler=this.onimageerror.bind(this)},load:function(){this.imageel.originalsrc=d.coalesce(this.imageel.originalsrc,"");var e=this.refobj.getattribute("data-source")?this.refobj.getattribute("data-source"):this.refobj.src;if(this.imageel.originalsrc===e){if(this.imageel.iserror){d.events.fire(this,{type:b.image.eventtypes.onerror,target:this})}else{d.events.fire(this,{type:b.image.eventtypes.onload,target:this})}return}this.imageel.iserror=false;this.imageel.isloading=true;this.imageel.naturalwidth=null;this.imageel.naturalheight=null;this.imageel.islandscape=false;this.imageel.onload=this.imageloadhandler;this.imageel.onerror=this.imageerrorhandler;this.imageel.onabort=this.imageerrorhandler;this.imageel.originalsrc=e;this.imageel.src=e},shrinkimage:function(){if(d.isnothing(this.imageel)){return}if(this.imageel.src.indexof(this.src)>-1){this.imageel.src="data:image/gif;base64,r0lgodlhaqabaad/acwaaaaaaqabaaacads=";if(!d.isnothing(this.imageel.parentnode)){d.dom.removechild(this.imageel,this.imageel.parentnode)}}},onimageload:function(f){this.imageel.onload=null;this.imageel.naturalwidth=d.coalesce(this.imageel.naturalwidth,this.imageel.width);this.imageel.naturalheight=d.coalesce(this.imageel.naturalheight,this.imageel.height);this.imageel.islandscape=(this.imageel.naturalwidth>this.imageel.naturalheight);this.imageel.isloading=false;d.events.fire(this,{type:b.image.eventtypes.onload,target:this})},onimageerror:function(f){this.imageel.onload=null;this.imageel.onerror=null;this.imageel.onabort=null;this.imageel.isloading=false;this.imageel.iserror=true;d.events.fire(this,{type:b.image.eventtypes.onerror,target:this})}})}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.cache");var b=c.code.photoswipe;b.cache.mode={normal:"normal",aggressive:"aggressive"};b.cache.functions={getimagesource:function(e){return e.href},getimagecaption:function(h){if(h.nodename==="img"){return d.dom.getattribute(h,"alt")}var g,f,e;for(g=0,f=h.childnodes.length;ge){e=d.dom.windowheight()}}else{f=d.dom.width(this.settings.target);e=d.dom.height(this.settings.target);g="0px"}d.dom.setstyle(this.el,{width:f,height:e,top:g})},fadein:function(e,f){this.resetposition();d.dom.setstyle(this.el,"opacity",0);d.dom.show(this.el);d.animation.fadein(this.el,e,f)}})}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.carousel");var b=c.code.photoswipe;b.carousel.eventtypes={onslidebyend:"photoswipecarouselonslidebyend",onslideshowstart:"photoswipecarouselonslideshowstart",onslideshowstop:"photoswipecarouselonslideshowstop"};b.carousel.cssclasses={carousel:"ps-carousel",content:"ps-carousel-content",item:"ps-carousel-item",itemloading:"ps-carousel-item-loading",itemerror:"ps-carousel-item-error"};b.carousel.slidebyaction={previous:"previous",current:"current",next:"next"}}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.carousel");var b=c.code.photoswipe;b.carousel.carouselclass=a({el:null,contentel:null,settings:null,cache:null,slidebyendhandler:null,currentcacheindex:null,issliding:null,isslideshowactive:null,lastslidebyaction:null,touchstartpoint:null,touchstartposition:null,imageloadhandler:null,imageerrorhandler:null,slideshowtimeout:null,dispose:function(){var g,f,e;for(f=0,e=this.cache.images.length;f0){d.dom.setstyle(g,{marginright:this.settings.margin+"px"})}d.dom.appendchild(g,this.contentel)}if(this.settings.target===c){d.dom.appendtobody(this.el)}else{d.dom.appendchild(this.el,this.settings.target)}},resetposition:function(){var f,q,o,l,m,e,k,h,p,g;if(this.settings.target===c){f=d.dom.windowwidth();q=d.dom.windowheight();o=d.dom.windowscrolltop()+"px"}else{f=d.dom.width(this.settings.target);q=d.dom.height(this.settings.target);o="0px"}l=(this.settings.margin>0)?f+this.settings.margin:f;m=d.dom.find("."+b.carousel.cssclasses.item,this.contentel);e=l*m.length;d.dom.setstyle(this.el,{top:o,width:f,height:q});d.dom.setstyle(this.contentel,{width:e,height:q});for(k=0,h=m.length;ko){h=o/i;i=math.round(i*h);f=math.round(f*h)}if(f>m){h=m/f;f=math.round(f*h);i=math.round(i*h)}}else{if(g.islandscape){h=o/g.naturalwidth}else{h=m/g.naturalheight}i=math.round(g.naturalwidth*h);f=math.round(g.naturalheight*h);if(this.settings.imagescalemethod==="zoom"){h=1;if(fo){h=o/i}else{if(f>m){h=m/f}}if(h!==1){i=math.round(i*h);f=math.round(f*h)}}}}k=math.round(((m-f)/2))+"px";l=math.round(((o-i)/2))+"px";d.dom.setstyle(g,{position:"absolute",width:i,height:f,top:k,left:l,display:"block"})},setcontentleftposition:function(){var e,g,f;if(this.settings.target===c){e=d.dom.windowwidth()}else{e=d.dom.width(this.settings.target)}g=this.getitemels();f=0;if(this.settings.loop){f=(e+this.settings.margin)*-1}else{if(this.currentcacheindex===this.cache.images.length-1){f=((g.length-1)*(e+this.settings.margin))*-1}else{if(this.currentcacheindex>0){f=(e+this.settings.margin)*-1}}}d.dom.setstyle(this.contentel,{left:f+"px"})},show:function(f){this.currentcacheindex=f;this.resetposition();this.setimages(false);d.dom.show(this.el);d.animation.resettranslate(this.contentel);var h=this.getitemels(),g,e;for(g=0,e=h.length;gthis.cache.images.length-1){e=0}if(h<0){h=this.cache.images.length-1}g=this.cache.getimages([h,this.currentcacheindex,e]);if(!f){this.addcacheimagetoitemel(g[1],i[1])}this.addcacheimagetoitemel(g[2],i[2]);this.addcacheimagetoitemel(g[0],i[0])}else{if(i.length===1){if(!f){g=this.cache.getimages([this.currentcacheindex]);this.addcacheimagetoitemel(g[0],i[0])}}else{if(i.length===2){if(this.currentcacheindex===0){g=this.cache.getimages([this.currentcacheindex,this.currentcacheindex+1]);if(!f){this.addcacheimagetoitemel(g[0],i[0])}this.addcacheimagetoitemel(g[1],i[1])}else{g=this.cache.getimages([this.currentcacheindex-1,this.currentcacheindex]);if(!f){this.addcacheimagetoitemel(g[1],i[1])}this.addcacheimagetoitemel(g[0],i[0])}}else{if(this.currentcacheindex===0){g=this.cache.getimages([this.currentcacheindex,this.currentcacheindex+1,this.currentcacheindex+2]);if(!f){this.addcacheimagetoitemel(g[0],i[0])}this.addcacheimagetoitemel(g[1],i[1]);this.addcacheimagetoitemel(g[2],i[2])}else{if(this.currentcacheindex===this.cache.images.length-1){g=this.cache.getimages([this.currentcacheindex-2,this.currentcacheindex-1,this.currentcacheindex]);if(!f){this.addcacheimagetoitemel(g[2],i[2])}this.addcacheimagetoitemel(g[1],i[1]);this.addcacheimagetoitemel(g[0],i[0])}else{g=this.cache.getimages([this.currentcacheindex-1,this.currentcacheindex,this.currentcacheindex+1]);if(!f){this.addcacheimagetoitemel(g[1],i[1])}this.addcacheimagetoitemel(g[2],i[2]);this.addcacheimagetoitemel(g[0],i[0])}}}}}},addcacheimagetoitemel:function(e,f){d.dom.removeclass(f,b.carousel.cssclasses.itemerror);d.dom.addclass(f,b.carousel.cssclasses.itemloading);d.dom.removechildren(f);d.dom.setstyle(e.imageel,{display:"none"});d.dom.appendchild(e.imageel,f);d.animation.resettranslate(e.imageel);d.events.add(e,b.image.eventtypes.onload,this.imageloadhandler);d.events.add(e,b.image.eventtypes.onerror,this.imageerrorhandler);e.load()},slidecarousel:function(e,k,i){if(this.issliding){return}var h,g,f;if(this.settings.target===c){h=d.dom.windowwidth()+this.settings.margin}else{h=d.dom.width(this.settings.target)+this.settings.margin}i=d.coalesce(i,this.settings.slidespeed);if(c.math.abs(g)<1){return}switch(k){case d.touchelement.actiontypes.swipeleft:f=h*-1;break;case d.touchelement.actiontypes.swiperight:f=h;break;default:g=e.x-this.touchstartpoint.x;if(c.math.abs(g)>h/2){f=(g>0)?h:h*-1}else{f=0}break}if(f<0){this.lastslidebyaction=b.carousel.slidebyaction.next}else{if(f>0){this.lastslidebyaction=b.carousel.slidebyaction.previous}else{this.lastslidebyaction=b.carousel.slidebyaction.current}}if(!this.settings.loop){if((this.lastslidebyaction===b.carousel.slidebyaction.previous&&this.currentcacheindex===0)||(this.lastslidebyaction===b.carousel.slidebyaction.next&&this.currentcacheindex===this.cache.images.length-1)){f=0;this.lastslidebyaction=b.carousel.slidebyaction.current}}this.issliding=true;this.doslidecarousel(f,i)},movecarousel:function(e){if(this.issliding){return}if(!this.settings.enabledrag){return}this.domovecarousel(e.x-this.touchstartpoint.x)},getitemels:function(){return d.dom.find("."+b.carousel.cssclasses.item,this.contentel)},previous:function(){this.stopslideshow();this.slidecarousel({x:0,y:0},d.touchelement.actiontypes.swiperight,this.settings.nextpreviousslidespeed)},next:function(){this.stopslideshow();this.slidecarousel({x:0,y:0},d.touchelement.actiontypes.swipeleft,this.settings.nextpreviousslidespeed)},slideshownext:function(){this.slidecarousel({x:0,y:0},d.touchelement.actiontypes.swipeleft)},startslideshow:function(){this.stopslideshow();this.isslideshowactive=true;this.slideshowtimeout=c.settimeout(this.slideshownext.bind(this),this.settings.slideshowdelay);d.events.fire(this,{type:b.carousel.eventtypes.onslideshowstart,target:this})},stopslideshow:function(){if(!d.isnothing(this.slideshowtimeout)){c.cleartimeout(this.slideshowtimeout);this.slideshowtimeout=null;this.isslideshowactive=false;d.events.fire(this,{type:b.carousel.eventtypes.onslideshowstop,target:this})}},onslidebyend:function(f){if(d.isnothing(this.issliding)){return}var g=this.getitemels();this.issliding=false;if(this.lastslidebyaction===b.carousel.slidebyaction.next){this.currentcacheindex=this.currentcacheindex+1}else{if(this.lastslidebyaction===b.carousel.slidebyaction.previous){this.currentcacheindex=this.currentcacheindex-1}}if(this.settings.loop){if(this.lastslidebyaction===b.carousel.slidebyaction.next){d.dom.appendchild(g[0],this.contentel)}else{if(this.lastslidebyaction===b.carousel.slidebyaction.previous){d.dom.insertbefore(g[g.length-1],g[0],this.contentel)}}if(this.currentcacheindex<0){this.currentcacheindex=this.cache.images.length-1}else{if(this.currentcacheindex===this.cache.images.length){this.currentcacheindex=0}}}else{if(this.cache.images.length>3){if(this.currentcacheindex>1&&this.currentcacheindex
'}}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.toolbar");var b=c.code.photoswipe;b.toolbar.toolbarclass=a({toolbarel:null,closeel:null,playel:null,previousel:null,nextel:null,showdetailel:null,captionel:null,captioncontentel:null,currentcaption:null,settings:null,cache:null,timeout:null,isvisible:null,fadeouthandler:null,touchstarthandler:null,touchmovehandler:null,clickhandler:null,dispose:function(){var e;this.cleartimeout();this.removeeventhandlers();d.animation.stop(this.toolbarel);d.animation.stop(this.captionel);d.dom.removechild(this.toolbarel,this.toolbarel.parentnode);d.dom.removechild(this.captionel,this.captionel.parentnode);for(e in this){if(d.objecthasproperty(this,e)){this[e]=null}}},initialize:function(f,g){var e;this.settings=g;this.cache=f;this.isvisible=false;this.fadeouthandler=this.onfadeout.bind(this);this.touchstarthandler=this.ontouchstart.bind(this);this.touchmovehandler=this.ontouchmove.bind(this);this.clickhandler=this.onclick.bind(this);e=b.toolbar.cssclasses.toolbar;if(this.settings.captionandtoolbarflipposition){e=e+" "+b.toolbar.cssclasses.toolbartop}this.toolbarel=d.dom.createelement("div",{"class":e},this.settings.gettoolbar());d.dom.setstyle(this.toolbarel,{left:0,position:"absolute",overflow:"hidden",zindex:this.settings.zindex});if(this.settings.target===c){d.dom.appendtobody(this.toolbarel)}else{d.dom.appendchild(this.toolbarel,this.settings.target)}d.dom.hide(this.toolbarel);this.closeel=d.dom.find("."+b.toolbar.cssclasses.close,this.toolbarel)[0];if(this.settings.preventhide&&!d.isnothing(this.closeel)){d.dom.hide(this.closeel)}this.playel=d.dom.find("."+b.toolbar.cssclasses.play,this.toolbarel)[0];if(this.settings.preventslideshow&&!d.isnothing(this.playel)){d.dom.hide(this.playel)}this.nextel=d.dom.find("."+b.toolbar.cssclasses.next,this.toolbarel)[0];this.previousel=d.dom.find("."+b.toolbar.cssclasses.previous,this.toolbarel)[0];this.showdetailel=d.dom.find("."+b.toolbar.cssclasses.showdetailel,this.toolbarel)[0];e=b.toolbar.cssclasses.caption;if(this.settings.captionandtoolbarflipposition){e=e+" "+b.toolbar.cssclasses.captionbottom}this.captionel=d.dom.createelement("div",{"class":e},"");d.dom.setstyle(this.captionel,{left:0,position:"absolute",overflow:"hidden",zindex:this.settings.zindex});if(this.settings.target===c){d.dom.appendtobody(this.captionel)}else{d.dom.appendchild(this.captionel,this.settings.target)}d.dom.hide(this.captionel);this.captioncontentel=d.dom.createelement("div",{"class":b.toolbar.cssclasses.captioncontent},"");d.dom.appendchild(this.captioncontentel,this.captionel);this.addeventhandlers()},inserttoolbartext:function(i){if(!i){i={name:"",basic:""}}if(!i.name){i.name=""}if(!i.basic){i.basic=""}var g=document.getelementbyid("wrappertitle");var h=document.getelementbyid("scrollerbasic");var f=i.mobidetail===0?false:true;if(!i.name.trim()){g.style.display="none"}else{g.style.display="";g.innerhtml=i.name}if(!i.basic.trim()){h.style.display="none"}else{h.style.display="";h.innerhtml=i.basic}var e=document.getelementbyid("wrappertitledetail");if(!f){e.style.display="none"}else{e.style.display=""}if(i.aid>14240000){g.style.display="none"}},resetposition:function(){var f,e,g;if(this.settings.target===c){if(this.settings.captionandtoolbarflipposition){e=d.dom.windowscrolltop();g=(d.dom.windowscrolltop()+d.dom.windowheight())-d.dom.height(this.captionel)}else{e=(d.dom.windowscrolltop()+d.dom.windowheight())-d.dom.height(this.toolbarel);g=d.dom.windowscrolltop()}f=d.dom.windowwidth()}else{if(this.settings.captionandtoolbarflipposition){e="0";g=d.dom.height(this.settings.target)-d.dom.height(this.captionel)}else{e=d.dom.height(this.settings.target)-d.dom.height(this.toolbarel);g=0}f=d.dom.width(this.settings.target)}d.dom.setstyle(this.toolbarel,{top:e+"px",width:f});d.dom.setstyle(this.captionel,{top:g+"px",width:f})},togglevisibility:function(e){if(this.isvisible){this.fadeout()}else{this.show(e)}},show:function(e){d.animation.stop(this.toolbarel);d.animation.stop(this.captionel);this.resetposition();this.settoolbarstatus(e);d.events.fire(this,{type:b.toolbar.eventtypes.onbeforeshow,target:this});this.showtoolbar();this.setcaption(e);this.showcaption();this.isvisible=true;this.settimeout();d.events.fire(this,{type:b.toolbar.eventtypes.onshow,target:this})},settimeout:function(){if(this.settings.captionandtoolbarautohidedelay>0){this.cleartimeout();this.timeout=c.settimeout(this.fadeout.bind(this),this.settings.captionandtoolbarautohidedelay)}},cleartimeout:function(){if(!d.isnothing(this.timeout)){c.cleartimeout(this.timeout);this.timeout=null}},fadeout:function(){this.cleartimeout();d.events.fire(this,{type:b.toolbar.eventtypes.onbeforehide,target:this});d.animation.fadeout(this.toolbarel,this.settings.fadeoutspeed);d.animation.fadeout(this.captionel,this.settings.fadeoutspeed,this.fadeouthandler);this.isvisible=false},addeventhandlers:function(){if(d.browser.istouchsupported){if(!d.browser.blackberry){d.events.add(this.toolbarel,"touchstart",this.touchstarthandler)}d.events.add(this.toolbarel,"touchmove",this.touchmovehandler);d.events.add(this.captionel,"touchmove",this.touchmovehandler)}d.events.add(this.toolbarel,"click",this.clickhandler)},removeeventhandlers:function(){if(d.browser.istouchsupported){if(!d.browser.blackberry){d.events.remove(this.toolbarel,"touchstart",this.touchstarthandler)}d.events.remove(this.toolbarel,"touchmove",this.touchmovehandler);d.events.remove(this.captionel,"touchmove",this.touchmovehandler)}d.events.remove(this.toolbarel,"click",this.clickhandler)},handletap:function(g){this.cleartimeout();var f;if(g.target===this.nextel||d.dom.ischildof(g.target,this.nextel)){f=b.toolbar.toolbaraction.next}else{if(g.target===this.previousel||d.dom.ischildof(g.target,this.previousel)){f=b.toolbar.toolbaraction.previous}else{if(g.target===this.closeel||d.dom.ischildof(g.target,this.closeel)){f=b.toolbar.toolbaraction.close}else{if(g.target===this.playel||d.dom.ischildof(g.target,this.playel)){f=b.toolbar.toolbaraction.play}else{if(g.target===this.showdetailel||d.dom.ischildof(g.target,this.showdetailel)){f=b.toolbar.toolbaraction.showdetail}}}}}this.settimeout();if(d.isnothing(f)){f=b.toolbar.toolbaraction.none}d.events.fire(this,{type:b.toolbar.eventtypes.ontap,target:this,action:f,taptarget:g.target})},setcaption:function(e){d.dom.removechildren(this.captioncontentel);this.currentcaption=d.coalesce(this.cache.images[e].caption,"\u00a0");if(d.isobject(this.currentcaption)){d.dom.appendchild(this.currentcaption,this.captioncontentel)}else{if(this.currentcaption===""){this.currentcaption="\u00a0"}d.dom.appendtext(this.currentcaption,this.captioncontentel)}this.currentcaption=(this.currentcaption==="\u00a0")?"":this.currentcaption;this.resetposition()},showtoolbar:function(){d.dom.setstyle(this.toolbarel,{opacity:this.settings.captionandtoolbaropacity});d.dom.show(this.toolbarel)},showcaption:function(){if(this.currentcaption===""||this.captioncontentel.childnodes.length<1){if(!this.settings.captionandtoolbarshowemptycaptions){d.dom.hide(this.captionel);return}}d.dom.setstyle(this.captionel,{opacity:this.settings.captionandtoolbaropacity});d.dom.show(this.captionel)},settoolbarstatus:function(e){if(this.settings.loop){return}},onfadeout:function(){d.dom.hide(this.toolbarel);d.dom.hide(this.captionel);d.events.fire(this,{type:b.toolbar.eventtypes.onhide,target:this})},ontouchstart:function(f){f.preventdefault();d.events.remove(this.toolbarel,"click",this.clickhandler);this.handletap(f)},ontouchmove:function(f){f.preventdefault()},onclick:function(f){f.preventdefault();this.handletap(f);event.stoppropagation()}})}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.uilayer");var b=c.code.photoswipe;b.uilayer.cssclasses={uilayer:"ps-uilayer"}}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.uilayer");var b=c.code.photoswipe;b.uilayer.uilayerclass=d.touchelement.touchelementclass.extend({el:null,settings:null,dispose:function(){var e;this.removeeventhandlers();d.dom.removechild(this.el,this.el.parentnode);for(e in this){if(d.objecthasproperty(this,e)){this[e]=null}}},initialize:function(e){this.settings=e;this.el=d.dom.createelement("div",{"class":b.uilayer.cssclasses.uilayer},"");d.dom.setstyle(this.el,{display:"block",position:"absolute",left:0,top:0,overflow:"hidden",zindex:this.settings.zindex,opacity:0});d.dom.hide(this.el);if(this.settings.target===c){d.dom.appendtobody(this.el)}else{d.dom.appendchild(this.el,this.settings.target)}this.supr(this.el,{swipe:true,move:true,gesture:true,doubletap:true,preventdefaulttouchevents:this.settings.preventdefaulttouchevents})},resetposition:function(){if(this.settings.target===c){d.dom.setstyle(this.el,{top:d.dom.windowscrolltop()+"px",width:d.dom.windowwidth(),height:d.dom.windowheight()})}else{d.dom.setstyle(this.el,{top:"0px",width:d.dom.width(this.settings.target),height:d.dom.height(this.settings.target)})}},show:function(){this.resetposition();d.dom.show(this.el);this.addeventhandlers()},hide:function(){d.dom.setstyle(this.el,{display:"none"});this.removeeventhandlers()},addeventhandlers:function(){this.supr()},removeeventhandlers:function(){this.supr()}})}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.uidetail");var b=c.code.photoswipe;b.uidetail.cssclasses={uidetail:"ps-uidetail"};b.uidetail.id={id:"ps-uidetail-id"}}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.uidetail");var b=c.code.photoswipe;b.uidetail.uidetailclass=d.touchelement.touchelementclass.extend({el:null,settings:null,dispose:function(){var e;this.removeeventhandlers();d.dom.removechild(this.el,this.el.parentnode);for(e in this){if(d.objecthasproperty(this,e)){this[e]=null}}},initialize:function(e){this.settings=e;this.el=d.dom.createelement("div",{id:b.uidetail.id.id,"class":b.uidetail.cssclasses.uidetail},"");this.elchlid=d.dom.createelement("div",{id:"ui-detail-child-id","class":"uidetailchild ps-carousel-item-loading"},"");this.elchlidcontent=d.dom.createelement("div",{id:"ui-detail-content-id","class":"uidetailcontent"},"");this.elchlidtitlepanel=d.dom.createelement("div",{id:"ui-detail-title-panel-id","class":"uidetailtitlepanel"},"");this.elchlidtitlename=d.dom.createelement("div",{id:"ui-detail-title-name-id","class":"ps-toolbar-base-title"},"");this.elchlidtitle=d.dom.createelement("div",{id:"ui-detail-title-id","class":"uidetailtitle icon-uidetailtitle"},"");d.dom.appendchild(this.elchlid,this.el);d.dom.appendchild(this.elchlidtitlepanel,this.el);d.dom.appendchild(this.elchlidtitlename,this.elchlidtitlepanel);d.dom.appendchild(this.elchlidtitle,this.elchlidtitlepanel);d.dom.appendchild(this.elchlidcontent,this.elchlid);d.dom.setstyle(this.el,{display:"none",position:"absolute",left:0,top:"100%",overflow:"hidden",zindex:this.settings.zindex});if(this.settings.target===c){d.dom.appendtobody(this.el)}else{d.dom.appendchild(this.el,this.settings.target)}this.supr(this.el,{swipe:true,move:true,gesture:true,doubletap:true,preventdefaulttouchevents:this.settings.preventdefaulttouchevents})},resetposition:function(){if(this.settings.target===c){d.dom.setstyle(this.el,{top:d.dom.windowscrolltop()+"px",width:d.dom.windowwidth(),height:d.dom.windowheight()})}else{d.dom.setstyle(this.el,{top:"0px",width:d.dom.width(this.settings.target),height:d.dom.height(this.settings.target)})}},hide:function(){d.dom.setstyle(this.el,{display:"none"});this.removeeventhandlers()},show:function(){this.resetposition();if(object.prototype.tostring.call(this.settings.uidetailcallback)==="[object function]"){this.settings.uidetailcallback(this.elchlidcontent,this.elchlid,this.elchlidtitlename)}d.dom.show(this.el);this.addeventhandlers()},addeventhandlers:function(){var e=this;if(jm.os.supportstouch){this.elchlidtitle.ontouchstart=function(){e.hide()};this.elchlidtitle.ontouchmove=function(){return false};this.elchlidtitle.ontouchend=function(){return false}}else{this.elchlidtitle.onclick=function(){e.hide()}}this.supr()},removeeventhandlers:function(){if(jm.os.supportstouch){this.elchlidtitle.ontouchstart=null;this.elchlidtitle.ontouchmove=null;this.elchlidtitle.ontouchend=null}else{this.elchlidtitle.onclick=null}this.supr()}})}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.zoompanrotate");var b=c.code.photoswipe;b.zoompanrotate.cssclasses={zoompanrotate:"ps-zoom-pan-rotate"};b.zoompanrotate.eventtypes={ontransform:"photoswipezoompanrotateontransform"}}(window,window.klass,window.code.util));(function(c,a,d){d.registernamespace("code.photoswipe.zoompanrotate");var b=c.code.photoswipe;b.zoompanrotate.zoompanrotateclass=a({el:null,settings:null,containerel:null,imageel:null,transformsettings:null,panstartingpoint:null,transformel:null,dispose:function(){var e;d.dom.removechild(this.el,this.el.parentnode);for(e in this){if(d.objecthasproperty(this,e)){this[e]=null}}},initialize:function(g,f,k){var i,h,e,l;this.settings=g;if(this.settings.target===c){i=document.body;h=d.dom.windowwidth();e=d.dom.windowheight();l=d.dom.windowscrolltop()+"px"}else{i=this.settings.target;h=d.dom.width(i);e=d.dom.height(i);l="0px"}this.imageel=f.imageel.clonenode(false);d.dom.setstyle(this.imageel,{zindex:1});this.transformsettings={startingscale:1,scale:1,startingrotation:0,rotation:0,startingtranslatex:0,startingtranslatey:0,translatex:0,translatey:0};this.el=d.dom.createelement("div",{"class":b.zoompanrotate.cssclasses.zoompanrotate},"");d.dom.setstyle(this.el,{left:0,top:l,position:"absolute",width:h,height:e,zindex:this.settings.zindex,display:"block"});d.dom.insertbefore(this.el,k.el,i);if(d.browser.ios){this.containerel=d.dom.createelement("div","","");d.dom.setstyle(this.containerel,{left:0,top:0,width:h,height:e,position:"absolute",zindex:1});d.dom.appendchild(this.imageel,this.containerel);d.dom.appendchild(this.containerel,this.el);d.animation.resettranslate(this.containerel);d.animation.resettranslate(this.imageel);this.transformel=this.containerel}else{d.dom.appendchild(this.imageel,this.el);this.transformel=this.imageel}},setstartingtranslatefromcurrenttransform:function(){var e=d.coalesce(this.transformel.style.webkittransform,this.transformel.style.moztransform,this.transformel.style.transform),f;if(!d.isnothing(e)){f=e.match(/translate\((.*?)\)/);if(!d.isnothing(f)){f=f[1].split(", ");this.transformsettings.startingtranslatex=c.parseint(f[0],10);this.transformsettings.startingtranslatey=c.parseint(f[1],10)}}},getscale:function(f){var e=this.transformsettings.startingscale*f;if(this.settings.minuserzoom!==0&&ethis.settings.maxuserzoom){e=this.settings.maxuserzoom}}return e},setstartingscaleandrotation:function(f,e){this.transformsettings.startingscale=this.getscale(f);this.transformsettings.startingrotation=(this.transformsettings.startingrotation+e)%360},zoomrotate:function(f,e){this.transformsettings.scale=this.getscale(f);this.transformsettings.rotation=this.transformsettings.startingrotation+e;this.applytransform()},panstart:function(e){this.setstartingtranslatefromcurrenttransform();this.panstartingpoint={x:e.x,y:e.y}},pan:function(e){var g=e.x-this.panstartingpoint.x,f=e.y-this.panstartingpoint.y,h=g/this.transformsettings.scale,i=f/this.transformsettings.scale;this.transformsettings.translatex=this.transformsettings.startingtranslatex+h;this.transformsettings.translatey=this.transformsettings.startingtranslatey+i;this.applytransform()},zoomandpantopoint:function(k,e){if(this.settings.target===c){this.panstart({x:d.dom.windowwidth()/2,y:d.dom.windowheight()/2});var g=e.x-this.panstartingpoint.x,f=e.y-this.panstartingpoint.y,h=g/this.transformsettings.scale,i=f/this.transformsettings.scale;this.transformsettings.translatex=(this.transformsettings.startingtranslatex+h)*-1;this.transformsettings.translatey=(this.transformsettings.startingtranslatey+i)*-1}this.setstartingscaleandrotation(k,0);this.transformsettings.scale=this.transformsettings.startingscale;this.transformsettings.rotation=0;this.applytransform()},applytransform:function(){var h=this.transformsettings.rotation%360,g=c.parseint(this.transformsettings.translatex,10),f=c.parseint(this.transformsettings.translatey,10),e="scale("+this.transformsettings.scale+") rotate("+h+"deg) translate("+g+"px, "+f+"px)";d.dom.setstyle(this.transformel,{webkittransform:e,moztransform:e,mstransform:e,transform:e});d.events.fire(this,{target:this,type:b.zoompanrotate.eventtypes.ontransform,scale:this.transformsettings.scale,rotation:this.transformsettings.rotation,rotationdegs:h,translatex:g,translatey:f})}})}(window,window.klass,window.code.util));(function(b,c){c.registernamespace("code.photoswipe");var a=b.code.photoswipe;a.cssclasses={buildingbody:"ps-building",activebody:"ps-active"};a.eventtypes={onbeforeshow:"photoswipeonbeforeshow",onshow:"photoswipeonshow",onbeforehide:"photoswipeonbeforehide",onhide:"photoswipeonhide",ondisplayimage:"photoswipeondisplayimage",onresetposition:"photoswipeonresetposition",onslideshowstart:"photoswipeonslideshowstart",onslideshowstop:"photoswipeonslideshowstop",ontouch:"photoswipeontouch",onbeforecaptionandtoolbarshow:"photoswipeonbeforecaptionandtoolbarshow",oncaptionandtoolbarshow:"photoswipeoncaptionandtoolbarshow",onbeforecaptionandtoolbarhide:"photoswipeonbeforecaptionandtoolbarhide",oncaptionandtoolbarhide:"photoswipeoncaptionandtoolbarhide",ontoolbartap:"photoswipeontoolbartap",onbeforezoompanrotateshow:"photoswipeonbeforezoompanrotateshow",onzoompanrotateshow:"photoswipeonzoompanrotateshow",onbeforezoompanrotatehide:"photoswipeonbeforezoompanrotatehide",onzoompanrotatehide:"photoswipeonzoompanrotatehide",onzoompanrotatetransform:"photoswipeonzoompanrotatetransform"};a.instances=[];a.activeinstances=[];a.setactivateinstance=function(d){var e=c.arrayindexof(d.settings.target,a.activeinstances,"target");if(e>-1){throw"code.photoswipe.activateinstance: unable to active instance as another instance is already active for this target"}a.activeinstances.push({target:d.settings.target,instance:d})};a.unsetactivateinstance=function(d){var e=c.arrayindexof(d,a.activeinstances,"instance");a.activeinstances.splice(e,1)};a.attach=function(m,p,e){var k,h,o,g,f,l;for(f=0,l=m.length;f=1){}else{if(g.parentnode&&(g.parentnode.nodename==="a"&&g.parentnode.href||g.parentnode.parentnode.nodename==="a"&&g.parentnode.parentnode.href)){continue}if(g.nodetype===1){g.__photoswipeclickhandler=a.ontriggerelementclick.bind(o);c.events.remove(g,"click",g.__photoswipeclickhandler);c.events.add(g,"click",g.__photoswipeclickhandler)}}}}return o};if(b.jquery){b.jquery.fn.photoswipe=function(d,e){return a.attach(this,d,e)}}a.detatch=function(d){var f,e,g;for(f=0,e=d.originalimages.length;f=2.1){this.isbackeventsupported=true}}if(!this.isbackeventsupported){this.isbackeventsupported=i.objecthasproperty(f,"onhashchange")}this.settings={fadeinspeed:250,fadeoutspeed:250,preventhide:false,preventslideshow:false,zindex:1000,backbuttonhideenabled:true,enablekeyboard:true,enablemousewheel:true,mousewheelspeed:350,autostartslideshow:false,jquerymobile:(!i.isnothing(f.jquery)&&!i.isnothing(f.jquery.mobile)),jquerymobiledialoghash:"&ui-state=dialog",enableuiwebviewrepositiontimeout:false,uiwebviewresetpositiondelay:500,target:f,preventdefaulttouchevents:true,loop:true,slidespeed:250,nextpreviousslidespeed:0,enabledrag:true,swipethreshold:50,swipetimethreshold:250,slidetimingfunction:"ease-out",slideshowdelay:3000,doubletapspeed:250,margin:20,imagescalemethod:"fit",resettoolbarposition:false,photojson:null,captionandtoolbarhide:false,captionandtoolbarflipposition:false,captionandtoolbarautohidedelay:5000,captionandtoolbaropacity:0.9,captionandtoolbarshowemptycaptions:true,gettoolbar:a.toolbar.gettoolbar,allowuserzoom:true,allowrotationonuserzoom:false,maxuserzoom:5,minuserzoom:1,doubletapzoomlevel:2.5,uidetailcallback:null,getimagesource:a.cache.functions.getimagesource,getimagecaption:a.cache.functions.getimagecaption,getimagemetadata:a.cache.functions.getimagemetadata,cachemode:a.cache.mode.normal};i.extend(this.settings,o);if(this.settings.target!==f){p=i.dom.getstyle(this.settings.target,"position");if(p!=="relative"||p!=="absolute"){i.dom.setstyle(this.settings.target,"position","relative")}}if(this.settings.target!==f){this.isbackeventsupported=false;this.settings.backbuttonhideenabled=false}else{if(this.settings.preventhide){this.settings.backbuttonhideenabled=false}}this.cache=new k.cacheclass(m,this.settings)},show:function(p){var o,m;this._isresettingposition=false;this.backbuttonclicked=false;if(i.isnumber(p)){this.currentindex=p}else{this.currentindex=-1;for(o=0,m=this.originalimages.length;othis.originalimages.length-1){throw"code.photoswipe.photoswipeclass.show: starting index out of range"}this.isalreadygettingpage=this.getwindowdimensions();a.setactivateinstance(this);this.windowdimensions=this.getwindowdimensions();if(this.settings.target===f){i.dom.addclass(f.document.body,a.cssclasses.buildingbody)}else{i.dom.addclass(this.settings.target,a.cssclasses.buildingbody)}this.createcomponents();i.events.fire(this,{type:a.eventtypes.onbeforeshow,target:this});this.documentoverlay.fadein(this.settings.fadeinspeed,this.ondocumentoverlayfadein.bind(this))},getwindowdimensions:function(){return{width:i.dom.windowwidth(),height:i.dom.windowheight()}},createcomponents:function(){this.documentoverlay=new e.documentoverlayclass(this.settings);this.carousel=new h.carouselclass(this.cache,this.settings);this.uilayer=new l.uilayerclass(this.settings);this.uidetail=new b.uidetailclass(this.settings);if(!this.settings.captionandtoolbarhide){this.toolbar=new d.toolbarclass(this.cache,this.settings)}},resetposition:function(){if(this._isresettingposition){return}var m=this.getwindowdimensions();if(!i.isnothing(this.windowdimensions)){if(m.width===this.windowdimensions.width&&m.height===this.windowdimensions.height){return}}this._isresettingposition=true;this.windowdimensions=m;this.destroyzoompanrotate();this.documentoverlay.resetposition();this.carousel.resetposition();if(!i.isnothing(this.toolbar)){this.toolbar.resetposition()}this.uilayer.resetposition();this._isresettingposition=false;i.events.fire(this,{type:a.eventtypes.onresetposition,target:this})},addeventhandler:function(o,m){i.events.add(this,o,m)},addeventhandlers:function(){if(i.isnothing(this.windoworientationchangehandler)){this.windoworientationchangehandler=this.onwindoworientationchange.bind(this);this.windowscrollhandler=this.onwindowscroll.bind(this);this.keydownhandler=this.onkeydown.bind(this);this.windowhashchangehandler=this.onwindowhashchange.bind(this);this.uilayertouchhandler=this.onuilayertouch.bind(this);this.carouselslidebyendhandler=this.oncarouselslidebyend.bind(this);this.carouselslideshowstarthandler=this.oncarouselslideshowstart.bind(this);this.carouselslideshowstophandler=this.oncarouselslideshowstop.bind(this);this.toolbartaphandler=this.ontoolbartap.bind(this);this.toolbarbeforeshowhandler=this.ontoolbarbeforeshow.bind(this);this.toolbarshowhandler=this.ontoolbarshow.bind(this);this.toolbarbeforehidehandler=this.ontoolbarbeforehide.bind(this);this.toolbarhidehandler=this.ontoolbarhide.bind(this);this.mousewheelhandler=this.onmousewheel.bind(this);this.zoompanrotatetransformhandler=this.onzoompanrotatetransform.bind(this)}if(i.browser.android){this.orientationeventname="resize"}else{if(i.browser.ios&&(!i.browser.safari)){i.events.add(f.document.body,"orientationchange",this.windoworientationchangehandler)}else{var m=!i.isnothing(f.onorientationchange);this.orientationeventname=m?"orientationchange":"resize"}}if(!i.isnothing(this.orientationeventname)){i.events.add(f,this.orientationeventname,this.windoworientationchangehandler)}if(this.settings.target===f){i.events.add(f,"scroll",this.windowscrollhandler)}if(this.settings.enablekeyboard){i.events.add(f.document,"keydown",this.keydownhandler)}if(this.isbackeventsupported&&this.settings.backbuttonhideenabled){this.windowhashchangehandler=this.onwindowhashchange.bind(this);if(this.settings.jquerymobile){f.location.hash=this.settings.jquerymobiledialoghash}else{this.currenthistoryhashvalue="photoswipe"+new date().gettime().tostring();f.location.hash=this.currenthistoryhashvalue}i.events.add(f,"hashchange",this.windowhashchangehandler)}if(this.settings.enablemousewheel){i.events.add(f,"mousewheel",this.mousewheelhandler)}i.events.add(this.uilayer,i.touchelement.eventtypes.ontouch,this.uilayertouchhandler);i.events.add(this.carousel,h.eventtypes.onslidebyend,this.carouselslidebyendhandler);i.events.add(this.carousel,h.eventtypes.onslideshowstart,this.carouselslideshowstarthandler);i.events.add(this.carousel,h.eventtypes.onslideshowstop,this.carouselslideshowstophandler);if(!i.isnothing(this.toolbar)){i.events.add(this.toolbar,d.eventtypes.ontap,this.toolbartaphandler);i.events.add(this.toolbar,d.eventtypes.onbeforeshow,this.toolbarbeforeshowhandler);i.events.add(this.toolbar,d.eventtypes.onshow,this.toolbarshowhandler);i.events.add(this.toolbar,d.eventtypes.onbeforehide,this.toolbarbeforehidehandler);i.events.add(this.toolbar,d.eventtypes.onhide,this.toolbarhidehandler)}},removeeventhandlers:function(){if(i.browser.ios&&(!i.browser.safari)){i.events.remove(f.document.body,"orientationchange",this.windoworientationchangehandler)}if(!i.isnothing(this.orientationeventname)){i.events.remove(f,this.orientationeventname,this.windoworientationchangehandler)}i.events.remove(f,"scroll",this.windowscrollhandler);if(this.settings.enablekeyboard){i.events.remove(f.document,"keydown",this.keydownhandler)}if(this.isbackeventsupported&&this.settings.backbuttonhideenabled){i.events.remove(f,"hashchange",this.windowhashchangehandler)}if(this.settings.enablemousewheel){i.events.remove(f,"mousewheel",this.mousewheelhandler)}if(!i.isnothing(this.uilayer)){i.events.remove(this.uilayer,i.touchelement.eventtypes.ontouch,this.uilayertouchhandler)}if(!i.isnothing(this.toolbar)){i.events.remove(this.carousel,h.eventtypes.onslidebyend,this.carouselslidebyendhandler);i.events.remove(this.carousel,h.eventtypes.onslideshowstart,this.carouselslideshowstarthandler);i.events.remove(this.carousel,h.eventtypes.onslideshowstop,this.carouselslideshowstophandler)}if(!i.isnothing(this.toolbar)){i.events.remove(this.toolbar,d.eventtypes.ontap,this.toolbartaphandler);i.events.remove(this.toolbar,d.eventtypes.onbeforeshow,this.toolbarbeforeshowhandler);i.events.remove(this.toolbar,d.eventtypes.onshow,this.toolbarshowhandler);i.events.remove(this.toolbar,d.eventtypes.onbeforehide,this.toolbarbeforehidehandler);i.events.remove(this.toolbar,d.eventtypes.onhide,this.toolbarhidehandler)}},hide:function(){if(this.settings.preventhide){return}if(i.isnothing(this.documentoverlay)){throw"code.photoswipe.photoswipeclass.hide: photoswipe instance is already hidden"}if(!i.isnothing(this.hiding)){return}this.clearuiwebviewresetpositiontimeout();this.destroyzoompanrotate();this.removeeventhandlers();i.events.fire(this,{type:a.eventtypes.onbeforehide,target:this});this.uilayer.dispose();this.uilayer=null;if(!i.isnothing(this.uidetail)){this.uidetail.dispose();this.uidetail=null}if(!i.isnothing(this.toolbar)){this.toolbar.dispose();this.toolbar=null}this.carousel.dispose();this.carousel=null;i.dom.removeclass(f.document.body,a.cssclasses.activebody);this.documentoverlay.dispose();this.documentoverlay=null;this._isresettingposition=false;a.unsetactivateinstance(this);i.events.fire(this,{type:a.eventtypes.onhide,target:this});this.gobackinhistory()},gobackinhistory:function(){if(this.isbackeventsupported&&this.settings.backbuttonhideenabled){if(!this.backbuttonclicked){f.history.back()}}},play:function(){if(this.iszoomactive()){return}if(!this.settings.preventslideshow){if(!i.isnothing(this.carousel)){if(!i.isnothing(this.toolbar)&&this.toolbar.isvisible){this.toolbar.fadeout()}this.carousel.startslideshow()}}},stop:function(){if(this.iszoomactive()){return}if(!i.isnothing(this.carousel)){this.carousel.stopslideshow()}},previous:function(){if(this.iszoomactive()){return}if(!i.isnothing(this.carousel)){this.carousel.previous()}},next:function(){if(this.iszoomactive()){return}if(!i.isnothing(this.carousel)){this.carousel.next()}},showdetail:function(){this.toggletoolbar();this.uidetail.show()},toggletoolbar:function(){if(this.iszoomactive()){return}if(!i.isnothing(this.toolbar)){this.toolbar.togglevisibility(this.currentindex)}},fadeouttoolbarifvisible:function(){if(!i.isnothing(this.toolbar)&&this.toolbar.isvisible&&this.settings.captionandtoolbarautohidedelay>0){this.toolbar.fadeout()}},createzoompanrotate:function(){this.stop();if(this.canuserzoom()&&!this.iszoomactive()){i.events.fire(this,a.eventtypes.onbeforezoompanrotateshow);this.zoompanrotate=new c.zoompanrotateclass(this.settings,this.cache.images[this.currentindex],this.uilayer);this.uilayer.capturesettings.preventdefaulttouchevents=true;i.events.add(this.zoompanrotate,a.zoompanrotate.eventtypes.ontransform,this.zoompanrotatetransformhandler);i.events.fire(this,a.eventtypes.onzoompanrotateshow);if(!i.isnothing(this.toolbar)&&this.toolbar.isvisible){this.toolbar.fadeout()}}},destroyzoompanrotate:function(){if(!i.isnothing(this.zoompanrotate)){i.events.fire(this,a.eventtypes.onbeforezoompanrotatehide);i.events.remove(this.zoompanrotate,a.zoompanrotate.eventtypes.ontransform,this.zoompanrotatetransformhandler);this.zoompanrotate.dispose();this.zoompanrotate=null;this.uilayer.capturesettings.preventdefaulttouchevents=this.settings.preventdefaulttouchevents;i.events.fire(this,a.eventtypes.onzoompanrotatehide)}},canuserzoom:function(){var o,m;if(i.browser.msie){o=document.createelement("div");if(i.isnothing(o.style.mstransform)){return false}}else{if(!i.browser.iscsstransformsupported){return false}}if(!this.settings.allowuserzoom){return false}if(this.carousel.issliding){return false}m=this.cache.images[this.currentindex];if(i.isnothing(m)){return false}if(m.isloading){return false}return true},iszoomactive:function(){return(!i.isnothing(this.zoompanrotate))},getcurrentimage:function(){return this.cache.images[this.currentindex]},ondocumentoverlayfadein:function(m){f.settimeout(function(){var o=(this.settings.target===f)?f.document.body:this.settings.target;i.dom.removeclass(o,a.cssclasses.buildingbody);i.dom.addclass(o,a.cssclasses.activebody);this.addeventhandlers();this.carousel.show(this.currentindex);this.uilayer.show();if(this.settings.autostartslideshow){this.play()}else{if(!i.isnothing(this.toolbar)){this.toolbar.show(this.currentindex)}}i.events.fire(this,{type:a.eventtypes.onshow,target:this});this.setuiwebviewresetpositiontimeout()}.bind(this),250)},setuiwebviewresetpositiontimeout:function(){if(!this.settings.enableuiwebviewrepositiontimeout){return}if(!(i.browser.ios&&(!i.browser.safari))){return}if(!i.isnothing(this._uiwebviewresetpositiontimeout)){f.cleartimeout(this._uiwebviewresetpositiontimeout)}this._uiwebviewresetpositiontimeout=f.settimeout(function(){this.resetposition();this.setuiwebviewresetpositiontimeout()}.bind(this),this.settings.uiwebviewresetpositiondelay)},clearuiwebviewresetpositiontimeout:function(){if(!i.isnothing(this._uiwebviewresetpositiontimeout)){f.cleartimeout(this._uiwebviewresetpositiontimeout)}},onwindowscroll:function(m){this.resetposition()},onwindoworientationchange:function(m){this.resetposition()},onwindowhashchange:function(m){var o="#"+((this.settings.jquerymobile)?this.settings.jquerymobiledialoghash:this.currenthistoryhashvalue);if(f.location.hash!==o){this.backbuttonclicked=true;this.hide()}},onkeydown:function(m){if(m.keycode===37){m.preventdefault();this.previous()}else{if(m.keycode===39){m.preventdefault();this.next()}else{if(m.keycode===38||m.keycode===40){m.preventdefault()}else{if(m.keycode===27){m.preventdefault();this.hide()}else{if(m.keycode===32){if(!this.settings.hidetoolbar){this.toggletoolbar()}else{this.hide()}m.preventdefault()}else{if(m.keycode===13){m.preventdefault();this.play()}}}}}}},onuilayertouch:function(t){var r;if(this.iszoomactive()){switch(t.action){case i.touchelement.actiontypes.gesturechange:this.zoompanrotate.zoomrotate(t.scale,(this.settings.allowrotationonuserzoom)?t.rotation:0);break;case i.touchelement.actiontypes.gestureend:this.zoompanrotate.setstartingscaleandrotation(t.scale,(this.settings.allowrotationonuserzoom)?t.rotation:0);break;case i.touchelement.actiontypes.touchstart:this.zoompanrotate.panstart(t.point);break;case i.touchelement.actiontypes.touchmove:this.zoompanrotate.pan(t.point);break;case i.touchelement.actiontypes.doubletap:this.destroyzoompanrotate();this.toggletoolbar();break;case i.touchelement.actiontypes.swipeleft:break;case i.touchelement.actiontypes.swiperight:break}}else{switch(t.action){case i.touchelement.actiontypes.touchmove:case i.touchelement.actiontypes.swipeleft:case i.touchelement.actiontypes.swiperight:this.fadeouttoolbarifvisible();this.carousel.ontouch(t.action,t.point);break;case i.touchelement.actiontypes.touchstart:case i.touchelement.actiontypes.touchmoveend:this.carousel.ontouch(t.action,t.point);break;case i.touchelement.actiontypes.touchend:this.carousel.ontouch(t.action,t.point);break;case i.touchelement.actiontypes.tap:this.toggletoolbar();break;case i.touchelement.actiontypes.doubletap:if(this.settings.target===f){t.point.x-=i.dom.windowscrollleft();t.point.y-=i.dom.windowscrolltop()}var q=this.cache.images[this.currentindex].imageel,s=f.parseint(i.dom.getstyle(q,"top"),10),m=f.parseint(i.dom.getstyle(q,"left"),10),o=m+i.dom.width(q),p=s+i.dom.height(q);if(t.point.xo){t.point.x=o}}if(t.point.yp){t.point.y=p}}this.createzoompanrotate();if(this.iszoomactive()){this.zoompanrotate.zoomandpantopoint(this.settings.doubletapzoomlevel,t.point)}break;case i.touchelement.actiontypes.gesturestart:this.createzoompanrotate();break}}i.events.fire(this,{type:a.eventtypes.ontouch,target:this,point:t.point,action:t.action})},oncarouselslidebyend:function(m){this.currentindex=m.cacheindex;if(!i.isnothing(this.toolbar)){this.toolbar.setcaption(this.currentindex);this.toolbar.settoolbarstatus(this.currentindex)}i.events.fire(this,{type:a.eventtypes.ondisplayimage,target:this,action:m.action,index:m.cacheindex});if(this.settings.resettoolbarposition){if(this.settings.photojson){this.toolbar.inserttoolbartext(this.settings.photojson[this.currentindex])}this.toolbar.resetposition()}},ontoolbartap:function(m){switch(m.action){case d.toolbaraction.next:this.next();break;case d.toolbaraction.previous:this.previous();break;case d.toolbaraction.close:if("returnindex" in g){g.returnindex()}else{this.hide()}break;case d.toolbaraction.play:this.play();break;case d.toolbaraction.showdetail:this.showdetail();break}i.events.fire(this,{type:a.eventtypes.ontoolbartap,target:this,toolbaraction:m.action,taptarget:m.taptarget})},onmousewheel:function(o){var p=i.events.getwheeldelta(o),m=o.timestamp-(this.mousewheelstarttime||0);if(m0){this.previous()}}},oncarouselslideshowstart:function(m){i.events.fire(this,{type:a.eventtypes.onslideshowstart,target:this})},oncarouselslideshowstop:function(m){i.events.fire(this,{type:a.eventtypes.onslideshowstop,target:this})},ontoolbarbeforeshow:function(m){i.events.fire(this,{type:a.eventtypes.onbeforecaptionandtoolbarshow,target:this})},ontoolbarshow:function(m){i.events.fire(this,{type:a.eventtypes.oncaptionandtoolbarshow,target:this})},ontoolbarbeforehide:function(m){i.events.fire(this,{type:a.eventtypes.onbeforecaptionandtoolbarhide,target:this})},ontoolbarhide:function(m){i.events.fire(this,{type:a.eventtypes.oncaptionandtoolbarhide,target:this})},onzoompanrotatetransform:function(m){i.events.fire(this,{target:this,type:a.eventtypes.onzoompanrotatetransform,scale:m.scale,rotation:m.rotation,rotationdegs:m.rotationdegs,translatex:m.translatex,translatey:m.translatey})}})}(window,window.klass,window.code.util,window.code.photoswipe.cache,window.code.photoswipe.documentoverlay,window.code.photoswipe.carousel,window.code.photoswipe.toolbar,window.code.photoswipe.uilayer,window.code.photoswipe.uidetail,window.code.photoswipe.zoompanrotate)); /*! * lazy load - jquery plugin for lazy loading images * * copyright (c) 2007-2015 mika tuupola * * licensed under the mit license: * http://www.opensource.org/licenses/mit-license.php * * project home: * http://www.appelsiini.net/projects/lazyload * * version: 1.9.7 * */ (function(c,b,a,e){var d=c(b);c.fn.lazyload=function(f){var h=this;var k;var g={threshold:0,w_threshold:0,failure_limit:0,event:"scroll.lazyload",load_all:false,otherevent:"",load_in_viewport:false,loadingclass:"loading-for-lazyload",container:b,data_attribute:"original",skip_invisible:false,appear:null,load:null,placeholder:"data:image/png;base64,ivborw0kggoaaaansuheugaaaaeaaaabcaqaaac1hawcaaaac0leqvr42mp8/x8aawmcao+ip1saaaaasuvork5cyii="};if(!!h&&h.length<1){return}function l(){var m=0;h.each(function(){var o=c(this);if(g.skip_invisible&&!o.is(":visible")){return}if(c.abovethetop(this,g)||c.leftofbegin(this,g)){}else{if(!c.belowthefold(this,g)&&!c.rightoffold(this,g)){o.trigger("appear");m=0;if(!!g.load_all){h.trigger("appear")}}else{if(++m>g.failure_limit){return false}}}})}if(f){if(e!==f.failurelimit){f.failure_limit=f.failurelimit;delete f.failurelimit}c.extend(g,f)}if(!!g.load_all&&!!g.load_in_viewport){g.load_in_viewport=false}k=(g.container===e||g.container===b)?d:c(g.container);var i=null;if(0===g.event.indexof("scroll.lazyload")){k.on(g.event,function(){if(typeof i=="number"){return}i=settimeout(function(){i=null;return l()},1000)})}c(h).addclass(g.loadingclass);this.each(function(){var m=this;var o=c(m);if(!o.attr("data-"+g.data_attribute)){return}m.loaded=false;if(!o.attr("src")){if(o.is("img")){o.attr("src",g.placeholder)}}o.one("appear",function(){if(!this.loaded){if(g.appear){var p=h.length;g.appear.call(m,p,g)}c("").one("load",function(){var r=o.attr("data-"+g.data_attribute);o.hide();if(o.is("img")){o.attr("src",r)}else{o.css("background-image","url('"+r+"')")}o.show().addclass("fade-in-for-lazyload");m.loaded=true;o.removeclass(g.loadingclass);var q=c.grep(h,function(t){return !t.loaded});h=c(q);if(g.load){var s=h.length;g.load.call(m,s,g)}}).attr("src",o.attr("data-"+g.data_attribute))}}).one("webkitanimationstart mozanimationstart msanimationstart oanimationstart animationstart",function(p){if(p.animationname=="fadein"){p.stoppropagation()}}).one("webkitanimationend mozanimationend msanimationend oanimationend animationend",function(p){if(p.animationname=="fadein"){p.stoppropagation()}});if(g.otherevent!=""){o.on(g.otherevent,function(){if(!g.load_in_viewport){if(!m.loaded){o.trigger("appear")}}else{if(c.abovethetop(m,g)||c.leftofbegin(m,g)){}else{if(!c.belowthefold(m,g)&&!c.rightoffold(m,g)){o.trigger("appear")}}}})}});d.on("resize.lazyload",function(){l()});if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appversion)){d.on("pageshow",function(m){if(m.originalevent&&m.originalevent.persisted){h.each(function(){c(this).trigger("appear")})}})}c(a).ready(function(){l()});return this};c.belowthefold=function(g,h){var f,i;if(h.container===e||h.container===b){f=(b.innerheight?b.innerheight:d.height())+(a.documentelement.scrolltop||b.pageyoffset||a.body.scrolltop)}else{i=c(h.container).offset();f=i.top+i.height}return f<=c(g).offset().top-h.threshold};c.rightoffold=function(g,h){var f,i;if(h.container===e||h.container===b){f=d.width()+(a.documentelement.scrollleft||b.pagexoffset||a.body.scrollleft)}else{i=c(h.container).offset();f=i.left+i.width}return f<=c(g).offset().left-h.w_threshold};c.abovethetop=function(g,h){var f,i;if(h.container===e||h.container===b){f=a.documentelement.scrolltop||b.pageyoffset||a.body.scrolltop}else{f=c(h.container).offset().top}i=c(g).offset();return f>=i.top+h.threshold+i.height};c.leftofbegin=function(g,h){var f,i;if(h.container===e||h.container===b){f=(a.documentelement.scrollleft||b.pagexoffset||a.body.scrollleft)}else{f=c(h.container).offset().left}i=c(g).offset();return f>=i.left+h.w_threshold+i.width};c.inviewport=function(f,g){return !c.rightoffold(f,g)&&!c.leftofbegin(f,g)&&!c.belowthefold(f,g)&&!c.abovethetop(f,g)}})(jm,window,document);