/*!
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
jQuery.cookie=function(d,e,b){if(arguments.length>1&&String(e)!=="[object Object]"){b=jQuery.extend({},b);if(e===null||e===undefined){b.expires=-1}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g)}e=String(e);return(document.cookie=[encodeURIComponent(d),"=",b.raw?e:encodeURIComponent(e),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=e||{};var a,f=b.raw?function(h){return h}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null};
/*!
 * jQuery Waypoints - v1.1
 * Copyright (c) 2011 Caleb Troughton
 * Dual licensed under the MIT license and GPL license.
 * https://github.com/imakewebthings/jquery-waypoints/blob/master/MIT-license.txt
 * https://github.com/imakewebthings/jquery-waypoints/blob/master/GPL-license.txt
 */
(function(r,p,n,s,x){var w=r(s),u="waypoint.reached",z=function(a,b){a.element.trigger(u,b);if(a.options.triggerOnce){a.element[p]("destroy")}},t=function(a,b){var c=b.waypoints.length-1;while(c>=0&&b.waypoints[c].element[0]!==a[0]){c-=1}return c},v=[],o=function(a){r.extend(this,{element:r(a),oldScroll:-99999,waypoints:[],didScroll:false,didResize:false,doScroll:r.proxy(function(){var d=this.element.scrollTop(),e=d>this.oldScroll,b=this,c=r.grep(this.waypoints,function(g,h){return e?(g.offset>b.oldScroll&&g.offset<=d):(g.offset<=b.oldScroll&&g.offset>d)}),f=c.length;if(!this.oldScroll||!d){r[n]("refresh")}this.oldScroll=d;if(!f){return}if(!e){c.reverse()}r.each(c,function(g,h){if(h.options.continuous||g===f-1){z(h,[e?"down":"up"])}})},this)});r(a).scroll(r.proxy(function(){if(!this.didScroll){this.didScroll=true;s.setTimeout(r.proxy(function(){this.doScroll();this.didScroll=false},this),r[n].settings.scrollThrottle)}},this)).resize(r.proxy(function(){if(!this.didResize){this.didResize=true;s.setTimeout(r.proxy(function(){r[n]("refresh");this.didResize=false},this),r[n].settings.resizeThrottle)}},this));w.load(r.proxy(function(){this.doScroll()},this))},q=function(b){var a=null;r.each(v,function(d,c){if(c.element[0]===b){a=c;return false}});return a},y={init:function(a,b){this.each(function(){var c=r.fn[p].defaults.context,g,d=r(this);if(b&&b.context){c=b.context}if(!r.isWindow(c)){c=d.closest(c)[0]}g=q(c);if(!g){g=new o(c);v.push(g)}var h=t(d,g),e=h<0?r.fn[p].defaults:g.waypoints[h].options,f=r.extend({},e,b);f.offset=f.offset==="bottom-in-view"?function(){var i=r.isWindow(c)?r[n]("viewportHeight"):r(c).height();return i-r(this).outerHeight()}:f.offset;if(h<0){g.waypoints.push({element:d,offset:d.offset().top,options:f})}else{g.waypoints[h].options=f}if(a){d.bind(u,a)}});r[n]("refresh");return this},remove:function(){return this.each(function(b,a){var c=r(a);r.each(v,function(e,d){var f=t(c,d);if(f>=0){d.waypoints.splice(f,1)}})})},destroy:function(){return this.unbind(u)[p]("remove")}},A={refresh:function(){r.each(v,function(b,a){var c=r.isWindow(a.element[0]),f=c?0:a.element.offset().top,d=c?r[n]("viewportHeight"):a.element.height(),e=c?0:a.element.scrollTop();r.each(a.waypoints,function(j,g){var k=g.options.offset,h=g.offset;if(typeof g.options.offset==="function"){k=g.options.offset.apply(g.element)}else{if(typeof g.options.offset==="string"){var i=parseFloat(g.options.offset);k=g.options.offset.indexOf("%")?Math.ceil(d*(i/100)):i}}g.offset=g.element.offset().top-f+e-k;if(a.oldScroll>h&&a.oldScroll<=g.offset){z(g,["up"])}else{if(a.oldScroll<h&&a.oldScroll>=g.offset){z(g,["down"])}}});a.waypoints.sort(function(g,h){return g.offset-h.offset})})},viewportHeight:function(){return(s.innerHeight?s.innerHeight:w.height())},aggregate:function(){var a=r();r.each(v,function(c,b){r.each(b.waypoints,function(e,d){a=a.add(d.element)})});return a}};r.fn[p]=function(a){if(y[a]){return y[a].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof a==="function"||!a){return y.init.apply(this,arguments)}else{if(typeof a==="object"){return y.init.apply(this,[null,a])}else{r.error("Method "+a+" does not exist on jQuery "+p)}}}};r.fn[p].defaults={continuous:true,offset:0,triggerOnce:false,context:s};r[n]=function(a){if(A[a]){return A[a].apply(this)}else{return A.aggregate()}};r[n].settings={resizeThrottle:200,scrollThrottle:100};w.load(function(){r[n]("refresh")})})(jQuery,"waypoint","waypoints",this);
/*!
 * jQuery Transitions
 */
