/*!
 * jQuery Smooth Scroll Plugin v1.4.1
 *
 * Date: Tue Nov 15 14:24:14 2011 EST
 * Requires: jQuery v1.3+
 *
 * Copyright 2010, Karl Swedberg
 * Dual licensed under the MIT and GPL licenses (just like jQuery):
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 *
 *
 *
*/
(function(b){function l(c){return c.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")}function m(c){return c.replace(/(:|\.)/g,"\\$1")}var n=l(location.pathname),o=function(c){var e=[],a=false,d=c.dir&&c.dir=="left"?"scrollLeft":"scrollTop";this.each(function(){if(!(this==document||this==window)){var g=b(this);if(g[d]()>0)e.push(this);else{g[d](1);a=g[d]()>0;g[d](0);a&&e.push(this)}}});if(c.el==="first"&&e.length)e=[e.shift()];return e};b.fn.extend({scrollable:function(c){return this.pushStack(o.call(this,
{dir:c}))},firstScrollable:function(c){return this.pushStack(o.call(this,{el:"first",dir:c}))},smoothScroll:function(c){c=c||{};var e=b.extend({},b.fn.smoothScroll.defaults,c);this.die("click.smoothscroll").live("click.smoothscroll",function(a){var d={},g=b(this),h=location.hostname===this.hostname||!this.hostname,f=e.scrollTarget||(l(this.pathname)||n)===n,j=m(this.hash),i=true;if(!e.scrollTarget&&(!h||!f||!j))i=false;else{h=e.exclude;f=0;for(var k=h.length;i&&f<k;)if(g.is(m(h[f++])))i=false;h=e.excludeWithin;
f=0;for(k=h.length;i&&f<k;)if(g.closest(h[f++]).length)i=false}if(i){a.preventDefault();b.extend(d,e,{scrollTarget:e.scrollTarget||j,link:this});b.smoothScroll(d)}});return this}});b.smoothScroll=function(c,e){var a,d,g,h=0;d="offset";var f="scrollTop",j={};if(typeof c==="number"){a=b.fn.smoothScroll.defaults;g=c}else{a=b.extend({},b.fn.smoothScroll.defaults,c||{});if(a.scrollElement){d="position";a.scrollElement.css("position")=="static"&&a.scrollElement.css("position","relative")}g=e||b(a.scrollTarget)[d]()&&
b(a.scrollTarget)[d]()[a.direction]||0}a=b.extend({link:null},a);f=a.direction=="left"?"scrollLeft":f;if(a.scrollElement){d=a.scrollElement;h=d[f]()}else d=b("html, body").firstScrollable();j[f]=g+h+a.offset;b.isFunction(a.beforeScroll)&&a.beforeScroll.call(d,a);d.animate(j,{duration:a.speed,easing:a.easing,complete:function(){a.afterScroll&&b.isFunction(a.afterScroll)&&a.afterScroll.call(a.link,a)}})};b.smoothScroll.version="1.4.1";b.fn.smoothScroll.defaults={exclude:[],excludeWithin:[],offset:0,
direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:null,afterScroll:null,easing:"swing",speed:400}})(jQuery);
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,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})((function(){try{console.log();return window.console}catch(a){return window.console={}}})());var debugmode=false;$(".frame>header h1 a").smoothScroll();$(".frame>header nav a").smoothScroll();$("#contact form input").focus(function(){if(this.value!="* required"){return}this.value="";this.style.color="#333";this.style.fontStyle="normal"});$("#contact form input").blur(function(){if(this.value!=""){return}this.value="* required";this.style.color="#999";this.style.fontStyle="italic"});function submitForm(){var a="input_name="+$("input#input_name").val()+"&input_email="+$("input#input_email").val()+"&input_message="+$("textarea#input_message").val();if(debugmode==true){alert(a);return false}$.ajax({type:"POST",url:"submitform.php",data:a,dataType:"html",success:function(b){$("#contact form").html(b).hide().fadeIn(1500)}});return false}$("#contact form button").on("click",submitForm);$(document).ready(function(){$("#contact form input").val("* required");$("#contact form input").css("color","#999");$("#contact form input").css("font-style","italic");$("#home figure *").hide().delay(1000).fadeIn(1000);$.fn.reverse=[].reverse;$("#home header nav").delay(2000).reverse().each(function(a){$(this).hide().delay(250*a).fadeIn(1000)});if(debugmode==true){alert("`script.js` $(document).ready loop done.")}});
