// ColorBox v1.3.16 - 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(a,b,c){function ba(b){if(!T){O=b,Z(a.extend(J,a.data(O,e))),x=a(O),P=0,J.rel!=="nofollow"&&(x=a("."+V).filter(function(){var b=a.data(this,e).rel||this.rel;return b===J.rel}),P=x.index(O),P===-1&&(x=x.add(O),P=x.length-1));if(!R){R=S=!0,q.show();if(J.returnFocus)try{O.blur(),a(O).one(k,function(){try{this.focus()}catch(a){}})}catch(c){}p.css({opacity:+J.opacity,cursor:J.overlayClose?"pointer":"auto"}).show(),J.w=X(J.initialWidth,"x"),J.h=X(J.initialHeight,"y"),U.position(0),n&&y.bind("resize."+o+" scroll."+o,function(){p.css({width:y.width(),height:y.height(),top:y.scrollTop(),left:y.scrollLeft()})}).trigger("resize."+o),$(g,J.onOpen),I.add(C).hide(),H.html(J.close).show()}U.load(!0)}}function _(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;J.slideshow&&x[1]&&(d=function(){E.text(J.slideshowStop).unbind(c).bind(i,function(){if(P<x.length-1||J.loop)a=setTimeout(U.next,J.slideshowSpeed)}).bind(h,function(){clearTimeout(a)}).one(c+" "+j,e),q.removeClass(b+"off").addClass(b+"on"),a=setTimeout(U.next,J.slideshowSpeed)},e=function(){clearTimeout(a),E.text(J.slideshowStart).unbind([i,h,j,c].join(" ")).one(c,d),q.removeClass(b+"on").addClass(b+"off")},J.slideshowAuto?d():e())}function $(b,c){c&&c.call(O),a.event.trigger(b)}function Z(b){for(var c in b)a.isFunction(b[c])&&c.substring(0,2)!=="on"&&(b[c]=b[c].call(O));b.rel=b.rel||O.rel||"nofollow",b.href=a.trim(b.href||a(O).attr("href")),b.title=b.title||O.title}function Y(a){return J.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function X(a,b){b=b==="x"?y.width():y.height();return typeof a=="string"?Math.round(/%/.test(a)?b/100*parseInt(a,10):parseInt(a,10)):a}function W(c,d){var e=b.createElement("div");c&&(e.id=f+c),e.style.cssText=d||!1;return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"368",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0},e="colorbox",f="cbox",g=f+"_open",h=f+"_load",i=f+"_complete",j=f+"_cleanup",k=f+"_closed",l=f+"_purge",m=a.browser.msie&&!a.support.opacity,n=m&&a.browser.version<7,o=f+"_IE6",p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K,L,M,N,O,P,Q,R,S,T=!1,U,V=f+"Element";U=a.fn[e]=a[e]=function(b,c){var f=this,g;if(!f[0]&&f.selector)return f;b=b||{},c&&(b.onComplete=c);if(!f[0]||f.selector===undefined)f=a("<a/>"),b.open=!0;f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(V)}),g=b.open,a.isFunction(g)&&(g=g.call(f)),g&&ba(f[0]);return f},U.init=function(){y=a(c),q=W().attr({id:e,"class":m?f+(n?"IE6":"IE"):""}),p=W("Overlay",n?"position:absolute":"").hide(),r=W("Wrapper"),s=W("Content").append(z=W("LoadedContent","width:0; height:0; overflow:hidden"),B=W("LoadingOverlay").add(W("LoadingGraphic")),C=W("Title"),D=W("Current"),F=W("Next"),G=W("Previous"),E=W("Slideshow").bind(g,_),H=W("Close")),r.append(W().append(W("TopLeft"),t=W("TopCenter"),W("TopRight")),W(!1,"clear:left").append(u=W("MiddleLeft"),s,v=W("MiddleRight")),W(!1,"clear:left").append(W("BottomLeft"),w=W("BottomCenter"),W("BottomRight"))).children().children().css({"float":"left"}),A=W(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(p,q.append(r,A)),s.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),K=t.height()+w.height()+s.outerHeight(!0)-s.height(),L=u.width()+v.width()+s.outerWidth(!0)-s.width(),M=z.outerHeight(!0),N=z.outerWidth(!0),q.css({"padding-bottom":K,"padding-right":L}).hide(),F.click(function(){U.next()}),G.click(function(){U.prev()}),H.click(function(){U.close()}),I=F.add(G).add(D).add(E),s.children().removeClass("hover"),a("."+V).live("click",function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),ba(this))}),p.click(function(){J.overlayClose&&U.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;R&&J.escKey&&b===27&&(a.preventDefault(),U.close()),R&&J.arrowKey&&x[1]&&(b===37?(a.preventDefault(),G.click()):b===39&&(a.preventDefault(),F.click()))})},U.remove=function(){q.add(p).remove(),a("."+V).die("click").removeData(e).removeClass(V)},U.position=function(a,c){function g(a){t[0].style.width=w[0].style.width=s[0].style.width=a.style.width,B[0].style.height=B[1].style.height=s[0].style.height=u[0].style.height=v[0].style.height=a.style.height}var d,e=Math.max(b.documentElement.clientHeight-J.h-M-K,0)/2+y.scrollTop(),f=Math.max(y.width()-J.w-N-L,0)/2+y.scrollLeft();d=q.width()===J.w+N&&q.height()===J.h+M?0:a,r[0].style.width=r[0].style.height="9999px",q.dequeue().animate({width:J.w+N,height:J.h+M,top:e,left:f},{duration:d,complete:function(){g(this),S=!1,r[0].style.width=J.w+N+L+"px",r[0].style.height=J.h+M+K+"px",c&&c()},step:function(){g(this)}})},U.resize=function(a){if(R){a=a||{},a.width&&(J.w=X(a.width,"x")-N-L),a.innerWidth&&(J.w=X(a.innerWidth,"x")),z.css({width:J.w}),a.height&&(J.h=X(a.height,"y")-M-K),a.innerHeight&&(J.h=X(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=z.wrapInner("<div style='overflow:auto'></div>").children();J.h=b.height(),b.replaceWith(b.children())}z.css({height:J.h}),U.position(J.transition==="none"?0:J.speed)}},U.prep=function(b){function h(b){U.position(b,function(){var b,d,g,h,j=x.length,k,n;!R||(n=function(){B.hide(),$(i,J.onComplete)},m&&Q&&z.fadeIn(100),C.html(J.title).add(z).show(),j>1?(typeof J.current=="string"&&D.html(J.current.replace(/\{current\}/,P+1).replace(/\{total\}/,j)).show(),F[J.loop||P<j-1?"show":"hide"]().html(J.next),G[J.loop||P?"show":"hide"]().html(J.previous),b=P?x[P-1]:x[j-1],g=P<j-1?x[P+1]:x[0],J.slideshow&&E.show(),J.preloading&&(h=a.data(g,e).href||g.href,d=a.data(b,e).href||b.href,h=a.isFunction(h)?h.call(g):h,d=a.isFunction(d)?d.call(b):d,Y(h)&&(a("<img/>")[0].src=h),Y(d)&&(a("<img/>")[0].src=d))):I.hide(),J.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],J.fastIframe?n():a(k).load(n),k.name=f+ +(new Date),k.src=J.href,J.scrolling||(k.scrolling="no"),m&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(z).one(l,function(){k.src="//about:blank"})):n(),J.transition==="fade"?q.fadeTo(c,1,function(){q[0].style.filter=""}):q[0].style.filter="",y.bind("resize."+f,function(){U.position(0)}))})}function g(){J.h=J.h||z.height(),J.h=J.mh&&J.mh<J.h?J.mh:J.h;return J.h}function d(){J.w=J.w||z.width(),J.w=J.mw&&J.mw<J.w?J.mw:J.w;return J.w}if(!!R){var c=J.transition==="none"?0:J.speed;y.unbind("resize."+f),z.remove(),z=W("LoadedContent").html(b),z.hide().appendTo(A.show()).css({width:d(),overflow:J.scrolling?"auto":"hidden"}).css({height:g()}).prependTo(s),A.hide(),a(Q).css({"float":"none"}),n&&a("select").not(q.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(j,function(){this.style.visibility="inherit"}),J.transition==="fade"?q.fadeTo(c,0,function(){h(0)}):h(c)}},U.load=function(b){var c,d,g=U.prep;S=!0,Q=!1,O=x[P],b||Z(a.extend(J,a.data(O,e))),$(l),$(h,J.onLoad),J.h=J.height?X(J.height,"y")-M-K:J.innerHeight&&X(J.innerHeight,"y"),J.w=J.width?X(J.width,"x")-N-L:J.innerWidth&&X(J.innerWidth,"x"),J.mw=J.w,J.mh=J.h,J.maxWidth&&(J.mw=X(J.maxWidth,"x")-N-L,J.mw=J.w&&J.w<J.mw?J.w:J.mw),J.maxHeight&&(J.mh=X(J.maxHeight,"y")-M-K,J.mh=J.h&&J.h<J.mh?J.h:J.mh),c=J.href,B.show(),J.inline?(W().hide().insertBefore(a(c)[0]).one(l,function(){a(this).replaceWith(z.children())}),g(a(c))):J.iframe?g(" "):J.html?g(J.html):Y(c)?(a(Q=new Image).addClass(f+"Photo").error(function(){J.title=!1,g(W("Error").text("This image could not be loaded"))}).load(function(){var a;Q.onload=null,J.scalePhotos&&(d=function(){Q.height-=Q.height*a,Q.width-=Q.width*a},J.mw&&Q.width>J.mw&&(a=(Q.width-J.mw)/Q.width,d()),J.mh&&Q.height>J.mh&&(a=(Q.height-J.mh)/Q.height,d())),J.h&&(Q.style.marginTop=Math.max(J.h-Q.height,0)/2+"px"),x[1]&&(P<x.length-1||J.loop)&&(Q.style.cursor="pointer",Q.onclick=function(){U.next()}),m&&(Q.style.msInterpolationMode="bicubic"),setTimeout(function(){g(Q)},1)}),setTimeout(function(){Q.src=c},1)):c&&A.load(c,function(b,c,d){g(c==="error"?W("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},U.next=function(){!S&&x[1]&&(P<x.length-1||J.loop)&&(P=P<x.length-1?P+1:0,U.load())},U.prev=function(){!S&&x[1]&&(P||J.loop)&&(P=P?P-1:x.length-1,U.load())},U.close=function(){R&&!T&&(T=!0,R=!1,$(j,J.onCleanup),y.unbind("."+f+" ."+o),p.fadeTo(200,0),q.stop().fadeTo(300,0,function(){q.add(p).css({opacity:1,cursor:"auto"}).hide(),$(l),z.remove(),setTimeout(function(){T=!1,$(k,J.onClosed)},1)}))},U.element=function(){return a(O)},U.settings=d,a(U.init)})(jQuery,document,this);
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright (c) Gilles Pegel, 2005. All rights reserved.
 * 
 * Trademark:
 * Butter unsalted is a trademark of Gilles Pegel.
 * 
 * Description:
 * I'm a font
 * 
 * Manufacturer:
 * Gilles Pegel
 * 
 * Designer:
 * Pegel Gilles
 * 
 * License information:
 * http://www.trypo.com/trypo/fonts/butter/License.txt
 */
