$(function(){$("a.lightbox").lightBox();var a=$("ul.portfolioSlider li").size();var b=1;var e;var d;$(".portfolioButtons a.right").click(function(){if(b==a-2){b=1;$(".portfolioSlider").animate({left:"0px"})}else{e=b*330;d=e-e-e;$(".portfolioSlider").animate({left:d});b++}return false});$(".portfolioButtons a.left").click(function(){if(b==1){b=1;$(".portfolioSlider").animate({left:"0px"})}else{e=b*330-660;d=e-e-e;$(".portfolioSlider").animate({left:d});b--}return false});$("ul.nav a[href*=#]").click(function(){$("ul.nav li").removeClass("active");$(this).parent("li").addClass("active");if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var f=$(this.hash);f=f.length&&f||$("[name="+this.hash.slice(1)+"]");if(f.length){var g=f.offset().top-50;$("html,body").animate({scrollTop:g},1000);return false}}});$("#banner a.bannerPortfolioLink").click(function(){$("ul.nav li").removeClass("active");$("ul.nav li a.myPortfolio").parent("li").addClass("active");if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var f=$(this.hash);f=f.length&&f||$("[name="+this.hash.slice(1)+"]");if(f.length){var g=f.offset().top-50;$("html,body").animate({scrollTop:g},1000);return false}}});$("textarea").focus(function(){if($(this).attr("value")=="Message"){$(this).attr("value","")}});$("textarea").blur(function(){if($(this).attr("value")==""){$(this).attr("value","Message")}});$("input#name").focus(function(){if($(this).attr("value")=="Name"){$(this).attr("value","")}});$("input#name").blur(function(){if($(this).attr("value")==""){$(this).attr("value","Name")}});$("input#email").focus(function(){if($(this).attr("value")=="Email"){$(this).attr("value","")}});$("input#email").blur(function(){if($(this).attr("value")==""){$(this).attr("value","Email")}});var c=$("input#submit").parent("p");$(c).children("input").remove();$(c).append('<input type="button" name="submit" id="submit" value="&nbsp;" />');$("p.submit input#submit").click(function(){$("p.submit #submit").hide();$("p.submit").append('<img src="images/ajax-loader.gif" class="loaderIcon" alt="Loading..." />');var g=$("input#name").val();var f=$("input#email").val();var h=$("textarea#message").val();$.ajax({type:"post",url:"./sendEmail.php",data:"name="+g+"&email="+f+"&message="+h,success:function(i){$("p.submit img.loaderIcon").fadeOut(100);$("p.submit #submit").fadeIn(1000);$("ul#response").fadeIn();$("ul#response").html(i)}})})});
