/*! fancyBox v2.0.6 fancyapps.com | fancyapps.com/fancybox/#license */
(function(u,x,e,s){var p=e(u),o=e(x),a=e.fancybox=function(){a.open.apply(this,arguments)},y=!1,r=x.createTouch!==s,F=function(a){return a&&a.hasOwnProperty&&a instanceof e},q=function(a){return a&&"string"===e.type(a)},B=function(a){return q(a)&&0<a.indexOf("%")},m=function(b,c){c&&B(b)&&(b=a.getViewport()[c]/100*parseInt(b,10));return Math.ceil(b)},v=function(a,c){return m(a,c)+"px"};e.extend(a,{version:"2.0.6",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,
maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!r,autoCenter:!r,fitToView:!0,aspectRatio:!1,topRatio:0.5,fixed:!1,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},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]},tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+(e.browser.msie?' allowtransparency="true"':"")+"></iframe>",swf:'<object id="fancybox-swf{rnd}" name="fancybox-swf{rnd}" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',
error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-nav fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev"><span></span></a>'},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:{speedIn:0,speedOut:250,opacity:0.8,css:{cursor:"pointer"},closeClick:!0},title:{type:"float"}}},group:{},opts:{},coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,player:{timer:null,isActive:!1},transitions:{},helpers:{},open:function(b,c){if(b)return c=e.isPlainObject(c)?c:{},a.close(!0),e.isArray(b)||(b=F(b)?e(b).get():
[b]),e.each(b,function(f,d){var j={},h,g,i,k,l;"object"===e.type(d)&&(d.nodeType&&(d=e(d)),F(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},e.metadata&&e.extend(!0,j,d.metadata())):j=d);h=c.href||j.href||(q(d)?d:null);g=c.title!==s?c.title:j.title||"";k=(i=c.content||j.content)?"html":c.type||j.type;!k&&j.isDom&&(k=d.data("fancybox-type"),k||(k=(k=d.prop("class").match(/fancybox\.(\w+)/))?k[1]:null));if(q(h)&&(k||(a.isImage(h)?k="image":a.isSWF(h)?k="swf":h.match(/^#/)?k="inline":
q(d)&&(k="html",i=d)),"ajax"===k))l=h.split(/\s+/,2),h=l.shift(),l=l.shift();i||("inline"===k?h?i=e(q(h)?h.replace(/.*(?=#[^\s]+$)/,""):h):j.isDom&&(i=d):"html"===k?i=h:!k&&(!h&&j.isDom)&&(k="inline",i=d));e.extend(j,{href:h,type:k,content:i,title:g,selector:l});b[f]=j}),a.opts=e.extend(!0,{},a.defaults,c),c.keys!==s&&(a.opts.keys=c.keys?e.extend({},a.defaults.keys,c.keys):!1),a.group=b,a._start(a.opts.index||0)},cancel:function(){var b=a.coming;b&&!1!==a.trigger("onCancel")&&(a.hideLoading(),b.wrap&&
b.wrap.stop().trigger("onReset").remove(),a.coming=null,a.ajaxLoad&&a.ajaxLoad.abort(),a.ajaxLoad=null,a.imgPreload&&(a.imgPreload.onload=a.imgPreload.onerror=null))},close:function(b){a.cancel();a.current&&!1!==a.trigger("beforeClose")&&(a.unbindEvents(),!a.isOpen||!0===b?(e(".fancybox-wrap").stop().trigger("onReset").remove(),a._afterZoomOut()):(a.isOpen=a.isOpened=!1,e(".fancybox-item, .fancybox-nav").remove(),a.wrap.stop(!0).removeClass("fancybox-opened"),"fixed"===a.wrap.css("position")&&a.wrap.css(a._getPosition(!0)),
a.transitions[a.current.closeMethod]()))},play:function(b){var c=function(){clearTimeout(a.player.timer)},f=function(){c();a.current&&a.player.isActive&&(a.player.timer=setTimeout(a.next,a.current.playSpeed))},d=function(){c();e("body").unbind(".player");a.player.isActive=!1;a.trigger("onPlayEnd")};if(!0===b||!a.player.isActive&&!1!==b){if(a.current&&(a.current.loop||a.current.index<a.group.length-1))a.player.isActive=!0,e("body").bind({"afterShow.player onUpdate.player":f,"onCancel.player beforeClose.player":d,
"beforeLoad.player":c}),f(),a.trigger("onPlayStart")}else d()},next:function(b){q(b)||(b="down");a.current&&a.jumpto(a.current.index+1,b,"next")},prev:function(b){q(b)||(b="up");a.current&&a.jumpto(a.current.index-1,b,"prev")},jumpto:function(b,c,f){var d=a.current;if(d&&(b=parseInt(b,10),a.direction=c||(b>d.index?"right":"left"),a.router=f||"jumpto",d.loop&&(0>b&&(b=d.group.length+b%d.group.length),b%=d.group.length),d.group[b]!==s))a.cancel(),a._start(b)},reposition:function(b,c){var f;a.isOpen&&
(f=a._getPosition(c),b&&"scroll"===b.type?(delete f.position,a.wrap.stop(!0,!0).animate(f,200)):a.wrap.css(f))},update:function(b){var c=!b||b&&"orientationchange"===b.type,f=b&&"scroll"===b.type;c&&(clearTimeout(y),y=null);a.isOpen&&!y&&(c&&r&&(a.wrap.removeAttr("style").addClass("fancybox-tmp"),a.trigger("onUpdate")),y=setTimeout(function(){var d=a.current;y=null;if(d){a.wrap.removeClass("fancybox-tmp");if(d.autoResize&&!f||c){a._setDimension();a.trigger("onUpdate")}(d.autoCenter&&(!f||!d.canShrink)||
c)&&a.reposition(b);a.trigger("onUpdate")}},c?20:200))},toggle:function(b){a.isOpen&&(a.current.fitToView="boolean"===e.type(b)?b:!a.current.fitToView,a.update())},hideLoading:function(){o.unbind("keypress.fb");e("#fancybox-loading").remove()},showLoading:function(){var b,c;a.hideLoading();o.bind("keypress.fb",function(b){if(27===(b.which||b.keyCode))b.preventDefault(),a.cancel()});b=e('<div id="fancybox-loading"><div></div></div>').click(a.cancel).appendTo("body");a.coming&&!a.coming.fixed&&(c=a.getViewport(),
b.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){return{x:p.scrollLeft(),y:p.scrollTop(),w:r&&u.innerWidth?u.innerWidth:p.width(),h:r&&u.innerHeight?u.innerHeight:p.height()}},unbindEvents:function(){a.wrap&&a.wrap.unbind(".fb");o.unbind(".fb");p.unbind(".fb")},bindEvents:function(){var b=a.current,c;b&&(p.bind("resize.fb orientationchange.fb"+(b.autoCenter&&!b.fixed?" scroll.fb":""),a.update),(c=b.keys)&&o.bind("keydown.fb",function(f){var d=f.which||f.keyCode,
j=f.target||f.srcElement;!f.ctrlKey&&(!f.altKey&&!f.shiftKey&&!f.metaKey&&(!j||!j.type&&!e(j).is("[contenteditable]")))&&e.each(c,function(c,g){if(1<b.group.length&&g[d]!==s)return a[c](g[d]),f.preventDefault(),!1;if(-1<e.inArray(d,g))return a[c](),f.preventDefault(),!1})}),e.fn.mousewheel&&b.mouseWheel&&a.wrap.bind("mousewheel.fb",function(c,d,j,h){for(var g=e(c.target||null),i=!1;g.length&&!i&&!g.is(".fancybox-skin")&&!g.is(".fancybox-wrap");)i=g[0]&&!(g[0].style.overflow&&"hidden"===g[0].style.overflow)&&
(g[0].clientWidth&&g[0].scrollWidth>g[0].clientWidth||g[0].clientHeight&&g[0].scrollHeight>g[0].clientHeight),g=e(g).parent();if(0!==d&&!i)if(1<a.group.length&&!b.canShrink){if(0<h||0<j)a.prev(0<h?"up":"left");else if(0>h||0>j)a.next(0>h?"down":"right");c.preventDefault()}else"fixed"===a.wrap.css("position")&&c.preventDefault()}))},trigger:function(b,c){var f,d=c||a[-1<e.inArray(b,["onCancel","beforeLoad","afterLoad"])?"coming":"current"];if(d){e.isFunction(d[b])&&(f=d[b].apply(d,Array.prototype.slice.call(arguments,
1)));if(!1===f)return!1;d.helpers&&e.each(d.helpers,function(c,f){if(f&&a.helpers[c]&&e.isFunction(a.helpers[c][b]))a.helpers[c][b](f,d)});e.event.trigger(b+".fb")}},isImage:function(a){return q(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp)((\?|#).*)?$/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(b){var c={},c=a.group[b]||null,f,d;if(!c)return!1;c=e.extend(!0,{},a.opts,c);f=c.margin;"number"===e.type(f)&&(c.margin=[f,f,f,f]);c.modal&&e.extend(!0,c,{closeBtn:!1,closeClick:!1,
nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{css:{cursor:"auto"},closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=a.group;c.index=b;a.coming=c;if(!1===a.trigger("beforeLoad"))a.coming=null;else{d=c.type;f=c.href;if(!d)return a.coming=null,a.current&&a.router&&"jumpto"!==a.router?(a.current.index=b,a[a.router](a.direction)):!1;a.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&r&&(c.scrolling="scroll");c.wrap=e(c.tpl.wrap).addClass("fancybox-"+(r?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo("body");e.extend(c,{skin:e(".fancybox-skin",c.wrap).css("padding",v(c.padding)),outer:e(".fancybox-outer",c.wrap),inner:e(".fancybox-inner",c.wrap)});if("inline"===d||"html"===d){if(!c.content||!c.content.length)return a._error("content")}else if(!f)return a._error("href");"image"===
d?a._loadImage():"ajax"===d?a._loadAjax():"iframe"===d?a._loadIframe():a._afterLoad()}},_error:function(b){e.extend(a.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:b,content:a.coming.tpl.error});a._afterLoad()},_loadImage:function(){var b=a.imgPreload=new Image;b.onload=function(){this.onload=this.onerror=null;a.coming.width=this.width;a.coming.height=this.height;a._afterLoad()};b.onerror=function(){this.onload=this.onerror=null;a._error("image")};b.src=
a.coming.href;(b.complete===s||!b.complete)&&a.showLoading()},_loadAjax:function(){var b=a.coming;a.showLoading();a.ajaxLoad=e.ajax(e.extend({},b.ajax,{url:b.href,error:function(b,f){a.coming&&"abort"!==f?a._error("ajax",b):a.hideLoading()},success:function(c,f){"success"===f&&(b.content=c,a._afterLoad())}}))},_loadIframe:function(){var b=a.coming,c=e(b.tpl.iframe.replace("{rnd}",(new Date).getTime())).attr("scrolling",r?"auto":b.iframe.scrolling).attr("src",b.href);e(b.wrap).bind("onReset",function(){try{c.hide().parent().empty()}catch(a){}});
b.iframe.preload&&(a.showLoading(),c.bind("load",function(){e(this).unbind().bind("load.fb",a.update).data("ready",1);a.coming.wrap.removeClass("fancybox-tmp").show();a._afterLoad()}));b.content=c.appendTo(b.inner);b.iframe.preload||a._afterLoad()},_preloadImages:function(){var b=a.group,c=a.current,f=b.length,d=c.preload?Math.min(c.preload,f-1):0,e,h;for(h=1;h<=d;h+=1)e=b[(c.index+h)%f],"image"===e.type&&e.href&&((new Image).src=e.href)},_afterLoad:function(){var b=a.coming,c=a.current,f,d;a.hideLoading();
if(!b||!1===a.trigger("afterLoad",b,c))a.coming.wrap.stop().trigger("onReset").remove(),a.coming=null;else{c&&a.trigger("beforeChange",c);a.unbindEvents();a.isOpened?(e(".fancybox-item, .fancybox-nav").remove(),c.wrap.stop(!0).removeClass("fancybox-opened"),a.transitions[c.prevMethod]()):e(".fancybox-wrap").not(b.wrap).stop().trigger("onReset").remove();c=b.content;f=b.type;d=b.scrolling;e.extend(a,{wrap:b.wrap,skin:b.skin,outer:b.outer,inner:b.inner,current:b});switch(f){case "inline":case "ajax":case "html":b.selector?
c=e("<div>").html(c).find(b.selector):F(c)&&(c=c.show().detach(),e(b.wrap).bind("onReset",function(){e(this).find(".fancybox-inner").children().appendTo("body").hide()}));break;case "image":c=b.tpl.image.replace("{href}",b.href);break;case "swf":c=b.tpl.swf.replace(/\{rnd\}/g,(new Date).getTime()).replace(/\{href\}/g,b.href)}"iframe"===b.type&&b.iframe.preload||b.inner.append(c);a.trigger("beforeShow");a._setDimension();b.pos=e.extend({},b.dim,a._getPosition(!0));b.inner.css("overflow","yes"===d?
"scroll":"no"===d?"hidden":d);b.wrap.removeClass("fancybox-tmp");a.isOpen=!1;a.coming=null;a.bindEvents();a.transitions[a.isOpened?b.nextMethod:b.openMethod]();a._preloadImages()}},_setDimension:function(){var b=a.getViewport(),c=0,f=!1,d=!1,f=a.wrap,j=a.skin,h=a.inner,g=a.current,d=g.width,i=g.height,k=g.minWidth,l=g.minHeight,n=g.maxWidth,t=g.maxHeight,r=g.scrolling,q=g.scrollOutside,w=g.margin,o=w[1]+w[3],p=w[0]+w[2],x,s,u,A,z,D,y,C,E;f.add(j).add(h).width("auto").height("auto");w=j.outerWidth(!0)-
j.width();x=j.outerHeight(!0)-j.height();s=o+w;u=p+x;A=B(d)?(b.w-s)*parseFloat(d)/100:d;z=B(i)?(b.h-u)*parseFloat(i)/100:i;if("iframe"===g.type){if(E=g.content,g.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(h.width(A).height(9999),D=E.contents().find("body"),q&&D.css("overflow-x","hidden"),z=D.height())}catch(F){}}else if(g.autoWidth||g.autoHeight)h.addClass("fancybox-tmp"),g.autoWidth&&(A=h.width()),g.autoHeight&&(z=h.height()),h.removeClass("fancybox-tmp");d=m(A);i=
m(z);C=A/z;k=m(B(k)?m(k,"w")-s:k);n=m(B(n)?m(n,"w")-s:n);l=m(B(l)?m(l,"h")-u:l);t=m(B(t)?m(t,"h")-u:t);D=n;y=t;o=b.w-o;p=b.h-p;if(g.aspectRatio){if(d>n&&(d=n,i=d/C),i>t&&(i=t,d=i*C),d<k&&(d=k,i=d/C),i<l)i=l,d=i*C}else d=Math.max(k,Math.min(d,n)),i=Math.max(l,Math.min(i,t));if(g.fitToView)if(Math.min(b.w-s,n),t=Math.min(b.h-u,t),h.width(m(d)).height(m(i)),f.width(m(d+w)),b=f.width(),n=f.height(),g.aspectRatio)for(;(b>o||n>p)&&(d>k&&i>l)&&!(19<c++);)i=Math.max(l,Math.min(t,i-10)),d=i*C,d<k&&(d=k,i=
d/C),h.width(m(d)).height(m(i)),f.width(m(d+w)),b=f.width(),n=f.height();else d=Math.max(k,Math.min(d,d-(b-o))),i=Math.max(l,Math.min(i,i-(n-p)));q&&("auto"===r&&i<z&&d+w+q<o)&&(d+=q);h.width(m(d)).height(m(i));f.width(m(d+w));b=f.width();n=f.height();f=(b>o||n>p)&&d>k&&i>l;d=g.aspectRatio?d<D&&i<y&&d<A&&i<z:(d<D||i<y)&&(d<A||i<z);e.extend(g,{dim:{width:v(b),height:v(n)},origWidth:A,origHeight:z,canShrink:f,canExpand:d,wPadding:w,hPadding:x,wrapSpace:n-j.outerHeight(!0),skinSpace:j.height()-i});!E&&
(g.autoHeight&&i>l&&i<t&&!d)&&h.height("auto")},_getPosition:function(b){var c=a.current,f=a.getViewport(),d=c.margin,e=a.wrap.width()+d[1]+d[3],h=a.wrap.height()+d[0]+d[2],g={position:"absolute",top:d[0]+f.y,left:d[3]+f.x};c.autoCenter&&(c.fixed&&!b&&h<=f.h&&e<=f.w)&&(g={position:"fixed",top:d[0],left:d[3]});g.top=v(Math.max(g.top,g.top+(f.h-h)*c.topRatio));g.left=v(Math.max(g.left,g.left+0.5*(f.w-e)));return g},_afterZoomIn:function(){var b=a.current;if(b&&(a.isOpen=a.isOpened=!0,a.wrap.addClass("fancybox-opened").css("overflow",
"visible"),a.trigger("afterShow"),a.reposition(),(b.closeClick||b.nextClick)&&a.inner.css("cursor","pointer").bind("click.fb",function(c){if(!e(c.target).is("a")&&!e(c.target).parent().is("a"))a[b.closeClick?"close":"next"]()}),b.closeBtn&&e(b.tpl.closeBtn).appendTo(a.skin).bind("click.fb",a.close),b.arrows&&1<a.group.length&&((b.loop||0<b.index)&&e(b.tpl.prev).appendTo(a.outer).bind("click.fb",a.prev),(b.loop||b.index<a.group.length-1)&&e(b.tpl.next).appendTo(a.outer).bind("click.fb",a.next)),a.opts.autoPlay&&
!a.player.isActive))a.opts.autoPlay=!1,a.play()},_afterZoomOut:function(){var b=a.current;a.wrap.trigger("onReset").remove();e.extend(a,{group:{},opts:{},current:null,isActive:!1,isOpened:!1,isOpen:!1,router:!1,wrap:null,skin:null,outer:null,inner:null});a.trigger("afterClose",b)}});a.transitions={getOrigPosition:function(){var b=a.current,c=b.element,f=e(b.orig),d={},j=50,h=50,g=b.hPadding,i=b.wPadding;!f.length&&(b.isDom&&c.is(":visible"))&&(f=c.find("img:first"),f.length||(f=c));f.length?(d=f.offset(),
f.is("img")&&(j=f.outerWidth(),h=f.outerHeight())):(b=a.getViewport(),d.top=b.y+0.5*(b.h-h),d.left=b.x+0.5*(b.w-j));return d={top:v(d.top-0.5*g),left:v(d.left-0.5*i),width:v(j+i),height:v(h+g)}},step:function(b,c){var f,d,e=c.prop;d=a.current;var h=d.wrapSpace,g=d.skinSpace;if("width"===e||"height"===e)f=(b-c.start)/(c.end-c.start),c.start>c.end&&(f=1-f),d="width"===e?d.wPadding:d.hPadding,d=b-d,a.skin[e](m("width"===e?d:d-h*f)),a.inner[e](m("width"===e?d:d-h*f-g*f))},zoomIn:function(){var b=a.wrap,
c=a.current,f=c.pos,d=c.openEffect,j="elastic"===d,h=e.extend({opacity:1},f);delete h.position;j?(f=this.getOrigPosition(),c.openOpacity&&(f.opacity=0.1)):"fade"===d&&(f.opacity=0.1);b.css(f).animate(h,{duration:"none"===d?0:c.openSpeed,easing:c.openEasing,step:j?this.step:null,complete:a._afterZoomIn})},zoomOut:function(){var b=a.wrap,c=a.current,f=c.closeEffect,d="elastic"===f,e={opacity:0.1};d&&(e=this.getOrigPosition(),c.closeOpacity&&(e.opacity=0.1));b.animate(e,{duration:"none"===f?0:c.closeSpeed,
easing:c.closeEasing,step:d?this.step:null,complete:a._afterZoomOut})},changeIn:function(){var b=a.wrap,c=a.current,f=c.nextEffect,d=c.pos,e={opacity:1},h=a.direction,g;d.opacity=0.1;"elastic"===f&&(g="down"===h||"up"===h?"top":"left","down"===h||"right"===h?(d[g]=v(parseInt(d[g],10)-200),e[g]="+=200px"):(d[g]=v(parseInt(d[g],10)+200),e[g]="-=200px"));b.css(d).animate(e,{duration:"none"===f?0:c.nextSpeed,easing:c.nextEasing,complete:function(){setTimeout(a._afterZoomIn,10)}})},changeOut:function(){var b=
a.wrap,c=a.current,f=c.prevEffect,d={opacity:0.1},j=a.direction;"elastic"===f&&(d["down"===j||"up"===j?"top":"left"]=("up"===j||"left"===j?"-":"+")+"=200px");b.animate(d,{duration:"none"===f?0:c.prevSpeed,easing:c.prevEasing,complete:function(){e(this).trigger("onReset").remove()}})}};a.helpers.overlay={overlay:null,update:function(){var a,c;this.overlay.width("100%").height("100%");e.browser.msie||r?(a=Math.max(x.documentElement.scrollWidth,x.body.scrollWidth),c=Math.max(x.documentElement.offsetWidth,
x.body.offsetWidth),a=a<c?p.width():a):a=o.width();this.overlay.width(a).height(o.height())},beforeShow:function(b){var c;this.overlay||(b=e.extend(!0,{},a.defaults.helpers.overlay,b),c=this.overlay=e('<div id="fancybox-overlay"></div>').css(b.css).appendTo("body").bind("mousewheel",function(b){(!a.wrap||"fixed"===a.wrap.css("position")||a.wrap.is(":animated"))&&b.preventDefault()}),b.closeClick&&c.bind("click.fb",a.close),a.current.fixed&&!r?c.addClass("overlay-fixed"):(this.update(),this.onUpdate=
function(){this.update()}),c.fadeTo(b.speedIn,b.opacity))},afterClose:function(a){this.overlay&&this.overlay.fadeOut(a.speedOut||0,function(){e(this).remove()});this.overlay=null}};a.helpers.title={beforeShow:function(b){var c=a.current.title,b=b.type;c&&(c=e('<div class="fancybox-title fancybox-title-'+b+'-wrap">'+c+"</div>").appendTo("body"),"float"===b&&(c.width(c.width()).wrapInner('<span class="child"></span>'),a.current.margin[2]+=Math.abs(parseInt(c.css("margin-bottom"),10))),c.appendTo("over"===
b?a.inner:"outside"===b?a.wrap:a.skin))}};e.fn.fancybox=function(b){var c,f=e(this),d=this.selector||"",j=function(h){var g=this,i=c,j,l;!h.ctrlKey&&(!h.altKey&&!h.shiftKey&&!h.metaKey)&&!e(g).is(".fancybox-wrap")&&(j=b.groupAttr||"data-fancybox-group",l=e(g).attr(j),l||(j="rel",l=g[j]),l&&(""!==l&&"nofollow"!==l)&&(g=d.length?e(d):f,g=g.filter("["+j+'="'+l+'"]'),i=g.index(this)),b.index=i,!1!==a.open(g,b)&&h.preventDefault())},b=b||{};c=b.index||0;!d||!1===b.live?f.unbind("click.fb-start").bind("click.fb-start",
j):o.undelegate(d,"click.fb-start").delegate(d,"click.fb-start",j);return this};e.scrollbarWidth||(e.scrollbarWidth=function(){var a,c;a=e('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body");c=a.children();c=c.innerWidth()-c.height(99).innerWidth();a.remove();return c});o.ready(function(){a.defaults.scrollOutside=e.scrollbarWidth();a.defaults.fixed=e.support.fixedPosition||!(e.browser.msie&&e.browser.version<=6||r)})})(window,document,jQuery);