(function(C){var D={path:"",width:null,height:null,controlbar:"",screencolor:null,autostop:true,preload:"off",stretching:true,smoothing:true,buffertime:null,expbuffertime:null,showcaptions:false,volume:80,mute:false,debug:false};var B;var A={init:function(E,F){return this.each(function(){var H=this;var J=C(H);var L=J.attr("id");if(E){B=C.extend({},D,E)}var K={};K.allowFullScreen=true;K.menu=false;K.bgcolor="#000000";var G={};G.name=L;var I={};I.fv_controlbar=B.controlbar;I.fv_playerID=L;I.fv_volume=B.volume;I.fv_mute=B.mute;I.fv_preload=B.preload;I.fv_stretching=B.stretching;I.fv_smoothing=B.smoothing;I.fv_showcaptions=B.showcaptions;I.fv_debug=B.debug;if(B.buffertime){I.fv_buffertime=B.buffertime}if(B.expbuffertime){I.fv_expbuffertime=B.expbuffertime}if(B.screencolor){I.fv_screencolor=B.screencolor}I.fv_jsCallback="VideoPlayerCallBacks."+L;VideoPlayerCallBacks[L]=function(){(function(M){switch(M.event){case"onReady":F();break}}).apply(this,arguments)};B.width=B.width||J.width();B.height=B.height||J.height();swfobject.embedSWF(B.path,L,B.width,B.height,"9",null,I,K,G)})},load:function(H,E,I,F){var G=swfobject.getObjectById(C(this).attr("id"));G.loadVideo(H,E,I,F)},pause:function(){var E=swfobject.getObjectById(C(this).attr("id"));E.pauseVideo()}};C.fn.videoPlayer=function(E){if(A[E]){return A[E].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof E==="object"||!E){return A.init.apply(this,arguments)}else{C.error("Method "+E+" does not exist on jQuery.videoPlayer")}}}})(jQuery);var VideoPlayerCallBacks={};jQuery(function(E){var C=E("html").hasClass("ie6");E("form.auto-submit select").change(function(){this.form.submit()});if(window._gaq){E("a[data-tracking=pageview]",this).click(function(){_gaq.push(["_trackPageview",E(this).attr("href")])});E("a[data-tracking=event]",this).click(function(){var I=E(this);var H=I.attr("data-tracking-category");var J=I.attr("data-tracking-action");if(H.length+J.length>0){var G=I.attr("data-tracking-label");_gaq.push(["_trackEvent",H,J,G])}})}var D;var A=function(){E(".video-embed p").each(function(){var G=E(this);if(swfobject.getFlashPlayerVersion().major<9){G.addClass("no-flash");return }var I=E("a",this).attr("href");if(I.indexOf("http")!=0&&I.indexOf("/")!=0){var H=self.location.href.split("/");H[H.length-1]=I;I=H.join("/")}D=G.videoPlayer({path:window.assetPath+"/swf/videoplayer.swf",controlbar:window.assetPath+"/swf/mediacontacts.swf",preload:"off",volume:80},function(){G.videoPlayer("load",I,null,window.assetPath+"/images/play-big.png")})})};A();var B={screen:null,overlay:null,window:null,container:null,closeLink:null,inited:false,onClose:null,setup:function(){if(this.inited){return }var G=this;E.fx.off=true;this.screen=E('<div class="screen"></div>').appendTo("body").fadeOut();this.overlay=E('<div class="overlay"></div>').appendTo("body").fadeOut();this.overlay.click(function(){return(function(){this.close()}).apply(G,arguments)});this.window=E('<div class="content"></div>').appendTo(this.overlay).click(function(H){H.stopPropagation()});this.container=E("<div/>").appendTo(this.window);this.closeLink=E('<a href="#" class="close-link">Close</a>').appendTo(this.window).click(function(H){H.preventDefault();return(function(){this.close()}).apply(G,arguments)});E.fx.off=false;this.inited=true},close:function(){if(this.onClose){this.onClose()}this.overlay.hide();this.screen.fadeOut()},open:function(G){this.overlay.addClass("loading").fadeIn(G);this.screen.fadeTo("fast",0.8)},loadPage:function(H,I){var G=this;this.container.empty();this.open(function(){return(function(){this.container.load(H+" #popup-content",function(){return(function(){this.overlay.removeClass("loading");I()}).apply(G,arguments)})}).apply(G,arguments)})}};E(".popups").each(function(){if(C){return }var G=E("a",this);B.setup();B.onClose=function(){if(D){D.videoPlayer("pause");D=null}};G.each(function(){var H=E(this).attr("href");E(this).click(function(I){I.preventDefault();B.loadPage(H+"#popup-content",function(){A();F();if(window._gaq){window._gaq.push(["_trackPageview",H.replace(self.location.protocol+"//"+self.location.host,"")])}})})})});E("div.video-link").each(function(){if(C){return }var H=E("a",this);var I=H.attr("href").replace(/.*v=([^&]+).*/g,"$1");var J=E('<iframe width="100%" height="100%" src="http://www.youtube.com/embed/'+I+'?enablejsapi=0&showinfo=0&autoplay=1&rel=0" frameborder="0" allowfullscreen></iframe>');var G=this;B.setup();B.overlay.addClass("video");B.onClose=function(){return(function(){J.remove()}).apply(G,arguments)};H.click(function(K){K.preventDefault();B.open(function(){return(function(){J.appendTo(B.container)}).apply(G,arguments)})})});E("ul.team").each(function(){var I=E(window);var N=E(this);var G=E('<div class="team-member" tabindex="-1"><div class="gradient"></div><div class="curtain"></div></div>');var M=E(".gradient",G);var J=E(".curtain",G).css("opacity",0).hide();if(C){E.fx.off=true}var L=N.children();var K=E(L[Math.floor(Math.random()*L.length)]);var O=function(P){M.empty().append(P.data("details"));G.css("background-image","url("+P.data("photoURL")+")");K.removeClass("current");K=P.addClass("current");G.trigger("focus")};L.each(function(){var R=E(this);var P=R.contents();var Q=E("<a/>",{href:"#",click:function(S){S.preventDefault();if(I.scrollTop()>H){I.scrollTop(H)}J.show().animate({opacity:1},200,function(){O(R)}).animate({opacity:0},200,function(){J.hide()})}});R.data("photoURL",E("img",R).attr("src"));R.data("details",P.clone());P.wrapAll(Q)});O(K);N.after(G);var H=G.offset().top;E("li:even",N).css("clear","left").each(function(R){var S=E("a",this).first();var Q=E("a",E(this).next()).first();if(!Q.length){return }var P=S.height();var T=Q.height();if(P!=T){S.add(Q).css("height",Math.max(P,T))}});N.css("visibility","visible")});E("div.vcard").each(function(){if(C){return }var K=E("h2",this).text();var I=E("div.details-panel",this);var M=E('<div class="map" id="map-canvas"></div');E("img.map",this).replaceWith(M);var J=I.height();if(J>M.height()){M.css("height",J)}var G=function(O){var Q=new google.maps.Map(M[0],{center:O,zoom:16,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:false});var N=new google.maps.Marker({map:Q,position:O,title:K,icon:window.assetPath+"/images/map-bullet.png"});var P=new google.maps.InfoWindow({maxWidth:300,content:'<div class="map-info"><h2>'+K+"</h2>"+E(".details",I).html().replace(/<br ?\/?>/gi,", ")+'<div><p class="directions"><a href="http://maps.google.com/maps?daddr='+(window.latlng?O.toUrlValue():encodeURIComponent(window.mapAddress||H))+'" target="_blank">'+_getdirections+"</a></p></div>"});google.maps.event.addListener(N,"click",function(){P.open(Q,N)});google.maps.event.addListener(Q,"click",function(){P.close()});var R=google.maps.event.addListener(Q,"tilesloaded",function(){P.open(Q,N);google.maps.event.removeListener(R)})};var H=E.trim(E("p.adr",I).html().replace(/(<br ?\/?>|\s+)/ig," "));if(window.latlng){G(new google.maps.LatLng(window.latlng[0],window.latlng[1]))}else{var L=new google.maps.Geocoder();L.geocode({address:window.mapAddress||H},function(O,N){if(N==google.maps.GeocoderStatus.OK){G(O[0].geometry.location)}})}});function F(){E(".dyn-gallery").each(function(){var M=E(this);var H=E("img",this);var K=500;var J=8000;if(H.length>1){var I=0;E.fx.off=true;H.fadeOut();E.fx.off=false;H.eq(I).fadeIn();var G;function L(N){N=N||"forward";H.eq(I).fadeOut(K);if(N=="forward"){if(++I==H.length){I=0}}else{if(--I==-1){I=H.length-1}}H.eq(I).fadeIn(K,function(){G=setTimeout(L,J)})}G=setTimeout(L,J);E('<a href="#" class="previous">'+_previous+"</a>").appendTo(this).click(function(N){N.preventDefault();clearTimeout(G);L("backward")});E('<a href="#" class="next">'+_next+"</a>").appendTo(this).click(function(N){N.preventDefault();clearTimeout(G);L()})}M.css("visibility","visible")})}E(window).load(F)});