Cufon.registerFont({"w":560,"face":{"font-family":"Butter","font-weight":500,"font-stretch":"normal","units-per-em":"1000","panose-1":"2 0 0 0 0 0 0 0 0 0","ascent":"800","descent":"-200","x-height":"8","bbox":"-50 -855 804 269","underline-thickness":"50","underline-position":"-50","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":300},"B":{"d":"414,-580v48,93,-11,206,-81,234v55,28,112,76,112,161v0,119,-98,185,-222,185r-223,0r0,-692v137,3,289,-19,366,54v19,18,36,36,48,58xm346,-507v0,-82,-55,-136,-137,-136r-123,0r0,273r123,0v83,-4,137,-55,137,-137xm223,-49v82,-4,136,-54,136,-136v0,-82,-54,-136,-136,-136r-137,0r0,272r137,0","w":545,"k":{",":20}},"C":{"d":"0,-515v-2,-178,256,-236,380,-131v35,29,64,73,65,131r-86,0v-5,-82,-54,-136,-136,-136v-82,0,-137,54,-137,136r0,338v5,81,55,136,137,136v82,0,132,-54,136,-136r86,0v-9,120,-98,185,-222,185v-124,0,-223,-65,-223,-185r0,-338","w":550,"k":{",":20}},"D":{"d":"0,-692v141,4,302,-21,381,54v33,31,63,73,64,131r0,322v-9,120,-98,185,-222,185r-223,0r0,-692xm223,-49v82,-4,136,-54,136,-136r0,-322v-4,-82,-54,-136,-136,-136r-137,0r0,594r137,0","k":{",":20,"Y":20}},"E":{"d":"0,-692r391,0r0,49r-305,0r0,273r273,0r0,49r-273,0r0,272r305,0r0,49r-391,0r0,-692","w":496,"k":{"u":10,"O":20,"C":20}},"F":{"d":"0,-692r391,0r0,49r-305,0r0,273r273,0r0,49r-273,0r0,321r-86,0r0,-692","w":456,"k":{";":40,":":20,",":70,".":60,"o":10,"e":10,"a":40,"A":10,"O":10,"G":10,"C":10}},"G":{"d":"223,-41v82,0,136,-54,136,-136r0,-136r-136,0r0,-49r222,0v-5,89,16,194,-17,258v-35,67,-106,112,-205,112v-124,0,-223,-65,-223,-185r0,-338v-2,-178,256,-236,380,-131v35,29,64,73,65,131r-86,0v-5,-82,-54,-136,-136,-136v-82,0,-136,54,-136,136r0,338v4,82,54,136,136,136","w":550,"k":{"U":10,"O":10}},"H":{"d":"0,-692r86,0r0,322r273,0r0,-322r86,0r0,692r-86,0r0,-321r-273,0r0,321r-86,0r0,-692","w":570,"k":{"o":20}},"I":{"d":"86,0r-86,0r0,-692r86,0r0,692","w":201,"k":{"l":-10,"O":10,"G":10,"C":10}},"J":{"d":"-50,-49v82,-4,136,-54,136,-136r0,-515r86,0r0,515v-8,120,-98,179,-222,185r0,-49","w":287,"k":{",":40,".":20,"a":20,"A":10,"O":10}},"K":{"d":"222,-370v82,-4,137,-54,137,-135r0,-179r86,0r0,180v-2,83,-56,129,-112,158v57,30,112,76,112,161r0,185r-86,0r0,-185v-5,-82,-55,-136,-137,-136r-136,0r0,321r-86,0r0,-692r86,0r0,322r136,0","k":{"O":10}},"L":{"d":"86,-49r305,0r0,49r-391,0r0,-692r86,0r0,643","w":456,"k":{"'":50,"y":10,"u":10,"Y":70,"W":30,"U":20,"T":80,"O":20,"G":20,"C":40}},"M":{"d":"402,-624v60,-86,253,-100,336,-22v33,31,65,72,66,130r0,516r-86,0r0,-516v-4,-81,-55,-135,-136,-135v-82,0,-137,54,-137,136r0,515r-86,0r0,-516v-4,-81,-55,-135,-136,-135v-82,0,-136,54,-136,136r0,515r-87,0r0,-516v9,-119,100,-180,223,-184v78,-2,142,32,179,76","w":919},"N":{"d":"223,-651v-82,0,-137,54,-137,136r0,515r-86,0r0,-516v10,-118,99,-184,223,-184v124,0,222,65,222,184r0,516r-86,0r0,-516v-4,-83,-55,-135,-136,-135"},"O":{"d":"0,-515v9,-119,99,-185,223,-185v124,0,222,66,222,185r0,339v1,177,-255,235,-379,130v-36,-29,-65,-72,-66,-130r0,-339xm223,-41v81,0,136,-53,136,-134r0,-340v-4,-82,-54,-136,-136,-136v-82,0,-137,54,-137,135r0,339v4,82,55,136,137,136","k":{",":20,"a":20,"Y":30,"T":60}},"P":{"d":"0,-692v140,4,299,-18,380,54v48,43,88,128,48,202v-36,66,-106,115,-206,115r-136,0r0,321r-86,0r0,-692xm359,-507v0,-82,-55,-136,-137,-136r-136,0r0,273r136,0v82,-5,137,-55,137,-137","w":510,"k":{";":30,":":30,",":70,".":75,"o":20,"e":20,"a":40}},"Q":{"d":"223,-700v124,0,222,66,222,185r0,339v-1,68,-41,116,-86,145r86,148r-93,0r-64,-117v-122,28,-228,-23,-270,-104v-12,-22,-18,-47,-18,-72r0,-339v9,-119,99,-185,223,-185xm223,-41v81,0,136,-53,136,-134r0,-340v-4,-82,-54,-136,-136,-136v-82,0,-137,54,-137,135r0,339v4,82,55,136,137,136"},"R":{"d":"414,-578v43,92,-2,203,-81,232v57,30,112,76,112,161r0,185r-86,0r0,-185v-5,-82,-54,-136,-136,-136r-137,0r0,321r-86,0r0,-692v137,3,291,-20,367,54v19,18,36,38,47,60xm345,-507v0,-82,-54,-136,-136,-136r-123,0r0,273r123,0v82,-5,136,-55,136,-137","k":{"Y":50,"T":60}},"S":{"d":"223,-41v130,9,180,-176,81,-244v-104,-71,-295,-57,-299,-230v-5,-200,311,-239,406,-99v10,14,17,25,21,35r-75,37v-16,-60,-59,-109,-134,-109v-82,0,-136,55,-136,136v0,96,104,111,179,142v88,36,178,74,179,196v2,178,-254,236,-379,131v-36,-29,-65,-72,-66,-131r87,0v4,82,55,130,136,136","w":550,"k":{",":20,"T":50}},"T":{"d":"415,-692r0,49r-180,0r0,643r-86,0r0,-643r-179,0r0,-49r445,0","w":465,"k":{";":40,":":30,",":80,".":70,"z":40,"y":45,"x":45,"w":40,"v":40,"u":45,"s":50,"r":40,"o":50,"n":40,"m":40,"j":40,"i":10,"e":45,"d":40,"c":45,"a":60,"A":20,"O":20,"C":20}},"U":{"d":"222,-41v81,0,137,-53,137,-134r0,-517r86,0r0,516v-9,119,-100,184,-223,184v-124,0,-222,-65,-222,-184r0,-516r86,0r0,515v4,82,54,136,136,136","k":{",":20,"S":10,"O":10,"G":10,"C":10}},"V":{"d":"222,-49v82,-4,137,-54,137,-135r0,-508r86,0r0,508v-9,119,-100,184,-223,184r-222,0r0,-692r86,0r0,643r136,0","k":{"S":20,"O":10,"G":10,"C":10}},"W":{"d":"582,-49v81,-5,136,-54,136,-135r0,-508r86,0r0,508v-9,119,-99,184,-222,184r-359,0v-124,-6,-223,-64,-223,-184r0,-508r86,0r0,508v5,81,55,135,137,135r136,0r0,-643r86,0r0,643r137,0","w":919,"k":{"O":10,"G":10,"C":10}},"X":{"d":"444,-505v-1,77,-53,132,-112,159v59,28,112,81,112,160r0,186r-86,0r0,-186v-4,-81,-55,-135,-136,-135v-82,0,-136,54,-136,136r0,185r-86,0r0,-186v1,-78,53,-133,112,-160v-59,-27,-112,-81,-112,-159r0,-187r86,0r0,185v4,82,54,137,136,137v81,0,136,-53,136,-135r0,-187r86,0r0,187","w":559},"Y":{"d":"67,-505v4,82,56,136,137,136r123,0r0,-323r84,0r0,517v-10,118,-99,177,-222,183r0,-49v82,-4,136,-55,136,-136r0,-144v-113,3,-219,3,-280,-55v-33,-32,-64,-73,-65,-131r0,-185r87,0r0,187","w":526,"k":{"S":10,"O":10,"C":10}},"Z":{"d":"411,-692v-5,96,16,219,-25,278v-62,89,-219,84,-294,158v-41,40,-21,133,-26,207r359,0r0,49r-445,0v6,-95,-15,-217,26,-276v62,-89,219,-84,294,-159v40,-40,20,-133,25,-208r-332,0r0,-49r418,0","w":530,"k":{"O":30}},"A":{"d":"136,-686v146,-48,309,26,309,171r0,515r-87,0r0,-321r-272,0r0,321r-86,0r0,-515v4,-91,64,-147,136,-171xm222,-651v-82,0,-136,54,-136,136r0,145r272,0r0,-145v-4,-82,-54,-136,-136,-136","k":{"Y":20,"W":-10,"V":-20,"U":-10,"T":30,"R":-20,"Q":-10,"P":-20,"O":-10,"N":-10,"M":-10,"L":-20,"K":-20,"J":10,"I":-20,"H":-20,"G":-10,"F":-20,"E":-20,"D":-20,"C":-10,"B":-10}},"a":{"d":"43,-426v29,-25,72,-44,125,-43v92,2,168,44,168,130r0,339r-79,0v-2,-10,3,-27,-2,-34v-24,23,-60,42,-109,42v-84,0,-146,-48,-146,-130v0,-82,62,-130,146,-130r109,0r0,-87v1,-47,-40,-88,-87,-87v-38,0,-64,21,-77,48xm168,-35v53,0,87,-35,87,-87r0,-87r-87,0v-52,3,-87,35,-87,87v0,52,35,87,87,87","w":441,"k":{"j":70}},"b":{"d":"81,-428v29,-21,58,-43,109,-41v84,3,146,48,146,130r0,217v-6,81,-62,127,-146,130v-50,2,-84,-20,-110,-42r0,34r-80,0r0,-730r81,0r0,302xm81,-122v-1,47,40,87,87,87v47,0,87,-40,87,-87r0,-217v-3,-53,-35,-87,-87,-87v-52,0,-87,34,-87,87r0,217","w":441,"k":{",":20,"j":70,"a":30}},"c":{"d":"0,-338v1,-133,207,-165,293,-87r-47,48v-14,-25,-38,-47,-78,-48v-47,-1,-87,40,-87,87r0,217v3,52,35,87,87,87v42,0,67,-25,80,-53r50,49v-31,26,-71,47,-130,47v-91,0,-168,-43,-168,-130r0,-217","w":368,"k":{"j":70,"a":30}},"d":{"d":"146,-469v51,-2,81,20,109,41r0,-302r81,0r0,730r-79,0v-2,-10,3,-27,-2,-34v-24,23,-60,42,-109,42v-84,0,-146,-48,-146,-130r0,-217v6,-81,62,-127,146,-130xm168,-35v47,0,87,-40,87,-87r0,-217v-3,-53,-35,-87,-87,-87v-52,0,-87,34,-87,87r0,217v-1,47,40,87,87,87","w":451,"k":{"l":-10,"j":70,"i":-10,"a":20}},"e":{"d":"82,-122v3,52,35,84,87,87v47,1,87,-40,86,-87r82,0v-7,87,-77,130,-168,130v-92,0,-169,-44,-169,-130r0,-217v7,-87,78,-130,169,-130v91,0,168,43,168,130v0,115,-122,138,-255,130r0,87xm169,-426v-52,2,-87,34,-87,87r0,87r87,0v52,-3,84,-35,86,-87v2,-47,-39,-89,-86,-87","w":437,"k":{"z":20,"n":10,"j":70,"a":30}},"f":{"d":"168,-694v-52,3,-87,34,-87,86r0,147r87,0r0,43r-87,0r0,418r-81,0r0,-608v8,-86,77,-126,168,-130r0,44","w":238,"k":{"j":70,"a":40}},"g":{"d":"147,-469v51,-2,82,22,110,42r0,-34r79,0r0,599v-1,155,-267,167,-323,51v-8,-16,-13,-33,-13,-51r81,0v3,52,34,85,87,87v47,2,87,-39,87,-87r0,-171v-28,20,-58,43,-108,41v-84,-3,-147,-48,-147,-130r0,-217v5,-82,63,-127,147,-130xm168,-35v52,0,87,-34,87,-87r0,-217v1,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,217v3,52,35,87,87,87","w":441,"k":{"j":40,"a":20}},"h":{"d":"81,-428v29,-21,58,-43,109,-41v84,3,146,48,146,130r0,339r-81,0r0,-339v-3,-52,-35,-87,-87,-87v-52,0,-87,34,-87,87r0,339r-81,0r0,-730r81,0r0,302","w":441,"k":{"j":70,"a":20}},"i":{"d":"87,0r-82,0r0,-461r82,0r0,461xm46,-692v26,0,46,21,46,46v1,26,-20,47,-46,46v-25,0,-46,-20,-46,-46v0,-25,21,-46,46,-46","w":197,"k":{"l":-20,"k":-10,"j":70,"h":-10,"b":-10,"a":30}},"j":{"d":"-50,225v52,-3,87,-34,87,-87r0,-599r81,0r0,599v-7,87,-76,127,-168,131r0,-44xm78,-692v25,0,46,21,46,46v0,26,-21,46,-46,46v-26,1,-47,-20,-46,-46v0,-25,20,-46,46,-46","w":229,"k":{"j":40,"a":20}},"k":{"d":"336,-339v0,56,-35,92,-70,111v33,19,70,52,70,106r0,122r-81,0r0,-122v1,-47,-40,-87,-87,-87r-87,0r0,209r-81,0r0,-730r81,0r0,302v29,-21,58,-43,109,-41v83,3,146,48,146,130xm168,-252v47,1,87,-40,87,-87v0,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,87r87,0","w":441,"k":{"j":70,"a":20}},"l":{"d":"0,-730r82,0r0,730r-82,0r0,-730","w":187,"k":{"x":-5,"p":-10,"l":-20,"k":-10,"j":70,"i":-10,"f":-10,"d":-5,"a":20}},"m":{"d":"0,-339v0,-135,212,-165,295,-85v28,-26,75,-46,128,-45v91,2,168,43,168,130r0,339r-81,0r0,-339v1,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,339r-81,0r0,-339v1,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,339r-81,0r0,-339","w":696,"k":{"w":-10,"u":-10,"t":-10,"r":-10,"n":-10,"l":-15,"j":70,"i":-20,"e":-10,"a":10}},"n":{"d":"0,-339v7,-87,77,-130,168,-130v91,0,168,43,168,130r0,339r-81,0r0,-339v1,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,339r-81,0r0,-339","w":441,"k":{"l":-5,"a":30}},"o":{"d":"1,-339v7,-87,77,-130,168,-130v91,0,168,43,168,130r0,217v-7,87,-77,130,-168,130v-91,0,-168,-43,-168,-130r0,-217xm169,-35v47,0,87,-40,87,-87r0,-217v1,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,217v-1,47,40,87,87,87","w":442,"k":{"j":20,"e":10,"a":30}},"p":{"d":"80,-427v29,-20,59,-44,110,-42v84,3,147,48,147,130r0,217v-5,82,-63,127,-147,130v-50,2,-80,-20,-108,-41r0,294r-82,0r0,-722r80,0r0,34xm168,-35v52,0,87,-34,87,-87r0,-217v1,-47,-40,-89,-87,-87v-52,2,-86,35,-86,87r0,217v3,52,34,87,86,87","w":442,"k":{"l":-5,"j":60,"a":20}},"q":{"d":"147,-469v51,-2,82,22,110,42r0,-34r80,0r0,722r-82,0r-1,-294v-26,22,-58,41,-107,41v-84,0,-147,-48,-147,-130r0,-217v5,-82,63,-127,147,-130xm169,-35v52,0,86,-35,86,-87r0,-217v-3,-52,-34,-85,-86,-87v-47,-2,-87,40,-87,87r0,217v3,53,35,87,87,87","w":442,"k":{"l":-10,"j":30}},"r":{"d":"81,-428v40,-40,135,-59,193,-17r-45,45v-49,-56,-148,-13,-148,61r0,339r-81,0r0,-461r81,0r0,33","w":309,"k":{",":50,".":30,"s":20,"l":-5,"j":60,"a":50}},"s":{"d":"254,-370v-12,-30,-38,-54,-81,-56v-70,-3,-118,90,-69,136v68,64,234,25,232,168v-2,154,-267,165,-322,50v-8,-16,-14,-32,-14,-50r81,0v3,52,35,84,87,87v70,5,116,-90,69,-137v-64,-65,-222,-30,-222,-167v0,-139,210,-164,290,-81","w":431,"k":{"j":70,"a":40}},"t":{"d":"168,8v-91,-4,-168,-44,-168,-130r0,-482r81,0r0,143r87,0r0,43r-87,0r0,296v3,52,35,84,87,87r0,43","w":243,"k":{"j":70,"a":10}},"u":{"d":"168,-35v47,0,87,-40,87,-87r0,-339r82,0r0,339v-8,86,-77,130,-169,130v-91,0,-168,-43,-168,-130r0,-339r82,0r0,339v-1,47,39,87,86,87","w":442,"k":{"j":70,"i":-10,"a":20}},"v":{"d":"168,-43v47,1,87,-40,87,-87r0,-331r81,0r0,331v-7,87,-77,130,-168,130r-168,0r0,-461r81,0r0,418r87,0","w":441,"k":{"l":-5,"j":70,"a":10}},"w":{"d":"423,-43v47,1,87,-40,87,-87r0,-331r81,0r0,331v-7,87,-77,130,-168,130r-255,0v-91,-4,-168,-43,-168,-130r0,-331r81,0r0,331v-1,47,40,87,87,87r87,0r0,-418r81,0r0,418r87,0","w":696,"k":{"u":-10,"t":-10,"r":-10,"n":-10,"m":-10,"l":-10,"j":70,"i":-20,"e":-10}},"x":{"d":"336,-339v-1,52,-35,89,-75,108v40,20,75,56,75,109r0,122r-81,0r0,-122v1,-47,-40,-87,-87,-87v-47,0,-87,40,-87,87r0,122r-81,0r0,-122v1,-52,36,-89,75,-109v-39,-19,-75,-56,-75,-108r0,-122r81,0r0,122v-1,47,40,87,87,87v47,0,87,-40,87,-87r0,-122r81,0r0,122","w":441,"k":{"j":70}},"y":{"d":"168,-35v52,0,87,-34,87,-87r0,-339r81,0r0,599v-1,155,-267,167,-323,51v-8,-16,-13,-33,-13,-51r81,0v3,52,34,85,87,87v47,2,87,-39,87,-87r0,-171v-29,19,-58,43,-109,41v-84,-3,-146,-48,-146,-130r0,-339r81,0r0,339v3,53,35,87,87,87","w":441,"k":{"j":30,"a":30}},"z":{"d":"0,0v3,-65,-9,-148,18,-189v41,-62,152,-52,204,-101v26,-24,15,-81,17,-128r-239,0r0,-43r321,0v-3,66,9,150,-17,192v-39,63,-150,51,-204,98v-26,23,-16,82,-18,128r247,0r0,43r-329,0","w":434,"k":{"j":70,"e":20,"a":70}},"^":{"d":"190,-692r65,0r190,383r-49,0r-173,-343r-174,343r-49,0","w":525},"0":{"d":"222,-700v124,0,223,65,223,185r0,339v-10,118,-99,184,-223,184v-124,0,-222,-65,-222,-184r0,-339v9,-119,98,-185,222,-185xm305,-623v-87,-66,-219,-4,-219,107r0,339v0,26,7,49,20,70xm143,-66v88,61,216,0,216,-109r0,-340v0,-26,-8,-49,-18,-66","w":535},"1":{"d":"-30,-556v81,-5,131,-54,135,-136r87,0r0,692r-87,0r0,-544v-31,21,-80,39,-135,39r0,-51","w":302},"2":{"d":"223,-700v123,0,220,65,222,193v3,192,-234,158,-333,251v-42,40,-21,132,-26,207r359,0r0,49r-445,0v6,-96,-17,-217,26,-276v65,-89,229,-83,306,-159v18,-17,26,-41,26,-72v0,-83,-55,-136,-135,-136v-81,0,-133,54,-137,136r-86,0v6,-127,97,-193,223,-193","w":535},"3":{"d":"404,-580v47,92,-11,206,-81,234v55,28,112,76,112,161v0,119,-98,185,-222,185r-223,0r0,-49r223,0v82,-4,136,-54,136,-136v0,-82,-54,-136,-136,-136r-207,0r0,-49r193,0v82,-4,136,-55,136,-137v0,-82,-54,-136,-136,-136r-201,0r0,-49v134,3,283,-18,358,54v19,18,36,36,48,58","w":525},"4":{"d":"76,-394v6,98,73,146,186,136r0,-263r86,0r0,263r87,0r0,49r-87,0r0,209r-86,0r0,-209v-155,8,-272,-50,-272,-185r0,-298r86,0r0,298","w":515},"5":{"d":"223,-49v81,0,136,-53,136,-136v0,-137,-173,-124,-266,-177v-51,-29,-94,-66,-93,-145r0,-185r432,0r0,121r-86,0r0,-72r-260,0v4,66,-14,151,16,193v83,118,337,57,343,265v7,222,-347,248,-425,83v-12,-25,-19,-52,-19,-83r86,0v4,82,55,136,136,136","w":535},"6":{"d":"86,-323v36,-22,81,-39,137,-39v124,0,222,66,222,185v0,119,-98,185,-222,185v-124,0,-223,-65,-223,-185r0,-338v-4,-189,289,-239,397,-115v9,10,14,16,16,19r-59,59v-16,-55,-65,-99,-131,-99v-82,0,-137,55,-137,136r0,192xm87,-177v0,82,54,136,136,136v82,0,136,-54,136,-136v0,-82,-54,-136,-136,-136v-82,0,-136,54,-136,136","w":535},"7":{"d":"56,0v4,-88,-9,-198,19,-258v52,-113,233,-90,237,-249r0,-136r-256,0r0,72r-86,0r0,-121r429,0v-2,91,5,204,-19,268v-38,101,-156,110,-219,180v-42,47,-12,163,-19,244r-86,0","w":459},"8":{"d":"433,-515v0,85,-52,144,-120,169v69,25,132,83,132,169v0,119,-98,185,-222,185v-124,0,-223,-65,-223,-185v0,-85,65,-144,132,-169v-67,-25,-120,-84,-120,-169v0,-119,89,-185,211,-185v122,0,210,67,210,185xm223,-651v-82,0,-135,55,-135,136v0,81,53,137,135,137v82,0,134,-56,134,-137v0,-81,-52,-136,-134,-136xm86,-177v0,81,55,136,137,136v82,0,136,-54,136,-136v0,-82,-54,-136,-136,-136v-82,0,-137,55,-137,136","w":545},"9":{"d":"222,-41v83,0,137,-54,137,-136r0,-192v-81,60,-229,44,-294,-15v-34,-31,-65,-72,-65,-131v0,-119,98,-185,222,-185v124,0,223,65,223,185r0,338v2,178,-256,236,-380,131v-35,-29,-64,-73,-65,-131r86,0v4,82,54,136,136,136xm359,-515v0,-82,-55,-136,-137,-136v-82,0,-136,54,-136,136v0,82,54,137,136,137v83,0,137,-55,137,-137","w":535},"{":{"d":"92,-364v39,21,76,55,77,109r0,250v-2,47,40,87,86,86r0,44v-91,-4,-168,-44,-168,-130r0,-250v-3,-52,-35,-84,-87,-87r0,-44v52,-3,87,-34,87,-86r0,-252v8,-86,77,-127,168,-131r0,44v-46,-1,-86,40,-86,87r0,252v-1,52,-39,88,-77,108","w":370},"}":{"d":"0,81v52,-3,87,-34,87,-86r0,-250v1,-53,38,-88,76,-109v-38,-21,-75,-56,-76,-108r0,-252v-3,-52,-35,-84,-87,-87r0,-44v92,3,168,44,168,131r0,252v3,52,35,83,87,86r0,44v-53,3,-87,35,-87,87r0,250v-7,87,-77,126,-168,130r0,-44","w":370},"[":{"d":"168,-811v-53,3,-87,35,-87,87r0,719v3,52,35,83,87,86r0,44v-91,-4,-168,-43,-168,-130r0,-719v7,-87,76,-127,168,-131r0,44","w":258},"]":{"d":"0,81v52,-2,86,-34,86,-86r0,-719v-3,-51,-33,-85,-86,-87r0,-44v92,3,168,44,168,131r0,719v-8,86,-77,126,-168,130r0,-44","w":258},"(":{"d":"0,-364v0,-197,66,-369,151,-482r83,0v-89,117,-153,280,-153,483v0,201,68,361,154,480r-84,0v-86,-120,-151,-275,-151,-481","w":350},")":{"d":"153,-363v0,-203,-63,-367,-152,-483r83,0v86,112,151,285,151,482v0,206,-66,360,-152,481r-83,0v87,-118,153,-278,153,-480","w":350},"*":{"d":"112,-594v10,25,28,42,41,65r-24,14v-13,-22,-20,-49,-36,-68r-34,68r-24,-14v13,-22,30,-40,41,-65r-76,4r0,-27r76,4v-10,-25,-28,-42,-41,-65r24,-14v13,22,20,49,36,68r34,-68r24,14v-13,22,-30,40,-41,65r76,-4r0,27","w":293},"`":{"d":"0,-620r93,0r76,108r-44,0","w":249},"\\":{"d":"0,-700r54,0r258,708r-54,0","w":392},"\/":{"d":"54,8r-54,0r257,-708r55,0","w":352},"&":{"d":"460,-321v2,82,-26,160,-49,213r83,108r-92,0r-36,-48v-39,37,-91,56,-154,56v-123,0,-208,-67,-212,-185v-4,-111,60,-165,126,-209v-32,-56,-81,-88,-81,-169v0,-92,65,-143,157,-145v111,-3,185,95,144,206v-23,61,-74,94,-122,129r137,186v10,-42,19,-91,19,-142r80,0xm202,-646v-71,-5,-107,82,-70,142v12,20,34,54,52,80v45,-33,103,-58,103,-131v0,-56,-34,-87,-85,-91xm75,-177v-2,101,111,162,199,115v17,-9,33,-26,50,-43r-157,-219v-45,33,-90,69,-92,147","w":584},".":{"d":"48,-90v26,0,49,23,49,49v0,26,-23,49,-49,49v-26,0,-48,-23,-48,-49v0,-26,22,-49,48,-49","w":202},",":{"d":"69,-90v38,0,65,46,39,79r-67,86r-41,0r44,-75v-41,-18,-23,-90,25,-90","w":223},":":{"d":"49,-89v26,0,49,22,49,48v0,26,-23,49,-49,49v-26,0,-49,-23,-49,-49v0,-26,23,-48,49,-48xm49,-469v26,0,49,23,49,49v0,26,-23,48,-49,48v-26,0,-49,-22,-49,-48v0,-26,23,-49,49,-49","w":203},";":{"d":"69,-469v26,0,48,23,48,49v0,26,-22,48,-48,48v-26,0,-49,-22,-49,-48v0,-26,23,-49,49,-49xm70,-89v-47,0,-68,68,-26,91r-44,74r41,0r67,-86v27,-30,0,-79,-38,-79","w":224},"\"":{"d":"44,-610v-42,-20,-22,-90,25,-90v38,0,65,48,39,79r-67,86r-41,0xm219,-700v38,0,62,49,38,79r-67,86r-41,0r44,-75v-42,-21,-21,-90,26,-90","w":372},"'":{"d":"70,-700v38,0,63,47,38,79r-67,86r-41,0r44,-75v-42,-21,-21,-90,26,-90","w":224},"!":{"d":"49,-89v26,0,49,22,49,48v0,26,-23,49,-49,49v-26,0,-49,-23,-49,-49v0,-26,23,-48,49,-48xm6,-730r86,0r0,521r-86,0r0,-521","w":203},"?":{"d":"397,-553v0,165,-193,158,-179,344r-86,0v-14,-161,105,-203,166,-299v9,-14,13,-30,13,-45v-5,-81,-54,-136,-136,-136v-73,0,-113,45,-131,99r-59,-59v36,-48,100,-92,190,-89v124,4,222,66,222,185xm175,-89v-26,0,-49,22,-49,48v0,26,23,49,49,49v26,0,49,-23,49,-49v0,-26,-23,-48,-49,-48","w":502},"~":{"d":"357,-339v51,13,101,-20,116,-54r39,11v-29,61,-89,122,-174,102v-70,-16,-131,-48,-206,-57v-40,-5,-81,27,-93,57r-39,-12v29,-61,90,-127,174,-102","w":617},"<":{"d":"512,-458r-458,209r458,208r0,49r-512,-233r0,-49r512,-233r0,49","w":617},"=":{"d":"0,-199r512,0r0,49r-512,0r0,-49xm512,-362r0,49r-512,0r0,-49r512,0xm512,-362r0,49r-512,0r0,-49r512,0","w":617},">":{"d":"0,-507r512,233r0,49r-512,233r0,-49r458,-208r-458,-209r0,-49","w":617},"+":{"d":"512,-231r-231,0r0,231r-49,0r0,-231r-232,0r0,-49r232,0r0,-232r49,0r0,232r231,0r0,49","w":617},"#":{"d":"375,-360r-23,114r95,0r0,48r-104,0r-38,198r-49,0r38,-198r-133,0r-39,198r-49,0r39,-198r-112,0r0,-48r121,0r22,-114r-99,0r0,-49r109,0r38,-195r49,0r-38,195r133,0r38,-195r49,0r-38,195r106,0r0,49r-115,0xm326,-360r-134,0r-22,114r134,0","w":595},"@":{"d":"239,-555v79,-70,296,-53,276,86r-39,277v118,-18,170,-192,118,-312v-48,-111,-213,-176,-356,-116v-128,53,-224,227,-153,394v44,102,134,179,274,179v117,0,207,-43,259,-112r0,69v-82,86,-266,129,-405,72v-124,-51,-213,-157,-213,-326v0,-168,95,-275,216,-329v126,-57,291,-10,365,57v72,65,125,201,74,319v-36,82,-97,157,-200,165v-32,2,-50,-22,-61,-45v-26,22,-62,42,-112,42v-76,0,-127,-41,-127,-120v0,-84,73,-136,163,-136r106,0r12,-90v1,-42,-32,-74,-74,-73v-37,0,-67,21,-83,46xm235,-251v-3,69,89,92,137,49v34,-31,38,-90,46,-146r-85,0v-52,1,-96,44,-98,97","w":798},"$":{"d":"239,-381v94,37,196,71,196,200v0,112,-89,167,-196,180r0,42r-44,0r0,-42v-108,-13,-187,-69,-195,-180r85,0v3,74,47,117,110,132r0,-284v-91,-34,-195,-55,-195,-178v0,-112,89,-166,195,-180r0,-47r44,0r0,47v91,8,153,52,183,118r-74,36v-13,-55,-50,-95,-109,-105r0,261xm195,-642v-88,7,-148,134,-78,202v21,19,49,31,78,43r0,-245xm239,-49v93,-5,151,-145,79,-219v-21,-21,-49,-36,-79,-49r0,268","w":525},"%":{"d":"367,-256v6,-73,64,-111,140,-111v76,0,140,38,140,111r0,151v-6,73,-64,110,-140,110v-77,0,-140,-37,-140,-110r0,-151xm507,-24v50,0,86,-32,86,-81r0,-151v-3,-50,-35,-82,-86,-82v-50,0,-86,32,-86,81r0,151v3,50,35,82,86,82xm0,-589v6,-73,64,-111,140,-111v76,0,140,38,140,111r0,151v-6,73,-64,110,-140,110v-77,0,-140,-37,-140,-110r0,-151xm140,-357v50,-2,86,-32,86,-81r0,-151v-3,-50,-35,-82,-86,-82v-50,0,-86,32,-86,81r0,151v-1,45,40,84,86,82xm185,0r-43,0r322,-692r44,0","w":752},"-":{"d":"0,-231r0,-49r255,0r0,49r-255,0","w":360},"_":{"d":"0,0r512,0r0,49r-512,0r0,-49","w":592},"|":{"d":"49,81r-49,0r0,-892r49,0r0,892","w":164},"\u00a0":{"w":300}}});

