/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
eval(function(a,b,c,d,e,f){e=function(a){return(a<b?"":e(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(c--)f[e(c)]=d[c]||e(c);d=[function(a){return f[a]}],e=function(){return"\\w+"},c=1}while(c--)d[c]&&(a=a.replace(new RegExp("\\b"+e(c)+"\\b","g"),d[c]));return a}("h.i['1a']=h.i['z'];h.O(h.i,{y:'D',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});",62,74,"||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"),0,{})),function(a){function b(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=0,g=0,b=a.event.fix(c);return b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),g=e,c.axis!==void 0&&c.axis===c.HORIZONTAL_AXIS&&(g=0,f=-1*e),c.wheelDeltaY!==void 0&&(g=c.wheelDeltaY/120),c.wheelDeltaX!==void 0&&(f=-1*c.wheelDeltaX/120),d.unshift(b,e,f,g),(a.event.dispatch||a.event.handle).apply(this,d)}var c=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var d=c.length;d;)a.event.fixHooks[c[--d]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],b,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}(jQuery),function(a,b,c){var d=c(a),e=c(b),f=c.fancybox=function(){f.open.apply(this,arguments)},g=!1,h=null;c.extend(f,{version:"2.0.3",defaults:{padding:15,margin:20,width:800,height:600,minWidth:200,minHeight:200,maxWidth:9999,maxHeight:9999,autoSize:!0,fitToView:!0,aspectRatio:!1,topRatio:.5,fixed:!c.browser.msie||c.browser.version>6,scrolling:"auto",wrapCSS:"fancybox-default",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,modal:!1,loop:!0,ajax:{},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0" '+(c.browser.msie?'allowtransparency="true""':"")+' scrolling="{scrolling}" src="{href}"></iframe>',swf:'<object 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-item fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-item fancybox-prev"><span></span></a>'},openEffect:"fade",openSpeed:500,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:500,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"fade",nextSpeed:200,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"fade",prevSpeed:200,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{speedIn:0,speedOut:0,opacity:.85,css:{cursor:"pointer","background-color":"rgba(0, 0, 0, 0.85)"},closeClick:!0},title:{type:"float"}},onCancel:c.noop,beforeLoad:c.noop,afterLoad:c.noop,beforeShow:c.noop,afterShow:c.noop,beforeClose:c.noop,afterClose:c.noop},group:{},opts:{},coming:null,current:null,isOpen:!1,isOpened:!1,wrap:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,b){c.isArray(a)||(a=[a]);if(!a.length)return;f.close(!0),f.opts=c.extend(!0,{},f.defaults,b),f.group=a,f._start(f.opts.index||0)},cancel:function(){if(f.coming&&!1===f.trigger("onCancel"))return;f.coming=null,f.hideLoading(),f.ajaxLoad&&f.ajaxLoad.abort(),f.ajaxLoad=null,f.imgPreload&&(f.imgPreload.onload=f.imgPreload.onabort=f.imgPreload.onerror=null)},close:function(a){f.cancel();if(!f.current||!1===f.trigger("beforeClose"))return;f.unbindEvents(),!f.isOpen||a&&a[0]===!0?(c(".fancybox-wrap").stop().trigger("onReset").remove(),f._afterZoomOut()):(f.isOpen=f.isOpened=!1,c(".fancybox-item").remove(),f.wrap.stop(!0).removeClass("fancybox-opened"),f.inner.css("overflow","hidden"),f.transitions[f.current.closeMethod]())},play:function(a){var b=function(){clearTimeout(f.player.timer)},d=function(){b(),f.current&&f.player.isActive&&(f.player.timer=setTimeout(f.next,f.current.playSpeed))},e=function(){b(),c("body").unbind(".player"),f.player.isActive=!1,f.trigger("onPlayEnd")},g=function(){f.current&&(f.current.loop||f.current.index<f.group.length-1)&&(f.player.isActive=!0,d(),c("body").bind({"onCancel.player afterShow.player onUpdate.player":d,"beforeClose.player":e,"beforeLoad.player":b}),f.trigger("onPlayStart"))};f.player.isActive||a&&a[0]===!1?e():g()},next:function(){f.current&&f.jumpto(f.current.index+1)},prev:function(){f.current&&f.jumpto(f.current.index-1)},jumpto:function(a){if(!f.current)return;a=parseInt(a,10),f.group.length>1&&f.current.loop&&(a>=f.group.length?a=0:a<0&&(a=f.group.length-1)),typeof f.group[a]!="undefined"&&(f.cancel(),f._start(a))},reposition:function(a){f.isOpen&&f.wrap.css(f._getPosition(a))},update:function(){f.isOpen&&(g||(h=setInterval(function(){g&&(g=!1,clearTimeout(h),f.current&&(f.current.autoSize&&(f.inner.height("auto"),f.current.height=f.inner.height()),f._setDimension(),f.current.canGrow&&f.inner.height("auto"),f.reposition(),f.trigger("onUpdate")))},100)),g=!0)},toggle:function(){f.isOpen&&(f.current.fitToView=!f.current.fitToView,f.update())},hideLoading:function(){c("#fancybox-loading").remove()},showLoading:function(){f.hideLoading(),c('<div id="fancybox-loading"></div>').click(f.cancel).appendTo("body")},getViewport:function(){return{x:d.scrollLeft(),y:d.scrollTop(),w:d.width(),h:d.height()}},unbindEvents:function(){f.wrap&&f.wrap.unbind(".fb"),e.unbind(".fb"),d.unbind(".fb")},bindEvents:function(){var a=f.current,b=a.keys;if(!a)return;d.bind("resize.fb, orientationchange.fb",f.update),b&&e.bind("keydown.fb",function(a){if(c.inArray(a.target.tagName.toLowerCase(),["input","textarea","select","button"])>-1)return;c.inArray(a.keyCode,b.close)>-1?(f.close(),a.preventDefault()):c.inArray(a.keyCode,b.next)>-1?(f.next(),a.preventDefault()):c.inArray(a.keyCode,b.prev)>-1&&(f.prev(),a.preventDefault())}),c.fn.mousewheel&&a.mouseWheel&&f.group.length>1&&f.wrap.bind("mousewheel.fb",function(a,b){if(c(a.target).get(0).clientHeight===0||c(a.target).get(0).scrollHeight===c(a.target).get(0).clientHeight)a.preventDefault(),f[b>0?"prev":"next"]()})},trigger:function(a){var b,d=c.inArray(a,["onCancel","beforeLoad","afterLoad"])>-1?"coming":"current";if(!f[d])return;c.isFunction(f[d][a])&&(b=f[d][a].apply(f[d],Array.prototype.slice.call(arguments,1)));if(b===!1)return!1;f[d].helpers&&c.each(f[d].helpers,function(b,d){d&&typeof f.helpers[b]!="undefined"&&c.isFunction(f.helpers[b][a])&&f.helpers[b][a](d)}),c.event.trigger(a+".fb")},isImage:function(a){return a&&a.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)},isSWF:function(a){return a&&a.match(/\.(swf)(.*)?$/i)},_start:function(a){var b=f.group[a]||null,d,e,g,h,i=c.extend(!0,{},f.opts,c.isPlainObject(b)?b:{},{index:a,element:b});typeof i.margin=="number"&&(i.margin=[i.margin,i.margin,i.margin,i.margin]),i.modal&&c.extend(!0,i,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{css:{cursor:"auto"},closeClick:!1}}}),f.coming=i;if(!1===f.trigger("beforeLoad")){f.coming=null;return}typeof b=="object"&&(b.nodeType||b instanceof c)&&(d=!0,i.href=c(b).attr("href")||i.href,i.title=c(b).attr("title")||i.title,c.metadata&&c.extend(i,c(b).metadata())),g=i.type,e=i.href,g||(d&&(h=c(b).data("fancybox-type"),!h&&b.className&&(h=b.className.match(/fancybox\.(\w+)/),h=h?h[1]:!1)),h?g=h:e&&(f.isImage(e)?g="image":f.isSWF(e)?g="swf":e.match(/^#/)&&(g="inline")),g||(g=d?"inline":"html"),i.type=g),g==="inline"||g==="html"?(i.content||(i.content=g==="inline"&&e?c(e):b),i.content.length||(g=null)):(i.href=e||b,i.href||(g=null)),i.group=f.group,g==="image"?f._loadImage():g==="ajax"?f._loadAjax():g?f._afterLoad():f._error()},_error:function(){f.coming.type="html",f.coming.minHeight=0,f.coming.autoSize=!0,f.coming.content=f.coming.tpl.error,f._afterLoad()},_loadImage:function(){f.imgPreload=new Image,f.imgPreload.onload=function(){this.onload=this.onerror=null,f.coming.width=this.width,f.coming.height=this.height,f._afterLoad()},f.imgPreload.onerror=function(){this.onload=this.onerror=null,f._error()},f.imgPreload.src=f.coming.href,f.imgPreload.complete||f.showLoading()},_loadAjax:function(){f.showLoading(),f.ajaxLoad=c.ajax(c.extend({},f.coming.ajax,{url:f.coming.href,error:function(a,b,c){b!=="abort"?(f.coming.content=c,f._error()):f.hideLoading()},success:function(a,b,c){b==="success"&&(f.coming.content=a,f._afterLoad())}}))},_afterLoad:function(){f.hideLoading();if(!f.coming||!1===f.trigger("afterLoad",f.current)){f.coming=!1;return}f.isOpened?(c(".fancybox-item").remove(),f.wrap.stop(!0).removeClass("fancybox-opened"),f.inner.css("overflow","hidden"),f.transitions[f.current.prevMethod]()):(c(".fancybox-wrap").stop().trigger("onReset").remove(),f.trigger("afterClose")),f.unbindEvents(),f.isOpen=!1,f.current=f.coming,f.coming=!1,f.wrap=c(f.current.tpl.wrap).addClass("fancybox-tmp "+f.current.wrapCSS).appendTo("body"),f.outer=c(".fancybox-outer",f.wrap).css("padding",f.current.padding+"px"),f.inner=c(".fancybox-inner",f.wrap),f._setContent(),f.trigger("beforeShow"),f._setDimension(),f.wrap.hide().removeClass("fancybox-tmp"),f.bindEvents(),f.transitions[f.isOpened?f.current.nextMethod:f.current.openMethod]()},_setContent:function(){var a,b,d=f.current,e=d.type;switch(e){case"inline":case"ajax":case"html":e==="inline"?(a=d.content.show().detach(),a.parent().hasClass("fancybox-inner")&&a.parents(".fancybox-wrap").trigger("onReset").remove(),c(f.wrap).bind("onReset",function(){a.appendTo("body").hide()})):a=d.content,d.autoSize&&(b=c('<div class="fancybox-tmp"></div>').appendTo(c("body")).append(a),d.width=b.outerWidth(),d.height=b.outerHeight(!0),a=b.contents().detach(),b.remove());break;case"image":a=d.tpl.image.replace("{href}",d.href),d.aspectRatio=!0;break;case"swf":a=d.tpl.swf.replace(/\{width\}/g,d.width).replace(/\{height\}/g,d.height).replace(/\{href\}/g,d.href);break;case"iframe":a=d.tpl.iframe.replace("{href}",d.href).replace("{scrolling}",d.scrolling).replace("{rnd}",(new Date).getTime())}c.inArray(e,["image","swf","iframe"])>-1&&(d.autoSize=!1,d.scrolling=!1),f.inner.append(a)},_setDimension:function(){var a=f.current,b=f.getViewport(),d=a.margin,e=a.padding*2,g=a.width+e,h=a.height+e,i=a.width/a.height,j=a.maxWidth,k=a.maxHeight,l=a.minWidth,m=a.minHeight,n,o;b.w-=d[1]+d[3],b.h-=d[0]+d[2],g.toString().indexOf("%")>-1&&(g=b.w*parseFloat(g)/100),h.toString().indexOf("%")>-1&&(h=b.h*parseFloat(h)/100),a.fitToView&&(j=Math.min(b.w,j),k=Math.min(b.h,k)),j=Math.max(l,j),k=Math.max(m,k),a.aspectRatio?(g>j&&(g=j,h=(g-e)/i+e),h>k&&(h=k,g=(h-e)*i+e),g<l&&(g=l,h=(g-e)/i+e),h<m&&(h=m,g=(h-e)*i+e)):(g=Math.max(l,Math.min(g,j)),h=Math.max(m,Math.min(h,k))),g=Math.round(g),h=Math.round(h),c(f.wrap.add(f.outer).add(f.inner)).width("auto").height("auto"),f.inner.width(g-e).height(h-e),f.wrap.width(g),n=f.wrap.height();if(g>j||n>k)while((g>j||n>k)&&g>l&&n>m)h=h-10,a.aspectRatio?(g=Math.round((h-e)*i+e),g<l&&(g=l,h=(g-e)/i+e)):g=g-10,f.inner.width(g-e).height(h-e),f.wrap.width(g),n=f.wrap.height();a.dim={width:g,height:n},a.canGrow=a.autoSize&&h>m&&h<k,a.canShrink=!1,a.canExpand=!1,g-e<a.width||h-e<a.height?a.canExpand=!0:(g>b.w||n>b.h)&&g>l&&h>m&&(a.canShrink=!0),o=n-e,f.innerSpace=o-f.inner.height(),f.outerSpace=o-f.outer.height()},_getPosition:function(a){var b=f.getViewport(),c=f.current.margin,d=f.wrap.width()+c[1]+c[3],e=f.wrap.height()+c[0]+c[2],g={position:"absolute",top:c[0]+b.y,left:c[3]+b.x};return f.current.fixed&&(!a||a[0]===!1)&&e<=b.h&&d<=b.w&&(g={position:"fixed",top:c[0],left:c[3]}),g.top=Math.ceil(Math.max(g.top,g.top+(b.h-e)*f.current.topRatio))+"px",g.left=Math.ceil(Math.max(g.left,g.left+(b.w-d)*.5))+"px",g},_afterZoomIn:function(){var a=f.current;f.isOpen=f.isOpened=!0,f.wrap.addClass("fancybox-opened").css("overflow","visible"),f.update(),f.inner.css("overflow",a.scrolling==="auto"?"auto":a.scrolling==="yes"?"scroll":"hidden"),(a.closeClick||a.nextClick)&&f.inner.bind("click.fb",a.nextClick?f.next:f.close),a.closeBtn&&c(f.current.tpl.closeBtn).appendTo(f.wrap).bind("click.fb",f.close),a.arrows&&f.group.length>1&&((a.loop||a.index>0)&&c(a.tpl.prev).appendTo(f.wrap).bind("click.fb",f.prev),(a.loop||a.index<f.group.length-1)&&c(a.tpl.next).appendTo(f.wrap).bind("click.fb",f.next)),f.trigger("afterShow"),f.opts.autoPlay&&!f.player.isActive&&(f.opts.autoPlay=!1,f.play())},_afterZoomOut:function(){f.trigger("afterClose"),f.wrap.trigger("onReset").remove(),c.extend(f,{group:{},opts:{},current:null,isOpened:!1,isOpen:!1,wrap:null,outer:null,inner:null})}}),f.transitions={getOrigPosition:function(){var a=f.current.element,b={},d=50,e=50,g,h;return a&&a.nodeName&&c(a).is(":visible")?(g=c(a).find("img:first"),g.length?(b=g.offset(),d=g.outerWidth(),e=g.outerHeight()):b=c(a).offset()):(h=f.getViewport(),b.top=h.y+(h.h-e)*.5,b.left=h.x+(h.w-d)*.5),b={top:Math.ceil(b.top)+"px",left:Math.ceil(b.left)+"px",width:Math.ceil(d)+"px",height:Math.ceil(e)+"px"},b},step:function(a,b){var c,d,e;if(b.prop==="width"||b.prop==="height")d=e=Math.ceil(a-f.current.padding*2),b.prop==="height"&&(c=(a-b.start)/(b.end-b.start),b.start>b.end&&(c=1-c),d-=f.innerSpace*c,e-=f.outerSpace*c),f.inner[b.prop](d),f.outer[b.prop](e)},zoomIn:function(){var a=f.current,b,d,e=a.dim;a.openEffect==="elastic"?(d=c.extend({},e,f._getPosition(!0)),delete d.position,b=this.getOrigPosition(),a.openOpacity&&(b.opacity=0,d.opacity=1),f.wrap.css(b).show().animate(d,{duration:a.openSpeed,easing:a.openEasing,step:this.step,complete:f._afterZoomIn})):(f.wrap.css(c.extend({},e,f._getPosition())),a.openEffect==="fade"?f.wrap.fadeIn(a.openSpeed,f._afterZoomIn):(f.wrap.show(),f._afterZoomIn()))},zoomOut:function(){var a=f.current,b;a.closeEffect==="elastic"?(f.wrap.css("position")==="fixed"&&f.wrap.css(f._getPosition(!0)),b=this.getOrigPosition(),a.closeOpacity&&(b.opacity=0),f.wrap.animate(b,{duration:a.closeSpeed,easing:a.closeEasing,step:this.step,complete:f._afterZoomOut})):f.wrap.fadeOut(a.closeEffect==="fade"?a.closeSpeed:0,f._afterZoomOut)},changeIn:function(){var a=f.current,b;f.current.nextEffect==="elastic"?(b=f._getPosition(!0),b.opacity=0,b.top=parseInt(b.top,10)-200+"px",f.wrap.css(b).show().animate({opacity:1,top:"+=200px"},{duration:a.nextSpeed,complete:f._afterZoomIn})):(f.wrap.css(f._getPosition()),a.nextEffect==="fade"?f.wrap.hide().fadeIn(a.nextSpeed,f._afterZoomIn):(f.wrap.show(),f._afterZoomIn()))},changeOut:function(){function a(){c(this).trigger("onReset").remove()}f.wrap.removeClass("fancybox-opened"),f.current.prevEffect==="elastic"?f.wrap.animate({opacity:0,top:"+=200px"},{duration:f.current.prevSpeed,complete:a}):f.wrap.fadeOut(f.current.prevEffect==="fade"?f.current.prevSpeed:0,a)}},f.helpers.overlay={overlay:null,update:function(){var a,f,g;this.overlay.width(0).height(0),c.browser.msie?(f=Math.max(b.documentElement.scrollWidth,b.body.scrollWidth),g=Math.max(b.documentElement.offsetWidth,b.body.offsetWidth),a=f<g?d.width():f):a=e.width(),this.overlay.width(a).height(e.height())},beforeShow:function(a){if(this.overlay)return;this.overlay=c('<div id="fancybox-overlay"></div>').css(a.css||{background:"black"}).appendTo("body"),this.update(),a.closeClick&&this.overlay.bind("click.fb",f.close),d.bind("resize.fb",c.proxy(this.update,this)),this.overlay.fadeTo(a.speedIn||"fast",a.opacity||1)},onUpdate:function(){this.update()},afterClose:function(a){this.overlay&&this.overlay.fadeOut(a.speedOut||"fast",function(){c(this).remove()}),this.overlay=null}},f.helpers.title={beforeShow:function(a){var b,d=f.current.title;d&&(b=c('<div class="fancybox-title fancybox-title-'+a.type+'-wrap">'+d+"</div>").appendTo("body"),a.type==="float"&&(b.width(b.width()),b.wrapInner('<span class="child"></span>'),f.current.margin[2]+=Math.abs(parseInt(b.css("margin-bottom"),10))),b.appendTo(a.type==="over"?f.inner:a.type==="outside"?f.wrap:f.outer))}},c.fn.fancybox=function(a){function g(a){var e=[],g=!1,h=c(this).data("fancybox-group");return a.preventDefault(),typeof h!="undefined"?g=h?"data-fancybox-group":!1:this.rel&&this.rel!==""&&this.rel!=="nofollow"&&(h=this.rel,g="rel"),g&&(e=d.length?c(d).filter("["+g+'="'+h+'"]'):c("["+g+'="'+h+'"]')),e.length?(b.index=e.index(this),f.open(e.get(),b)):f.open(this,b),!1}var b=a||{},d=this.selector||"";return d?e.undelegate(d,"click.fb-start").delegate(d,"click.fb-start",g):c(this).unbind("click.fb-start").bind("click.fb-start",g),this}}(window,document,jQuery),function(a){function b(b){window.console&&window.console.log&&(window.console.log("Window Width: "+a(window).width()),window.console.log("Window Height: "+a(window).height()))}function c(){var a=0;return typeof window.innerHeight=="number"?a=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(a=document.body.clientHeight),a}function d(){var a=0;return typeof window.innerWidth=="number"?a=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?a=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(a=document.body.clientWidth),a}a.fn.pinFooter=function(b){var e=a(window).height(),f=d(),g=a(this).outerHeight(!0),h=a("body").outerHeight(!0),i=parseInt(a("body").css("margin-bottom"));b=="relative"?h>c()?(a(this).css("position","absolute"),a(this).css("width",f+"px"),a(this).css("top",h-g+"px"),a("body").css("overflow-x","hidden")):(a(this).css("position","fixed"),a(this).css("width",f+"px"),a(this).css("top",e-g+"px")):(a(this).css("position","fixed"),a(this).css("width",f+"px"),a(this).css("top",e-g+"px"),a("body").css("height",h+i+"px"))}}(jQuery),function(a){a.fn.easyPaginate=function(b){function o(){clearTimeout(m),e=(l-1)*d,f=e+d,a(g).each(function(c){var g=a(this);g.hide(),c>=e&&c<f&&setTimeout(function(){g.fadeIn("fast")},(c-Math.floor(c/d)*d)*b.delay),b.nextprev&&(f>=h?(j.addClass("inactive"),j.removeClass("active")):(j.removeClass("inactive"),j.addClass("active"),j.css("display","inline-block")),e>=1?(k.removeClass("inactive"),k.addClass("active"),k.css("display","inline-block")):(k.addClass("inactive"),k.removeClass("active")))}),a("li","#"+b.controls).removeClass(b.current),a('li[data-index="'+l+'"]',"#"+b.controls).addClass(b.current),b.auto&&(!b.clickstop||!n)&&(m=setTimeout(p,b.pause))}function p(){f<=h&&(l++,o())}var c={step:4,delay:100,numeric:!0,nextprev:!0,auto:!1,pause:4e3,clickstop:!0,controls:"pagination",current:"current"},b=a.extend(c,b),d=b.step,e,f,g=a(this).children(),h=g.length,i,j,k,l=1,m,n=!1;this.each(function(){i=this;if(h>d){var c=Math.floor(h/d);h/d>c&&c++;var e=a('<ol id="'+b.controls+'"></ol>').insertAfter(i);b.nextprev&&(k=a('<li class="prev">Previous</li>').appendTo(e).click(function(){n=!0,l--,o()}));if(b.numeric)for(var f=1;f<=c;f++)a('<li data-index="'+f+'">'+f+"</li>").appendTo(e).click(function(){n=!0,l=a(this).attr("data-index"),o()});b.nextprev&&(j=a('<li class="next">Next</li>').appendTo(e).click(function(){n=!0,l++,o()})),o()}})}}(jQuery),function(a){"$:nomunge",a.fn.replaceText=function(b,c,d){return this.each(function(){var e=this.firstChild,f,g,h=[];if(e)do e.nodeType===3&&(f=e.nodeValue,g=f.replace(b,c),g!==f&&(!d&&/</.test(g)?(a(e).before(g),h.push(e)):e.nodeValue=g));while(e=e.nextSibling);h.length&&a(h).remove()})}}(jQuery),function(a){a.cookie=function(b,c,d,e,f,g){var h=function(a){return a.replace(/(^\s+)|(\s+$)/g,"")},i={},j=document.cookie.split(";");for(var k in j){j[k]=h(j[k]);if(j[k]){var l=j[k].split("=");for(var m in l)l[m]=h(l[m]);l[0]&&(i[l[0]]=l[1]?l[1]:null)}else j.splice(k,1)}if(!b)return i;var n=d?"; expires="+(new Date((new Date).getTime()+d*1e3)).toGMTString():"";n+=e?"; domain="+e:"",n+=f?"; path="+f:"",n+=g?"; secure":"";if(c)document.cookie=b+"="+encodeURIComponent(c)+n;else return i[b];return a},a.removeCookie=function(b){var c;b?(c={},c[b]=null):c=a.cookie();for(var d in c)document.cookie=d+"=; expires="+new Date+";"}}(jQuery),jQuery.preloadCssImages=function(a){function g(){clearTimeout(f);if(d&&d.length&&d[c]){c++;if(a.statusTextEl){var b=d[c]?"Now Loading: <span>"+d[c].split("/")[d[c].split("/").length-1]:"Loading complete";jQuery(a.statusTextEl).html('<span class="numLoaded">'+c+'</span> of <span class="numTotal">'+d.length+'</span> loaded (<span class="percentLoaded">'+(c/d.length*100).toFixed(0)+'%</span>) <span class="currentImg">'+b+"</span></span>")}if(a.statusBarEl){var e=jQuery(a.statusBarEl).width();jQuery(a.statusBarEl).css("background-position",-(e-(e*c/d.length).toFixed(0))+"px 50%")}h()}}function h(){if(d&&d.length&&d[c]){var b=new Image;b.src=d[c],b.complete?g():jQuery(b).bind("error load onreadystatechange",g),f=setTimeout(g,a.errorDelay)}}function i(b,c){var f=!1,g=[],j=[],k,l=b.length;while(l--){var m="";if(c&&c[l])k=c[l];else{var n=b[l].href?b[l].href:"window.location.href",o=n.split("/");o.pop(),k=o.join("/"),k&&(k+="/")}if(b[l].cssRules||b[l].rules){e=b[l].cssRules?b[l].cssRules:b[l].rules;var p=e.length;while(p--)if(e[p].style&&e[p].style.cssText){var q=e[p].style.cssText;q.toLowerCase().indexOf("url")!=-1&&(m+=q)}else e[p].styleSheet&&(g.push(e[p].styleSheet),f=!0)}var r=m.match(/[^\("]+\.(gif|jpg|jpeg|png)/g);if(r){var s=r.length;while(s--){var t=r[s].charAt(0)=="/"||r[s].match("://")?r[s]:k+r[s];jQuery.inArray(t,d)==-1&&d.push(t)}}if(!f&&b[l].imports&&b[l].imports.length)for(var u=0,v=b[l].imports.length;u<v;u++){var w=b[l].imports[u].href;w=w.split("/"),w.pop(),w=w.join("/"),w&&(w+="/");var x=w.charAt(0)=="/"||w.match("://")?w:k+w;j.push(x),g.push(b[l].imports[u])}}if(g.length)return i(g,j),!1;var y=a.simultaneousCacheLoading;while(y--)setTimeout(h,y)}a=jQuery.extend({statusTextEl:null,statusBarEl:null,errorDelay:999,simultaneousCacheLoading:2},a);var b=[],c=0,d=[],e,f;return i(document.styleSheets),d},function(a){var b=a.fancybox;b.helpers.buttons={tpl:'<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:$.fancybox.prev();">Previous</a></li><li><a class="btnPlay" title="Slideshow" href="javascript:$.fancybox.play();;">Play</a></li><li><a class="btnNext" title="Next" href="javascript:$.fancybox.next();">Next</a></li><li><a class="btnToggle" title="Toggle size" href="javascript:$.fancybox.toggle();">Toggle</a></li><li><a class="btnClose" title="Close" href="javascript:$.fancybox.close();">Close</a></li></ul></div>',list:null,buttons:{},update:function(){var a=this.buttons.toggle.removeClass("btnDisabled btnToggleOn");b.current.canShrink?a.addClass("btnToggleOn"):b.current.canExpand||a.addClass("btnDisabled")},beforeShow:function(){b.current.margin[0]+=30},onPlayStart:function(){this.list&&this.buttons.play.text("Pause").addClass("btnPlayOn")},onPlayEnd:function(){this.list&&this.buttons.play.text("Play").removeClass("btnPlayOn")},afterShow:function(c){var d;this.list||(this.list=a(c.tpl||this.tpl).appendTo("body"),this.buttons={prev:this.list.find(".btnPrev"),next:this.list.find(".btnNext"),play:this.list.find(".btnPlay"),toggle:this.list.find(".btnToggle")}),d=this.buttons,b.current.index>0||b.current.loop?d.prev.removeClass("btnDisabled"):d.prev.addClass("btnDisabled"),b.current.loop||b.current.index<b.group.length-1?(d.next.removeClass("btnDisabled"),d.play.removeClass("btnDisabled")):(d.next.addClass("btnDisabled"),d.play.addClass("btnDisabled")),this.update()},onUpdate:function(){this.update()},beforeClose:function(){this.list&&this.list.remove(),this.list=null,this.buttons={}}}}(jQuery),function(a){var b=a.fancybox;b.helpers.thumbs={wrap:null,list:null,width:0,source:function(b){var c=a(b).find("img");return c.length?c.attr("src"):b.href},init:function(c){var d=this,e,f=c.width||50,g=c.height||50,h=c.source||this.source;e="";for(var i=0;i<b.group.length;i++)e+='<li><a style="width:'+f+"px;height:"+g+'px;" href="javascript:$.fancybox.jumpto('+i+');"></a></li>';this.wrap=a('<div id="fancybox-thumbs"></div>').appendTo("body"),this.list=a("<ul>"+e+"</ul>").appendTo(this.wrap),a.each(b.group,function(b){a("<img />").load(function(){var c=this.width,e=this.height,h,i,j;if(!d.list||!c||!e)return;h=c/f,i=e/g,j=d.list.children().eq(b).find("a"),h>=1&&i>=1&&(h>i?(c=Math.floor(c/i),e=g):(c=f,e=Math.floor(e/h))),a(this).css({width:c,height:e,top:Math.floor(g/2-e/2),left:Math.floor(f/2-c/2)}),j.width(f).height(g),a(this).hide().appendTo(j).fadeIn(300)}).attr("src",h(this))}),this.width=this.list.children().eq(0).outerWidth(),this.list.width(this.width*(b.group.length+1)).css("left",Math.floor(a(window).width()*.5-(b.current.index*this.width+this.width*.5)))},update:function(c){this.list&&this.list.stop(!0).animate({left:Math.floor(a(window).width()*.5-(b.current.index*this.width+this.width*.5))},150)},beforeLoad:function(a){if(b.group.length<2){b.coming.helpers.thumbs=!1;return}b.coming.margin[2]=a.height+30},afterShow:function(a){this.list?this.update(a):this.init(a),this.list.children().removeClass("active").eq(b.current.index).addClass("active")},onUpdate:function(){this.update()},beforeClose:function(){this.wrap&&this.wrap.remove(),this.wrap=null,this.list=null,this.width=0}}}(jQuery),function(){var a,b;b=$(window).width(),a=$(window).height(),$(window).resize(function(){return b=$(window).width(),a=$(window).height()}),$(document).ready(function(){return $.preloadCssImages(),$(".projectMetaTrigger").click(function(){return $(this).siblings(".projectMeta").slideToggle(),$(this).toggleClass("active"),!1}),$(".projectMeta .closeMe").click(function(){return $(this).parent(".projectMeta").slideUp(),$(this).parent(".projectMeta").siblings(".projectMetaTrigger").removeClass("active"),!1})}),$("#top-header h1 a").css("cursor","pointer"),$("#download-headshot").slideDown("slow"),document.body.clientWidth>787&&($(".paginateMe").easyPaginate({step:4,nextprev:!0}),$("html").addClass("has-pagination")),$(".inactive").click(function(a){}),$(".fancybox").fancybox(),$(".gallery-link").hover(function(){return $(".gallery-link").addClass("no-hover"),$(this).removeClass("no-hover"),$(this).addClass("hover")},function(){return $(".gallery-link").removeClass("hover"),$(".gallery-link").removeClass("no-hover")}),$("body.work_press #main p, .excerpt").replaceText("Greer","<strong>Greer</strong>"),$("body.work_press #main p, .excerpt").replaceText("Greer's","<strong>Greer's</strong>"),$("body.work_press #main p, .excerpt").replaceText("Cassie","<strong>Cassie</strong>"),$(".projectMetaTrigger").click(function(){var a;console.log($.cookie("has_seen_project_meta"));if($("body").hasClass("work_index")&&!$(this).hasClass("active")&&b>1099)return $.cookie("has_seen_project_meta")==="1"?console.log("seen it"):(a=$(this).offset(),$('<div class="trigger-close-notice">Click again to close</div>').appendTo("body").hide().fadeIn(500),$(".trigger-close-notice").offset({top:a.top,left:a.left+125}),$(".trigger-close-notice").delay(1e3).fadeOut(500),$.cookie("has_seen_project_meta","1",86400),console.log($.cookie("has_seen_project_meta")))})}.call(this)
