/*! fancybox v2.0.6 fancyapps.com | fancyapps.com/fancybox/#license & buttons helper & media helper */ (function(k,n,i,e){var d=i(k),a=i(n),o=i.fancybox=function(){o.open.apply(this,arguments)},c=false,f=n.createtouch!==e,j=function(p){return p&&p.hasownproperty&&p instanceof i},b=function(p){return p&&i.type(p)==="string"},l=function(p){return b(p)&&p.indexof("%")>0},h=function(p){return(p&&!(p.style.overflow&&p.style.overflow==="hidden")&&((p.clientwidth&&p.scrollwidth>p.clientwidth)||(p.clientheight&&p.scrollheight>p.clientheight)))},m=function(p,q){if(q&&l(p)){p=o.getviewport()[q]/100*parseint(p,10)}return math.ceil(p)},g=function(p,q){return m(p,q)+"px"};i.extend(o,{version:"2.0.6",defaults:{padding:15,margin:20,width:800,height:600,minwidth:100,minheight:100,maxwidth:9999,maxheight:9999,autosize:true,autoheight:false,autowidth:false,autoresize:!f,autocenter:!f,fittoview:true,aspectratio:false,topratio:0.5,fixed:false,scrolling:"auto",wrapcss:"",arrows:true,closebtn:true,closeclick:false,nextclick:false,mousewheel:true,autoplay:false,playspeed:3000,preload:3,modal:false,loop:true,ajax:{datatype:"html",headers:{"x-fancybox":true}},iframe:{scrolling:"auto",preload:true},keys:{next:{13:"right",34:"down",39:"right",40:"down"},prev:{8:"left",33:"up",37:"left",38:"up"},close:[27],play:[32],toggle:[70]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'
',image:'',iframe:'",swf:'',error:'

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

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