var ie6;
var gifpngext;
var doctitle;
var map;
var icon;
var marker;
var latlng;
var baseIcon;
var markerOptions;
	
if(document.images){
	p = new Image();
	p.src = "/images/loading.gif";
}

var postForm = function(formid, submitid, url){
	var form=$('#'+formid);
	
	form.submit(function(event){
		form.addClass('loading');
		
		$.ajax({
			type: 'POST',
			url: '/inc/'+url,
			data: form.serialize(),
			success: function(response){
				form.html(response);
				form.removeClass('loading');
				
				if(submitid!=''){
					$('#'+submitid).click(function(event){
						form.submit();
						event.preventDefault();
					});
				}
			}
		});
						
		event.preventDefault();
	});
	
	if(submitid!=''){
		$('#'+submitid).click(function(event){
			form.submit();
			event.preventDefault();
		});
	}
};

var postFormChange = function(formid, url, varqs){
	var form=$('#'+formid);
	
	form.addClass('loading');
	
	$.ajax({
		type: 'POST',
		url: '/inc/'+url+'?change=1'+varqs,
		data: form.serialize(),
		success: function(response){
			form.html(response);
			form.removeClass('loading');
		}
	});
};

var sliderControl = function(index){
	jQuery('#dynamic').accordion({
		autoHeight: false,
		navigation: false,
		active: index,
		collapsible: true
	});
};