// (function(g){function m(){setTimeout(k,0);return e=g.now()}function k(){e=void 0}var p={},f,b,i=/^(?:toggle|show|hide)$/,h=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,d,e,c=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame,l=document.createElement("div").style;g.support.transition="MozTransition" in l?"MozTransition":"WebkitTransition" in l?"WebkitTransition":!1;g.fn.extend({animate:function(q,a,j,n){var o=g.speed(a,j,n);if(g.isEmptyObject(q)){return this.each(o.complete,[!1])}q=g.extend({},q);return this[o.queue===!1?"each":"queue"](function(){var w;o.queue===!1&&g._mark(this);var D=g.extend({},o),y=this.nodeType===1,B=y&&g(this).is(":hidden"),A,C,v,x,z;x=g.cssProps;var u=!D.step&&g.support.transition,t=[],s,r;D.animatedProperties={};D.transition={};for(v in q){A=g.camelCase(v);v!==A&&(q[A]=q[v],delete q[v]);C=q[A];g.isArray(C)?(z=D.animatedProperties[A]=C[1],w=q[A]=C[0],C=w):z=D.animatedProperties[A]=D.specialEasing&&D.specialEasing[A]||D.easing||"swing";if(z=u&&y&&(z=="swing"?"ease":z=="linear"?z:!1)){s=x[v]||v,r=s.replace(/([A-Z])/g,"-$1").toLowerCase(),z=r+" "+D.duration+"ms "+z,D.transition[v]={lower:r,real:s},t.push(z)}if(C==="hide"&&B||C==="show"&&!B){return D.complete.call(this)}if(y&&(A==="height"||A==="width")){if(D.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],g.css(this,"display")==="inline"&&g.css(this,"float")==="none"){if(g.support.inlineBlockNeedsLayout){C=this.nodeName;if(!p[C]){A=document.body;z=g("<"+C+">").appendTo(A);s=z.css("display");z.remove();if(s==="none"||s===""){if(!f){f=document.createElement("iframe"),f.frameBorder=f.width=f.height=0}A.appendChild(f);if(!b||!f.createElement){b=(f.contentWindow||f.contentDocument).document,b.write((document.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),b.close()}z=b.createElement(C);b.body.appendChild(z);s=g.css(z,"display");A.removeChild(f)}p[C]=s}C=p[C];C==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else{this.style.display="inline-block"}}}}if(D.overflow!=null){this.style.overflow="hidden"}for(v in q){if(y=new g.fx(this,D,v),C=q[v],i.test(C)){y[C==="toggle"?B?"show":"hide":C]()}else{x=h.exec(C),A=y.cur(),x?(C=parseFloat(x[2]),z=x[3]||(g.cssNumber[v]?"":"px"),z!=="px"&&(g.style(this,v,(C||1)+z),A*=(C||1)/y.cur(),g.style(this,v,A+z)),x[1]&&(C=(x[1]==="-="?-1:1)*C+A),y.custom(A,C,z)):y.custom(A,C,"")}}u&&t.length&&(z=this.style[u],this.style[u]=t.join()+(z?","+z:""));return !0})},stop:function(j,a){j&&this.queue([]);this.each(function(){var q=g.timers,n=q.length,o=g.support.transition;for(a||g._unmark(!0,this);n--;){if(q[n].elem===this){if(a||o){q[n](a)}q.splice(n,1)}}});a||this.dequeue();return this}});g.extend(g.fx.prototype,{cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var j,a=g.css(this.elem,this.prop);return isNaN(j=parseFloat(a))?!a||a==="auto"?0:a:j},custom:function(v,w,n){function s(j){return u.step(j)}var u=this,o=g.fx,q,a=u.options.transition,r=g.timers,t=this.prop;this.startTime=e||m();this.start=v;this.end=w;this.unit=n||this.unit||(g.cssNumber[t]?"":"px");this.now=this.start;this.pos=this.state=0;s.elem=this.elem;s.transition=a[t];a[t]?(r.push(s),u.elem.style[a[t].real]=g.css(u.elem,t),setTimeout(function(){g.style(u.elem,t,w+u.unit);a[t].timeout=setTimeout(function(){r.splice(r.indexOf(s),1);u.step(!0)},u.options.duration+30)},0)):s()&&g.timers.push(s)&&!d&&(c?(d=1,q=function(){d&&(c(q),o.tick())},c(q)):d=setInterval(o.tick,o.interval))},step:function(u){var a=e||m(),o=!0,s=this.elem,t=this.options,q,r,n=t.transition[this.prop];if(n||u||a>=t.duration+this.startTime){n?(clearTimeout(n.timeout),u||(this.elem.style[n.real]=g.css(this.elem,n.real))):(this.now=this.end,this.pos=this.state=1,this.update());t.animatedProperties[this.prop]=!0;for(q in t.animatedProperties){t.animatedProperties[q]!==!0&&(o=!1)}if(o){t.overflow!=null&&!g.support.shrinkWrapBlocks&&g.each(["","X","Y"],function(v,j){s.style["overflow"+j]=t.overflow[v]});t.hide&&g(s).hide();if(t.hide||t.show){for(r in t.animatedProperties){g.style(s,r,t.orig[r])}}if(u=s.nodeType===1&&g.support.transition){n=","+s.style[u];for(r in t.transition){n=n.split(t.transition[r].lower).join("_")}s.style[u]=n.replace(/, ?_[^,]*/g,"").substr(1)}t.complete.call(s)}return !1}else{t.duration==Infinity?this.now=a:(r=a-this.startTime,this.state=r/t.duration,this.pos=g.easing[t.animatedProperties[this.prop]](this.state,r,0,1,t.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update()}return !0}});g.extend(g.fx,{tick:function(){for(var j=g.timers,a=0;a<j.length;++a){!j[a].transition&&!j[a]()&&j.splice(a--,1)}j.length||g.fx.stop()}})})(jQuery);
/*!
 * ColorBox v1.3.17.2 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
 * Copyright (c) 2011 Jack Moore - jack@colorpowered.com
 * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
 */
