(function(A){A.fn.shake=function(B){return this.each(function(){A(this).animate({marginLeft:"10px"},50);A(this).animate({marginLeft:"0px"},50);A(this).animate({marginLeft:"5px"},80);A(this).animate({marginLeft:"0px"},120)})}})(jQuery);(function(A){A.fn.vCenter=function(B){B=A.extend({offsetX:0,offsetY:0,maxTop:0},B);var C={sTop:function(){return window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop},wHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body.clientHeight}};return this.each(function(E){if(E==0){var F=$(this);var D=F.height();var G=C.sTop()+(C.wHeight()/2)-(D/2);if(B.maxTop&&G>B.maxTop){G=B.maxTop}F.css({position:"absolute",marginTop:"0",top:G+"px"})}})}})(jQuery);jQuery.mouseTrap={};jQuery.mouseTrap.house={};jQuery.mouseTrap.track=function(A,B){B=jQuery.extend({debug:false},B);jQuery().unbind("mousemove");clearTimeout($.mouseTrap.egg);if(A){jQuery().mousemove(function(C){jQuery.mouseTrap.mouseX=C.pageX;jQuery.mouseTrap.mouseY=C.pageY});jQuery.mouseTrap.egg=setTimeout("jQuery.mouseTrap.check({debug:"+B.debug+"});",500)}};jQuery.mouseTrap.hold=function(A,B){if(B=="off"){jQuery.mouseTrap.house[A].hangon=false;return }else{for(key in jQuery.mouseTrap.house){mt=jQuery.mouseTrap.house[key];if(key==A){mt.hangon=true}else{mt.hangon=false}}}return };jQuery.mouseTrap.set=function(B,A){A=jQuery.extend({action:function(){alert("action not set for mousetrap!")},hangon:false,destroy:false},A);if(A.destroy){delete jQuery.mouseTrap.house[B]}else{jQuery.mouseTrap.house[B]=new Object();jQuery.mouseTrap.house[B].action=A.action;jQuery.mouseTrap.house[B].hangon=A.hangon;jQuery.mouseTrap.house[B].map=new Object();return B}};(function(A){A.fn.mouseMap=function(D,C,B){if(typeof (D)=="undefined"||D==""){D="kitchen"}if(typeof (C)=="undefined"||C==""){C=this.id}B=A.extend({debug:false,release:false,pad:20,relativeContainer:null},B);A.mouseTrap.house[D].map[C]=new Array();return this.each(function(){if(B.release){delete A.mouseTrap.house[D].map[C]}var E=A(this).offset();E.right=(E.left+B.pad)+A(this).width();E.bottom=(E.top+B.pad)+A(this).height();E.left-=B.pad;E.top-=B.pad;A.mouseTrap.house[D].map[C]=E;if(B.debug){A.trace("Mapped as T:"+E.top+" B:"+E.bottom+" L:"+E.left+" R:"+E.right)}})}})(jQuery);jQuery.mouseTrap.check=function(C){C=jQuery.extend({debug:false,relativeContainer:null},C);var B=false;var A=jQuery.mouseTrap;for(key in jQuery.mouseTrap.house){mt=jQuery.mouseTrap.house[key];mt.inRange=false;if(C.debug){console.log(key+".hangon="+mt.hangon)}if(mt.hangon){B=true;continue}for(key in mt.map){if(C.debug){$.trace(key+"TEST (Y:"+A.mouseY+"|X:"+A.mouseX+") in t:"+mt.map[key].top+",b:"+mt.map[key].bottom+",l:"+parseInt(mt.map[key].left)+",r:"+parseInt(mt.map[key].right))}if(A.mouseY<mt.map[key].top||A.mouseY>mt.map[key].bottom){continue}if(A.mouseX<mt.map[key].left||A.mouseX>mt.map[key].right){continue}if(C.debug){console.log(key+"-Pointer in "+key)}B=true;mt.inRange=true}if(!mt.inRange){mt.action()}continue}if(C.debug){if(B){console.log("reset timer")}}if(B){jQuery.mouseTrap.egg=setTimeout("jQuery.mouseTrap.check();",1000)}};(function(A){A.fn.formulate=function(B){B=jQuery.extend({submitBtnSelector:".x_submit",callbacks:"",ap:".x_submit",offset:{offsetX:0,offsetY:0},formid:A(this).attr("id"),scall:false,errLoc:"before",createErrSpans:true,autoLabelFor:true,instant:true},B);return this.each(function(){obj=A(this);if(B.createErrSpans||B.autoLabelFor){lbl=obj.find("label").each(function(){if(B.createErrSpans){A(this).append("<span class='vd_error'></span>")}if(B.autoLabelFor){if(B.errLoc=="before"){elem=A(this).nextAll("[name]:first")}if(B.errLoc=="after"){elem=A(this).prevAll("[name]:first")}var C=elem.attr("name");elem.attr("id",C);A(this).attr("for",C)}})}obj.find(B.submitBtnSelector).click(function(){if(xajax.wait){return false}A("#"+B.formid).find(".vd_error").html("");if(B.scall){xajax.scall("validateForm",[xajax.getFormValues(B.formid),B.callbacks,B.formid,B.errLoc],{ap:B.ap,offset:B.offset,instant:B.instant})}else{xajax.lcall("validateForm",[xajax.getFormValues(B.formid),B.callbacks,B.formid,B.errLoc],{ap:B.ap,offset:B.offset,instant:B.instant})}return false});first=obj.find("input:first");first.focus();first.select();obj.find("input").keydown(function(C){if(C.keyCode==13){A(this).parents("form").find(B.submitBtnSelector).click();return false}})})}})(jQuery);(function(A){A.fn.fadeLater=function(){return this.each(function(){A(this).fadeIn(100);A(this).fadeTo(2000,1);A(this).fadeOut()})}})(jQuery);(function(A){A.fn.placeRight=function(C,B){B=jQuery.extend({offsetX:0,offsetY:0},B);return this.each(function(){loc=A(C).offset();if(!loc){alert("Could not select PlaceRight:sel="+C)}B.offsetX+=A(C).outerWidth()+B.offsetX;A(C).width()+B.offsetX;A(this).placer(C,B)})}})(jQuery);(function(A){A.fn.placer=function(C,B){B=A.extend({offsetX:0,offsetY:0,relativeContainer:null,where:"top-left",debug:false},B);return this.each(function(){box=A(this);anchor=A(C);if(!anchor){alert("Could not select PlaceRel:sel="+C)}if(!B.relativeContainer){B.relativeContainer=anchor.offsetParent()}var D=anchor.position();D.rleft=D.left;D.rtop=D.top;D.height=anchor.height();D.width=anchor.width();D.zdex=parseInt(anchor.css("z-index"));box.appendTo(B.relativeContainer);switch(B.where){case"top-left":t=D.rtop+B.offsetY+"px";l=D.rleft+B.offsetX+"px";break;case"top-right":t=D.rtop+B.offsetY+"px";l=D.rleft+D.width+B.offsetX+"px";break;case"bottom-left":t=D.rtop+D.height+B.offsetY+"px";l=D.rleft+B.offsetX+"px";break;case"bottom-right":t=D.rtop+D.height+B.offsetY+"px";l=D.rleft+D.width+B.offsetX+"px";break;case"off-left":t=D.rtop+B.offsetY+"px";l=D.rleft+B.offsetX-box.outerWidth()+"px";break;case"above":t=D.rtop-box.outerHeight()+B.offsetY+"px";l=D.rleft+B.offsetX+"px";break;case"above-off-left":t=D.rtop-box.outerHeight()+B.offsetY+"px";l=D.rleft+B.offsetX-box.outerWidth()+"px";break}if(!box.zdex){zdex=10}if(B.debug){A.trace(l+"-"+t+" in #"+A(B.relativeContainer).attr("id")+":."+A(B.relativeContainer).attr("className"))}box.css({position:"absolute",top:t,left:l,zIndex:zdex})})}})(jQuery);jQuery.curtainCall=[];jQuery.curtainCall["nextID"]=1;(function(A){jQuery.fn.curtainCall=function(C){C=jQuery.extend({mode:"close",openSpeed:1000,closeSpeed:500,stageSel:"#content",effect:"panel",idPrepend:"curt",relativeContainer:null,offsetY:20,zdex:10,recycle:true,opacity:1,paddingLR:40,curtainClass:"shadowbox",justDoIt:false,closeCallback:function(E){var D=A(E).attr("href");rlink=D.substr(D.indexOf("#/")+1,D.length);stage.html("");window.location=rlink},openCallback:function(D){D.remove()}},C);stage=A(C.stageSel);if(!C.relativeContainer){C.relativeContainer=stage.offsetParent()}var B=function(D){switch(C.effect){case"panel":if(!C.recycle){jQuery.curtainCall["nextID"]++}curtain=A("#"+C.idPrepend+jQuery.curtainCall["nextID"]);if(curtain.length==0){curtain=jQuery(jQuery("<div class='"+C.curtainClass+"' id='"+C.idPrepend+jQuery.curtainCall["nextID"]+"'></div>").prependTo(C.relativeContainer).get(0));curtain.css("z-index",C.zdex).css("top",stage.offset().top+C.offsetY).css("left",stage.offset().left-C.paddingLR/2).width(stage.outerWidth()+C.paddingLR).height(stage.outerHeight()-C.offsetY);if(C.mode=="open"){if(A.browser.msie){curtain.css("filter","alpha(opacity='100')")}else{curtain.css("opacity",1)}}if(C.mode=="close"){if(A.browser.msie){curtain.css("filter","alpha(opacity=0)")}else{curtain.css("opacity",0)}}}if(C.mode=="close"){curtain.fadeTo(C.closeSpeed,C.opacity,function(){C.closeCallback(D)})}if(C.mode=="open"){curtain.fadeTo(1,C.opacity).fadeTo(C.openSpeed,0,function(){C.openCallback(curtain)})}break}return false};if(C.justDoIt){B(this);return false}return this.each(function(){lnk=A(this);lnk.click(function(){B(this);return false}).focus(function(){if(this.blur){this.blur()}return false})})}})(jQuery);(function(A){A.fn.jaxify=function(B){B=jQuery.extend({whereID:"content",jsCallback:"/_js/rejax.js.tpl",navContainerSel:".mainnav"},B);return this.each(function(){var C=this.href.indexOf("/",10);var D=this.href.substring(C);hash="#"+D;this.href=hash;A(this).removeClass("jax").click(function(H){if(H.clientX){A.ajaxHistory.supress=true}if(!xajax.wait){var F=B.whereID;xajax.wait=true;var G=A(this).attr("href");rlink=G.substr(G.indexOf("#/")+1,G.length);var E=A(this).attr("class").split(" ");if(E.length){for(loop=0;loop<E.length;loop++){if(E[loop].indexOf("xt_")==0){F=E[loop].substr(3)}}}if(A(this).parents(B.navContainerSel).length>0||A(this).hasClass("x_menu")){mcl=A.lastClass(this);A.horizMenuSelect(mcl,B.navContainerSel)}xajax.lcall("servUp",[rlink,F,B.jsCallback])}return true}).focus(function(){if(this.blur){this.blur()}return false})})}})(jQuery);jQuery.shadowBox={};jQuery.shadowBox["nextID"]=0;(function(A){jQuery.fn.shadowBox=function(E){E=jQuery.extend({offsetX:0,offsetY:0,pad:10,speed:600,opacity:0.8,flyFrom:{x:0,y:0},idPrepend:"shad_",relativeContainer:null,destoryOthers:false,effect:"normal"},E);var B;var F;if(E.destoryOthers){for(var C=1;C<=A.shadowBox["nextID"];C++){A("#"+E.idPrepend+C).remove()}A.shadowBox["nextID"]=0}return this.each(function(){F=A(this);A("#"+this.shadowID).remove();A("#"+E.idPrepend+(A.shadowBox["nextID"]+1)).remove();if(!E.relativeContainer){E.relativeContainer=F.offsetParent()}A.shadowBox["nextID"]++;B=A(A("<div class='shadowbox' id='"+E.idPrepend+A.shadowBox["nextID"]+"'></div>").prependTo(E.relativeContainer).get(0));this.shadowID=E.idPrepend+A.shadowBox["nextID"];relbox=A(E.relativeContainer).offset();loc.rleft=loc.left-relbox.left;loc.rtop=loc.top-relbox.top;loc.height=F.height();loc.width=F.width();loc.zdex=parseInt(F.css("z-index"));F.css({visibility:"hidden"});F.fadeIn(E.speed);F.queue(function(){D();F.dequeue()});B.fadeTo(10,E.opacity);B.css("z-index",loc.zdex-1);if(E.flyFrom.x&&E.flyFrom.y){B.placer(E.flyFrom.x,E.flyFrom.y)}else{B.placer(loc.rleft+loc.width/2,loc.rtop+loc.height/2)}switch(E.effect){case"cartesian":B.animate({height:loc.height+(E.pad*2)+"px"},{queue:true,duration:E.speed}).animate({width:loc.width+(E.pad*2)+"px"},{queue:true,duration:E.speed}).animate({top:loc.rtop+E.offsetY-(E.pad)+"px"},{queue:false,duration:E.speed}).animate({left:loc.rleft+E.offsetX-(E.pad)+"px"},{queue:false,duration:E.speed});break;default:A("#footer").append(" ");B.animate({height:loc.height+(E.pad*2)+"px"},{queue:false,duration:E.speed}).animate({width:loc.width+(E.pad*2)+"px"},{queue:false,duration:E.speed}).animate({top:loc.rtop+E.offsetY-(E.pad)+"px"},{queue:false,duration:E.speed}).animate({left:loc.rleft+E.offsetX-(E.pad)+"px"},{queue:false,duration:E.speed});break}});function D(){F.css("visibility","visible")}}})(jQuery);jQuery.shadowBox.cleanup=function(D){D=jQuery.extend({idPrepend:"shad_",keep:null},D);var A;var C;for(var B=1;B<=jQuery.shadowBox["nextID"];B++){if(D.keep){jQuery(D.keep).each(function(){if(this.shadowID==D.idPrepend+B){A=true}})}if(!A){jQuery("#"+D.idPrepend+B).remove()}else{A=false;C=false}}if(C){jQuery.shadowBox["nextID"]=0}};jQuery.lastClass=function(B){var A=$(B).attr("class").split(" ");return A[A.length-1]};jQuery.horizMenuSelect=function(A,D){var C=$(D).find("a[@class$='_selected']")[0];if(C){var B=jQuery.lastClass(C);if(B==A+"_selected"){return false}$(C).addClass(B.substr(0,B.indexOf("_selected"))).removeClass(B)}$("."+A).addClass(A+"_selected").removeClass(A)};jQuery.repound=function(F){var E=location.hash;if(!F){F=[]}var D=window.location.href;if(E.length){var B=D.indexOf(E)}else{var B=D.length}var A=D.indexOf("/",7);var C=D.substring(A,B);var G=D.substring(0,A);if(C.length>1){if(F.indexOf(C)<0){newurl=G+"/#"+C;$("body").append("<form name='redir' action='"+newurl+"' method='POST'><input type='hidden' name='loadpage' value='"+C+"'></form>");document.redir.submit()}}else{$("body").append("<a href='"+E.substring(2,E.length)+"' class='jax'></a>")}};jQuery.trace=function(A,B){if(B==undefined){B="body"}$(B).append(A+"<br>");return A};$.pratt={};$.pratt.store=[];$.pratt.store["panelOffset"]=25;$.pratt.panelControl=function(){$(".x_pm").fadeOut();me=$(this);me.unbind("mouseover").queue(function(){xframe.height(me.outerHeight());$(this).dequeue()}).animate({bottom:0+"px"},{queue:true,duration:300}).queue(function(){var A={action:function(){me.animate({bottom:-ppan.height()+jQuery.pratt.store["panelOffset"]+"px"},{queue:true,duration:300}).queue(function(){xframe.height(jQuery.pratt.store["panelOffset"]+3);$(".x_pm").fadeIn("fast");$(this).dequeue()}).mouseover(jQuery.pratt.panelControl)}};$.mouseTrap.set("panelTrap",A);me.mouseMap("panelTrap","bottomPane");$.mouseTrap.track(true);$(this).dequeue()});return false};jQuery.pratt.ppanel=function(A){ppan=$(".panel_people");ppan.wrap("<div class='abs x_frame'></div>");xframe=$(".x_frame");xframe.width(ppan.outerWidth()).height(jQuery.pratt.store["panelOffset"]+3).css("bottom",ppan.css("bottom")).css("overflow","hidden").css("z-index",9);if(A=="up"){$(".x_pm").hide();ppan.css("bottom",-ppan.height()+jQuery.pratt.store["panelOffset"]+"px").queue(function(){xframe.height(ppan.outerHeight());$(this).dequeue()}).animate({bottom:0+"px"},{queue:false,duration:600})}else{ppan.css("bottom",-ppan.height()+jQuery.pratt.store["panelOffset"]+"px").mouseover(jQuery.pratt.panelControl)}};jQuery.pratt.showPage=function(A){$("#work_content").fadeTo(400,0).fadeTo(1000,0,function(){xajax.lcall("servUp",["/work/"+A,"work_content","",{"fadeIn":600}])})}