window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})((function(){try{console.log();return window.console}catch(a){return window.console={}}})());(function(e){function b(p,c,g){var o=this,f=p.add(this),n=p.find(g.tabs),m=c.jquery?c:p.children(c),k;n.length||(n=p.children());m.length||(m=p.parent().find(c));m.length||(m=e(c));e.extend(this,{click:function(j,i){var h=n.eq(j);if(typeof j=="string"&&j.replace("#","")){h=n.filter("[href*="+j.replace("#","")+"]");j=Math.max(n.index(h),0)}if(g.rotate){var l=n.length-1;if(j<0){return o.click(l,i)}if(j>l){return o.click(0,i)}}if(!h.length){if(k>=0){return o}j=g.initialIndex;h=n.eq(j)}if(j===k){return o}i=i||e.Event();i.type="onBeforeClick";f.trigger(i,[j]);if(!i.isDefaultPrevented()){d[g.effect].call(o,j,function(){i.type="onClick";f.trigger(i,[j])});k=j;n.removeClass(g.current);h.addClass(g.current);return o}},getConf:function(){return g},getTabs:function(){return n},getPanes:function(){return m},getCurrentPane:function(){return m.eq(k)},getCurrentTab:function(){return n.eq(k)},getIndex:function(){return k},next:function(){return o.click(k+1)},prev:function(){return o.click(k-1)},destroy:function(){n.unbind(g.event).removeClass(g.current);m.find("a[href^=#]").unbind("click.T");return o}});e.each("onBeforeClick,onClick".split(","),function(i,h){e.isFunction(g[h])&&e(o).bind(h,g[h]);o[h]=function(j){j&&e(o).bind(h,j);return o}});if(g.history&&e.fn.history){e.tools.history.init(n);g.event="history"}n.each(function(h){e(this).bind(g.event,function(i){o.click(h,i);return i.preventDefault()})});m.find("a[href^=#]").bind("click.T",function(h){o.click(e(this).attr("href"),h)});if(location.hash&&g.tabs=="a"&&p.find("[href="+location.hash+"]").length){o.click(location.hash)}else{if(g.initialIndex===0||g.initialIndex>0){o.click(g.initialIndex)}}}e.tools=e.tools||{version:"1.2.5"};e.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(f,c){d[f]=c}};var d={"default":function(f,c){this.getPanes().hide().eq(f).show();c.call()},fade:function(i,c){var g=this.getConf(),h=g.fadeOutSpeed,f=this.getPanes();h?f.fadeOut(h):f.hide();f.eq(i).fadeIn(g.fadeInSpeed,c)},slide:function(f,c){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,c)},ajax:function(f,c){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),c)}},a;e.tools.tabs.addEffect("horizontal",function(f,c){a||(a=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){e(this).hide()});this.getPanes().eq(f).animate({width:a},function(){e(this).show();c.call()})});e.fn.tabs=function(g,c){var f=this.data("tabs");if(f){f.destroy();this.removeData("tabs")}if(e.isFunction(c)){c={onBeforeClick:c}}c=e.extend({},e.tools.tabs.conf,c);this.each(function(){f=new b(e(this),g,c);e(this).data("tabs",f)});return c.api?f:this}})(jQuery);(function(b){function c(f,e,n){var l=n.relative?f.position().top:f.offset().top,m=n.relative?f.position().left:f.offset().left,k=n.position[0];l-=e.outerHeight()-n.offset[0];m+=f.outerWidth()+n.offset[1];if(/iPad/i.test(navigator.userAgent)){l-=b(window).scrollTop()}var g=e.outerHeight()+f.outerHeight();if(k=="center"){l+=g/2}if(k=="bottom"){l+=g}k=n.position[1];f=e.outerWidth()+f.outerWidth();if(k=="center"){m-=f/2}if(k=="left"){m-=f}return{top:l,left:m}}function a(A,z){var y=this,w=A.add(y),x,u=0,p=0,g=A.attr("title"),f=A.attr("data-tooltip"),e=d[z.effect],n,D=A.is(":input"),B=D&&A.is(":checkbox, :radio, select, :button, :submit"),C=A.attr("type"),o=z.events[C]||z.events[D?B?"widget":"input":"def"];
if(!e){throw'Nonexistent effect "'+z.effect+'"'}o=o.split(/,\s*/);if(o.length!=2){throw"Tooltip: bad events configuration for "+C}A.bind(o[0],function(h){clearTimeout(u);if(z.predelay){p=setTimeout(function(){y.show(h)},z.predelay)}else{y.show(h)}}).bind(o[1],function(h){clearTimeout(p);if(z.delay){u=setTimeout(function(){y.hide(h)},z.delay)}else{y.hide(h)}});if(g&&z.cancelDefault){A.removeAttr("title");A.data("title",g)}b.extend(y,{show:function(i){if(!x){if(f){x=b(f)}else{if(z.tip){x=b(z.tip).eq(0)}else{if(g){x=b(z.layout).addClass(z.tipClass).appendTo(document.body).hide().append(g)}else{x=A.next();x.length||(x=A.parent().next())}}}if(!x.length){throw"Cannot find tooltip for "+A}}if(y.isShown()){return y}x.stop(true,true);var h=c(A,x,z);z.tip&&x.html(A.data("title"));i=i||b.Event();i.type="onBeforeShow";w.trigger(i,[h]);if(i.isDefaultPrevented()){return y}h=c(A,x,z);x.css({position:"absolute",top:h.top,left:h.left});n=true;e[0].call(y,function(){i.type="onShow";n="full";w.trigger(i)});h=z.events.tooltip.split(/,\s*/);if(!x.data("__set")){x.bind(h[0],function(){clearTimeout(u);clearTimeout(p)});h[1]&&!A.is("input:not(:checkbox, :radio), textarea")&&x.bind(h[1],function(j){j.relatedTarget!=A[0]&&A.trigger(o[1].split(" ")[0])});x.data("__set",true)}return y},hide:function(h){if(!x||!y.isShown()){return y}h=h||b.Event();h.type="onBeforeHide";w.trigger(h);if(!h.isDefaultPrevented()){n=false;d[z.effect][1].call(y,function(){h.type="onHide";w.trigger(h)});return y}},isShown:function(h){return h?n=="full":n},getConf:function(){return z},getTip:function(){return x},getTrigger:function(){return A}});b.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(i,h){b.isFunction(z[h])&&b(y).bind(h,z[h]);y[h]=function(j){j&&b(y).bind(h,j);return y}})}b.tools=b.tools||{version:"1.2.5"};b.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(f,e,g){d[f]=[e,g]}};var d={toggle:[function(f){var e=this.getConf(),g=this.getTip();e=e.opacity;e<1&&g.css({opacity:e});g.show();f.call()},function(e){this.getTip().hide();e.call()}],fade:[function(f){var e=this.getConf();this.getTip().fadeTo(e.fadeInSpeed,e.opacity,f)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};b.fn.tooltip=function(f){var e=this.data("tooltip");if(e){return e}f=b.extend(true,{},b.tools.tooltip.conf,f);if(typeof f.position=="string"){f.position=f.position.split(/,?\s/)}this.each(function(){e=new a(b(this),f);b(this).data("tooltip",e)});return f.api?e:this}})(jQuery);(function(b){function c(u,w){var v=this,r=u.add(v),h=b(window),q,t,l,s=b.tools.expose&&(w.mask||w.expose),i=Math.random().toString().slice(10);if(s){if(typeof s=="string"){s={color:s}}s.closeOnClick=s.closeOnEsc=false}var a=w.target||u.attr("rel");t=a?b(a):u;if(!t.length){throw"Could not find Overlay: "+a}u&&u.index(t)==-1&&u.click(function(f){v.load(f);return f.preventDefault()});b.extend(v,{load:function(n){if(v.isOpened()){return v}var k=e[w.effect];if(!k){throw'Overlay: cannot find effect : "'+w.effect+'"'}w.oneInstance&&b.each(d,function(){this.close(n)});n=n||b.Event();n.type="onBeforeLoad";r.trigger(n);if(n.isDefaultPrevented()){return v}l=true;s&&b(t).expose(s);var j=w.top,m=w.left,g=t.outerWidth({margin:true}),f=t.outerHeight({margin:true});if(typeof j=="string"){j=j=="center"?Math.max((h.height()-f)/2,0):parseInt(j,10)/100*h.height()}if(m=="center"){m=Math.max((h.width()-g)/2,0)}k[0].call(v,{top:j,left:m},function(){if(l){n.type="onLoad";r.trigger(n)}});s&&w.closeOnClick&&b.mask.getMask().one("click",v.close);w.closeOnClick&&b(document).bind("click."+i,function(o){b(o.target).parents(t).length||v.close(o)});w.closeOnEsc&&b(document).bind("keydown."+i,function(o){o.keyCode==27&&v.close(o)});
return v},close:function(f){if(!v.isOpened()){return v}f=f||b.Event();f.type="onBeforeClose";r.trigger(f);if(!f.isDefaultPrevented()){l=false;e[w.effect][1].call(v,function(){f.type="onClose";r.trigger(f)});b(document).unbind("click."+i).unbind("keydown."+i);s&&b.mask.close();return v}},getOverlay:function(){return t},getTrigger:function(){return u},getClosers:function(){return q},isOpened:function(){return l},getConf:function(){return w}});b.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(g,f){b.isFunction(w[f])&&b(v).bind(f,w[f]);v[f]=function(j){j&&b(v).bind(f,j);return v}});q=t.find(w.close||".close");if(!q.length&&!w.close){q=b('<a class="close"></a>');t.prepend(q)}q.click(function(f){v.close(f)});w.load&&v.load()}b.tools=b.tools||{version:"1.2.5"};b.tools.overlay={addEffect:function(f,a,g){e[f]=[a,g]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!b.browser.msie||b.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var d=[],e={};b.tools.overlay.addEffect("default",function(g,a){var h=this.getConf(),f=b(window);if(!h.fixed){g.top+=f.scrollTop();g.left+=f.scrollLeft()}g.position=h.fixed?"fixed":"absolute";this.getOverlay().css(g).fadeIn(h.speed,a)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});b.fn.overlay=function(f){var a=this.data("overlay");if(a){return a}if(b.isFunction(f)){f={onBeforeLoad:f}}f=b.extend(true,{},b.tools.overlay.conf,f);this.each(function(){a=new c(b(this),f);d.push(a);b(this).data("overlay",a)});return f.api?a:this}})(jQuery);(function(d){function c(g,h){var e=d(h);return e.length<2?e:g.parent().find(h)}function b(v,w){var x=this,i=v.add(x),u=v.children(),p=0,r=w.vertical;a||(a=x);if(u.length>1){u=d(w.items,v)}d.extend(x,{getConf:function(){return w},getIndex:function(){return p},getSize:function(){return x.getItems().size()},getNaviButtons:function(){return h.add(e)},getRoot:function(){return v},getItemWrap:function(){return u},getItems:function(){return u.children(w.item).not("."+w.clonedClass)},move:function(f,g){return x.seekTo(p+f,g)},next:function(f){return x.move(1,f)},prev:function(f){return x.move(-1,f)},begin:function(f){return x.seekTo(0,f)},end:function(f){return x.seekTo(x.getSize()-1,f)},focus:function(){return a=x},addItem:function(f){f=d(f);if(w.circular){u.children("."+w.clonedClass+":last").before(f);u.children("."+w.clonedClass+":first").replaceWith(f.clone().addClass(w.clonedClass))}else{u.append(f)}i.trigger("onAddItem",[f]);return x},seekTo:function(f,m,j){f.jquery||(f*=1);if(w.circular&&f===0&&p==-1&&m!==0){return x}if(!w.circular&&f<0||f>x.getSize()||f<-1){return x}var g=f;if(f.jquery){f=x.getItems().index(f)}else{g=x.getItems().eq(f)}var l=d.Event("onBeforeSeek");if(!j){i.trigger(l,[f,m]);if(l.isDefaultPrevented()||!g.length){return x}}g=r?{top:-g.position().top}:{left:-g.position().left};p=f;a=x;if(m===undefined){m=w.speed}u.animate(g,m,w.easing,j||function(){i.trigger("onSeek",[f])});return x}});d.each(["onBeforeSeek","onSeek","onAddItem"],function(f,g){d.isFunction(w[g])&&d(x).bind(g,w[g]);x[g]=function(j){j&&d(x).bind(g,j);return x}});if(w.circular){var z=x.getItems().slice(-1).clone().prependTo(u),y=x.getItems().eq(1).clone().appendTo(u);z.add(y).addClass(w.clonedClass);x.onBeforeSeek(function(f,j,g){if(!f.isDefaultPrevented()){if(j==-1){x.seekTo(z,g,function(){x.end(0)});return f.preventDefault()}else{j==x.getSize()&&x.seekTo(y,g,function(){x.begin(0)})}}});x.seekTo(0,0,function(){})}var h=c(v,w.prev).click(function(){x.prev()}),e=c(v,w.next).click(function(){x.next()});if(!w.circular&&x.getSize()>1){x.onBeforeSeek(function(f,g){setTimeout(function(){if(!f.isDefaultPrevented()){h.toggleClass(w.disabledClass,g<=0);e.toggleClass(w.disabledClass,g>=x.getSize()-1)}},1)});w.initialIndex||h.addClass(w.disabledClass)}w.mousewheel&&d.fn.mousewheel&&v.mousewheel(function(f,g){if(w.mousewheel){x.move(g<0?1:-1,w.wheelSpeed||50);return false
}});if(w.touch){var k={};u[0].ontouchstart=function(f){f=f.touches[0];k.x=f.clientX;k.y=f.clientY};u[0].ontouchmove=function(f){if(f.touches.length==1&&!u.is(":animated")){var j=f.touches[0],g=k.x-j.clientX;j=k.y-j.clientY;x[r&&j>0||!r&&g>0?"next":"prev"]();f.preventDefault()}}}w.keyboard&&d(document).bind("keydown.scrollable",function(f){if(!(!w.keyboard||f.altKey||f.ctrlKey||d(f.target).is(":input"))){if(!(w.keyboard!="static"&&a!=x)){var g=f.keyCode;if(r&&(g==38||g==40)){x.move(g==38?-1:1);return f.preventDefault()}if(!r&&(g==37||g==39)){x.move(g==37?-1:1);return f.preventDefault()}}}});w.initialIndex&&x.seekTo(w.initialIndex,0,function(){})}d.tools=d.tools||{version:"1.2.5"};d.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};var a;d.fn.scrollable=function(e){var g=this.data("scrollable");if(g){return g}e=d.extend({},d.tools.scrollable.conf,e);this.each(function(){g=new b(d(this),e);d(this).data("scrollable",g)});return e.api?g:this}})(jQuery);$(function(){$("header h1").clone().html("Dan DeFelippi").addClass("boom mid").appendTo("header").animate({opacity:"toggle"},{duration:500,complete:function(){$(this).clone().addClass("top").removeClass("mid").css("display","none").appendTo("header").animate({opacity:"toggle"},500)}});$(".samples a[title]").tooltip()});
