"),(E=u)&&""!==E))switch(l.addClass("fancybox-title-"+v.titlePosition).html(E).appendTo("body").show(),v.titlePosition){case"inside":l.css({width:h.width-2*v.padding,marginLeft:v.padding,marginRight:v.padding}),N=l.outerHeight(!0),l.appendTo(r),h.height+=N;break;case"over":l.css({marginLeft:v.padding,width:h.width-2*v.padding,bottom:v.padding}).appendTo(r);break;case"float":l.css("left",-1*parseInt((l.width()-h.width-40)/2,10)).appendTo(o);break;default:l.css({width:h.width-2*v.padding,paddingLeft:v.padding,paddingRight:v.padding}).appendTo(o)}l.hide(),o.is(":visible")?(e(s.add(c).add(d)).hide(),u=o.position(),f={top:u.top,left:u.left,width:o.width(),height:o.height()},x=f.width==h.width&&f.height==h.height,a.fadeTo(v.changeFade,.3,function(){var n=function(){a.html(t.contents()).fadeTo(v.changeFade,1,I)};e.event.trigger("fancybox-change"),a.empty().removeAttr("filter").css({"border-width":v.padding,width:h.width-2*v.padding,height:m.autoDimensions?"auto":h.height-N-2*v.padding}),x?n():(j.prop=0,e(j).animate({prop:1},{duration:v.changeSpeed,easing:v.easingChange,step:q,complete:n}))})):(o.removeAttr("style"),a.css("border-width",v.padding),"elastic"==v.transitionIn?(f=W(),a.html(t.contents()),o.show(),v.opacity&&(h.opacity=0),j.prop=0,e(j).animate({prop:1},{duration:v.speedIn,easing:v.easingIn,step:q,complete:I})):("inside"==v.titlePosition&&N>0&&l.show(),a.css({width:h.width-2*v.padding,height:m.autoDimensions?"auto":h.height-N-2*v.padding}).html(t.contents()),o.css(h).fadeIn("none"==v.transitionIn?0:v.speedIn,I)))}},I=function(){var t;e.support.opacity||(a.css("filter",0),o.css("filter",0)),m.autoDimensions&&a.css("height","auto"),o.css("height","auto"),E&&E.length&&l.show(),v.showCloseButton&&s.show(),(v.enableEscapeButton||v.enableKeyboardNav)&&e(document).bind("keydown.fb",function(t){27==t.keyCode&&v.enableEscapeButton?(t.preventDefault(),e.fancybox.close()):37!=t.keyCode&&39!=t.keyCode||!v.enableKeyboardNav||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName||(t.preventDefault(),e.fancybox[37==t.keyCode?"prev":"next"]())}),v.showNavArrows?((v.cyclic&&b.length>1||0!==y)&&c.show(),(v.cyclic&&b.length>1||y!=b.length-1)&&d.show()):(c.hide(),d.hide()),v.hideOnContentClick&&a.bind("click",e.fancybox.close),v.hideOnOverlayClick&&i.bind("click",e.fancybox.close),e(window).bind("resize.fb",e.fancybox.resize),v.centerOnScroll&&e(window).bind("scroll.fb",e.fancybox.center),"iframe"==v.type&&e(' ').appendTo(a),o.show(),S=!1,e.fancybox.center(),v.onComplete(b,y,v),b.length-1>y&&void 0!==(t=b[y+1].href)&&t.match(T)&&((new Image).src=t),y>0&&void 0!==(t=b[y-1].href)&&t.match(T)&&((new Image).src=t)},q=function(e){var t={width:parseInt(f.width+(h.width-f.width)*e,10),height:parseInt(f.height+(h.height-f.height)*e,10),top:parseInt(f.top+(h.top-f.top)*e,10),left:parseInt(f.left+(h.left-f.left)*e,10)};void 0!==h.opacity&&(t.opacity=e<.5?.5:e),o.css(t),a.css({width:t.width-2*v.padding,height:t.height-N*e-2*v.padding})},H=function(){return[e(window).width()-2*v.margin,e(window).height()-2*v.margin,e(document).scrollLeft()+v.margin,e(document).scrollTop()+v.margin]},P=function(){var e=H(),t={},n=v.autoScale,i=2*v.padding;return t.width=v.width.toString().indexOf("%")>-1?parseInt(e[0]*parseFloat(v.width)/100,10):v.width+i,t.height=v.height.toString().indexOf("%")>-1?parseInt(e[1]*parseFloat(v.height)/100,10):v.height+i,n&&(t.width>e[0]||t.height>e[1])&&("image"==m.type||"swf"==m.type?(n=v.width/v.height,t.width>e[0]&&(t.width=e[0],t.height=parseInt((t.width-i)/n+i,10)),t.height>e[1]&&(t.height=e[1],t.width=parseInt((t.height-i)*n+i,10))):(t.width=Math.min(t.width,e[0]),t.height=Math.min(t.height,e[1]))),t.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-t.height-40)),10),t.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-t.width-40)),10),t},W=function(){var t=!!m.orig&&e(m.orig),n={};return t&&t.length?((n=t.offset()).top+=parseInt(t.css("paddingTop"),10)||0,n.left+=parseInt(t.css("paddingLeft"),10)||0,n.top+=parseInt(t.css("border-top-width"),10)||0,n.left+=parseInt(t.css("border-left-width"),10)||0,n.width=t.width(),n.height=t.height(),n={width:n.width+2*v.padding,height:n.height+2*v.padding,top:n.top-v.padding-20,left:n.left-v.padding-20}):(t=H(),n={width:2*v.padding,height:2*v.padding,top:parseInt(t[3]+.5*t[1],10),left:parseInt(t[2]+.5*t[0],10)}),n},_=function(){n.is(":visible")?(e("div",n).css("top",-40*k+"px"),k=(k+1)%12):clearInterval(u)};e.fn.fancybox=function(t){return e(this).length?(e(this).data("fancybox",e.extend({},t,e.metadata?e(this).metadata():{})).unbind("click.fb").bind("click.fb",function(t){t.preventDefault(),S||(S=!0,e(this).blur(),g=[],p=0,(t=e(this).attr("rel")||"")&&""!=t&&"nofollow"!==t?(g=e("a[rel="+t+"], area[rel="+t+"]"),p=g.index(this)):g.push(this),F())}),this):this},e.fancybox=function(t,n){var i;if(!S){if(S=!0,i=void 0!==n?n:{},g=[],p=parseInt(i.index,10)||0,e.isArray(t)){for(var o=0,r=t.length;og.length||p<0)&&(p=0),F()}},e.fancybox.showActivity=function(){clearInterval(u),n.show(),u=setInterval(_,66)},e.fancybox.hideActivity=function(){n.hide()},e.fancybox.next=function(){return e.fancybox.pos(y+1)},e.fancybox.prev=function(){return e.fancybox.pos(y-1)},e.fancybox.pos=function(e){S||(e=parseInt(e),g=b,e>-1&&e1&&(p=e>=b.length?0:b.length-1,F()))},e.fancybox.cancel=function(){S||(S=!0,e.event.trigger("fancybox-cancel"),L(),m.onCancel(g,p,m),S=!1)},e.fancybox.close=function(){function t(){i.fadeOut("fast"),l.empty().hide(),o.hide(),e.event.trigger("fancybox-cleanup"),a.empty(),v.onClosed(b,y,v),b=m=[],y=p=0,v=m={},S=!1}if(!S&&!o.is(":hidden"))if(S=!0,v&&!1===v.onCleanup(b,y,v))S=!1;else if(L(),e(s.add(c).add(d)).hide(),e(a.add(i)).unbind(),e(window).unbind("resize.fb scroll.fb"),e(document).unbind("keydown.fb"),a.find("iframe").attr("src",A&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==v.titlePosition&&l.empty(),o.stop(),"elastic"==v.transitionOut){f=W();var n=o.position();h={top:n.top,left:n.left,width:o.width(),height:o.height()},v.opacity&&(h.opacity=1),l.empty().hide(),j.prop=1,e(j).animate({prop:0},{duration:v.speedOut,easing:v.easingOut,step:q,complete:t})}else o.fadeOut("none"==v.transitionOut?0:v.speedOut,t)},e.fancybox.resize=function(){i.is(":visible")&&i.css("height",e(document).height()),e.fancybox.center(!0)},e.fancybox.center=function(e){var t,n;S||(n=!0===e?1:0,t=H(),!n&&(o.width()>t[0]||o.height()>t[1])||o.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-a.height()-40)-v.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-a.width()-40)-v.padding))},"number"==typeof e?e:200))},e.fancybox.init=function(){e("#fancybox-wrap").length||(e("body").append(t=e('