/*! fancybox v2.1.3 fancyapps.com | fancyapps.com/fancybox/#license */ (function(b,x,f,q){var r=f(b),m=f(x),b=f.fancybox=function(){b.open.apply(this,arguments)},u=null,n=x.createtouch!==q,s=function(a){return a&&a.hasownproperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},e=function(a){return p(a)&&0
',image:'',iframe:'",error:'

the requested content cannot be loaded.
please try again later.

',closebtn:'',next:'',prev:''},openeffect:"fade",openspeed:250,openeasing:"swing", openopacity:!0,openmethod:"zoomin",closeeffect:"fade",closespeed:250,closeeasing:"swing",closeopacity:!0,closemethod:"zoomout",nexteffect:"elastic",nextspeed:250,nexteasing:"swing",nextmethod:"changein",preveffect:"elastic",prevspeed:250,preveasing:"swing",prevmethod:"changeout",helpers:{overlay:!0,title:!0},oncancel:f.noop,beforeload:f.noop,afterload:f.noop,beforeshow:f.noop,aftershow:f.noop,beforechange:f.noop,beforeclose:f.noop,afterclose:f.noop},group:{},opts:{},previous:null,coming:null,current:null, isactive:!1,isopen:!1,isopened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isactive:!1},ajaxload:null,imgpreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isplainobject(d)||(d={}),!1!==b.close(!0)))return f.isarray(a)||(a=s(a)?f(a).get():[a]),f.each(a,function(e,c){var j={},g,h,i,l,k;"object"===f.type(c)&&(c.nodetype&&(c=f(c)),s(c)?(j={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isdom:!0,element:c},f.metadata&&f.extend(!0, j,c.metadata())):j=c);g=d.href||j.href||(p(c)?c:null);h=d.title!==q?d.title:j.title||"";l=(i=d.content||j.content)?"html":d.type||j.type;!l&&j.isdom&&(l=c.data("fancybox-type"),l||(l=(l=c.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));p(g)&&(l||(b.isimage(g)?l="image":b.isswf(g)?l="swf":"#"===g.charat(0)?l="inline":p(c)&&(l="html",i=c)),"ajax"===l&&(k=g.split(/\s+/,2),g=k.shift(),k=k.shift()));i||("inline"===l?g?i=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isdom&&(i=c):"html"===l?i=g:!l&&(!g&& j.isdom)&&(l="inline",i=c));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==q&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("oncancel")&&(b.hideloading(),b.ajaxload&&b.ajaxload.abort(),b.ajaxload=null,b.imgpreload&&(b.imgpreload.onload=b.imgpreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onreset").remove(),b.coming=null,b.current|| b._afterzoomout(a))},close:function(a){b.cancel();!1!==b.trigger("beforeclose")&&(b.unbindevents(),b.isactive&&(!b.isopen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onreset").remove(),b._afterzoomout()):(b.isopen=b.isopened=!1,b.isclosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeclass("fancybox-opened"),b.transitions[b.current.closemethod]())))},play:function(a){var d=function(){cleartimeout(b.player.timer)},e=function(){d();b.current&&b.player.isactive&&(b.player.timer= settimeout(b.next,b.current.playspeed))},c=function(){d();f("body").unbind(".player");b.player.isactive=!1;b.trigger("onplayend")};if(!0===a||!b.player.isactive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==q&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,j;c&&(j=b._getposition(d),a&&"scroll"===a.type?(delete j.position,c.stop(!0,!0).animate(j,200)):(c.css(j),e.pos=f.extend({}, e.dim,j)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(cleartimeout(u),u=null);b.isopen&&!u&&(u=settimeout(function(){var c=b.current;c&&!b.isclosing&&(b.wrap.removeclass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoresize)&&b._setdimension(),"scroll"===d&&c.canshrink||b.reposition(a),b.trigger("onupdate"),u=null)},e&&!n?0:300))},toggle:function(a){b.isopen&&(b.current.fittoview="boolean"===f.type(a)?a:!b.current.fittoview,n&&(b.wrap.removeattr("style").addclass("fancybox-tmp"), b.trigger("onupdate")),b.update())},hideloading:function(){m.unbind(".loading");f("#fancybox-loading").remove()},showloading:function(){var a,d;b.hideloading();a=f('
').click(b.cancel).appendto("body");m.bind("keydown.loading",function(a){if(27===(a.which||a.keycode))a.preventdefault(),b.cancel()});b.defaults.fixed||(d=b.getviewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getviewport:function(){var a=b.current&&b.current.locked|| !1,d={x:r.scrollleft(),y:r.scrolltop()};a?(d.w=a[0].clientwidth,d.h=a[0].clientheight):(d.w=n&&b.innerwidth?b.innerwidth:r.width(),d.h=n&&b.innerheight?b.innerheight:r.height());return d},unbindevents:function(){b.wrap&&s(b.wrap)&&b.wrap.unbind(".fb");m.unbind(".fb");r.unbind(".fb")},bindevents:function(){var a=b.current,d;a&&(r.bind("orientationchange.fb"+(n?"":" resize.fb")+(a.autocenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&m.bind("keydown.fb",function(e){var c=e.which||e.keycode,j= e.target||e.srcelement;if(27===c&&b.coming)return!1;!e.ctrlkey&&(!e.altkey&&!e.shiftkey&&!e.metakey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(d,function(d,j){if(1h[0].clientwidth||h[0].clientheight&&h[0].scrollheight>h[0].clientheight),h=f(h).parent();if(0!==c&&!i&&1g||0>j)b.next(0>g?"up":"right");d.preventdefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isfunction(c[a])&&(e=c[a].apply(c,array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d, e){e&&(b.helpers[d]&&f.isfunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isimage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isswf:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c,a=k(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&& (d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closebtn:!1,closeclick:!1,nextclick:!1,arrows:!1,mousewheel:!1,keys:null,helpers:{overlay:{closeclick:!1}}});d.autosize&&(d.autowidth=d.autoheight=!0);"auto"===d.width&&(d.autowidth=!0);"auto"===d.height&&(d.autoheight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeload"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isactive= !0;if("image"===c||"swf"===c)d.autoheight=d.autowidth=!1,d.scrolling="visible";"image"===c&&(d.aspectratio=!0);"iframe"===c&&n&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addclass("fancybox-"+(n?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapcss).appendto(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["top","right","bottom","left"],function(a,b){d.skin.css("padding"+b,v(d.padding[a]))});b.trigger("onready"); if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadimage():"ajax"===c?b._loadajax():"iframe"===c?b._loadiframe():b._afterload()}},_error:function(a){f.extend(b.coming,{type:"html",autowidth:!0,autoheight:!0,minwidth:0,minheight:0,scrolling:"no",haserror:a,content:b.coming.tpl.error});b._afterload()},_loadimage:function(){var a=b.imgpreload=new image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= this.width;b.coming.height=this.height;b._afterload()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showloading()},_loadajax:function(){var a=b.coming;b.showloading();b.ajaxload=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideloading()},success:function(d,e){"success"===e&&(a.content=d,b._afterload())}}))},_loadiframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g, (new date).gettime())).attr("scrolling",n?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onreset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showloading(),d.one("load",function(){f(this).data("ready",1);n||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeclass("fancybox-tmp").show();b._afterload()}));a.content=d.appendto(a.inner);a.iframe.preload||b._afterload()},_preloadimages:function(){var a= b.group,d=b.current,e=a.length,c=d.preload?math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new image).src=f.href)},_afterload:function(){var a=b.coming,d=b.current,e,c,j,g,h;b.hideloading();if(a&&!1!==b.isactive)if(!1===b.trigger("afterload",a,d))a.wrap.stop(!0).trigger("onreset").remove(),b.coming=null;else{d&&(b.trigger("beforechange",d),d.wrap.stop(!0).removeclass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindevents(); e=a.content;c=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
").html(e).find(a.selector):s(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
').insertafter(e).hide()),e=e.show().detach(),a.wrap.bind("onreset",function(){f(this).find(e).length&&e.hide().replaceall(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!s(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeshow"); a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setdimension();b.reposition();b.isopen=!1;b.coming=null;b.bindevents();if(b.isopened){if(d.prevmethod)b.transitions[d.prevmethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onreset").remove();b.transitions[b.isopened?a.nextmethod:a.openmethod]();b._preloadimages()}},_setdimension:function(){var a=b.getviewport(),d=0,e=!1,c=!1,e=b.wrap,j=b.skin,g=b.inner,h=b.current,c=h.width,i=h.height,l=h.minwidth,t=h.minheight,m=h.maxwidth, n=h.maxheight,r=h.scrolling,p=h.scrolloutside?h.scrollbarwidth:0,w=h.margin,y=k(w[1]+w[3]),q=k(w[0]+w[2]),x,z,s,c,a,f,b,d,u;e.add(j).add(g).width("auto").height("auto").removeclass("fancybox-tmp");w=k(j.outerwidth(!0)-j.width());x=k(j.outerheight(!0)-j.height());z=y+w;s=q+x;c=e(c)?(a.w-z)*k(c)/100:c;a=e(i)?(a.h-s)*k(i)/100:i;if("iframe"===h.type){if(u=h.content,h.autoheight&&1===u.data("ready"))try{u[0].contentwindow.document.location&&(g.width(c).height(9999),f=u.contents().find("body"),p&&f.css("overflow-x", "hidden"),a=f.height())}catch(g){}}else if(h.autowidth||h.autoheight)g.addclass("fancybox-tmp"),h.autowidth||g.width(c),h.autoheight||g.height(a),h.autowidth&&(c=g.width()),h.autoheight&&(a=g.height()),g.removeclass("fancybox-tmp");c=k(c);i=k(a);d=c/a;l=k(e(l)?k(l,"w")-z:l);m=k(e(m)?k(m,"w")-z:m);t=k(e(t)?k(t,"h")-s:t);n=k(e(n)?k(n,"h")-s:n);f=m;b=n;h.fittoview&&(m=math.min(a.w-z,m),n=math.min(a.h-s,n));z=a.w-y;q=a.h-q;h.aspectratio?(c>m&&(c=m,i=k(c/d)),i>n&&(i=n,c=k(i*d)),cz||y>q)&&(c>l&&i>t)&&!(19m&&(c=m,i=k(c/d)),g.width(c).height(i),e.width(c+w),a=e.width(),y=e.height();else c=math.max(l,math.min(c,c-(a-z))),i=math.max(t,math.min(i,i-(y-q)));p&&("auto"===r&&iz||y>q)&&c>l&&i>t;c=h.aspectratio?ct&&i
').appendto("body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addclass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this,a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(r.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeclick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasclass("fancybox-overlay")&& (b.isactive?b.close():d.close())});this.overlay.css(a.css).show()},close:function(){f(".fancybox-overlay").remove();r.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeclass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=math.max(x.documentelement.offsetwidth,x.body.offsetwidth),m.width()>b&&(a=m.width())):m.width()>r.width()&&(a=m.width());this.overlay.width(a).height(m.height())}, onready:function(a,b){f(".fancybox-overlay").stop(!0,!0);this.overlay||(this.margin=m.height()>r.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=x.all&&!x.queryselector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showearly&&this.beforeshow.apply(this,arguments)},beforeshow:function(a,b){b.locked&&(this.el.addclass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+ b.scrollbarwidth));this.open(a)},onupdate:function(){this.fixed||this.update()},afterclose:function(a){this.overlay&&!b.isactive&&this.overlay.fadeout(a.speedout,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeshow:function(a){var d=b.current,e=d.title,c=a.type;f.isfunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('
'+e+"
");switch(c){case "inside":c=b.skin;break;case "outside":c= b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendto("body"),f.browser.msie&&d.width(d.width()),d.wrapinner(''),b.current.margin[2]+=math.abs(k(d.css("margin-bottom")))}d["top"===a.position?"prependto":"appendto"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",j=function(g){var h=f(this).blur(),i=d,j,k;!g.ctrlkey&&(!g.altkey&&!g.shiftkey&&!g.metakey)&&!h.is(".fancybox-wrap")&&(j=a.groupattr||"data-fancybox-group",k=h.attr(j),k||(j="rel", k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=c.length?f(c):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventdefault())},a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",j):m.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);this.filter("[data-fancybox-start=1]").trigger("click");return this};m.ready(function(){f.scrollbarwidth===q&&(f.scrollbarwidth=function(){var a=f('
').appendto("body"), b=a.children(),b=b.innerwidth()-b.height(99).innerwidth();a.remove();return b});if(f.support.fixedposition===q){var a=f.support,d=f('
').appendto("body"),e=20===d[0].offsettop||15===d[0].offsettop;d.remove();a.fixedposition=e}f.extend(b.defaults,{scrollbarwidth:f.scrollbarwidth(),fixed:f.support.fixedposition,parent:f("body")})})})(window,document,jquery);