var dynamicItems = function(uldiv, id, file){
	$('#'+uldiv+id+'list a').each(function() {
		$(this).click(function(event){
			did=$(this).attr('rel');
			title=$(this).attr('title');
			
			new dynamicItem(did, uldiv, id, file, title);
			event.preventDefault();
			
			$('#'+uldiv+id+'list a').removeClass('active');
			
			$(this).addClass('active');
		});
	});
};

var dynamicItem = function(did, uldiv, id, file, title){
	var div=$('#'+uldiv+id);
	var url = '/inc/'+file;
	var loading = $('#loading'+id);
	
	div.fadeTo(0, 0);
	loading.addClass('loading');
	
	$.ajax({
		type: 'GET',
		url: url,
		data: 'did='+did,
		success: function(response){
			div.html(response);
			div.fadeTo(300, 1);
			loading.removeClass('loading');
			document.title=title+doctitle;
		}
	});
};

var galleryItems = function(id, file, pid){
	$('#'+id+'list a').each(function() {
		$(this).click(function(event){
			did=$(this).attr('rel');

			new galleryItem(did, id, file, pid);
			event.preventDefault();
			
			$('#'+id+'list a').removeClass('active');
			
			$(this).addClass('active');
		});
	});
};

var galleryItem = function(did, id, file, pid){
	var div=$('#'+id);
	var url = '/inc/'+file;
	var loading = $('#'+id+'loading');
	
	div.fadeTo(0, 0);
	loading.addClass('loading');
	
	$.ajax({
		type: 'GET',
		url: url,
		data: 'did='+did+'&pid='+pid,
		success: function(response){
			div.html(response);
			div.fadeTo(300, 1);
			loading.removeClass('loading');
		}
	});
};