(function(G,k,U){var H={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,bottom:false,left:false,right:false,fixed:false,data:false},v="colorbox",Q="cbox",p=Q+"Element",T=Q+"_open",e=Q+"_load",S=Q+"_complete",s=Q+"_cleanup",Z=Q+"_closed",i=Q+"_purge",t=G.browser.msie&&!G.support.opacity,ab=t&&G.browser.version<7,Y=Q+"_IE6",O,ac,ad,d,E,o,b,N,c,X,K,j,h,n,r,V,q,P,x,z,aa,ae,l,g,a,u,F,m,B,W,J,D,y,I;function M(ah,af,ag){ag=k.createElement("div");if(ah){ag.id=Q+ah}ag.style.cssText=af||"";return G(ag)}function L(af,ag){return Math.round((/%/.test(af)?((ag==="x"?X.width():X.height())/100):1)*parseInt(af,10))}function A(af){return aa.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(af)}function R(af){aa=G.extend({},G.data(u,v));for(af in aa){if(G.isFunction(aa[af])&&af.substring(0,2)!=="on"){aa[af]=aa[af].call(u)}}aa.rel=aa.rel||u.rel||"nofollow";aa.href=aa.href||G(u).attr("href");aa.title=aa.title||u.title;if(typeof aa.href==="string"){aa.href=G.trim(aa.href)}}function C(af,ag){if(ag){ag.call(u)}G.event.trigger(af)}function w(){var ag,ai=Q+"Slideshow_",aj="click."+Q,ak,ah,af;if(aa.slideshow&&c[1]){ak=function(){V.text(aa.slideshowStop).unbind(aj).bind(S,function(){if(F<c.length-1||aa.loop){ag=setTimeout(I.next,aa.slideshowSpeed)}}).bind(e,function(){clearTimeout(ag)}).one(aj+" "+s,ah);ac.removeClass(ai+"off").addClass(ai+"on");ag=setTimeout(I.next,aa.slideshowSpeed)};ah=function(){clearTimeout(ag);V.text(aa.slideshowStart).unbind([S,e,s,aj].join(" ")).one(aj,ak);ac.removeClass(ai+"on").addClass(ai+"off")};if(aa.slideshowAuto){ak()}else{ah()}}else{ac.removeClass(ai+"off "+ai+"on")}}function f(ag){if(!J){u=ag;R();c=G(u);F=0;if(aa.rel!=="nofollow"){c=G("."+p).filter(function(){var ah=G.data(this,v).rel||this.rel;return(ah===aa.rel)});F=c.index(u);if(F===-1){c=c.add(u);F=c.length-1}}if(!B){B=W=true;ac.show();if(aa.returnFocus){try{u.blur();G(u).one(Z,function(){try{this.focus()}catch(ah){}})}catch(af){}}O.css({opacity:+aa.opacity,cursor:aa.overlayClose?"pointer":"auto"}).show();aa.w=L(aa.initialWidth,"x");aa.h=L(aa.initialHeight,"y");I.position();if(ab){X.bind("resize."+Y+" scroll."+Y,function(){O.css({width:X.width(),height:X.height(),top:X.scrollTop(),left:X.scrollLeft()})}).trigger("resize."+Y)}C(T,aa.onOpen);z.add(n).hide();x.html(aa.close).show()}I.load(true)}}I=G.fn[v]=G[v]=function(af,ah){var ag=this;af=af||{};if(!ag[0]){if(ag.selector){return ag}ag=G("<a/>");af.open=true}if(ah){af.onComplete=ah}ag.each(function(){G.data(this,v,G.extend({},G.data(this,v)||H,af));G(this).addClass(p)});if((G.isFunction(af.open)&&af.open.call(ag))||af.open){f(ag[0])}return ag};I.init=function(){X=G(U);ac=M().attr({id:v,"class":t?Q+(ab?"IE6":"IE"):""});O=M("Overlay",ab?"position:absolute":"").hide();ad=M("Wrapper");d=M("Content").append(K=M("LoadedContent","width:0; height:0; overflow:hidden"),h=M("LoadingOverlay").add(M("LoadingGraphic")),n=M("Title"),r=M("Current"),q=M("Next"),P=M("Previous"),V=M("Slideshow").bind(T,w),x=M("Close"));ad.append(M().append(M("TopLeft"),E=M("TopCenter"),M("TopRight")),M(false,"clear:left").append(o=M("MiddleLeft"),d,b=M("MiddleRight")),M(false,"clear:left").append(M("BottomLeft"),N=M("BottomCenter"),M("BottomRight"))).children().children().css({"float":"left"});j=M(false,"position:absolute; width:9999px; visibility:hidden; display:none");G("body").prepend(O,ac.append(ad,j));d.children().hover(function(){G(this).addClass("hover")},function(){G(this).removeClass("hover")}).addClass("hover");ae=E.height()+N.height()+d.outerHeight(true)-d.height();l=o.width()+b.width()+d.outerWidth(true)-d.width();g=K.outerHeight(true);a=K.outerWidth(true);ac.css({"padding-bottom":ae,"padding-right":l}).hide();q.click(function(){I.next()});P.click(function(){I.prev()});x.click(function(){I.close()});z=q.add(P).add(r).add(V);d.children().removeClass("hover");O.click(function(){if(aa.overlayClose){I.close()}});G(k).bind("keydown."+Q,function(ag){var af=ag.keyCode;if(B&&aa.escKey&&af===27){ag.preventDefault();I.close()}if(B&&aa.arrowKey&&c[1]){if(af===37){ag.preventDefault();P.click()}else{if(af===39){ag.preventDefault();q.click()}}}})};I.remove=function(){ac.add(O).remove();G("."+p).removeData(v).removeClass(p)};I.position=function(ag,af){var ai=0,ah=0;X.unbind("resize."+Q);ac.hide();if(aa.fixed&&!ab){ac.css({position:"fixed"})}else{ai=X.scrollTop();ah=X.scrollLeft();ac.css({position:"absolute"})}if(aa.right!==false){ah+=Math.max(X.width()-aa.w-a-l-L(aa.right,"x"),0)}else{if(aa.left!==false){ah+=L(aa.left,"x")}else{ah+=Math.round(Math.max(X.width()-aa.w-a-l,0)/2)}}if(aa.bottom!==false){ai+=Math.max(k.documentElement.clientHeight-aa.h-g-ae-L(aa.bottom,"y"),0)}else{if(aa.top!==false){ai+=L(aa.top,"y")}else{ai+=Math.round(Math.max(k.documentElement.clientHeight-aa.h-g-ae,0)/2)}}ac.show();ag=(ac.width()===aa.w+a&&ac.height()===aa.h+g)?0:ag||0;ad[0].style.width=ad[0].style.height="9999px";function aj(ak){E[0].style.width=N[0].style.width=d[0].style.width=ak.style.width;h[0].style.height=h[1].style.height=d[0].style.height=o[0].style.height=b[0].style.height=ak.style.height}ac.dequeue().animate({width:aa.w+a,height:aa.h+g,top:ai,left:ah},{duration:ag,complete:function(){aj(this);W=false;ad[0].style.width=(aa.w+a+l)+"px";ad[0].style.height=(aa.h+g+ae)+"px";if(af){af()}setTimeout(function(){X.bind("resize."+Q,I.position)},1)},step:function(){aj(this)}})};I.resize=function(af){if(B){af=af||{};if(af.width){aa.w=L(af.width,"x")-a-l}if(af.innerWidth){aa.w=L(af.innerWidth,"x")}K.css({width:aa.w});if(af.height){aa.h=L(af.height,"y")-g-ae}if(af.innerHeight){aa.h=L(af.innerHeight,"y")}if(!af.innerHeight&&!af.height){var ag=K.wrapInner("<div style='overflow:auto'></div>").children();aa.h=ag.height();ag.replaceWith(ag.children())}K.css({height:aa.h});I.position(aa.transition==="none"?0:aa.speed)}};I.prep=function(ag){if(!B){return}var aj,ah=aa.transition==="none"?0:aa.speed;K.remove();K=M("LoadedContent").append(ag);function af(){aa.w=aa.w||K.width();aa.w=aa.mw&&aa.mw<aa.w?aa.mw:aa.w;return aa.w}function ai(){aa.h=aa.h||K.height();aa.h=aa.mh&&aa.mh<aa.h?aa.mh:aa.h;return aa.h}K.hide().appendTo(j.show()).css({width:af(),overflow:aa.scrolling?"auto":"hidden"}).css({height:ai()}).prependTo(d);j.hide();G(m).css({"float":"none"});if(ab){G("select").not(ac.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(s,function(){this.style.visibility="inherit"})}aj=function(){var ap,ar,an,am,ao=c.length,al,ak;if(!B){return}function aq(){if(t){ac[0].style.removeAttribute("filter")}}ak=function(){clearTimeout(y);h.hide();C(S,aa.onComplete)};if(t){if(m){K.fadeIn(100)}}n.html(aa.title).add(K).show();if(ao>1){if(typeof aa.current==="string"){r.html(aa.current.replace("{current}",F+1).replace("{total}",ao)).show()}q[(aa.loop||F<ao-1)?"show":"hide"]().html(aa.next);P[(aa.loop||F)?"show":"hide"]().html(aa.previous);ap=F?c[F-1]:c[ao-1];an=F<ao-1?c[F+1]:c[0];if(aa.slideshow){V.show()}if(aa.preloading){am=G.data(an,v).href||an.href;ar=G.data(ap,v).href||ap.href;am=G.isFunction(am)?am.call(an):am;ar=G.isFunction(ar)?ar.call(ap):ar;if(A(am)){G("<img/>")[0].src=am}if(A(ar)){G("<img/>")[0].src=ar}}}else{z.hide()}if(aa.iframe){K.addClass("hasIframe");al=G("<iframe/>").addClass(Q+"Iframe")[0];if(aa.fastIframe){ak()}else{G(al).one("load",ak)}al.name=Q+(+new Date());al.src=aa.href;if(!aa.scrolling){al.scrolling="no"}if(t){al.frameBorder=0;al.allowTransparency="true"}G(al).appendTo(K).one(i,function(){al.src="//about:blank"})}else{K.removeClass("hasIframe");ak()}if(aa.transition==="fade"){ac.fadeTo(ah,1,aq)}else{aq()}};if(aa.transition==="fade"){ac.fadeTo(ah,0,function(){I.position(0,aj)})}else{I.position(ah,aj)}};I.load=function(ah){var ag,ai,af=I.prep;W=true;m=false;u=c[F];if(!ah){R()}C(i);C(e,aa.onLoad);aa.h=aa.height?L(aa.height,"y")-g-ae:aa.innerHeight&&L(aa.innerHeight,"y");aa.w=aa.width?L(aa.width,"x")-a-l:aa.innerWidth&&L(aa.innerWidth,"x");aa.mw=aa.w;aa.mh=aa.h;if(aa.maxWidth){aa.mw=L(aa.maxWidth,"x")-a-l;aa.mw=aa.w&&aa.w<aa.mw?aa.w:aa.mw}if(aa.maxHeight){aa.mh=L(aa.maxHeight,"y")-g-ae;aa.mh=aa.h&&aa.h<aa.mh?aa.h:aa.mh}ag=aa.href;y=setTimeout(function(){h.show()},100);if(aa.inline){M().hide().insertBefore(G(ag)[0]).one(i,function(){G(this).replaceWith(K.children())});af(G(ag))}else{if(aa.iframe){af(" ")}else{if(aa.html){af(aa.html)}else{if(A(ag)){G(m=new Image()).addClass(Q+"Photo").error(function(){aa.title=false;af(M("Error").text("This image could not be loaded"))}).load(function(){var aj;m.onload=null;if(aa.scalePhotos){ai=function(){m.height-=m.height*aj;m.width-=m.width*aj};if(aa.mw&&m.width>aa.mw){aj=(m.width-aa.mw)/m.width;ai()}if(aa.mh&&m.height>aa.mh){aj=(m.height-aa.mh)/m.height;ai()}}if(aa.h){m.style.marginTop=Math.max(aa.h-m.height,0)/2+"px"}if(c[1]&&(F<c.length-1||aa.loop)){m.style.cursor="pointer";m.onclick=function(){I.next()}}if(t){m.style.msInterpolationMode="bicubic"}setTimeout(function(){af(m)},1)});setTimeout(function(){m.src=ag},1)}else{if(ag){j.load(ag,aa.data,function(ak,aj,al){af(aj==="error"?M("Error").text("Request unsuccessful: "+al.statusText):G(this).contents())})}}}}}};I.next=function(){if(!W&&c[1]&&(F<c.length-1||aa.loop)){F=F<c.length-1?F+1:0;I.load()}};I.prev=function(){if(!W&&c[1]&&(F||aa.loop)){F=F?F-1:c.length-1;I.load()}};I.close=function(){if(B&&!J){J=true;B=false;C(s,aa.onCleanup);X.unbind("."+Q+" ."+Y);O.fadeTo(200,0);ac.stop().fadeTo(300,0,function(){ac.add(O).css({opacity:1,cursor:"auto"}).hide();C(i);K.remove();setTimeout(function(){J=false;C(Z,aa.onClosed)},1)})}};I.element=function(){return G(u)};I.settings=H;D=function(af){if(!((af.button!==0&&typeof af.button!=="undefined")||af.ctrlKey||af.shiftKey||af.altKey)){af.preventDefault();f(this)}};if(G.fn.delegate){G(k).delegate("."+p,"click",D)}else{G("."+p).live("click",D)}G(I.init)}(jQuery,document,this));
/*!
 * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
 * http://benalman.com/projects/jquery-bbq-plugin/
 *
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
/*!
 * jQuery hashchange event - v1.2 - 2/11/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 *
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
/*!
 * Viewport - jQuery selectors for finding elements in viewport
 *
 * Copyright (c) 2008-2009 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *  http://www.appelsiini.net/projects/viewport
 *
 */
(function(a){a.belowthefold=function(c,d){var b=a(window).height()+a(window).scrollTop();return b<=a(c).offset().top-d.threshold};a.abovethetop=function(b,c){var d=a(window).scrollTop();return d>=a(b).offset().top+a(b).height()-c.threshold};a.rightofscreen=function(c,d){var b=a(window).width()+a(window).scrollLeft();return b<=a(c).offset().left-d.threshold};a.leftofscreen=function(b,c){var d=a(window).scrollLeft();return d>=a(b).offset().left+a(b).width()-c.threshold};a.inviewport=function(b,c){return !a.rightofscreen(b,c)&&!a.leftofscreen(b,c)&&!a.belowthefold(b,c)&&!a.abovethetop(b,c)};a.extend(a.expr[":"],{"below-the-fold":function(c,d,b){return a.belowthefold(c,{threshold:0})},"above-the-top":function(c,d,b){return a.abovethetop(c,{threshold:0})},"left-of-screen":function(c,d,b){return a.leftofscreen(c,{threshold:0})},"right-of-screen":function(c,d,b){return a.rightofscreen(c,{threshold:0})},"in-viewport":function(c,d,b){return a.inviewport(c,{threshold:0})}})})(jQuery);
/*!
 * jQuery throttle / debounce - v1.1 - 3/7/2010
 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
 *
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
/*!
 * jQuery Once
 * @see http://plugins.jquery.com/project/once
 *
 * Copyright (c) 2009 Konstantin Kaefer <mail@kkaefer.com>
 * Dual licensed under the MIT and GPL licenses.
 */
(function(c){var a={},b=0;c.fn.once=function(g,e){if(typeof g!="string"){if(!(g in a)){a[g]=++b}if(!e){e=g}g="jquery-once-"+a[g]}var d=g+"-processed",f=this.not("."+d).addClass(d);return c.isFunction(e)?f.each(e):f}})(jQuery);
/*!
 * Wayfarer Tooltip
 * Version 1.0.9
 * Author Abel Mohler
 * URI: http://www.wayfarerweb.com/wtooltip.php
 * Released with the MIT License: http://www.wayfarerweb.com/mit.php
 */
(function(a){a.fn.wTooltip=function(f,r){f=a.extend({content:null,ajax:null,follow:true,auto:true,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:false,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(t,p,o){},callAfter:function(t,p,o){},clickAction:function(p,o){a(p).hide()},delay:0,timeout:0},f||{});if(!f.style&&typeof f.style!="object"){f.style={};f.style.zIndex="1000"}else{f.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},f.style||{})}if(typeof r=="function"){f.callAfter=r||f.callAfter}f.style.display="none",f.style.position="absolute";var m,l,q,c,k={},b=true,e=false,n=false,s=document.createElement("div"),g=(typeof document.body.style.maxWidth=="undefined")?true:false,j=(typeof a.talk=="function"&&typeof a.listen=="function")?true:false;if(f.id){s.id=f.id}if(f.className){s.className=f.className}f.degrade=(f.degrade&&g)?true:false;for(var d in f.style){s.style[d]=f.style[d]}function i(o){if(o){if(f.degrade){a(s).html(f.content.replace(/<\/?[^>]+>/gi,""))}else{a(s).html(f.content)}}}if(f.ajax){a.get(f.ajax,function(o){if(o){f.content=o}i(f.content)})}function h(p){function t(u){if(m&&!f.content){m=""}}function o(){if(!e&&f.auto){clearInterval(c);if(f.fadeOut){a(s).fadeOut(f.fadeOut,function(){t(p)})}else{t(p);s.style.display="none"}}if(typeof f.callAfter=="function"){f.callAfter(s,p,f)}if(j){f=a.listen(f)}}if(f.timeout>0){q=setTimeout(function(){o()},f.timeout)}else{o()}}a(s).hover(function(){e=true},function(){e=false;h(k)});if(j){f.key=s;f.plugin="wTooltip";f.channel="wayfarer";a.talk(f)}i(f.content&&!f.ajax);a(s).appendTo(f.appendTip);return this.each(function(){a(this).hover(function(){var p=this;clearTimeout(q);if((this.title||this.titleMemKeep)&&!f.degrade&&!f.content){m=this.title||this.titleMemKeep;if(this.title){this.titleMemKeep=this.title;this.title=""}}if(f.content&&f.degrade){this.title=s.innerHTML}function o(){if(typeof f.callBefore=="function"){f.callBefore(s,p,f)}if(j){f=a.listen(f)}var t;if(f.content){if(!f.degrade){t="block"}}else{if(m&&!f.degrade){a(s).html(unescape(m));t="block";m=""}else{t="none"}}if(f.auto){if(t=="block"&&f.fadeIn){a(s).fadeIn(f.fadeIn)}else{s.style.display=t}}}if(f.delay>0){l=setTimeout(function(){o()},f.delay)}else{o()}},function(){clearTimeout(l);var o=this;b=true;if(!f.follow||n||((f.offsetX<0&&(0-f.offsetX<a(s).outerWidth()))&&(f.offsetY>0&&0-f.offsetY<a(s).outerHeight()))){setTimeout(function(){c=setInterval(function(){h(o)},1)},1)}else{h(this)}});a(this).mousemove(function(v){k=this;if(f.follow||b){var y=a(window).scrollTop(),z=a(window).scrollLeft(),w=v.clientY+y+f.offsetY,t=v.clientX+z+f.offsetX,x=a(f.appendTip).outerHeight(),p=a(f.appendTip).innerHeight(),o=a(window).width()+z-a(s).outerWidth(),u=a(window).height()+y-a(s).outerHeight();w=(x>p)?w-(x-p):w;n=(w>u||t>o)?true:false;if(t-z<=0&&f.offsetX<0){t=z}else{if(t>o){t=o}}if(w-y<=0&&f.offsetY<0){w=y}else{if(w>u){w=u}}s.style.top=w+"px";s.style.left=t+"px";b=false}});if(typeof f.clickAction=="function"){a(this).click(function(){f.clickAction(s,this)})}})}})(jQuery);
/*!
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne brian(at)cherne(dot)net
*/
(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(o){var g=jQuery.extend({},o);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(o.type=="mouseenter"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.bind("mouseenter",b).bind("mouseleave",b)}})(jQuery);
/*
* the images preload plugin
*/
(function(a){a.fn.preload=function(b){var c=a.extend({},a.fn.preload.defaults,b),d=a.meta?a.extend({},c,this.data()):c;return this.each(function(){var f=a(this),h=f.attr("rel"),g=f.attr("href"),e=0;a("<img/>").load(function(j){++e;if(e==2){d.onComplete()}}).attr("src",g);a("<img/>").load(function(j){++e;if(e==2){d.onComplete()}}).attr("src",h)})};a.fn.preload.defaults={onComplete:function(){return false}}})(jQuery);
/*********************************
Fossil tagging plugin

Requires:
jQuery and Coremetrics libraries

Methods:
init = binds click events to anchors and mapped areas
custom = binds to custom element click event
send = executes the coremetrics function(s) pulling necessary parameters from html and settings
debug = allows you to enable debuging in console to see parameters being passed to coremetrics functions on click
*********************************/
(function($){var settings={debug:false};var methods={init:function(options){settings={elementCategory:false,debug:false,boundElements:"[data-tag]"};$.extend(settings,options);return this.each(function(){$(this).find(settings.boundElements).each(function(){$(this).data("elementCategory",settings.elementCategory)}).live("click",function(){$(this).tagIt("send");if(settings.debug){return false}})})},custom:function(options){settings={elementCategory:false,debug:false};$.extend(settings,options);return this.each(function(){$(this).each(function(){$(this).data("elementCategory",settings.elementCategory)}).live("click",function(){$(this).tagIt("send");if(settings.debug){return false}})})},send:function(){var manualLinkClickName=$(this).data("tag");var elementCategory=settings.elementCategory;if(settings.debug){console.log("manualLinkClickName: "+manualLinkClickName);console.log("elementCategory: "+elementCategory);return false}cmCreateElementTag(manualLinkClickName,elementCategory)},debug:function(options){return this.each(function(){settings.debug=true;console.log("Debugging On")})}};$.fn.tagIt=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist on jQuery.tagIt")}}}})(jQuery);

/*
*tabs and slideshow plugin
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
* http://flowplayer.org/tools/
*/
(function(c){function p(d,b,a){var e=this,l=d.add(this),h=d.find(a.tabs),i=b.jquery?b:d.children(b),j;h.length||(h=d.children());i.length||(i=d.parent().find(b));i.length||(i=c(b));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=Math.max(h.index(k),0)}if(a.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(j>=0)return e;f=a.initialIndex;k=h.eq(f)}if(f===j)return e;
g=g||c.Event();g.type="onBeforeClick";l.trigger(g,[f]);if(!g.isDefaultPrevented()){o[a.effect].call(e,f,function(){g.type="onClick";l.trigger(g,[f])});j=f;h.removeClass(a.current);k.addClass(a.current);return e}},getConf:function(){return a},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return e.click(j+1)},prev:function(){return e.click(j-1)},destroy:function(){h.unbind(a.event).removeClass(a.current);
i.find("a[href^=#]").unbind("click.T");return e}});c.each("onBeforeClick,onClick".split(","),function(f,g){c.isFunction(a[g])&&c(e).bind(g,a[g]);e[g]=function(k){k&&c(e).bind(g,k);return e}});if(a.history&&c.fn.history){c.tools.history.init(h);a.event="history"}h.each(function(f){c(this).bind(a.event,function(g){e.click(f,g);return g.preventDefault()})});i.find("a[href^=#]").bind("click.T",function(f){e.click(c(this).attr("href"),f)});if(location.hash&&a.tabs=="a"&&d.find("[href="+location.hash+"]").length)e.click(location.hash);
else if(a.initialIndex===0||a.initialIndex>0)e.click(a.initialIndex)}c.tools=c.tools||{version:"1.2.5"};c.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(d,b){o[d]=b}};var o={"default":function(d,b){this.getPanes().hide().eq(d).show();b.call()},fade:function(d,b){var a=this.getConf(),e=a.fadeOutSpeed,l=this.getPanes();e?l.fadeOut(e):l.hide();l.eq(d).fadeIn(a.fadeInSpeed,b)},slide:function(d,
b){this.getPanes().slideUp(200);this.getPanes().eq(d).slideDown(400,b)},ajax:function(d,b){this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),b)}},m;c.tools.tabs.addEffect("horizontal",function(d,b){m||(m=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:m},function(){c(this).show();b.call()})});c.fn.tabs=function(d,b){var a=this.data("tabs");if(a){a.destroy();this.removeData("tabs")}if(c.isFunction(b))b=
{onBeforeClick:b};b=c.extend({},c.tools.tabs.conf,b);this.each(function(){a=new p(c(this),d,b);c(this).data("tabs",a)});return b.api?a:this}})(jQuery);
(function(c){function p(g,a){function m(f){var e=c(f);return e.length<2?e:g.parent().find(f)}var b=this,i=g.add(this),d=g.data("tabs"),h,j=true,n=m(a.next).click(function(){d.next()}),k=m(a.prev).click(function(){d.prev()});c.extend(b,{getTabs:function(){return d},getConf:function(){return a},play:function(){if(h)return b;var f=c.Event("onBeforePlay");i.trigger(f);if(f.isDefaultPrevented())return b;h=setInterval(d.next,a.interval);j=false;i.trigger("onPlay");return b},pause:function(){if(!h)return b;
var f=c.Event("onBeforePause");i.trigger(f);if(f.isDefaultPrevented())return b;h=clearInterval(h);i.trigger("onPause");return b},stop:function(){b.pause();j=true}});c.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(f,e){c.isFunction(a[e])&&c(b).bind(e,a[e]);b[e]=function(q){return c(b).bind(e,q)}});a.autopause&&d.getTabs().add(n).add(k).add(d.getPanes()).hover(b.pause,function(){j||b.play()});a.autoplay&&b.play();a.clickable&&d.getPanes().click(function(){d.next()});if(!d.getConf().rotate){var l=
a.disabledClass;d.getIndex()||k.addClass(l);d.onBeforeClick(function(f,e){k.toggleClass(l,!e);n.toggleClass(l,e==d.getTabs().length-1)})}}var o;o=c.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3E3,clickable:true,api:false}};c.fn.slideshow=function(g){var a=this.data("slideshow");if(a)return a;g=c.extend({},o.conf,g);this.each(function(){a=new p(c(this),g);c(this).data("slideshow",a)});return g.api?a:this}})(jQuery);

