(function(B){B.extend(B.fx.step,{backgroundPosition:function(H){if(H.state===0&&typeof H.end=="string"){var A=B.curCSS(H.elem,"backgroundPosition");A=I(A);H.start=[A[0],A[2]];var J=I(H.end);H.end=[J[0],J[2]];H.unit=[J[1],J[3]]}var G=[];G[0]=((H.end[0]-H.start[0])*H.pos)+H.start[0]+H.unit[0];G[1]=((H.end[1]-H.start[1])*H.pos)+H.start[1]+H.unit[1];H.elem.style.backgroundPosition=G[0]+" "+G[1];function I(C){C=C.replace(/left|top/g,"0px");C=C.replace(/right|bottom/g,"100%");C=C.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var D=C.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(D[1],10),D[2],parseFloat(D[3],10),D[4]]}}})})(jQuery);(function(B){B.modal=function(A,D){return B.modal.impl.init(A,D)};B.modal.close=function(){B.modal.impl.close(true)};B.fn.modal=function(A){return B.modal.impl.init(this,A)};B.modal.defaults={overlay:50,overlayId:"modalOverlay",overlayCss:{},containerId:"modalContainer",containerCss:{},close:true,closeTitle:"Close",closeClass:"modalClose",persist:false,onOpen:null,onShow:null,onClose:null};B.modal.impl={opts:null,dialog:{},init:function(A,D){if(this.dialog.data){return false}this.opts=B.extend({},B.modal.defaults,D);if(typeof A=="object"){A=A instanceof jQuery?A:B(A);if(A.parent().parent().size()>0){this.dialog.parentNode=A.parent();if(!this.opts.persist){this.dialog.original=A.clone(true)}}}else{if(typeof A=="string"||typeof A=="number"){A=B("<div>").html(A)}else{if(console){console.log("SimpleModal Error: Unsupported data type: "+typeof A)}return false}}this.dialog.data=A.addClass("modalData");A=null;this.create();this.open();if(B.isFunction(this.opts.onShow)){this.opts.onShow.apply(this,[this.dialog])}return this},create:function(){this.dialog.overlay=B("<div>").attr("id",this.opts.overlayId).addClass("modalOverlay").css(B.extend(this.opts.overlayCss,{opacity:this.opts.overlay/100,height:"100%",width:"100%",position:"fixed",left:0,top:0,zIndex:3000})).hide().appendTo("body");this.dialog.container=B("<div>").attr("id",this.opts.containerId).addClass("modalContainer").css(B.extend(this.opts.containerCss,{position:"fixed",zIndex:3100})).append(this.opts.close?'<a class="modalCloseImg '+this.opts.closeClass+'" title="'+this.opts.closeTitle+'"></a>':"").hide().appendTo("body");if(B.browser.msie&&(B.browser.version<7)){this.fixIE()}this.dialog.container.append(this.dialog.data.hide())},bindEvents:function(){var A=this;B("."+this.opts.closeClass).click(function(D){D.preventDefault();A.close()})},unbindEvents:function(){B("."+this.opts.closeClass).unbind("click")},fixIE:function(){var A=B(document.body).height()+"px";var D=B(document.body).width()+"px";this.dialog.overlay.css({position:"absolute",height:A,width:D});this.dialog.container.css({position:"absolute"});this.dialog.iframe=B('<iframe src="javascript:false;">').css(B.extend(this.opts.iframeCss,{opacity:0,position:"absolute",height:A,width:D,zIndex:1000,width:"100%",top:0,left:0})).hide().appendTo("body")},open:function(){if(this.dialog.iframe){this.dialog.iframe.show()}if(B.isFunction(this.opts.onOpen)){this.opts.onOpen.apply(this,[this.dialog])}else{this.dialog.overlay.show();this.dialog.container.show();this.dialog.data.show()}this.bindEvents()},close:function(A){if(!this.dialog.data){return false}if(B.isFunction(this.opts.onClose)&&!A){this.opts.onClose.apply(this,[this.dialog])}else{if(this.dialog.parentNode){if(this.opts.persist){this.dialog.data.hide().appendTo(this.dialog.parentNode)}else{this.dialog.data.remove();this.dialog.original.appendTo(this.dialog.parentNode)}}else{this.dialog.data.remove()}this.dialog.container.remove();this.dialog.overlay.remove();if(this.dialog.iframe){this.dialog.iframe.remove()}this.dialog={}}this.unbindEvents()}}})(jQuery);$(document).ready(function(){$("#contactForm input:eq(0)").click(function(A){A.preventDefault();$.get("data/contact.php",function(D){$(D).modal({close:false,overlayId:"contact-overlay",containerId:"contact-container",onOpen:contact.open,onShow:contact.show,onClose:contact.close})})});var B=["cancel.png","form_bottom.gif","form_top.gif","form_top_ie.gif","loading.gif","send.png"];$(B).each(function(){var A=new Image();A.src="img/contact/"+this})});var contact={message:null,open:function(C){if($.browser.mozilla){$("#contact-container .contact-button").css({"padding-bottom":"2px"})}if($.browser.safari){$("#contact-container .contact-input").css({"font-size":".9em"})}var D=$("#contact-container .contact-title").html();$("#contact-container .contact-title").html("Loading...");C.overlay.fadeIn(200,function(){C.container.fadeIn(200,function(){C.data.fadeIn(200,function(){$("#contact-container .contact-content").animate({height:260},function(){$("#contact-container .contact-title").html(D);$("#contact-container form").fadeIn(200,function(){$("#contact-container #contact-name").focus();if($.browser.msie&&$.browser.version<7){$("#contact-container .contact-button").each(function(){if($(this).css("backgroundImage").match(/^url[("']+(.*\.png)[)"']+$/i)){var A=RegExp.$1;$(this).css({backgroundImage:"none",filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+A+'", sizingMethod="crop")'})}})}})})})})})},show:function(B){$("#contact-container .contact-send").click(function(D){D.preventDefault();if(contact.validate()){$("#contact-container .contact-message").fadeOut(function(){$("#contact-container .contact-message").removeClass("contact-error").empty()});$("#contact-container .contact-title").html("Sending...");$("#contact-container form").fadeOut(200);$("#contact-container .contact-content").animate({height:"80px"},function(){$("#contact-container .contact-loading").fadeIn(200,function(){$.ajax({url:"data/contact.php",data:$("#contact-container form").serialize()+"&action=send",type:"post",cache:false,dataType:"html",complete:function(C){$("#contact-container .contact-loading").fadeOut(200,function(){$("#contact-container .contact-title").html("Thank you!");$("#contact-container .contact-message").html(C.responseText).fadeIn(200)})},error:contact.error})})})}else{if($("#contact-container .contact-message:visible").length>0){var A=$("#contact-container .contact-message div");A.fadeOut(200,function(){A.empty();contact.showError();A.fadeIn(200)})}else{$("#contact-container .contact-message").animate({height:"30px"},contact.showError)}}})},close:function(B){$("#contact-container .contact-message").fadeOut();$("#contact-container .contact-title").html("Goodbye...");$("#contact-container form").fadeOut(200);$("#contact-container .contact-content").animate({height:40},function(){B.data.fadeOut(200,function(){B.container.fadeOut(200,function(){B.overlay.fadeOut(200,function(){$.modal.close()})})})})},error:function(B){alert(B.statusText)},validate:function(){contact.message="";if(!$("#contact-container #contact-name").val()){contact.message+="Name is required. "}var B=$("#contact-container #contact-email").val();if(!B){contact.message+="Email is required. "}else{if(!contact.validateEmail(B)){contact.message+="Email is invalid. "}}if(!$("#contact-container #contact-message").val()){contact.message+="Message is required."}if(contact.message.length>0){return false}else{return true}},validateEmail:function(H){var E=H.lastIndexOf("@");if(E<1||(E+1)===H.length){return false}if(/(\.{2,})/.test(H)){return false}var G=H.substring(0,E);var F=H.substring(E+1);if(G.length<1||G.length>64||F.length<4||F.length>255){return false}if(/(^\.|\.$)/.test(G)||/(^\.|\.$)/.test(F)){return false}if(!/^"(.+)"$/.test(G)){if(!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(G)){return false}}if(!/^[-a-zA-Z0-9\.]*$/.test(F)||F.indexOf(".")===-1){return false}return true},showError:function(){$("#contact-container .contact-message").html($('<div class="contact-error">').append(contact.message)).fadeIn(200)}};$(document).ready(function(){$("#clients input:eq(0)").click(function(B){B.preventDefault();$("#basicModalContent").modal()})});jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(J,I,F,G,H){return jQuery.easing[jQuery.easing.def](J,I,F,G,H)},easeInQuad:function(J,I,F,G,H){return G*(I/=H)*I+F},easeOutQuad:function(J,I,F,G,H){return -G*(I/=H)*(I-2)+F},easeInOutQuad:function(J,I,F,G,H){if((I/=H/2)<1){return G/2*I*I+F}return -G/2*((--I)*(I-2)-1)+F},easeInCubic:function(J,I,F,G,H){return G*(I/=H)*I*I+F},easeOutCubic:function(J,I,F,G,H){return G*((I=I/H-1)*I*I+1)+F},easeInOutCubic:function(J,I,F,G,H){if((I/=H/2)<1){return G/2*I*I*I+F}return G/2*((I-=2)*I*I+2)+F},easeInQuart:function(J,I,F,G,H){return G*(I/=H)*I*I*I+F},easeOutQuart:function(J,I,F,G,H){return -G*((I=I/H-1)*I*I*I-1)+F},easeInOutQuart:function(J,I,F,G,H){if((I/=H/2)<1){return G/2*I*I*I*I+F}return -G/2*((I-=2)*I*I*I-2)+F},easeInQuint:function(J,I,F,G,H){return G*(I/=H)*I*I*I*I+F},easeOutQuint:function(J,I,F,G,H){return G*((I=I/H-1)*I*I*I*I+1)+F},easeInOutQuint:function(J,I,F,G,H){if((I/=H/2)<1){return G/2*I*I*I*I*I+F}return G/2*((I-=2)*I*I*I*I+2)+F},easeInSine:function(J,I,F,G,H){return -G*Math.cos(I/H*(Math.PI/2))+G+F},easeOutSine:function(J,I,F,G,H){return G*Math.sin(I/H*(Math.PI/2))+F},easeInOutSine:function(J,I,F,G,H){return -G/2*(Math.cos(Math.PI*I/H)-1)+F},easeInExpo:function(J,I,F,G,H){return(I==0)?F:G*Math.pow(2,10*(I/H-1))+F},easeOutExpo:function(J,I,F,G,H){return(I==H)?F+G:G*(-Math.pow(2,-10*I/H)+1)+F},easeInOutExpo:function(J,I,F,G,H){if(I==0){return F}if(I==H){return F+G}if((I/=H/2)<1){return G/2*Math.pow(2,10*(I-1))+F}return G/2*(-Math.pow(2,-10*--I)+2)+F},easeInCirc:function(J,I,F,G,H){return -G*(Math.sqrt(1-(I/=H)*I)-1)+F},easeOutCirc:function(J,I,F,G,H){return G*Math.sqrt(1-(I=I/H-1)*I)+F},easeInOutCirc:function(J,I,F,G,H){if((I/=H/2)<1){return -G/2*(Math.sqrt(1-I*I)-1)+F}return G/2*(Math.sqrt(1-(I-=2)*I)+1)+F},easeInElastic:function(P,N,I,J,K){var M=1.70158;var L=0;var O=J;if(N==0){return I}if((N/=K)==1){return I+J}if(!L){L=K*0.3}if(O<Math.abs(J)){O=J;var M=L/4}else{var M=L/(2*Math.PI)*Math.asin(J/O)}return -(O*Math.pow(2,10*(N-=1))*Math.sin((N*K-M)*(2*Math.PI)/L))+I},easeOutElastic:function(P,N,I,J,K){var M=1.70158;var L=0;var O=J;if(N==0){return I}if((N/=K)==1){return I+J}if(!L){L=K*0.3}if(O<Math.abs(J)){O=J;var M=L/4}else{var M=L/(2*Math.PI)*Math.asin(J/O)}return O*Math.pow(2,-10*N)*Math.sin((N*K-M)*(2*Math.PI)/L)+J+I},easeInOutElastic:function(P,N,I,J,K){var M=1.70158;var L=0;var O=J;if(N==0){return I}if((N/=K/2)==2){return I+J}if(!L){L=K*(0.3*1.5)}if(O<Math.abs(J)){O=J;var M=L/4}else{var M=L/(2*Math.PI)*Math.asin(J/O)}if(N<1){return -0.5*(O*Math.pow(2,10*(N-=1))*Math.sin((N*K-M)*(2*Math.PI)/L))+I}return O*Math.pow(2,-10*(N-=1))*Math.sin((N*K-M)*(2*Math.PI)/L)*0.5+J+I},easeInBack:function(L,K,G,H,I,J){if(J==undefined){J=1.70158}return H*(K/=I)*K*((J+1)*K-J)+G},easeOutBack:function(L,K,G,H,I,J){if(J==undefined){J=1.70158}return H*((K=K/I-1)*K*((J+1)*K+J)+1)+G},easeInOutBack:function(L,K,G,H,I,J){if(J==undefined){J=1.70158}if((K/=I/2)<1){return H/2*(K*K*(((J*=(1.525))+1)*K-J))+G}return H/2*((K-=2)*K*(((J*=(1.525))+1)*K+J)+2)+G},easeInBounce:function(J,I,F,G,H){return G-jQuery.easing.easeOutBounce(J,H-I,0,G,H)+F},easeOutBounce:function(J,I,F,G,H){if((I/=H)<(1/2.75)){return G*(7.5625*I*I)+F}else{if(I<(2/2.75)){return G*(7.5625*(I-=(1.5/2.75))*I+0.75)+F}else{if(I<(2.5/2.75)){return G*(7.5625*(I-=(2.25/2.75))*I+0.9375)+F}else{return G*(7.5625*(I-=(2.625/2.75))*I+0.984375)+F}}}},easeInOutBounce:function(J,I,F,G,H){if(I<H/2){return jQuery.easing.easeInBounce(J,I*2,0,G,H)*0.5+F}return jQuery.easing.easeOutBounce(J,I*2-H,0,G,H)*0.5+G*0.5+F}});(function(B){B.fn.lavaLamp=function(A){A=B.extend({fx:"linear",speed:500,click:function(){},linum:0},A||{});return this.each(function(){var M=B(this),N=function(){},K=B('<li class="back"><div class="left"></div><div class="bottom"></div><div class="corner"></div></li>').appendTo(M),J=B("li",this),L=B("li.current",this)[0]||B(J[A.linum]).addClass("current")[0];J.not(".back").hover(function(){P(this)},N);B(this).hover(N,function(){P(L)});J.click(function(C){O(this);return A.click.apply(this,[C,this])});O(L);function O(C){K.css({left:C.offsetLeft+"px",width:C.offsetWidth+"px",height:C.offsetHeight+"px",top:C.offsetTop+"px"});L=C}function P(C){K.stop().animate({width:C.offsetWidth,left:C.offsetLeft,height:C.offsetHeight,top:C.offsetTop},A.speed,A.fx)}})}})(jQuery);jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyInit:function(F){jQuery.historyCallback=F;var G=location.hash;jQuery.historyCurrentHash=G;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}$("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');var E=$("#jQuery_history")[0];var H=E.contentWindow.document;H.open();H.close();H.location.hash=G}else{if($.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.isFirst=true}}jQuery.historyCallback(G.replace(/^#/,""));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(B){jQuery.historyBackStack.push(B);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var G=$("#jQuery_history")[0];var J=G.contentDocument||G.contentWindow.document;var H=J.location.hash;if(H!=jQuery.historyCurrentHash){location.hash=H;jQuery.historyCurrentHash=H;jQuery.historyCallback(H.replace(/^#/,""))}}else{if($.browser.safari){if(!jQuery.dontCheck){var L=history.length-jQuery.historyBackStack.length;if(L){jQuery.isFirst=false;if(L<0){for(var K=0;K<Math.abs(L);K++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var K=0;K<L;K++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var I=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(I!=undefined){jQuery.historyCurrentHash=location.hash;jQuery.historyCallback(I)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(document.URL.indexOf("#")>=0){jQuery.historyCallback(document.URL.split("#")[1])}else{var H=location.hash;jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var H=location.hash;if(H!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=H;jQuery.historyCallback(H.replace(/^#/,""))}}}},historyLoad:function(H){var G;if(jQuery.browser.safari){G=H}else{G="#"+H;location.hash=G}jQuery.historyCurrentHash=G;if(jQuery.browser.msie){var F=$("#jQuery_history")[0];var I=F.contentWindow.document;I.open();I.close();I.location.hash=G;jQuery.historyCallback(H)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(H);var J=function(){jQuery.dontCheck=false};window.setTimeout(J,200);jQuery.historyCallback(H);location.hash=G}else{jQuery.historyCallback(H)}}}});(function(J){var K={},L=new Image,G=["png","jpg","jpeg","gif"],H,I=1;J.fn.fancybox=function(A){K.settings=J.extend({},J.fn.fancybox.defaults,A);J.fn.fancybox.init();return this.each(function(){var C=J(this);var B=J.metadata?J.extend({},K.settings,C.metadata()):K.settings;C.unbind("click").click(function(){J.fn.fancybox.start(this,B);return false})})};J.fn.fancybox.start=function(C,A){if(K.animating){return false}if(A.overlayShow){J("#fancy_wrap").prepend('<div id="fancy_overlay"></div>');J("#fancy_overlay").css({width:J(window).width(),height:J(document).height(),opacity:A.overlayOpacity});if(J.browser.msie){J("#fancy_wrap").prepend('<iframe id="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>');J("#fancy_bigIframe").css({width:J(window).width(),height:J(document).height(),opacity:0})}J("#fancy_overlay").click(J.fn.fancybox.close)}K.itemArray=[];K.itemNum=0;if(jQuery.isFunction(A.itemLoadCallback)){A.itemLoadCallback.apply(this,[K]);var N=J(C).children("img:first").length?J(C).children("img:first"):J(C);var D={width:N.width(),height:N.height(),pos:J.fn.fancybox.getPosition(N)};for(var E=0;E<K.itemArray.length;E++){K.itemArray[E].o=J.extend({},A,K.itemArray[E].o);if(A.zoomSpeedIn>0||A.zoomSpeedOut>0){K.itemArray[E].orig=D}}}else{if(!C.rel||C.rel==""){var B={url:C.href,title:C.title,o:A};if(A.zoomSpeedIn>0||A.zoomSpeedOut>0){var N=J(C).children("img:first").length?J(C).children("img:first"):J(C);B.orig={width:N.width(),height:N.height(),pos:J.fn.fancybox.getPosition(N)}}K.itemArray.push(B)}else{var F=J("a[@rel="+C.rel+"]").get();for(var E=0;E<F.length;E++){var D=J.metadata?J.extend({},A,J(F[E]).metadata()):A;var B={url:F[E].href,title:F[E].title,o:D};if(A.zoomSpeedIn>0||A.zoomSpeedOut>0){var N=J(F[E]).children("img:first").length?J(F[E]).children("img:first"):J(C);B.orig={width:N.width(),height:N.height(),pos:J.fn.fancybox.getPosition(N)}}if(F[E].href==C.href){K.itemNum=E}K.itemArray.push(B)}}}J.fn.fancybox.changeItem(K.itemNum)};J.fn.fancybox.changeItem=function(A){J.fn.fancybox.showLoading();K.itemNum=A;J("#fancy_nav").empty();J("#fancy_outer").stop();J("#fancy_title").hide();J(document).unbind("keydown");imgRegExp=G.join("|");imgRegExp=new RegExp("."+imgRegExp+"$","i");var C=K.itemArray[A].url;if(C.match(/#/)){var B=window.location.href.split("#")[0];B=C.replace(B,"");J.fn.fancybox.showItem('<div id="fancy_div">'+J(B).html()+"</div>");J("#fancy_loading").hide()}else{if(C.match(imgRegExp)){J(L).unbind("load").bind("load",function(){J("#fancy_loading").hide();K.itemArray[A].o.frameWidth=L.width;K.itemArray[A].o.frameHeight=L.height;J.fn.fancybox.showItem('<img id="fancy_img" src="'+L.src+'" />')}).attr("src",C+"?rand="+Math.floor(Math.random()*999999999))}else{J.fn.fancybox.showItem('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+C+'"></iframe>')}}};J.fn.fancybox.showIframe=function(){J("#fancy_loading").hide();J("#fancy_frame").show()};J.fn.fancybox.showItem=function(B){J.fn.fancybox.preloadNeighborImages();var E=J.fn.fancybox.getViewport();var C=J.fn.fancybox.getMaxSize(E[0]-50,E[1]-100,K.itemArray[K.itemNum].o.frameWidth,K.itemArray[K.itemNum].o.frameHeight);var F=E[2]+Math.round((E[0]-C[0])/2)-20;var D=E[3]+Math.round((E[1]-C[1])/2)-40;var A={left:F,top:D,width:C[0]+"px",height:C[1]+"px"};if(K.active){J("#fancy_content").fadeOut("normal",function(){J("#fancy_content").empty();J("#fancy_outer").animate(A,"normal",function(){J("#fancy_content").append(J(B)).fadeIn("normal");J.fn.fancybox.updateDetails()})})}else{K.active=true;J("#fancy_content").empty();if(J("#fancy_content").is(":animated")){console.info("animated!")}if(K.itemArray[K.itemNum].o.zoomSpeedIn>0){K.animating=true;A.opacity="show";J("#fancy_outer").css({top:K.itemArray[K.itemNum].orig.pos.top-18,left:K.itemArray[K.itemNum].orig.pos.left-18,height:K.itemArray[K.itemNum].orig.height,width:K.itemArray[K.itemNum].orig.width});J("#fancy_content").append(J(B)).show();J("#fancy_outer").animate(A,K.itemArray[K.itemNum].o.zoomSpeedIn,function(){K.animating=false;J.fn.fancybox.updateDetails()})}else{J("#fancy_content").append(J(B)).show();J("#fancy_outer").css(A).show();J.fn.fancybox.updateDetails()}}};J.fn.fancybox.updateDetails=function(){J("#fancy_bg,#fancy_close").show();if(K.itemArray[K.itemNum].title!==undefined&&K.itemArray[K.itemNum].title!==""){J("#fancy_title div").html(K.itemArray[K.itemNum].title);J("#fancy_title").show()}if(K.itemArray[K.itemNum].o.hideOnContentClick){J("#fancy_content").click(J.fn.fancybox.close)}else{J("#fancy_content").unbind("click")}if(K.itemNum!=0){J("#fancy_nav").append('<a id="fancy_left" href="javascript:;"></a>');J("#fancy_left").click(function(){J.fn.fancybox.changeItem(K.itemNum-1);return false})}if(K.itemNum!=(K.itemArray.length-1)){J("#fancy_nav").append('<a id="fancy_right" href="javascript:;"></a>');J("#fancy_right").click(function(){J.fn.fancybox.changeItem(K.itemNum+1);return false})}J(document).keydown(function(A){if(A.keyCode==27){J.fn.fancybox.close()}else{if(A.keyCode==37&&K.itemNum!=0){J.fn.fancybox.changeItem(K.itemNum-1)}else{if(A.keyCode==39&&K.itemNum!=(K.itemArray.length-1)){J.fn.fancybox.changeItem(K.itemNum+1)}}}})};J.fn.fancybox.preloadNeighborImages=function(){if((K.itemArray.length-1)>K.itemNum){preloadNextImage=new Image();preloadNextImage.src=K.itemArray[K.itemNum+1].url}if(K.itemNum>0){preloadPrevImage=new Image();preloadPrevImage.src=K.itemArray[K.itemNum-1].url}};J.fn.fancybox.close=function(){if(K.animating){return false}J(L).unbind("load");J(document).unbind("keydown");J("#fancy_loading,#fancy_title,#fancy_close,#fancy_bg").hide();J("#fancy_nav").empty();K.active=false;if(K.itemArray[K.itemNum].o.zoomSpeedOut>0){var A={top:K.itemArray[K.itemNum].orig.pos.top-18,left:K.itemArray[K.itemNum].orig.pos.left-18,height:K.itemArray[K.itemNum].orig.height,width:K.itemArray[K.itemNum].orig.width,opacity:"hide"};K.animating=true;J("#fancy_outer").animate(A,K.itemArray[K.itemNum].o.zoomSpeedOut,function(){J("#fancy_content").hide().empty();J("#fancy_overlay,#fancy_bigIframe").remove();K.animating=false})}else{J("#fancy_outer").hide();J("#fancy_content").hide().empty();J("#fancy_overlay,#fancy_bigIframe").fadeOut("fast").remove()}};J.fn.fancybox.showLoading=function(){clearInterval(H);var A=J.fn.fancybox.getViewport();J("#fancy_loading").css({left:((A[0]-40)/2+A[2]),top:((A[1]-40)/2+A[3])}).show();J("#fancy_loading").bind("click",J.fn.fancybox.close);H=setInterval(J.fn.fancybox.animateLoading,66)};J.fn.fancybox.animateLoading=function(B,A){if(!J("#fancy_loading").is(":visible")){clearInterval(H);return }J("#fancy_loading > div").css("top",(I*-40)+"px");I=(I+1)%12};J.fn.fancybox.init=function(){if(!J("#fancy_wrap").length){J('<div id="fancy_wrap"><div id="fancy_loading"><div></div></div><div id="fancy_outer"><div id="fancy_inner"><div id="fancy_nav"></div><div id="fancy_close"></div><div id="fancy_content"></div><div id="fancy_title"></div></div></div></div>').appendTo("body");J('<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>').prependTo("#fancy_inner");J('<table cellspacing="0" cellpadding="0" border="0"><tr><td id="fancy_title_left"></td><td id="fancy_title_main"><div></div></td><td id="fancy_title_right"></td></tr></table>').appendTo("#fancy_title")}if(J.browser.msie){J("#fancy_inner").prepend('<iframe id="fancy_freeIframe" scrolling="no" frameborder="0"></iframe>')}if(jQuery.fn.pngFix){J(document).pngFix()}J("#fancy_close").click(J.fn.fancybox.close)};J.fn.fancybox.getPosition=function(B){var A=B.offset();A.top+=J.fn.fancybox.num(B,"paddingTop");A.top+=J.fn.fancybox.num(B,"borderTopWidth");A.left+=J.fn.fancybox.num(B,"paddingLeft");A.left+=J.fn.fancybox.num(B,"borderLeftWidth");return A};J.fn.fancybox.num=function(B,A){return parseInt(J.curCSS(B.jquery?B[0]:B,A,true))||0};J.fn.fancybox.getPageScroll=function(){var A,B;if(self.pageYOffset){B=self.pageYOffset;A=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){B=document.documentElement.scrollTop;A=document.documentElement.scrollLeft}else{if(document.body){B=document.body.scrollTop;A=document.body.scrollLeft}}}return[A,B]};J.fn.fancybox.getViewport=function(){var A=J.fn.fancybox.getPageScroll();return[J(window).width(),J(window).height(),A[0],A[1]]};J.fn.fancybox.getMaxSize=function(A,B,D,E){var C=Math.min(Math.min(A,D)/D,Math.min(B,E)/E);return[Math.round(C*D),Math.round(C*E)]};J.fn.fancybox.defaults={hideOnContentClick:false,zoomSpeedIn:500,zoomSpeedOut:500,frameWidth:600,frameHeight:400,overlayShow:false,overlayOpacity:0.4,itemLoadCallback:null}})(jQuery);var animatedcollapse={divholders:{},divgroups:{},lastactiveingroup:{},show:function(D){if(typeof D=="object"){for(var C=0;C<D.length;C++){this.showhide(D[C],"show")}}else{this.showhide(D,"show")}},hide:function(D){if(typeof D=="object"){for(var C=0;C<D.length;C++){this.showhide(D[C],"hide")}}else{this.showhide(D,"hide")}},toggle:function(B){this.showhide(B,"toggle")},addDiv:function(D,C){this.divholders[D]=({id:D,$divref:null,attrs:C});this.divholders[D].getAttr=function(A){var B=new RegExp(A+"=([^,]+)","i");return(B.test(this.attrs)&&parseInt(RegExp.$1)!=0)?RegExp.$1:null}},showhide:function(F,G){var E=this.divholders[F].$divref;if(this.divholders[F]&&E.length==1){var H=this.divgroups[E.attr("groupname")];if(E.attr("groupname")&&H.count>1&&(G=="show"||G=="toggle"&&E.css("display")=="none")){if(H.lastactivedivid&&H.lastactivedivid!=F){this.slideengine(H.lastactivedivid,"hide")}this.slideengine(F,"show");H.lastactivedivid=F}else{this.slideengine(F,G)}}},slideengine:function(F,G){var E=this.divholders[F].$divref;if(this.divholders[F]&&E.length==1){var H={height:G};if(E.attr("fade")){H.opacity=G}E.animate(H,E.attr("speed")?parseInt(E.attr("speed")):500);return false}},generatemap:function(){var D={};for(var C=0;C<arguments.length;C++){if(arguments[C][1]!=null){D[arguments[C][0]]=arguments[C][1]}}return D},init:function(){var B=this;jQuery(document).ready(function(G){var J=B.getCookie("acopendivids");var H=B.getCookie("acgroupswithpersist");if(J!=null){J=(J=="nada")?[]:J.split(",")}H=(H==null||H=="nada")?[]:H.split(",");jQuery.each(B.divholders,function(){this.$divref=G("#"+this.id);if((this.getAttr("persist")||jQuery.inArray(this.getAttr("group"),H)!=-1)&&J!=null){var C=(jQuery.inArray(this.id,J)!=-1)?"block":"none"}else{var C=this.getAttr("hide")?"none":null}this.$divref.css(B.generatemap(["height",this.getAttr("height")],["display",C]));this.$divref.attr(B.generatemap(["groupname",this.getAttr("group")],["fade",this.getAttr("fade")],["speed",this.getAttr("speed")]));if(this.getAttr("group")){var D=B.divgroups[this.getAttr("group")]||(B.divgroups[this.getAttr("group")]={});D.count=(D.count||0)+1;if(!D.lastactivedivid&&this.$divref.css("display")!="none"||C=="block"){D.lastactivedivid=this.id}this.$divref.css({display:"none"})}});jQuery.each(B.divgroups,function(){if(this.lastactivedivid){B.divholders[this.lastactivedivid].$divref.show()}});var I=G("*[rel]").filter('[@rel^="collapse-"], [@rel^="expand-"], [@rel^="toggle-"]');var A=/(collapse-)|(expand-)|(toggle-)/;I.each(function(){G(this).click(function(){var E=this.getAttribute("rel");var C=E.replace(A,"");var D=(E.indexOf("collapse-")!=-1)?"hide":(E.indexOf("expand-")!=-1)?"show":"toggle";return B.showhide(C,D)})});G(window).bind("unload",function(){B.uninit()})})},uninit:function(){var D="",C="";jQuery.each(this.divholders,function(){if(this.$divref.css("display")!="none"){D+=this.id+","}if(this.getAttr("group")&&this.getAttr("persist")){C+=this.getAttr("group")+","}});D=(D=="")?"nada":D.replace(/,$/,"");C=(C=="")?"nada":C.replace(/,$/,"");this.setCookie("acopendivids",D);this.setCookie("acgroupswithpersist",C)},getCookie:function(C){var D=new RegExp(C+"=[^;]*","i");if(document.cookie.match(D)){return document.cookie.match(D)[0].split("=")[1]}return null},setCookie:function(H,G,F){if(typeof F!="undefined"){var E=new Date();E.setDate(E.getDate()+F);document.cookie=H+"="+G+"; path=/; expires="+E.toGMTString()}else{document.cookie=H+"="+G+"; path=/"}}};$(document).ready(function(){var B=$("#services-web").height();var A=$("#services-print").height();if(A>B){$("#services-web").height(A)}else{$("#services-print").height(B)}});easing="Quad";function loadEasing(A){location.href="/index.php"+A}function setEasing(A){loadLamps(A)}function loadLamps(A){$("#main_nav").lavaLamp({fx:"easeOut"+A,speed:400,click:function(){return true}})}$(function(){loadLamps("Quad");$(".easingLabel").text(easing)});$(document).ready(function(){$(".active").fadeTo("slow",0);$(".active").hover(function(){$(this).fadeTo("slow",1)},function(){$(this).fadeTo("slow",0)})});$(document).ready(function(){$(".staff a,#content a").fancybox()});$(".port-navs li a").click(function(){$("a.clicked").removeClass("clicked");$(this).addClass("clicked");return false});animatedcollapse.addDiv("drupal","fade=0,speed=400,group=web,hide=1");animatedcollapse.addDiv("joomla","fade=0,speed=400,group=web,hide=1");animatedcollapse.addDiv("wordpress","fade=0,speed=400,group=web,hide=1");animatedcollapse.addDiv("zencart","fade=0,speed=400,group=web,hide=1");animatedcollapse.addDiv("oscommerce","fade=0,speed=400,group=web,hide=1");animatedcollapse.addDiv("valid","fade=0,speed=400,group=web,hide=1");animatedcollapse.addDiv("php","fade=0,speed=400,group=web,hide=1");animatedcollapse.init();