var website = function(url){
	newwindow = window.open(url, '_blank','');
	newwindow.focus();
};

var popup = function(url){
	popupWindow = window.open(url, '_blank', 'location=no,menubar=no,width=650,height=620,toolbar=no,scrollbars=yes,resizable=no');
	popupWindow.focus();
};

var mapDisplay = function(glatcenter, glngcenter, glat, glng, gzoom){
	var showmap = function(glatcenter, glngcenter, glat, glng, gzoom){
		map = new GMap2($("#map").get(0));
		map.setCenter(new google.maps.LatLng(glatcenter, glngcenter), gzoom);
		
		map.addMapType(G_PHYSICAL_MAP);
		map.addMapType(G_SATELLITE_3D_MAP);		
		//map.setMapType(G_PHYSICAL_MAP);
		map.addControl(new GLargeMapControl());
		var position = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 30));
		map.addControl(new GMenuMapTypeControl(), position);
		map.addControl(new GScaleControl());
		//map.addControl(new GOverviewMapControl());
		map.addControl(new GNavLabelControl());
		
		baseIcon = new GIcon(G_DEFAULT_ICON);
		baseIcon.iconSize = new GSize(32, 14);
		baseIcon.shadow = "";
		baseIcon.iconAnchor = new GPoint(16, 7);
		
		icon = new GIcon(baseIcon);
		icon.image = "/images/marker.png";
		markerOptions = { icon: icon };
		
		if(poivar==0){
			latlng=new GLatLng(glat, glng);
			
			marker = new GMarker(latlng, markerOptions);
			
			map.addOverlay(marker);
			
			$("#address").appendTo(map.getPane(G_MAP_FLOAT_SHADOW_PANE));
			$("#address").hide();
			
			var zoomEnd = GEvent.addListener(map, "zoomend", function(){
				var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
				$("#address").css({ top:(markerOffset.y+10), left:(markerOffset.x+10)});
			});
			
			GEvent.addListener(map, "moveend", function(){			
				var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
				$("#address").css({ top:(markerOffset.y+10), left:(markerOffset.x+10)});
			});
			
			var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
			$("#address").fadeIn().css({ top:(markerOffset.y+10), left:(markerOffset.x+10)});
		}
	};
	
	
	new showmap(glatcenter, glngcenter, glat, glng, gzoom);
};

