(function(C){var A=C.scrollTo=function(D,E,F){C(window).scrollTo(D,E,F)};A.defaults={axis:"xy",duration:parseFloat(C.fn.jquery)>=1.3?0:1};A.window=function(D){return C(window)._scrollable()};C.fn._scrollable=function(){return this.map(function(){var D=this,E=!D.nodeName||C.inArray(D.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!E){return D}var F=(D.contentWindow||D).document||D.ownerDocument||D;return C.browser.safari||F.compatMode=="BackCompat"?F.body:F.documentElement})};C.fn.scrollTo=function(F,E,D){if(typeof E=="object"){D=E;E=0}if(typeof D=="function"){D={onAfter:D}}if(F=="max"){F=9000000000}D=C.extend({},A.defaults,D);E=E||D.speed||D.duration;D.queue=D.queue&&D.axis.length>1;if(D.queue){E/=2}D.offset=B(D.offset);D.over=B(D.over);return this._scrollable().each(function(){var M=this,K=C(M),L=F,I,J={},G=K.is("html,body");switch(typeof L){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(L)){L=B(L);break}L=C(L,this);case"object":if(L.is||L.style){I=(L=C(L)).offset()}}C.each(D.axis.split(""),function(P,Q){var S=Q=="x"?"Left":"Top",R=S.toLowerCase(),U="scroll"+S,O=M[U],N=A.max(M,Q);if(I){J[U]=I[R]+(G?0:O-K.offset()[R]);if(D.margin){J[U]-=parseInt(L.css("margin"+S))||0;J[U]-=parseInt(L.css("border"+S+"Width"))||0}J[U]+=D.offset[R]||0;if(D.over[R]){J[U]+=L[Q=="x"?"width":"height"]()*D.over[R]}}else{var T=L[R];J[U]=T.slice&&T.slice(-1)=="%"?parseFloat(T)/100*N:T}if(/^\d+$/.test(J[U])){J[U]=J[U]<=0?0:Math.min(J[U],N)}if(!P&&D.queue){if(O!=J[U]){H(D.onAfterFirst)}delete J[U]}});H(D.onAfter);function H(N){K.animate(J,E,D.easing,N&&function(){N.call(this,F,D)})}}).end()};A.max=function(F,G){var I=G=="x"?"Width":"Height",H="scroll"+I;if(!C(F).is("html,body")){return F[H]-C(F)[I.toLowerCase()]()}var J="client"+I,E=F.ownerDocument.documentElement,D=F.ownerDocument.body;return Math.max(E[H],D[H])-Math.min(E[J],D[J])};function B(D){return typeof D=="object"?D:{top:D,left:D}}})(jQuery);(function(B){B.fn.ajaxSubmit=function(O){if(!this.length){A("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof O=="function"){O={success:O}}var E=B.trim(this.attr("action"));if(E){E=(E.match(/^([^#]+)/)||[])[1]}E=E||window.location.href||"";O=B.extend({url:E,type:this.attr("method")||"GET"},O||{});var Q={};this.trigger("form-pre-serialize",[this,O,Q]);if(Q.veto){A("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(O.beforeSerialize&&O.beforeSerialize(this,O)===false){A("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var K=this.formToArray(O.semantic);if(O.data){O.extraData=O.data;for(var F in O.data){if(O.data[F] instanceof Array){for(var G in O.data[F]){K.push({name:F,value:O.data[F][G]})}}else{K.push({name:F,value:O.data[F]})}}}if(O.beforeSubmit&&O.beforeSubmit(K,this,O)===false){A("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[K,this,O,Q]);if(Q.veto){A("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var D=B.param(K);if(O.type.toUpperCase()=="GET"){O.url+=(O.url.indexOf("?")>=0?"&":"?")+D;O.data=null}else{O.data=D}var P=this,J=[];if(O.resetForm){J.push(function(){P.resetForm()})}if(O.clearForm){J.push(function(){P.clearForm()})}if(!O.dataType&&O.target){var M=O.success||function(){};J.push(function(R){B(O.target).html(R).each(M,arguments)})}else{if(O.success){J.push(O.success)}}O.success=function(U,S){for(var T=0,R=J.length;T<R;T++){J[T].apply(O,[U,S,P])}};var C=B("input:file",this).fieldValue();var N=false;for(var I=0;I<C.length;I++){if(C[I]){N=true}}var H=false;if(O.iframe||N||H){if(O.closeKeepAlive){B.get(O.closeKeepAlive,L)}else{L()}}else{B.ajax(O)}this.trigger("form-submit-notify",[this,O]);return this;function L(){var V=P[0];if(B(":input[name=submit]",V).length){alert('Error: Form elements must not be named "submit".');return }var T=B.extend({},B.ajaxSettings,O);var f=B.extend(true,{},B.extend(true,{},B.ajaxSettings),T);var U="jqFormIO"+(new Date().getTime());var b=B('<iframe id="'+U+'" name="'+U+'" src="about:blank" />');var d=b[0];b.css({position:"absolute",top:"-1000px",left:"-1000px"});var e={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;b.attr("src","about:blank")}};var c=T.global;if(c&&!B.active++){B.event.trigger("ajaxStart")}if(c){B.event.trigger("ajaxSend",[e,T])}if(f.beforeSend&&f.beforeSend(e,f)===false){f.global&&B.active--;return }if(e.aborted){return }var S=0;var X=0;var R=V.clk;if(R){var W=R.name;if(W&&!R.disabled){O.extraData=O.extraData||{};O.extraData[W]=R.value;if(R.type=="image"){O.extraData[name+".x"]=V.clk_x;O.extraData[name+".y"]=V.clk_y}}}setTimeout(function(){var j=P.attr("target"),h=P.attr("action");V.setAttribute("target",U);if(V.getAttribute("method")!="POST"){V.setAttribute("method","POST")}if(V.getAttribute("action")!=T.url){V.setAttribute("action",T.url)}if(!O.skipEncodingOverride){P.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(T.timeout){setTimeout(function(){X=true;Y()},T.timeout)}var i=[];try{if(O.extraData){for(var k in O.extraData){i.push(B('<input type="hidden" name="'+k+'" value="'+O.extraData[k]+'" />').appendTo(V)[0])}}b.appendTo("body");d.attachEvent?d.attachEvent("onload",Y):d.addEventListener("load",Y,false);V.submit()}finally{V.setAttribute("action",h);j?V.setAttribute("target",j):P.removeAttr("target");B(i).remove()}},10);var Z=0;function Y(){if(S++){return }d.detachEvent?d.detachEvent("onload",Y):d.removeEventListener("load",Y,false);var i=true;try{if(X){throw"timeout"}var j,l;l=d.contentWindow?d.contentWindow.document:d.contentDocument?d.contentDocument:d.document;if((l.body==null||l.body.innerHTML=="")&&!Z){Z=1;S--;setTimeout(Y,100);return }e.responseText=l.body?l.body.innerHTML:null;e.responseXML=l.XMLDocument?l.XMLDocument:l;e.getResponseHeader=function(n){var m={"content-type":T.dataType};return m[n]};if(T.dataType=="json"||T.dataType=="script"){var h=l.getElementsByTagName("textarea")[0];e.responseText=h?h.value:e.responseText}else{if(T.dataType=="xml"&&!e.responseXML&&e.responseText!=null){e.responseXML=a(e.responseText)}}j=B.httpData(e,T.dataType)}catch(k){i=false;B.handleError(T,e,"error",k)}if(i){T.success(j,"success");if(c){B.event.trigger("ajaxSuccess",[e,T])}}if(c){B.event.trigger("ajaxComplete",[e,T])}if(c&&!--B.active){B.event.trigger("ajaxStop")}if(T.complete){T.complete(e,i?"success":"error")}setTimeout(function(){b.remove();e.responseXML=null},100)}function a(h,i){if(window.ActiveXObject){i=new ActiveXObject("Microsoft.XMLDOM");i.async="false";i.loadXML(h)}else{i=(new DOMParser()).parseFromString(h,"text/xml")}return(i&&i.documentElement&&i.documentElement.tagName!="parsererror")?i:null}}};B.fn.ajaxForm=function(C){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){B(this).ajaxSubmit(C);return false}).each(function(){B(":submit,input:image",this).bind("click.form-plugin",function(E){var D=this.form;D.clk=this;if(this.type=="image"){if(E.offsetX!=undefined){D.clk_x=E.offsetX;D.clk_y=E.offsetY}else{if(typeof B.fn.offset=="function"){var F=B(this).offset();D.clk_x=E.pageX-F.left;D.clk_y=E.pageY-F.top}else{D.clk_x=E.pageX-this.offsetLeft;D.clk_y=E.pageY-this.offsetTop}}}setTimeout(function(){D.clk=D.clk_x=D.clk_y=null},10)})})};B.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){B(":submit,input:image",this).unbind("click.form-plugin")})};B.fn.formToArray=function(N){var M=[];if(this.length==0){return M}var D=this[0];var H=N?D.getElementsByTagName("*"):D.elements;if(!H){return M}for(var I=0,K=H.length;I<K;I++){var E=H[I];var F=E.name;if(!F){continue}if(N&&D.clk&&E.type=="image"){if(!E.disabled&&D.clk==E){M.push({name:F,value:B(E).val()});M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}continue}var O=B.fieldValue(E,true);if(O&&O.constructor==Array){for(var G=0,C=O.length;G<C;G++){M.push({name:F,value:O[G]})}}else{if(O!==null&&typeof O!="undefined"){M.push({name:F,value:O})}}}if(!N&&D.clk){var J=B(D.clk),L=J[0],F=L.name;if(F&&!L.disabled&&L.type=="image"){M.push({name:F,value:J.val()});M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}}return M};B.fn.formSerialize=function(C){return B.param(this.formToArray(C))};B.fn.fieldSerialize=function(D){var C=[];this.each(function(){var H=this.name;if(!H){return }var F=B.fieldValue(this,D);if(F&&F.constructor==Array){for(var G=0,E=F.length;G<E;G++){C.push({name:H,value:F[G]})}}else{if(F!==null&&typeof F!="undefined"){C.push({name:this.name,value:F})}}});return B.param(C)};B.fn.fieldValue=function(H){for(var G=[],E=0,C=this.length;E<C;E++){var F=this[E];var D=B.fieldValue(F,H);if(D===null||typeof D=="undefined"||(D.constructor==Array&&!D.length)){continue}D.constructor==Array?B.merge(G,D):G.push(D)}return G};B.fieldValue=function(C,I){var E=C.name,N=C.type,O=C.tagName.toLowerCase();if(typeof I=="undefined"){I=true}if(I&&(!E||C.disabled||N=="reset"||N=="button"||(N=="checkbox"||N=="radio")&&!C.checked||(N=="submit"||N=="image")&&C.form&&C.form.clk!=C||O=="select"&&C.selectedIndex==-1)){return null}if(O=="select"){var J=C.selectedIndex;if(J<0){return null}var L=[],D=C.options;var G=(N=="select-one");var K=(G?J+1:D.length);for(var F=(G?J:0);F<K;F++){var H=D[F];if(H.selected){var M=H.value;if(!M){M=(H.attributes&&H.attributes.value&&!(H.attributes.value.specified))?H.text:H.value}if(G){return M}L.push(M)}}return L}return C.value};B.fn.clearForm=function(){return this.each(function(){B("input,select,textarea",this).clearFields()})};B.fn.clearFields=B.fn.clearInputs=function(){return this.each(function(){var D=this.type,C=this.tagName.toLowerCase();if(D=="text"||D=="password"||C=="textarea"){this.value=""}else{if(D=="checkbox"||D=="radio"){this.checked=false}else{if(C=="select"){this.selectedIndex=-1}}}})};B.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};B.fn.enable=function(C){if(C==undefined){C=true}return this.each(function(){this.disabled=!C})};B.fn.selected=function(C){if(C==undefined){C=true}return this.each(function(){var D=this.type;if(D=="checkbox"||D=="radio"){this.checked=C}else{if(this.tagName.toLowerCase()=="option"){var E=B(this).parent("select");if(C&&E[0]&&E[0].type=="select-one"){E.find("option").selected(false)}this.selected=C}}})};function A(){if(B.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);(function(B){var A=B.preload=function(J,I){if(J.split){J=B(J)}I=B.extend({},A.defaults,I);var H=B.map(J,function(L){if(!L){return }if(L.split){return I.base+L+I.ext}var K=L.src||L.href;if(typeof I.placeholder=="string"&&L.src){L.src=I.placeholder}if(K&&I.find){K=K.replace(I.find,I.replace)}return K||null}),G={loaded:0,failed:0,next:0,done:0,total:H.length};if(!G.total){return C()}var F=B(Array(I.threshold+1).join("<img/>")).load(E).error(E).bind("abort",E).each(D);function E(L){G.element=this;G.found=L.type=="load";G.image=this.src;G.index=this.index;var K=G.original=J[this.index];G[G.found?"loaded":"failed"]++;G.done++;if(I.enforceCache){A.cache.push(B("<img/>").attr("src",G.image)[0])}if(I.placeholder&&K.src){K.src=G.found?G.image:I.notFound||K.src}if(I.onComplete){I.onComplete(G)}if(G.done<G.total){D(0,this)}else{if(F&&F.unbind){F.unbind("load").unbind("error").unbind("abort")}F=null;C()}}function D(M,L,K){if(L.attachEvent&&G.next&&G.next%A.gap==0&&!K){setTimeout(function(){D(M,L,1)},0);return !1}if(G.next==G.total){return !1}L.index=G.next;L.src=H[G.next++];if(I.onRequest){G.index=L.index;G.element=L;G.image=L.src;G.original=J[G.next-1];I.onRequest(G)}}function C(){if(I.onFinish){I.onFinish(G)}}};A.gap=14;A.cache=[];A.defaults={threshold:2,base:"",ext:"",replace:""};B.fn.preload=function(C){A(this,C);return this}})(jQuery);(function(A){A.extend(A.fx.step,{backgroundPosition:function(D){if(D.state===0&&typeof D.end=="string"){var F=A.curCSS(D.elem,"backgroundPosition");F=C(F);D.start=[F[0],F[2]];var B=C(D.end);D.end=[B[0],B[2]];D.unit=[B[1],B[3]]}var E=[];E[0]=((D.end[0]-D.start[0])*D.pos)+D.start[0]+D.unit[0];E[1]=((D.end[1]-D.start[1])*D.pos)+D.start[1]+D.unit[1];D.elem.style.backgroundPosition=E[0]+" "+E[1];function C(H){H=H.replace(/left|top/g,"0px");H=H.replace(/right|bottom/g,"100%");H=H.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var G=H.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(G[1],10),G[2],parseFloat(G[3],10),G[4]]}}})})(jQuery);var Geometry={};if(window.screenLeft){Geometry.getWindowX=function(){return window.screenLeft};Geometry.getWindowY=function(){return window.screenTop}}else{if(window.screenX){Geometry.getWindowX=function(){return window.screenX};Geometry.getWindowY=function(){return window.screenY}}}if(window.innerWidth){Geometry.getViewportWidth=function(){return window.innerWidth};Geometry.getViewportHeight=function(){return window.innerHeight};Geometry.getHorizontalScroll=function(){return window.pageXOffset};Geometry.getVerticalScroll=function(){return window.pageYOffset}}else{if(document.documentElement&&document.documentElement.clientWidth){Geometry.getViewportWidth=function(){return document.documentElement.clientWidth};Geometry.getViewportHeight=function(){return document.documentElement.clientHeight};Geometry.getHorizontalScroll=function(){return document.documentElement.scrollLeft};Geometry.getVerticalScroll=function(){return document.documentElement.scrollTop}}else{if(document.body.clientWidth){Geometry.getViewportWidth=function(){return document.body.clientWidth};Geometry.getViewportHeight=function(){return document.body.clientHeight};Geometry.getHorizontalScroll=function(){return document.body.scrollLeft};Geometry.getVerticalScroll=function(){return document.body.scrollTop}}}}if(document.documentElement&&document.documentElement.scrollWidth){Geometry.getDocumentWidth=function(){return document.documentElement.scrollWidth};Geometry.getDocumentHeight=function(){return document.documentElement.scrollHeight}}else{if(document.body.scrollWidth){Geometry.getDocumentWidth=function(){return document.body.scrollWidth};Geometry.getDocumentHeight=function(){return document.body.scrollHeight}}}(function(A){A.fn.hoverIntent=function(I,H){var J={sensitivity:7,interval:100,timeout:0};J=A.extend(J,H?{over:I,out:H}:I);var L,K,F,D;var E=function(M){L=M.pageX;K=M.pageY};var C=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);if((Math.abs(F-L)+Math.abs(D-K))<J.sensitivity){A(M).unbind("mousemove",E);M.hoverIntent_s=1;return J.over.apply(M,[N])}else{F=L;D=K;M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}};var G=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);M.hoverIntent_s=0;return J.out.apply(M,[N])};var B=function(P){var O=(P.type=="mouseover"?P.fromElement:P.toElement)||P.relatedTarget;while(O&&O!=this){try{O=O.parentNode}catch(P){O=this}}if(O==this){return false}var N=jQuery.extend({},P);var M=this;if(M.hoverIntent_t){M.hoverIntent_t=clearTimeout(M.hoverIntent_t)}if(P.type=="mouseover"){F=N.pageX;D=N.pageY;A(M).bind("mousemove",E);if(M.hoverIntent_s!=1){M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}}else{A(M).unbind("mousemove",E);if(M.hoverIntent_s==1){M.hoverIntent_t=setTimeout(function(){G(N,M)},J.timeout)}}};return this.mouseover(B).mouseout(B)}})(jQuery);var gfn={setWidthClass:function(){if(screen.availHeight>768){$(document.body).removeClass("w1024").addClass("w1280")}}};var g={portfolioWidthInit:994,portfolioWidthAdd:385,portfolioWidthComb:1379,portfolioColumnWidth:159,portfolioColumnWidthBothMargins:174,menyOffsetLeft:565,menyOffsetRight:20,lochash:location.hash};var widthManager;jQuery(function(E){E(document.body).removeClass("jsOff").addClass("jsOn");gfn.setWidthClass();widthManager=widthManagerBuilder();menuBuilder();var C=E("#logo");if(E("#logo a")[0]){C.prepend(E("<span/>")).find("span").hide().end().hover(function(){C.css("cursor","pointer").find("span").fadeIn("normal")},function(){C.find("span").hide()})}E(window).scroll(function(){if(getPageScroll()["yScroll"]>50){C.fadeOut()}else{C.fadeIn()}});if(Boolean(g.lochash)){setTimeout(function(){E("#menu li."+g.lochash.substring(1)+" a").trigger("click")},300);if(getPageScroll()["yScroll"]>0){C.fadeOut()}}if(document.getElementById("section2")){var D=E("#section2 ul");var B=D.map(function(){return E(this).height()}).get();D.height(Math.max.apply(Math,B)+15)}portfolioAjaxCtnersHolder=pageAjaxCtnersConstructor();portfolioAjaxCtnersHolder.addCtner([{ctnerClassName:"sites",parentCtnerId:"section2",ctnerId:"oneSite",oneSiteWidth:g.portfolioWidthAdd,columnWidth:g.portfolioColumnWidth}]);g.portfolioJQ.find("a").click(function(G){G.preventDefault();if((Geometry.getViewportHeight()+Geometry.getVerticalScroll()-E("#section3").offset().top)<0){E("#menu li.portfolio a").trigger("click")}var H=E(this);g.portfolioJQ.find("a").unbind("click");var F=portfolioAjaxContentBuilder({ctnersHolder:portfolioAjaxCtnersHolder,ctnerClassName:"sites",clickedJQ:H});F.init();H.addClass("sel")});if(document.getElementById("amd_contactform_fixed")){E("#amd_contactform_fixed").attr("action","code/forms/process_contact.php");var A=formContactBuilder({formId:"amd_contactform_fixed",thanksId:"amf_response_thank"});A.prepareForm()}if(document.getElementById("home")){loopTestimonials=loopBuilder();loopTestimonials.init()}if(document.getElementById("blog")){E("a[href]").each(function(){if(this.hostname&&this.hostname!==location.hostname){this.setAttribute("target","out")}});if(document.getElementById("blogIndexPage")){if(E("#newerEntriesLink")[0]&&E("#newerEntriesLink").text()==""){E("#newerEntriesLink, #latestEntriesLinkBot").remove()}}else{if(document.getElementById("archivePage")){if(!E("div.entry")[1]){E("#latestEntriesLinkBot").remove()}}}}});var menuBuilder=function(){var $menuLinks=$("#menu a");$menuLinks.append($('<span class="over"/>'));$menuLinks.each(function(i){if($(this).hasClass("scroll")){$(this).click(function(e){var c=$(this).closest("li").attr("class");e.preventDefault();if(c.toString().indexOf("portfolio")!=-1){var $that=$("#section2");$.scrollTo($that,{duration:500,onAfter:function(){$that.css("backgroundColor","#f70984").animate({backgroundColor:"#F77507"},2000)}})}else{if(c.toString().indexOf("services")!=-1){var $that=$("#section3");$.scrollTo($that,{duration:500,offset:{top:-20},onAfter:function(){$that.css({backgroundColor:"#000000",color:"#FFFFFF"}).animate({backgroundColor:"#FFFFFF",color:"#393939"},2000)}})}else{if(c.toString().indexOf("contact")!=-1){var $that=$("#section4"),scroll=Geometry.getVerticalScroll(),durat=600;if(scroll>200){durat=400}$.scrollTo($that,{duration:durat,onAfter:function(){$that.css({backgroundColor:"#920000",color:"#FF7400"}).animate({backgroundColor:"#D30900",color:"#FFFFFF"},2000)}})}}}});
/*@cc_on
if (parseInt(jQuery.browser.version)===6) {$menuLinks.hover(function() {$(this).find('span.over').addClass('ieOver');},function() {$(this).find('span.over').removeClass('ieOver');})}
@*/
}})};var loopBuilder=function(){var B="testimonials_raw.html",C="oneTestim",H=".oneTestim",G="visit",F="slow";var J=function(){$.get(B,function(K){$('<div id="testimonials"/>').appendTo($("#section4")).append(K).prepend($('<a id="nextTestm" href="#nextTestm">next testimonial</a>'));D();$(H).bind("loopEvt",function(){I(this)});$("#nextTestm").click(function(L){L.preventDefault();$(H+":visible").trigger("loopEvt")})})};var D=function(){var K=parseInt($(H).length,10),L=parseInt(getCookie(G),10)||0;if(L<K){$(H+":eq("+L+")").show();document.cookie=G+"="+(L+1)+"; max-age="+(60*60*24*30)}else{$(H+":eq(0)").show();document.cookie=G+"=1; max-age="+(60*60*24*30)}};var I=function(K){$this=$(K);$this.slideUp(F,A($this))};var A=function(L){var K=L.next(H);if(!K.is(H)){K=$(H+":first")}K.slideDown(F,function(){ieClearTypeFix(K[0],"testimonials")})};var E={};E.init=J;return E};function ieClearTypeFix(B,A){if(!jQuery.support.opacity){B.style.removeAttribute("filter");document.getElementById(A).style.removeAttribute("filter")}}var widthManagerBuilder=function(){g.wrapperJQ=$("#wrapper");g.portfolioJQ=$("#sites");g.menuJQ=$("#menu");var docWidth=g.portfolioWidthInit;var setDocWidth=function(w){docWidth=w};var getDocWidth=function(){return docWidth};if(Geometry.getViewportWidth()<docWidth){g.wrapperJQ.width(docWidth);g.menuJQ.css({left:"auto",right:g.menyOffsetRight+"px"})}$(window).resize(function(){g.wrapperJQ.css("width","100%");g.menuJQ.attr("style","");if(Geometry.getViewportWidth()<docWidth){g.wrapperJQ.width(docWidth);
/*@cc_on if ( parseInt(jQuery.browser.version)===6) {return;} @*/
g.menuJQ.css({left:"auto",right:g.menyOffsetRight+"px"})}});var that={};that.setDocWidth=setDocWidth;that.getDocWidth=getDocWidth;return that};var portfolioAjaxContentBuilder=function(C){var B={};C.pathStart="images/sites/";C.pathEnd=".jpg";C.addToDOMCtnerStr='<div id="'+C.ctnersHolder[C.ctnerClassName].ctnerId+'"><div id="closeOneSite"></div></div>';var A=ajaxContentConstructor(C,B);A.addLoadEvent=(function(){g.portfolioJQ.find("a").click(function(D){D.preventDefault();A.loadEventHandler($(this))})})();return A};var ajaxContentConstructor=function(paramsClass,paramsInstance){var contentCtnerId=paramsClass.ctnersHolder[paramsClass.ctnerClassName].ctnerId,contentCtnerIdJ="#"+contentCtnerId,contentCtnerJQ=$("#"+contentCtnerId),ctnersHolder=paramsClass.ctnersHolder,loadedSites=[],currentContent,nextContent;var loadCallback=paramsInstance.loadCallback||function(){};var checkExistCtner=function(){try{if(!contentCtnerJQ[0]){if(paramsClass.addToDOMCtnerStr){$(paramsClass.addToDOMCtnerStr).appendTo(ctnersHolder[paramsClass.ctnerClassName].parentCtnerJQ());$("#closeOneSite").click(function(e){contentCtnerJQ.fadeOut("fast",function(){currentContent.parentColumnJQ.animate({width:ctnersHolder[paramsClass.ctnerClassName].columnWidth},600,function(){setDocWidth()})});g.portfolioJQ.find("a.sel").removeClass("sel")})}else{$('<div id="'+contentCtnerId+'"></div>').appendTo(ctnersHolder[paramsClass.ctnerClassName].parentCtnerJQ())}contentCtnerJQ=$("#"+contentCtnerId)}}catch(e){alert(e.message)}};if(!ctnersHolder[paramsClass.ctnerClassName].fixed){checkExistCtner()}var init=function(){nextContent=contentConstr(paramsClass.clickedJQ);loadContent(true)};var contentConstr=function(clickedJQ){var that={};that.clickedJQ=clickedJQ;var id=convertId(clickedJQ.text());var parentColumnJQ=clickedJQ.closest("div.part");that.parentColumnJQ=parentColumnJQ;that.leftMargin=function(){return parentColumnJQ.offset().left+ctnersHolder[paramsClass.ctnerClassName].columnWidth};that.fullWidth=function(){return parentColumnJQ.width()+ctnersHolder[paramsClass.ctnerClassName].oneSiteWidth};that.objJQ=function(){if(!$("#"+id)[0]){$('<div style="display:none;" id="'+id+'"><p class="visitSite"><a target="out" href="'+clickedJQ.attr("href")+'">Visit the site</a></p><img src="'+that.path+'" /></div>').appendTo(contentCtnerJQ)}return $("#"+id)};that.path=paramsClass.pathStart+id+paramsClass.pathEnd;return that};var loadEventHandler=function(clickedJQ){if(clickedJQ.hasClass("sel")){return }nextContent=contentConstr(clickedJQ);loadContent();g.portfolioJQ.find("a.sel").removeClass("sel");clickedJQ.addClass("sel");var thisSiteImg=clickedJQ.parent("li").text();if($.inArray(thisSiteImg,loadedSites)===-1){loadedSites.push(thisSiteImg)}preloadSiteImage(clickedJQ)};var preloadSiteImage=function(clickedJQ){var n=clickedJQ.parent("li").next("li").text()||false;var p=clickedJQ.parent("li").prev("li").text()||false;var doPreload=function(a,b){$.preload(a,{base:"images/sites/",ext:".jpg",onComplete:function(){loadedSites.push(b)}})};if(n&&$.inArray(n,loadedSites)===-1){doPreload([convertId(n)],n)}if(p&&$.inArray(p,loadedSites)===-1){doPreload([convertId(p)],p)}};var loadContent=function(init){if(init){setDocWidth(true);nextContent.parentColumnJQ.animate({width:nextContent.fullWidth()},600,function(){contentCtnerJQ.css("left",nextContent.leftMargin()+"px");nextContent.objJQ().show();contentCtnerJQ.fadeIn("fast",function(){centerContent()});currentContent=contentConstr(nextContent.clickedJQ)});loadedSites.push(nextContent.clickedJQ.parent("li").text());loadCallback()}else{if(nextContent.leftMargin()===currentContent.leftMargin()){if(contentCtnerJQ.is(":visible")){currentContent.objJQ().fadeOut("slow",function(){nextContent.objJQ().fadeIn("slow");currentContent=contentConstr(nextContent.clickedJQ);loadCallback()})}else{currentContent.objJQ().hide();nextContent.objJQ().show();setDocWidth(true);nextContent.parentColumnJQ.animate({width:nextContent.fullWidth()},600,function(){contentCtnerJQ.fadeIn("fast",function(){centerContent()});currentContent=contentConstr(nextContent.clickedJQ)})}}else{if(contentCtnerJQ.is(":visible")){contentCtnerJQ.fadeOut("fast",function(){currentContent.parentColumnJQ.animate({width:ctnersHolder[paramsClass.ctnerClassName].columnWidth},600);currentContent.objJQ().hide();nextContent.objJQ().show();nextContent.parentColumnJQ.animate({width:nextContent.fullWidth()},600,function(){contentCtnerJQ.css("left",nextContent.leftMargin()+"px");contentCtnerJQ.fadeIn("fast",function(){centerContent()});currentContent=contentConstr(nextContent.clickedJQ)})})}else{currentContent.objJQ().hide();nextContent.objJQ().show();contentCtnerJQ.css("left",nextContent.leftMargin()+"px");setDocWidth(true);nextContent.parentColumnJQ.animate({width:nextContent.fullWidth()},600,function(){contentCtnerJQ.fadeIn("fast",function(){centerContent()});currentContent=contentConstr(nextContent.clickedJQ)})}}}};var convertId=function(id){var n=replaceInStr(" & ","_",id);n=replaceInStr(" ","_",n);n=replaceInStr("’","",n);return n};var setDocWidth=function(expand){if(expand){widthManager.setDocWidth(g.portfolioWidthComb)}else{widthManager.setDocWidth(g.portfolioWidthInit)}if(g.wrapperJQ.width()>g.portfolioWidthComb){return }if(!expand&&(g.wrapperJQ.width()>widthManager.getDocWidth())){if(g.menuJQ.offset().left>g.menyOffsetLeft){g.menuJQ.fadeOut("fast")}g.wrapperJQ.animate({width:Geometry.getViewportWidth()},500,function(){if(Geometry.getViewportWidth()<widthManager.getDocWidth()){g.wrapperJQ.width(widthManager.getDocWidth()-15);g.menuJQ.css({left:"auto",right:g.menyOffsetRight+"px"});if(!g.menuJQ.is(":visible")){g.menuJQ.fadeIn("slow")}}else{g.wrapperJQ.css("width","100%");g.menuJQ.css({left:g.menyOffsetLeft+"px",right:"auto"});if(!g.menuJQ.is(":visible")){g.menuJQ.fadeIn("slow")}}})}else{if(expand){if(Geometry.getViewportWidth()<widthManager.getDocWidth()){g.wrapperJQ.width(widthManager.getDocWidth());if(Geometry.getViewportWidth()<g.portfolioWidthInit){g.menuJQ.css({left:"auto",right:g.menyOffsetRight+"px"})}}else{g.wrapperJQ.css("width","100%");g.menuJQ.attr("style","")}
/*@cc_on
			if ( parseInt(jQuery.browser.version)===6) {  
				g.menuJQ.attr('style','');
			}
			@*/
}}};var centerContent=function(){var dif=(nextContent.leftMargin()+g.portfolioWidthAdd-Geometry.getViewportWidth());if(dif>0){if(Geometry.getViewportWidth()>=g.portfolioWidthInit){$.scrollTo("+="+(g.portfolioWidthComb-Geometry.getViewportWidth())+"px",400,{axis:"x"})}else{$.scrollTo(nextContent.leftMargin()-g.portfolioColumnWidthBothMargins+"px",400,{axis:"x"})}}};var that={};that.init=init;that.loadEventHandler=loadEventHandler;return that};var pageAjaxCtnersConstructor=function(){var B={};var A=function(D){for(var C=0;C<D.length;C++){B[D[C].ctnerClassName]={parentCtnerId:D[C].parentCtnerId,parentCtnerJQ:function(){return $("#"+this.parentCtnerId)},ctnerId:D[C].ctnerId,ctnerJQ:function(){return $("#"+this.ctnerId)},oneSiteWidth:D[C].oneSiteWidth,columnWidth:D[C].columnWidth,fixed:D[C].fixed||undefined}}};B.addCtner=A;return B};var formContactBuilder=function(C){var B={};var A=formConstructor(C,B);return A};var formConstructor=function(G,A){var E="#"+G.formId,H=$(E);var B=function(){H.find(".validate").focus(function(){var K=$(this).closest("li");var L=$(K).find(".error:visible")[0];if(L){$(L).hide("slow")}});if(jQuery.browser.msie){if(parseInt(jQuery.browser.version)<7){$("#submitBtn").hover(function(){$(this).css("background-position","0 -28px")},function(){$(this).css("background-position","0 0")})}H.find("input, textarea").focus(function(){$(this).addClass("ieFocus")});H.find("input, textarea").blur(function(){$(this).removeClass("ieFocus")})}var J={dataType:"json",beforeSubmit:D,success:F};H.ajaxForm(J)};var D=function(M,L,R){var K=L[0],N=0,J;for(var O=0;O<M.length;O++){var P=$(K[name=M[O].name]);var Q=M[O].value;if(P.hasClass("validate")){if(P.hasClass("notempty")||P.hasClass("radio")){J=I(Q,P,M[O].type);N=N+Number(J)}if(P.hasClass("email")){J=I(Q,P,"email");N=N+Number(J)}}}return !N};var I=function(M,O,N){var K,P;if(N==="email"){K=!M.match(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i);P='<span class="error">Please enter a valid e-mail address!</span>'}else{if(N==="radio"){K=!jQuery.trim(M);P='<span class="error">Please select one of the choices!</span>'}else{K=!jQuery.trim(M);var P='<span class="error">Please fill out the field above!</span>'}}if(K){var J=O.closest("li"),L=$(J).find(".error")[0];if(!L){$(J).append(P);L=$(J).find(".error")[0]}$(L).show()}return K};var F=function(J){H.unbind("submit");var K=H.closest("div");K.slideUp("slow",function(){K.empty().addClass("processed").append('<p id="'+G.thanksId+'">'+J.message+"</p>").slideDown("slow")})};var C={};C.prepareForm=B;return C};function getNrFromHrefHash(A){if(typeof A==="object"){A=A.href}var B=A.split("#")[1];return parseInt(B)}function getStrFromHrefHash(A){if(typeof A==="object"){A=A.href}return A.split("#")[1]}function getStrFromHrefSearch(A){if(typeof A==="object"){A=A.href}return A.split("?p=")[1]}function getImgIdFromElemId(B){var A=B.attr("id").substring(1);return parseInt(A)}function getNrFromSrc(B){var A=B.attr("src").split("/");A=A[A.length-1].split("_")[0];return parseInt(A)}function getPageScroll(){var C,A;if(self.pageYOffset){A=self.pageYOffset;C=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop;C=document.documentElement.scrollLeft}else{if(document.body){A=document.body.scrollTop;C=document.body.scrollLeft}}}var B={xScroll:C,yScroll:A};return B}function replaceInStr(B,A,D){var C=new RegExp(B,"g");return D.replace(C,A)}function getCookie(A){var E=null;if(document.cookie&&document.cookie!=""){var D=document.cookie.split(";");for(var C=0;C<D.length;C++){var B=$.trim(D[C]);if(B.substring(0,A.length+1)==(A+"=")){E=decodeURIComponent(B.substring(A.length+1));break}}}return E};