/*
 * Modernizr JavaScript library 1.5
 * http://www.modernizr.com/
 *
 * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/
 * Dual-licensed under the BSD and MIT licenses.
 * http://www.modernizr.com/license/
 *
 * Featuring major contributions by
 * Paul Irish  - http://paulirish.com
 */
window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!=="text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange",i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+
m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!==-1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a};d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+
(a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker};d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f,k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g=g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint",function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;(function($){$.fn.equalHeights=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){if($(this).height()>tallest){tallest=$(this).height();}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){$(this).height(tallest).css("overflow","auto");});}})(jQuery);;function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js'];c=b.join(' ');h.className+=' '+c;return c;};css_browser_selector(navigator.userAgent);;var ytplayer=false;var quotesTimer;$(document).ready(function(){pageEnhance();});function pageEnhance(){scrollersInit();viewerNav();newWindowLinks();clickable();defaultText();$("#twitterBlock li").equalHeights();$("#homeCenterLayout .greyBox").equalHeights();itemGrid();fadeInImages($(".ldr"));quotesBlock();$("#refeshcaptcha").live("click",function(){$("#captcha").attr("src",'/securimage/securimage_show.php?'+Math.random());$("#captcha_code").val("");return false});plannerInit();projectQuickDates();logo();setTimeout(function(){$(".wf").hide().css({visibility:"visible"}).show();},500);$(".launchSpektrix").fancybox({type:"iframe",padding:10,width:650,height:400});}
function addYT(target,stub,width,height,playerID){var params={wmode:"transparent",allowScriptAccess:"always"};var atts={id:playerID};swfobject.embedSWF("http://www.youtube.com/v/"+stub+"?enablejsapi=1&amp;playerapiid="+playerID+"&autoplay=0&hd=1&showinfo=0&border=0",target,width,height,"8",null,null,params,atts);}
function addVimeo(target,stub,width,height,playerID){var params={"allowfullscreen":"true","allowscriptaccess":"always"}
var atts={id:playerID};swfobject.embedSWF("http://vimeo.com/moogaloop.swf?clip_id="+stub+"&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=&amp;fullscreen=1",target,width+"px",height+"px","8",null,null,params,atts);}
function viewerNav(){$("#viewerNav li a").click(function(){if($(this).hasClass("video")){var stub=$(this).attr("href").split("http://www.youtube.com/watch?v=")[1];var YTPlayerObj=$("#viewerYTPlayer");if(YTPlayerObj.size()==0){$("#viewer .ldr").fadeOut(500,function(){$("#viewer").html('<div id="youtubePlayerTarget"></div>')
addYT("youtubePlayerTarget",stub,510,350,"viewerYTPlayer");});}
else{var YTPlayerObj=YTPlayerObj.get(0);YTPlayerObj.loadVideoById(stub);}}
if($(this).hasClass("image")){$("#youtubePlayerTarget").remove();var src=$(this).attr("href");$("#viewer").html('<span class="ldr"><img src="'+src+'" alt="" /></span>')
fadeInImages($("#viewer .ldr"));}
var caption="";var parts=$(this).find("img").attr("alt").split(" ~ ");if(parts[0]!=""){caption+=''+parts[0]+'';}
if(parts[0]!=""&&parts[1]!=""){caption+='<br />';}
if(parts[1]!=""){caption+=''+parts[1]+'';}
$("#viewercaption").html(caption)
return false;})}
function fadeInImages(imageWrappers){imageWrappers.each(function(){var timer;var wrpObj=$(this);var imgObj=$(this).find("img")
newImage=new Image();newImage.onload=function(){clearTimeout(timer);wrpObj.css({height:imgObj.height()+"px"})
imgObj.css({display:"none",visibility:"visible"}).fadeIn(1000);}
timer=setTimeout(function(){wrpObj.css({height:imgObj.height()+"px"})
imgObj.css({display:"none",visibility:"visible"}).fadeIn(1000);},2000);newImage.src=imgObj.attr("src");})}
function scrollersInit(){prepareScroller($(".scroller .itemGrid"),{itemWidth:190,itemsOnShow:5,maskWidth:930,maskHeight:255})
prepareScroller($("#viewerNav"),{itemWidth:104,itemsOnShow:5,maskWidth:510,maskHeight:70})}
function itemGrid(){$(".itemGrid li").hover(function(){$(this).find(".panel").stop().animate({height:"120px"},700,"easeOutBack");$(this).find(".text").stop(true,true).fadeIn();$(this).find(".whiteButton").stop(true,true).fadeIn();},function(){$(this).find(".panel").stop().animate({height:"50px"},300,"swing");$(this).find(".text").stop(true,true).fadeOut(300);$(this).find(".whiteButton").stop(true,true).fadeOut(300);})}
function prepareScroller(targetWrapperObj,settings){var itemWidth=settings.itemWidth||500;var itemsOnShow=settings.itemsOnShow||5;var maskWidth=settings.maskWidth||500;var maskHeight=settings.maskHeight||100;targetWrapperObj.each(function(){var count=$(this).find("li").size();targetWrapperObj.addClass("scrollerActive");var scrollWidth=count*itemWidth;var increment=itemsOnShow*itemWidth;var currentX=0;var maxScroll=-(scrollWidth-increment);var list=$(this).find("ul");list.wrap('<div class="scrollerMask" style="width:'+maskWidth+'px;height:'+maskHeight+'px;overflow:hidden;position: relative;" />');list.css({width:scrollWidth+"px"})
if(count>itemsOnShow){var prevButton=$('<span class="prevButton disabled">Prev</span>');var nextButton=$('<span class="nextButton">Next</span>');prevButton.click(function(){if((currentX+increment)>0){var scrollTo=0;$(this).addClass("disabled")}else{var scrollTo=currentX+increment;}
list.animate({left:scrollTo+"px"},1000,"easeOutCirc");currentX=scrollTo;nextButton.removeClass("disabled")})
nextButton.click(function(){if((currentX-increment)<maxScroll){var scrollTo=maxScroll;$(this).addClass("disabled")}else{var scrollTo=currentX-increment;}
list.animate({left:scrollTo+"px"},1000,"easeOutCirc");currentX=scrollTo;prevButton.removeClass("disabled")})
$(this).prepend(nextButton).prepend(prevButton)}})}
function fnE(inarr,text){inarr=inarr.split(",");var out="";for(i=inarr.length-1;i>=0;i--){out+=inarr[i];}
if(text==false||text==""||text==undefined){text=out;}
document.write('<a href="mailto:'+out+'">'+text+'</a>');}
function clickable(){$(".clickable:has(a):not(.disabled),.listWithThumb:has(a)").live("click",function(){var link=$("a",this).eq(0).attr("href");window.location=link;}).hover(function(){if(!$(this).hasClass("disabled")){$(this).addClass("hover").css({"cursor":"pointer"});}},function(){$(this).removeClass("hover").css({"cursor":"default"});})}
function defaultText(){$(".defaultText").unbind("focus,blur").focus(function(){if($(this).val()==$(this)[0].defaultValue){$(this).val("");}}).blur(function(){if($(this).val()==""){$(this).val($(this)[0].defaultValue);}});}
function newWindowLinks(){$('a[rel=external]').live("click",function(){window.open($(this).attr('href'));return false;});}
function logo(){var scalar=1.25;var page=$("body").attr("id");var dot=$("#logoDot");var header=$("#header");var o=header.offset();var entranceSpeed=o.left*2+300;var initialX=-(o.left+15);if(page=="page7"){dot.css({left:initialX+"px"}).show().animate({left:"48px"},entranceSpeed,"linear").animate({top:"65px"},(50*scalar),"linear").animate({top:"56px",left:"53px"},(50*scalar),"linear").animate({left:"63px"},(50*scalar),"linear").animate({left:"53px"},(50*scalar),"linear").animate({top:"65px",left:"48px"},(50*scalar),"linear").animate({top:"105px"},(150*scalar),"linear").animate({top:"72px"},(110*scalar),"linear").animate({left:"65px"},(100*scalar),"linear").animate({top:"95px"},(110*scalar),"linear").animate({top:"102px",left:"70px"},(50*scalar),"linear").animate({left:"85px"},(50*scalar),"linear").animate({top:"95px",left:"91px"},(50*scalar),"linear").animate({top:"72px"},(80*scalar),"linear").animate({top:"105px"},(110*scalar),"linear").animate({top:"92px"},(50*scalar),"linear").animate({left:"132px",top:"85px"},(120*scalar),"linear").animate({top:"75px"},(50*scalar),"linear").animate({left:"122px",top:"70px"},(50*scalar),"linear").animate({left:"110px"},(30*scalar),"linear").animate({left:"105px",top:"80px"},(50*scalar),"linear").animate({top:"95px"},(50*scalar),"linear").animate({left:"110px",top:"105px"},(50*scalar),"linear").animate({left:"150px"},(60*scalar),"linear").animate({top:"55px"},(120*scalar),"linear").animate({top:"105px"},(120*scalar),"linear");var o=header.offset();var endX=$(window).width()-o.left;dot.animate({left:endX+"px"},(2000*scalar),"easeInQuad",function(){var entranceSpeed=o.left*2+1000;$(this).css({left:-(o.left+15)+"px",top:"72px"}).animate({left:"0px"},(entranceSpeed*scalar),"easeOutBounce")})}else{dot.css({left:"0"}).fadeIn(200);}}
function plannerInit(){$("#plannerList li a").live("click",function(){return false;})
$("#planner").append('<div id="plannerPreview"><div id="plannerPreviewInner"><div id="plannerPreviewLoader"></div></div></div>')
$("#plannerList li").hover(function(){var w=$(this).width();$(this).data('defaultWidth',w);$(this).css({zIndex:"100"})
if(w<198){$(this).animate({width:(198)+"px"},100,function(){var textHeight=$(this).find("a").height();if(textHeight>35){$(this).css({zIndex:"100"}).animate({height:(textHeight+4)+"px"},100)}})}},function(){var w=$(this).data('defaultWidth');$(this).css({zIndex:"1"}).animate({height:"35px",width:w+"px"})}).click(function(){$("#plannerPreview").show();var path=$(this).find("a").attr("href");$.ajax({type:"GET",url:path,data:"mode=ajax",dataType:'json',success:function(json){$("#plannerPreviewInner").html(json['content']);fadeInImages($("#plannerPreviewInner .ldr"));$("#plannerPreviewInner .close").click(function(){$("#plannerPreview").hide();$("#plannerPreviewInner").html('<div id="plannerPreviewLoader"></div>');})}});})}
function projectQuickDates(){$(".projectQuickDateView").click(function(){if($(this).closest("tr").hasClass("open")){$(".projectQuickDates .open").removeClass("open")
$(".projectQuickDates .openInfo").removeClass("openInfo").addClass("closedInfo");}else{$(".projectQuickDates .open").removeClass("open")
$(".projectQuickDates .openInfo").removeClass("openInfo").addClass("closedInfo");$(this).closest("tr").addClass("open");var targ=$(this).attr("href");$(targ).removeClass("closedInfo").addClass("openInfo")}
return false;})}
var quotesInterval=7000;function quotesBlock(){$("#quotesBlock li:eq(0)").show()
var prevButton=$('<span class="prevButton">Prev</span>');var nextButton=$('<span class="nextButton">Next</span>');prevButton.click(function(){clearInterval(quotesTimer);var index=$("#quotesBlock").data("currQuote");var length=$("#quotesBlock li").size();var next=index-1;if(next<0){next=length-1;}
showQuote(next)
quotesTimer=setInterval(function(){nextButton.click()},quotesInterval);})
nextButton.click(function(){clearInterval(quotesTimer);var index=$("#quotesBlock").data("currQuote");var length=$("#quotesBlock li").size();var next=index+1;if(next>(length-1)){next=0;}
showQuote(next)
quotesTimer=setInterval(function(){nextButton.click()},quotesInterval);})
if($("#quotesBlock").size()>0){quotesTimer=setInterval(function(){nextButton.click()},quotesInterval);}
$("#quotesBlock").data("currQuote",0).append(prevButton).append(nextButton);}
function showQuote(index){$("#quotesBlock li").hide()
$("#quotesBlock li:eq("+index+")").show()
$("#quotesBlock").data("currQuote",index)}