var links = function(){
	$('a').each(function() {
		if ($(this).attr('rel')=='popup'){
			$(this).click(function(event){
				new popup($(this).attr('href'));
				event.preventDefault();
			});
		}
	});
};

var videos = function(id){
	var v=0;
	
	$('#'+id+'list a').each(function() {
		$(this).click(function(event){
			videocode=$(this).attr('href');
			title=$(this).attr('title');
			
			document.title=(title=='' ? '' : (title+' - '))+doctitle;
			
			new embedVideo(videocode);
			event.preventDefault();
			
			$('#'+id+'list a').removeClass('active');
			
			$(this).addClass('active');
		});
		
		if(v==0){
			videocode=$(this).attr('href');
			new embedVideo(videocode);
		}
		
		v++;
	});
};

var movement = function(){
	var body=$('body');
	var bodywidth=body.width();
	
	var heli=$('#heli');
	var heliwidth=912;
	
	var helistart=((bodywidth-heliwidth)/2);
	helistart=(helistart-50);
	heli.css({backgroundPosition: helistart+'px 0px'});
	
	body.mousemove(
		function(e){
			var offset = $(this).offset();
			var xPos = e.pageX - offset.left;
			
			width=$(this).width();
			
			var mouseXPercent = Math.round(xPos / width * 300);
			var diffX = heliwidth;
			var myX = diffX * (mouseXPercent / 1000);
			heli.css({backgroundPosition: (helistart-myX)+'px 0px'});			
		}
	);
	
	$(window).resize(function() {
		bodywidth=body.width();
		helistart=((bodywidth-heliwidth)/2);
		helistart=(helistart+50);
	});

};