//map resizer
(function(c){var b={debug:false};var a={init:function(){var d=this;d.find("map area").each(function(){var e=this.getAttribute("coords");e=e.split(",");c(this).data("raw_coords",e)});d.find("img[usemap]").each(function(){var f=c(this);var e=new Image();e.src=this.getAttribute("src");f.data("raw_dimensions",[e.width,e.height]);f.map_resizer("resize_map")});FS.dom.body.bind("resizeEnd",function(){d.find("img[usemap]").each(function(){c(this).map_resizer("resize_map")})})},resize_map:function(){var f=this;var h=f.attr("usemap");var i=f.data();var e=i.raw_dimensions;var g=null;var j=f.parents().not(":visible").length-1;if(j!=-1){g=c(f.parents().not(":visible")[j]);g.css({visibility:"hidden",display:"block"})}var d=f.width()/e[0];var k=f.height()/e[1];if(b.debug){console.log("-----------------");console.log("src: "+f.attr("src"));console.log("map name: "+h);console.log("original dimensions: "+e[0]+" x "+e[1]);console.log("resized dimensions: "+f.width()+" x "+f.height());console.log("width change: "+d+" height change: "+k)}if(g!==null){g.css({visibility:"",display:""})}c("map[name="+h.slice(1)+"] area").each(function(){var n=c(this);var l=this.getAttribute("shape");var p=n.data();var o=[];if(l=="RECT"||l=="POLY"||l=="rect"||l=="poly"){for(var m=0;m<p.raw_coords.length;m++){if(m%2==0){o[m]=Math.ceil(p.raw_coords[m]*d)}else{o[m]=Math.ceil(p.raw_coords[m]*k)}}}o=o.join(",");n.attr("coords",o);if(b.debug){console.log(n.data("tag")+" raw_coords: "+p.raw_coords);console.log(n.data("tag")+": "+o)}})},debug:function(){b.debug=true;console.log("Map Resizer Debug Mode")}};c.fn.map_resizer=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{c.error("Method "+d+" does not exist on jQuery.map_resizer")}}}})(jQuery);


