(function(n){n.fn.hoverIntent=function(t,i,r){var u={interval:100,sensitivity:7,timeout:0};u=typeof t=="object"?n.extend(u,t):n.isFunction(i)?n.extend(u,{over:t,out:i,selector:r}):n.extend(u,{over:t,out:t,selector:i});var f,e,o,s,h=function(n){f=n.pageX;e=n.pageY},c=function(t,i){if(i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(o-f)+Math.abs(s-e)<u.sensitivity)return n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s=1,u.over.apply(i,[t]);o=f;s=e;i.hoverIntent_t=setTimeout(function(){c(t,i)},u.interval)},a=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,u.out.apply(t,[n])},l=function(t){var r=jQuery.extend({},t),i=this;if(i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t)),t.type=="mouseenter"){o=r.pageX;s=r.pageY;n(i).on("mousemove.hoverIntent",h);i.hoverIntent_s!=1&&(i.hoverIntent_t=setTimeout(function(){c(r,i)},u.interval))}else n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s==1&&(i.hoverIntent_t=setTimeout(function(){a(r,i)},u.timeout))};return this.on({"mouseenter.hoverIntent":l,"mouseleave.hoverIntent":l},u.selector)}})(jQuery),function(n){n("a[data-reveal-id]").on("click",function(t){t.preventDefault();var i=n(this).attr("data-reveal-id");n("#"+i).reveal(n(this).data())});n.fn.reveal=function(t){var t=n.extend({},{animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:!0,dismissModalClass:"close-reveal-modal"},t);return this.each(function(){function s(){r.unbind("click.modalEvent");n("."+t.dismissModalClass).unbind("click.modalEvent");e||(c(),t.animation=="fadeAndPop"&&(i.css({top:n(document).scrollTop()-o,opacity:0,visibility:"visible"}),r.fadeIn(t.animationSpeed/2),i.delay(t.animationSpeed/2).animate({top:n(document).scrollTop()+u+"px",opacity:1},t.animationSpeed,f)),t.animation=="fade"&&(i.css({opacity:0,visibility:"visible",top:n(document).scrollTop()+u}),r.fadeIn(t.animationSpeed/2),i.delay(t.animationSpeed/2).animate({opacity:1},t.animationSpeed,f)),t.animation=="none"&&(i.css({visibility:"visible",top:n(document).scrollTop()+u}),r.css({display:"block"}),f()));i.unbind("reveal:open",s)}function h(){e||(c(),t.animation=="fadeAndPop"&&(r.delay(t.animationSpeed).fadeOut(t.animationSpeed),i.animate({top:n(document).scrollTop()-o+"px",opacity:0},t.animationSpeed/2,function(){i.css({top:u,opacity:1,visibility:"hidden"});f()})),t.animation=="fade"&&(r.delay(t.animationSpeed).fadeOut(t.animationSpeed),i.animate({opacity:0},t.animationSpeed,function(){i.css({opacity:1,visibility:"hidden",top:u});f()})),t.animation=="none"&&(i.css({visibility:"hidden",top:u}),r.css({display:"none"})));i.unbind("reveal:close",h)}function f(){e=!1}function c(){e=!0}var i=n(this),u=parseInt(i.css("top")),o=i.height()+u,e=!1,r=n(".reveal-modal-bg"),l;r.length==0&&(r=n('<div class="reveal-modal-bg" />').insertAfter(i),r.fadeTo("fast",.8));i.bind("reveal:open",s);i.bind("reveal:close",h);i.trigger("reveal:open");l=n("."+t.dismissModalClass).bind("click.modalEvent",function(){i.trigger("reveal:close")});t.closeOnBackgroundClick&&(r.css({cursor:"pointer"}),r.bind("click.modalEvent",function(){i.trigger("reveal:close")}));n("body").keyup(function(n){n.which===27&&i.trigger("reveal:close")})})}}(jQuery)