var embedVideo = function(video){
    var flashvars = { };
    var params = { allowScriptAccess: "always", allowFullScreen: "true" };
    var atts = { };
 
	swfobject.embedSWF(video,  "video", 718, 428, "8", '/js/expressInstall.swf', flashvars, params, atts);
};
var external = function(){
	$('a').each(function() {
		var relAttribute = String(this.getAttribute('data-rel'));
		if (this.getAttribute('href') && (relAttribute=='external')){
			
			this.onclick = function() {
				website(this);
				return false;
			};
		}
	});
};

$(document).ready(function(){
	ie6=(($.browser.msie && $.browser.version.substr(0,1)<7) ? 1 : 0);
	//ie6=1;
	
	new external();
		
	if(ie6){
		$("a[data-rel^='lightbox'], a[data-rel^='lightboxpt'], a[data-rel^='lightboxinline'], a[data-rel^='lightboxiframe']").each(function(){
			$(this).click(function(event){
				if($(this).attr('href').substring(0, 1)!='#'){
					new popup($(this).attr('href'));
					event.preventDefault();
				}
			});
		});
			
	}else{
		$("a[data-rel^='lightbox']").colorbox();
	
		$('div.popupholder').each(function(){
			$(this).attr('class','popuphidden');
		});
	}
});

