/*!
 * selectivizr v1.0.1 - (c) Keith Clark, freely distributable under the terms of the MIT license.
 * selectivizr.com
 */
var k=true,p=false;(function(A){function N(a){return a.replace(O,q).replace(P,function(b,e,c){b=c.split(",");c=0;for(var g=b.length;c<g;c++){var h=Q(b[c].replace(R,q).replace(S,q))+w,f=[];b[c]=h.replace(T,function(d,l,m,j,i){if(l){if(f.length>0){d=f;var x;i=h.substring(0,i).replace(U,o);if(i==o||i.charAt(i.length-1)==w)i+="*";try{x=y(i)}catch(ha){}if(x){i=0;for(m=x.length;i<m;i++){j=x[i];for(var B=j.className,C=0,V=d.length;C<V;C++){var r=d[C];if(!RegExp("(^|\\s)"+r.className+"(\\s|$)").test(j.className))if(r.b&&(r.b===k||r.b(j)===k))B=E(B,r.className,k)}j.className=B}}f=[]}return l}else{if(l=m?W(m):!F||F.test(j)?{className:G(j),b:k}:null){f.push(l);return"."+l.className}return d}})}return e+b.join(",")})}function W(a){var b=k,e=G(a.slice(1)),c=a.substring(0,5)==":not(",g,h;if(c)a=a.slice(5,-1);var f=a.indexOf("(");if(f>-1)a=a.substring(0,f);if(a.charAt(0)==":")switch(a.slice(1)){case "root":b=function(d){return c?d!=H:d==H};break;case "target":if(s==8){b=function(d){function l(){var m=location.hash,j=m.slice(1);return c?m==""||d.id!=j:m!=""&&d.id==j}t(A,"hashchange",function(){u(d,e,l())});return l()};break}return p;case "checked":b=function(d){X.test(d.type)&&t(d,"propertychange",function(){event.propertyName=="checked"&&u(d,e,d.checked!==c)});return d.checked!==c};break;case "disabled":c=!c;case "enabled":b=function(d){if(Y.test(d.tagName)){t(d,"propertychange",function(){event.propertyName=="$disabled"&&u(d,e,d.a===c)});z.push(d);d.a=d.disabled;return d.disabled===c}return a==":enabled"?c:!c};break;case "focus":g="focus";h="blur";case "hover":if(!g){g="mouseenter";h="mouseleave"}b=function(d){t(d,c?h:g,function(){u(d,e,k)});t(d,c?g:h,function(){u(d,e,p)});return c};break;default:if(!Z.test(a))return p}return{className:e,b:b}}function G(a){return I+"-"+(s==6&&$?aa++:a.replace(ba,function(b){return b.charCodeAt(0)}))}function Q(a){return a.replace(J,q).replace(ca,w)}function u(a,b,e){var c=a.className;b=E(c,b,e);if(b!=c){a.className=b;a.parentNode.className+=o}}function E(a,b,e){var c=RegExp("(^|\\s)"+b+"(\\s|$)"),g=c.test(a);return e?g?a:a+w+b:g?a.replace(c,q).replace(J,q):a}function t(a,b,e){a.attachEvent("on"+b,e)}function D(a,b){if(/^https?:\/\//i.test(a))return b.substring(0,b.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return b.substring(0,b.indexOf("/",8))+a;var e=b.split("?")[0];if(a.charAt(0)!="?"&&e.charAt(e.length-1)!="/")e=e.substring(0,e.lastIndexOf("/")+1);return e+a}function K(a){if(a){v.open("GET",a,p);v.send();return(v.status==200?v.responseText:o).replace(da,o).replace(ea,function(b,e,c,g,h){return K(D(c||h,a))}).replace(fa,function(b,e,c){e=e||"";return" url("+e+D(c,a)+e+") "})}return o}function ga(){var a,b;a=n.getElementsByTagName("BASE");for(var e=a.length>0?a[0].href:n.location.href,c=0;c<n.styleSheets.length;c++){b=n.styleSheets[c];if(b.href!=o)if(a=D(b.href,e))b.cssText=N(K(a))}z.length>0&&setInterval(function(){for(var g=0,h=z.length;g<h;g++){var f=z[g];if(f.disabled!==f.a)if(f.disabled){f.disabled=p;f.a=k;f.disabled=k}else f.a=f.disabled}},250)}if(!/*@cc_on!@*/true){var n=document,H=n.documentElement,v=function(){if(A.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}(),s=/MSIE ([\d])/.exec(navigator.userAgent)[1];if(!(n.compatMode!="CSS1Compat"||s<6||s>8||!v)){var L={NW:"*.Dom.select",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",MooTools:"$$",Sizzle:"*",jQuery:"*",dojo:"*.query"},y,z=[],aa=0,$=k,I="slvzr",M=I+"DOMReady",da=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,ea=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,fa=/\burl\(\s*(["']?)([^"')]+)\1\s*\)/g,Z=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,O=/:(:first-(?:line|letter))/g,P=/(^|})\s*([^\{]*?[\[:][^{]+)/g,T=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,U=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,ba=/[^\w-]/g,Y=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,X=/^(checkbox|radio)$/,F=s>6?/[\$\^*]=(['"])\1/:null,R=/([(\[+~])\s+/g,S=/\s+([)\]+~])/g,ca=/\s+/g,J=/^\s*((?:[\S\s]*\S)?)\s*$/,o="",w=" ",q="$1";n.write("<script id="+M+" defer src='//:'><\/script>");n.getElementById(M).onreadystatechange=function(){if(this.readyState=="complete"){a:{var a,b;for(b in L)if(A[b]&&(a=eval(L[b].replace("*",b)))){y=a;break a}y=p}if(y){ga();this.parentNode.removeChild(this)}}}}}})(this);

// ColorBox v1.3.17.1 - 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 bc(b){if(!T){O=b,_(a.extend(J,a.data(O,e))),x=a(O),P=0,J.rel!=="nofollow"&&(x=a("."+X).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=Z(J.initialWidth,"x"),J.h=Z(J.initialHeight,"y"),W.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),ba(g,J.onOpen),I.add(C).hide(),H.html(J.close).show()}W.load(!0)}}function bb(){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(W.next,J.slideshowSpeed)}).bind(h,function(){clearTimeout(a)}).one(c+" "+j,e),q.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.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()):q.removeClass(b+"off "+b+"on")}function ba(b,c){c&&c.call(O),a.event.trigger(b)}function _(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=b.href||a(O).attr("href"),b.title=b.title||O.title,typeof b.href=="string"&&(b.href=a.trim(b.href))}function $(a){return J.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(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 Y(c,d){var e=b.createElement("div");c&&(e.id=f+c),e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",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,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1},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,U,V,W,X=f+"Element";W=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(X)}),g=b.open,a.isFunction(g)&&(g=g.call(f)),g&&bc(f[0]);return f},W.init=function(){y=a(c),q=Y().attr({id:e,"class":m?f+(n?"IE6":"IE"):""}),p=Y("Overlay",n?"position:absolute":"").hide(),r=Y("Wrapper"),s=Y("Content").append(z=Y("LoadedContent","width:0; height:0; overflow:hidden"),B=Y("LoadingOverlay").add(Y("LoadingGraphic")),C=Y("Title"),D=Y("Current"),F=Y("Next"),G=Y("Previous"),E=Y("Slideshow").bind(g,bb),H=Y("Close")),r.append(Y().append(Y("TopLeft"),t=Y("TopCenter"),Y("TopRight")),Y(!1,"clear:left").append(u=Y("MiddleLeft"),s,v=Y("MiddleRight")),Y(!1,"clear:left").append(Y("BottomLeft"),w=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"}),A=Y(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("#Form").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(){W.next()}),G.click(function(){W.prev()}),H.click(function(){W.close()}),I=F.add(G).add(D).add(E),s.children().removeClass("hover"),p.click(function(){J.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;R&&J.escKey&&b===27&&(a.preventDefault(),W.close()),R&&J.arrowKey&&x[1]&&(b===37?(a.preventDefault(),G.click()):b===39&&(a.preventDefault(),F.click()))})},W.remove=function(){q.add(p).remove(),a("."+X).removeData(e).removeClass(X)},W.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=0,f=0;q.hide(),J.fixed&&!n?q.css({position:"fixed"}):(e=y.scrollTop(),f=y.scrollLeft(),q.css({position:"absolute"})),J.right!==!1?f+=Math.max(y.width()-J.w-N-L-Z(J.right,"x"),0):J.left!==!1?f+=Z(J.left,"x"):f+=Math.max(y.width()-J.w-N-L,0)/2,J.bottom!==!1?e+=Math.max(b.documentElement.clientHeight-J.h-M-K-Z(J.bottom,"y"),0):J.top!==!1?e+=Z(J.top,"y"):e+=Math.max(b.documentElement.clientHeight-J.h-M-K,0)/2,q.show(),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)}})},W.resize=function(a){if(R){a=a||{},a.width&&(J.w=Z(a.width,"x")-N-L),a.innerWidth&&(J.w=Z(a.innerWidth,"x")),z.css({width:J.w}),a.height&&(J.h=Z(a.height,"y")-M-K),a.innerHeight&&(J.h=Z(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}),W.position(J.transition==="none"?0:J.speed)}},W.prep=function(b){function h(b){W.position(b,function(){function o(){m&&q[0].style.removeAttribute("filter")}var b,d,g,h,j=x.length,k,n;!R||(n=function(){clearTimeout(V),B.hide(),ba(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,$(h)&&(a("<img/>")[0].src=h),$(d)&&(a("<img/>")[0].src=d))):I.hide(),J.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],J.fastIframe?n():a(k).one("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,o):o(),y.bind("resize."+f,function(){W.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=Y("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)}},W.load=function(b){var c,d,g=W.prep;S=!0,Q=!1,O=x[P],b||_(a.extend(J,a.data(O,e))),ba(l),ba(h,J.onLoad),J.h=J.height?Z(J.height,"y")-M-K:J.innerHeight&&Z(J.innerHeight,"y"),J.w=J.width?Z(J.width,"x")-N-L:J.innerWidth&&Z(J.innerWidth,"x"),J.mw=J.w,J.mh=J.h,J.maxWidth&&(J.mw=Z(J.maxWidth,"x")-N-L,J.mw=J.w&&J.w<J.mw?J.w:J.mw),J.maxHeight&&(J.mh=Z(J.maxHeight,"y")-M-K,J.mh=J.h&&J.h<J.mh?J.h:J.mh),c=J.href,V=setTimeout(function(){B.show()},100),J.inline?(Y().hide().insertBefore(a(c)[0]).one(l,function(){a(this).replaceWith(z.children())}),g(a(c))):J.iframe?g(" "):J.html?g(J.html):$(c)?(a(Q=new Image).addClass(f+"Photo").error(function(){J.title=!1,g(Y("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(){W.next()}),m&&(Q.style.msInterpolationMode="bicubic"),setTimeout(function(){g(Q)},1)}),setTimeout(function(){Q.src=c},1)):c&&A.load(c,J.data,function(b,c,d){g(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!S&&x[1]&&(P<x.length-1||J.loop)&&(P=P<x.length-1?P+1:0,W.load())},W.prev=function(){!S&&x[1]&&(P||J.loop)&&(P=P?P-1:x.length-1,W.load())},W.close=function(){R&&!T&&(T=!0,R=!1,ba(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(),ba(l),z.remove(),setTimeout(function(){T=!1,ba(k,J.onClosed)},1)}))},W.element=function(){return a(O)},W.settings=d,U=function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),bc(this))},a.fn.delegate?a(b).delegate("."+X,"click",U):a("."+X).live("click",U),a(W.init)})(jQuery,document,this);

/* CDAA SHOWCASE */
(function($){$.fn.cdaaShowcase=function(options){var defaults={portfolioMode:false,animationStyle:"slide",animationLoop:true,autoSlide:false,autoSlideDelay:4000,autoSlideRestart:false,pauseOnHover:false,slideGroups:false,defaultPage:"clients",tabWidth:72,slideWidth:940,slideGap:60,slideOpacity:0.3,bulletNavMain:true,bulletNavProject:false,bulletNavHide:false,lastArrowOpacity:0.3,lastArrowAnimateDuration:500,showNext:true,showPrev:true,nextText:"next",prevText:"previous",closeText:"close",nextImage:"",prevImage:"",closeImage:"",cssClass:"showcase",projectThumbs:"#dnn_thumbs .Normal",projectSlides:"#dnn_slides",projectQuote:"#dnn_blockquote",projectContent:"#dnn_ContentPane .Normal",projectScope:"#dnn_scope .Normal",pageFormat:"aspx",projectFolder:"Work",DNN:false,HTML5:true,slideShadow:false,hoverIntent:false,keyboardNav:true,facebook:false,hashbang:false}
var options=$.extend(defaults,options);function getUrlVars(){var vars=[],hash;var hashes=window.location.href.slice(window.location.href.indexOf('?')+1).split('&');for(var i=0;i<hashes.length;i++){hash=hashes[i].split('=');vars.push(hash[0]);vars[hash[0]]=hash[1];}
return vars;}
function removeVariableFromURL(url_string,variable_name){URL=String(url_string);var regex=new RegExp("\\?"+variable_name+"=[^&]*&?","gi");URL=URL.replace(regex,'?');regex=new RegExp("\\&"+variable_name+"=[^&]*&?","gi");URL=URL.replace(regex,'&');URL=URL.replace(/(\?|&)$/,'');regex=null;return URL;}
if(options.HTML5){var elArticle="article";var elSection="section";}else{var elArticle="div";var elSection="div";}
var slideOffset=options.slideWidth+options.slideGap;var oldTitle=$("title").html();if(typeof(window.history.pushState)!='function'){options.hashbang=true;options.facebook=false;var thisProject=getUrlVars()["t"];if(thisProject){var stripped_url=removeVariableFromURL(top.location.href,"t");window.location=stripped_url+"#!"+thisProject;}}
return this.each(function(){$(this).addClass(options.cssClass);var thisSlider="."+options.cssClass;var thisTabs=$(thisSlider).children(".tabs");var thisTab=$(thisTabs).children(".tab");$(thisSlider).css({"position":"relative"});$(this).wrapInner('<div class="tabs"></div>');if(options.slideGroups){var tabLeft=20;if(options.tabWidth){options.tabWidth=options.tabWidth+"px";}else{options.tabWidth="auto";}
$(thisSlider).children(".tabs").children(elSection+"[data-title]").each(function(){$(this).addClass("tab");var groupTitle=$(this).attr("data-title");var groupID=$(this).attr("id");if(options.defaultPage==groupID){var currentClass="active";$("#"+options.defaultPage).addClass("currentPage");}else{var currentClass=""}
$(this).parent(".tabs").prepend('<a class="'+groupID+'Button showcaseButton '+currentClass+'" href="#'+groupID+'" style="left: '+tabLeft+'px; width: '+options.tabWidth+';">'+groupTitle+'</a>');$(this).wrapInner('<div class="slides '+groupTitle+'_slides"></div>');if(options.tabWidth=="auto"){tabLeft+=$(".tabs").children("a:first").outerWidth();}else{tabLeft+=options.tabWidth;}});$('.showcaseButton').click(function(){if($(this).hasClass("active")){return false}else{var thisPage=$(this).attr("href");if($.browser.msie){var hrefArr=$(this).attr('href').split('#');thisPage=hrefArr[hrefArr.length-1];thisPage="#"+thisPage;}
thisGroup=thisPage.substring(1,thisPage.length);$(thisSlider).children(".tabs").children('.tab').fadeOut(350).removeClass("currentPage").children('.next, .prev').fadeOut(350);$(thisSlider).children(".tabs").children(thisPage).fadeIn(350,function(){$(this).css('filter','');}).addClass("currentPage").children('.next, .prev').fadeIn(350,function(){$(this).css('filter','');});$(thisSlider).children(".tabs").children('.showcaseButton').removeClass('active');$(this).addClass('active');thisGroup=thisPage.substring(1,thisPage.length);checkNextPrev(thisGroup);}
return false});if(options.defaultPage==""){$(".tab").hide();$(".tab:first").addClass("currentPage").show();$(".showcaseButton:last").addClass("active");}else{$(".tab").hide();$("#"+options.defaultPage).addClass("currentPage").show();}}else{$(thisSlider).children(".tabs").wrapInner('<div class="tab currentPage"></div>');$(thisSlider).children(".tabs").children(".tab").wrapInner('<div class="slides '+options.cssClass+'_slides"></div>');}
if(!options.DNN){$(thisSlider).children(".tabs").children(".tab").children('.slides').children(elArticle).addClass("module").wrap("<div></div>");}
$(thisSlider).children(".tabs").children(".tab").children(".slides").each(function(){if(options.DNN){if($(this).children(".DNNEmptyPane").length>0){$(this).children(".DNNEmptyPane").append("<div class='slide_container s0 current_slide' style='left: 0px; opacity: 1; z-index: 90;'><div class='module'><em>No Slides Found!</em></div></div>");}}else{if($(this).length>0){var noSlides=true;}}
if(noSlides==true){}});if(options.showPrev){$(thisSlider).children(".tabs").children(".tab").prepend('<div class="prev" style="background-image: url('+options.prevImage+'">'+options.prevText+'</div>');}
if(options.showNext){$(thisSlider).children(".tabs").children(".tab").prepend('<div class="next" style="background-image: url('+options.nextImage+'">'+options.nextText+'</div>');}
$(thisSlider).children(".tabs").children(".tab").children('.slides').each(function(){$('.module',this).each(function(i){$(this).parent('div').wrap('<div class="slide_container s'+i+'"></div>');if(options.animationStyle=="slide"){$('.s'+i).css({'left':i*slideOffset,opacity:options.slideOpacity});$('.s0').addClass('current_slide').css({opacity:1}).children().children('.module').css({opacity:1,"filter":""});}else if(options.animationStyle=="fade"){$('.s'+i).css({'left':0,'top':0,'z-index':0,'opacity':0});$('.s0').addClass('current_slide').css({opacity:1,"z-index":90}).children().children('.module').css({opacity:1,"filter":""});}});});if(options.bulletNavMain){$(".tab").append("<div class='minislides'></div>");$(".tab").each(function(){$(this).find(".slide_container").each(function(i){extraI=i+1;if(options.slideGroups){var thisTab=$(this).parent("div").parent(".slides").parent(".tab").attr("id");thisTab="#"+thisTab;}else{var thisTab=".tab";}
$thisProject=$(thisSlider).find(thisTab);$('<div class="ms ms'+i+'" data-num='+i+'>'+extraI+'</div>').appendTo($(thisTab).find(".minislides"));$('.ms'+i).css({'left':(i*36)+20});});if(options.bulletNavHide){if(extraI==1){$(this).children(".minislides").css("display","none");}}});$(".tab").find('.ms0').addClass('current');}
$(thisSlider).children(".tabs").children(".tab").each(function(){thisGroup=$(this).attr("id");checkNextPrev(thisGroup,0);});function checkNextPrev(group,animationSpeed){if(options.animationLoop){return false;}else{if(animationSpeed!=0){animationSpeed=options.lastArrowAnimateDuration;}
if(group==null){group=".tab";}else{group="#"+group;}
if(!options.slideGroups){group=".tab";}
$(group).each(function(){if($(this).children(".slides").find(".slide_container:last").hasClass("current_slide")){if($.browser.msie){$(this).children(".next").addClass("disabled");}else{$(this).children(".next").addClass("disabled").animate({"opacity":options.lastArrowOpacity},{duration:animationSpeed,queue:false});}}else{if($.browser.msie){$(this).children(".next").removeClass("disabled");}else{$(this).children(".next").removeClass("disabled").animate({"opacity":1},{duration:animationSpeed,queue:false});}}});$(group).each(function(){if($(this).children(".slides").find(".slide_container:first").hasClass("current_slide")){if($.browser.msie){$(this).children(".prev").addClass("disabled");}else{$(this).children(".prev").addClass("disabled").animate({"opacity":options.lastArrowOpacity},{duration:animationSpeed,queue:false});}}else{if($.browser.msie){$(this).children(".prev").removeClass("disabled");}else{$(this).children(".prev").removeClass("disabled").animate({"opacity":1},{duration:animationSpeed,queue:false});}}});}}
if(options.autoSlide){function autoSlide(){nextSlide(".currentPage");}
autoSlideGo=setInterval(autoSlide,options.autoSlideDelay);if(options.pauseOnHover){$(".module",this).hover(function(){clearInterval(autoSlideGo);},function(){autoSlideGo=setInterval(autoSlide,options.autoSlideDelay);});}
function restartAutoSlide(){clearInterval(autoSlideGo);if(options.autoSlideRestart){autoSlideGo=setInterval(autoSlide,options.autoSlideDelay);}}
$(".next").click(restartAutoSlide);$(".prev").click(restartAutoSlide);$(".showcaseButton").click(restartAutoSlide);if(options.keyboardNav){function ALcheckKey(e){switch(e.keyCode){case 37:restartAutoSlide();break;case 39:restartAutoSlide();break;default:}}
if($.browser.mozilla){$(document).keypress(ALcheckKey);}else{$(document).keydown(ALcheckKey);}}}
if(options.keyboardNav){function checkKey(e){switch(e.keyCode){case 37:e.preventDefault();if($('#project').css("display")=="block"){prevSlide('#project');}else if(options.slideGroups){prevSlide('.currentPage');}else{prevSlide('.currentPage');}
break;case 39:e.preventDefault();if($('#project').css("display")=="block"){nextSlide('#project');}else if(options.slideGroups){nextSlide('.currentPage');}else{nextSlide('.currentPage');}
break;case 27:e.preventDefault();if($('#project').css("display")=="block"){$("#project").children(".close").click();}
break;default:}}
if($.browser.mozilla){$(document).keypress(checkKey);}else{$(document).keydown(checkKey);}}
$(thisSlider).children(".tabs").children('.tab').children('.next').click(function(){nextSlide('.currentPage');});function nextSlide(parent){if(!parent){parent=".slides";}
var checkNextExists=$(thisSlider).find(parent).find(".current_slide").next('.slide_container').length;if(checkNextExists==0){if(options.animationLoop){gotoFirst(parent);}}else{$(thisSlider).children(".tabs").children('.currentPage').children(".prev").stop().show();if($('.current_slide').is(':animated')){}else{if(options.animationStyle=="fade"){$(thisSlider).find(parent).find('.slide_container').animate({opacity:0},{queue:false}).css("z-index",0);$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide').next('.slide_container').addClass('current_slide').animate({opacity:1},{queue:false}).css("z-index",90);}else if(options.animationStyle=="slide"){$(thisSlider).find(parent).find('.slide_container').animate({opacity:options.slideOpacity,'left':'-='+slideOffset},{queue:false})
$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide').next('.slide_container').addClass('current_slide').animate({opacity:1},{queue:false});}
$(thisSlider).find(parent).find('.minislides .current').removeClass('current').next('.ms').addClass('current');if(checkNextExists==0){}}}
if(parent=="#project"){var thisGroup="project";}else{var thisGroup=$(thisSlider).children(".tabs").children(".currentPage").attr("id");}
checkNextPrev(thisGroup,options.lastArrowAnimationDuration);}
$(thisSlider).children(".tabs").children('.tab').children('.prev').click(function(){prevSlide('.currentPage');});function prevSlide(parent){if(!parent){parent=".slides";}
var checkPrevExists=$(thisSlider).find(parent).find(".current_slide").prev('.slide_container').length;if(checkPrevExists==0){if(options.animationLoop){gotoLast(parent);}}else{$(this).prev(".next").show();if($('.current_slide').is(':animated')){}else{if(options.animationStyle=="slide"){$(thisSlider).find(parent).find('.slide_container').animate({opacity:options.slideOpacity,'left':'+='+slideOffset},{queue:false})
$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide').prev('.slide_container').addClass('current_slide').animate({opacity:1},{queue:false});}else if(options.animationStyle=="fade"){$(thisSlider).find(parent).find('.slide_container').animate({opacity:0},{queue:false}).css("z-index",0);$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide').prev('.slide_container').addClass('current_slide').animate({opacity:1},{queue:false}).css("z-index",90);}
$(thisSlider).find(parent).find('.minislides .current').removeClass('current').prev('.ms').addClass('current')}}
if(parent=="#project"){var thisGroup="project";}else{var thisGroup=$(thisSlider).children(".tabs").children(".currentPage").attr("id");}
checkNextPrev(thisGroup,options.lastArrowAnimationDuration);}
function gotoFirst(parent){var thisLeft=0;$(thisSlider).find(parent).find('.slide_container').each(function(){if(options.animationStyle=="fade"){$(this).animate({opacity:0}).css("z-index",0);$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide');}else if(options.animationStyle=="slide"){$(this).animate({opacity:options.slideOpacity,'left':thisLeft},{queue:false});$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide');thisLeft+=slideOffset;}
$(thisSlider).find(parent).find('.minislides .current').removeClass('current');$(thisSlider).find(parent).find('.minislides .ms:first-child').addClass('current');});$(thisSlider).find(parent).find('.slide_container:first').addClass('current_slide').animate({opacity:1},{queue:false}).css("z-index",90);}
function gotoLast(parent){var thisLeft=$(thisSlider).find(parent).find('.slide_container').size();thisLeft=(thisLeft-1)*-slideOffset;$(thisSlider).find(parent).find('.slide_container').each(function(){if(options.animationStyle=="fade"){$(this).animate({opacity:0},{queue:false}).css("z-index",0);$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide');}else if(options.animationStyle=="slide"){$(this).animate({opacity:options.slideOpacity,'left':thisLeft},{queue:false});$(thisSlider).find(parent).find('.current_slide').removeClass('current_slide');thisLeft+=slideOffset;}
$(thisSlider).find(parent).find('.minislides .current').removeClass('current');$(thisSlider).find(parent).find('.minislides .ms:last').addClass('current');});$(thisSlider).find(parent).find('.slide_container:last').addClass('current_slide').animate({opacity:1},{queue:false}).css("z-index",90);}
if(options.portfolioMode){$(thisSlider).prepend('<div class="loading"></div>');$("#clients").addClass("projecttab");$("#work").addClass("projecttab");elSection="div";$(thisSlider).append('<'+elSection+' id="project"></'+elSection+'>');var closeBtn="<div class='close'>Back to Work</div>";var nextBtn='<div class="next" style="background-image: url('+options.nextImage+'">'+options.nextText+'</div>';var prevBtn='<div class="prev" style="background-image: url('+options.prevImage+'">'+options.prevText+'</div>';var slides='<div class="slides"></div><div class="minislides"></div>';var facebook='<div class="fb-like"><fb:like layout="button_count" show_faces="true" width="100"></fb:like></div>';if(options.facebook){var slides=slides+facebook}
$(thisSlider).children("#project").html(closeBtn+nextBtn+prevBtn+slides);$('#clients .module a').each(function(){var thisURL=$(this).attr('href');var thisTitle=$(this).attr('title');$(this).after('<div class="thumbs"><div class="pics"></div></div>');$(".thumbs").hide();if(window.hoverIntent){$(this).hoverIntent(clientOver,clientOut);}else{$(this).hover(clientOver,clientOut);}
function clientOver(){$(this).css({'z-index':'200'}).children('h3').css({'background-position':'-39px -607px'});}
function clientOut(){$(this).css({'z-index':'180'}).children('h3').css({'background-position':'-20px -607px'});};});$projectLinks=$(thisSlider).children(".tabs").find(".module").find("a");$projectLinks.each(function(){var thisURL=$(this).attr('href');var thisTitle=$(this).attr('title');if(options.hashbang){$(this).attr('href','#!'+thisTitle);}else{$(this).attr('href','?t='+thisTitle);}
$(this).click(function(ev){if(!options.hashbang){ev.preventDefault();}
oldTitle=$("title").html();newTitle=oldTitle+" > "+thisTitle;if(!$.browser.msie){$("title").html(newTitle);}
if($("meta[property=og:title]").length>0){$("meta[property=og:title]").attr("content",newTitle);}else{$("head").append('<meta property="og:title" content="'+newTitle+'" />');}
if(!options.hashbang){currentURL=top.location.href;window.history.pushState({"html":currentURL+"?t="+thisTitle,"pageTitle":newTitle},newTitle,currentURL+"?t="+thisTitle);}
$('.loading').fadeIn(350,function(){$(this).css('filter','');});$thisProject=$(thisSlider).children("#project");$.ajax({type:"GET",url:thisURL,dataType:"html",success:function(html){$(html).find(options.projectSlides+' img').each(function(i){var imgloc=$(this).attr('src');var extraI=i+1;$('<div class="slide_container s'+i+'"><div class="slide_pic"><img src='+imgloc+' /></div></div>').appendTo(thisSlider+" #project .slides");if(options.animationStyle=="fade"){$($thisProject).find('.s'+i).css({'left':0,opacity:0,'z-index':0});}else if(options.animationStyle=="slide"){$($thisProject).find('.s'+i).css({'left':i*slideOffset,opacity:options.slideOpacity});}
if(options.bulletNavProject){$('<div class="ms ms'+i+'" data-num='+i+'>'+extraI+'</div>').appendTo($($thisProject).find(".minislides"));$('.ms'+i).css({'left':(i*36)+20});}})
$(html).find(options.projectQuote).each(function(){var blockquote=$(this).html()
$('#main').append('<div id="project_details" style="display: none;"><div class="text_container"><div class="launch">'+blockquote+'</div></div></div>');$("#project_details").animate({"height":"toggle"});});$(html).find(options.projectThumbs).each(function(){var intro_text=$(this).html();$('#main').find('#project .s0').append('<div class="intro_text">'+intro_text+'</div>');});$(html).find(options.projectContent).each(function(){var content=$(this).html();$('#main').find('.text_container').append('<div class="body_text">'+content+'</div>');});$(html).find(options.projectScope).each(function(){var scopeList=$(this).html()
$('#main').find('.text_container').append('<div class="scope_list"><h4>Services provided:</h4>'+scopeList+'</div>');});$($thisProject).find('.s0').addClass('current_slide').css({opacity:1,"z-index":90});$($thisProject).find('.ms0').addClass('current');$($thisProject).find('.slide_container').each(function(){$(this).prepend('<div class="bg"></div>');});$($thisProject).children('.close').fadeIn(350,function(){$(this).css('filter','');});$($thisProject).fadeIn(350,function(){$(this).css('filter','');});$(thisSlider).children('.tabs').fadeOut(350);$(thisSlider).children('.loading').fadeOut(200);checkNextPrev("project",0);}});})});if(options.hashbang){var actualURL=window.location.hash.substring(1);actualURL=actualURL.substring(1,actualURL.length);}else{var actualURL=getUrlVars()["t"];}
if(actualURL==""){}else{$thisProject=$(thisSlider).children("#project");$.ajax({type:"GET",url:options.projectFolder+"/"+actualURL+"."+options.pageFormat,dataType:"html",success:function(html){$(html).find(options.projectSlides+' img').each(function(i){var imgloc=$(this).attr('src');var extraI=i+1;$('<div class="slide_container s'+i+'"><div class="slide_pic"><img src='+imgloc+' /></div></div>').appendTo(thisSlider+" #project .slides");if(options.animationStyle=="fade"){$($thisProject).find('.s'+i).css({'left':0,opacity:0,"z-index":0});}else if(options.animationStyle=="slide"){$($thisProject).find('.s'+i).css({'left':i*slideOffset,opacity:options.slideOpacity});}
if(options.bulletNavProject){$('<div class="ms ms'+i+'" data-num='+i+'>'+extraI+'</div>').appendTo($($thisProject).find(".minislides"));$('.ms'+i).css({'left':(i*36)+20});}});$(html).find(options.projectQuote).each(function(){var blockquote=$(this).html();$('#main').append('<div id="project_details"><div class="text_container"><div class="launch">'+blockquote+'</div></div></div>');});$(html).find(options.projectThumbs).each(function(){var intro_text=$(this).html();$('#main').find('#project .s0').append('<div class="intro_text">'+intro_text+'</div>');});$(html).find(options.projectContent).each(function(){var content=$(this).html();$('#main').find('.text_container').append('<div class="body_text">'+content+'</div>');});$(html).find(options.projectScope).each(function(){var scopeList=$(this).html()
$('#main').find('.text_container').append('<div class="scope_list"><h4>Work</h4>'+scopeList+'</div>');});$($thisProject).find('.s0').addClass('current_slide').css({opacity:1,"z-index":90});$($thisProject).find('.ms0').addClass('current');$($thisProject).find('.slide_container').each(function(){$(this).prepend('<div class="bg png_bg"></div>');});$($thisProject).find('.close').fadeIn(350,function(){$(this).css('filter','');});$($thisProject).fadeIn(350,function(){$(this).css('filter','');});$(thisSlider).find('.tabs').fadeOut(350);$(thisSlider).find('.loading').fadeOut(200);checkNextPrev("project",0);}});}
$('#project .close').click(function(){if(options.hashbang){window.location.hash='';}else{var stripped_url=removeVariableFromURL(top.location.href,"t");if(!options.hashbang){window.history.pushState({"html":stripped_url,"pageTitle":oldTitle},oldTitle,stripped_url);}}
if(!$.browser.msie){$("title").html(oldTitle);}
$("meta[property=og:title]").attr("content",oldTitle);$("#project_details").animate({"height":"0px"},500,function(){$(this).remove();});$(this).fadeOut(350);$(this).parent('#project').fadeOut(350,function(){$('#project').children('.slides, .minislides').empty();});$('.tabs').fadeIn(350,function(){$(this).css('filter','');});return false;});$('#project .next').click(function(){nextSlide('#project');});$('#project .prev').click(function(){prevSlide("#project");});}
$(thisSlider).find(".ms").live("click",function(){if($(this).hasClass("current")){return false;}
thisParentID=$(this).parent(".minislides").parent().attr("id");if(options.slideGroups){thisParent="#"+thisParentID;}else{thisParent=".currentPage";}
var thisId=$(this).attr("data-num");thisId=parseInt(thisId);$(thisParent+' .minislides .current').removeClass('current');$(thisParent+' .minislides .ms'+thisId).addClass('current');thisLeft=(thisId)*-slideOffset;$(thisSlider).find(thisParent).find('.slide_container').each(function(){if(options.animationStyle=="fade"){$(this).animate({opacity:0},{queue:false}).css("z-index",0);$(thisSlider).find(thisParent).find('.current_slide').removeClass('current_slide');}else if(options.animationStyle=="slide"){$(this).animate({opacity:options.slideOpacity,'left':thisLeft},{queue:false});$(thisSlider).find(thisParent).find('.current_slide').removeClass('current_slide');thisLeft+=slideOffset;}
$(thisSlider).find(thisParent).find('.s'+thisId).addClass("current_slide").animate({opacity:1},{queue:false}).css({"z-index":90});});checkNextPrev(thisParentID,options.lastArrowAnimationDuration);});$(thisSlider).find(".minislides").each(function(){var countChildren=parseInt($(this).size);});if(options.slideShadow){$(this).find(".slide_container").prepend('<div class="bg png_bg"></div>');}});}})(jQuery);
