$(document).ready(function(){$.localScroll.defaults.axis="xy";$.localScroll({target:"#content",queue:true,margin:true,duration:1000});$.easing.elasout=function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e}});$(document).ready(function(){$("a.work-items").fancybox()});(function(d){var a=location.href.replace(/#.*/,"");var c=d.localScroll=function(e){d("body").localScroll(e)};c.defaults={duration:1000,axis:"y",event:"click",stop:true,target:window,reset:true};c.hash=function(f){if(location.hash){f=d.extend({},c.defaults,f);f.hash=false;if(f.reset){var g=f.duration;delete f.duration;d(f.target).scrollTo(0,f);f.duration=g}b(0,location,f)}};d.fn.localScroll=function(e){e=d.extend({},c.defaults,e);return e.lazy?this.bind(e.event,function(g){var h=d([g.target,g.target.parentNode]).filter(f)[0];if(h){b(g,h,e)}}):this.find("a,area").filter(f).bind(e.event,function(g){b(g,this,e)}).end().end();function f(){return !!this.href&&!!this.hash&&this.href.replace(this.hash,"")==a&&(!e.filter||d(this).is(e.filter))}};function b(i,p,g){var q=p.hash.slice(1),o=document.getElementById(q)||document.getElementsByName(q)[0];if(!o){return}if(i){i.preventDefault()}var n=d(g.target);if(g.lock&&n.is(":animated")||g.onBefore&&g.onBefore.call(g,i,o,n)===false){return}if(g.stop){n.stop(true)}if(g.hash){var m=o.id==q?"id":"name",l=d("<a> </a>").attr(m,q).css({position:"absolute",top:d(window).scrollTop(),left:d(window).scrollLeft()});o[m]="";d("body").prepend(l);location=p.hash;l.remove();o[m]=q}n.scrollTo(o,g).trigger("notify.serialScroll",[o])}})(jQuery);(function(b){var a=b.scrollTo=function(d,e,g){b(window).scrollTo(d,e,g)};a.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};a.window=function(d){return b(window).scrollable()};b.fn.scrollable=function(){return this.map(function(){var d=this,e=!d.nodeName||b.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!e){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return b.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};b.fn.scrollTo=function(e,f,d){if(typeof f=="object"){d=f;f=0}if(typeof d=="function"){d={onAfter:d}}if(e=="max"){e=9000000000}d=b.extend({},a.defaults,d);f=f||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){f/=2}d.offset=c(d.offset);d.over=c(d.over);return this.scrollable().each(function(){var h=this,s=b(h),r=e,n,l={},m=s.is("html,body");switch(typeof r){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(r)){r=c(r);break}r=b(r,this);case"object":if(r.is||r.style){n=(r=b(r)).offset()}}b.each(d.axis.split(""),function(g,p){var t=p=="x"?"Left":"Top",k=t.toLowerCase(),u="scroll"+t,q=h[u],o=p=="x"?"Width":"Height";if(n){l[u]=n[k]+(m?0:q-s.offset()[k]);if(d.margin){l[u]-=parseInt(r.css("margin"+t))||0;l[u]-=parseInt(r.css("border"+t+"Width"))||0}l[u]+=d.offset[k]||0;if(d.over[k]){l[u]+=r[o.toLowerCase()]()*d.over[k]}}else{l[u]=r[k]}if(/^\d+$/.test(l[u])){l[u]=l[u]<=0?0:Math.min(l[u],i(o))}if(!g&&d.queue){if(q!=l[u]){j(d.onAfterFirst)}delete l[u]}});j(d.onAfter);function j(g){s.animate(l,f,d.easing,g&&function(){g.call(this,e,d)})}function i(g){var o="scroll"+g;if(!m){return h[o]}var p="client"+g,k=h.ownerDocument.documentElement,q=h.ownerDocument.body;return Math.max(k[o],q[o])-Math.min(k[p],q[p])}}).end()};function c(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);this.vtip=function(){this.xOffset=-10;this.yOffset=40;$(".vtip").unbind().hover(function(b){this.t=this.title;this.title="";this.top=(b.pageY+yOffset);this.left=(b.pageX+xOffset);$("body").append('<p id="vtip"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","images/vtip_arrow.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("slow")},function(){this.title=this.t;$("p#vtip").fadeOut("slow").remove()}).mousemove(function(b){this.top=(b.pageY+yOffset);this.left=(b.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};jQuery(document).ready(function(b){vtip()});