$(document).ready(function(){function b(a,b){$(a).focus(function(){if($(this).val()==b){$(this).val("")}});$(a).blur(function(){if($(this).val()==""){$(this).val(b)}})}function a(a,b,c){$(a).click(function(){if($(this).hasClass(b)){return false}else{$(c).removeClass(b).slideUp();$(this).next().slideDown().addClass(b)}$(a).removeClass(b);$(this).addClass(b);return false})}$("#accordion div.menu_background").hide();$("div.active").show();$(".error").hide;a("#accordion h2.slider","active","#accordion div.active");b("textarea","Type Message Here");b("input#phplist_email","Enter E-Mail");$(".subscribe").click(function(){$(".mailinglist_form .error").css("visibility","hidden");$("input#phplist_email").css("background-color","white");var a=$("input#phplist_email").val();var b="email="+a+"&htmlemail=0&list%5B2%5D=signup&listname%5B2%5D=The+Art+of+Chris+Fiskaa&VerificationCodeX=&subscribe=Subscribe";if(a==""){$(".mailinglist_form .error").css("visibility","visible");$("input#phplist_email").css("background-color","yellow").focus();return false}$(".mailinglist_form .loading").show().html("Loading...");$.ajax({type:"POST",data:b,url:"/phplist/?p=subscribe",success:function(){$(".mailinglist_form .loading").html("Thank you, E-mail has been sent.");$(".mailinglist_form .loading").fadeOut(6e3)},error:function(){$(".mailinglist_form .loading").html("Error! Please <a href='mailto:admin@chrisfiskaa.com' style='text-decoration:underline'>contact the Administrator</a>.")}});return false});$(".sendMessage").click(function(){$(".contact_form .error").css("visibility","hidden");$(".contact_form input.text").css("background-color","white");$("textarea#mesg").css("background-color","white");var a=$(".contact_form input#FullName").val();var b=$(".contact_form input#EmailAddr").val();var c=$(".contact_form textarea").val();var d=$(".contact_form input#env_report").val();var e=$(".contact_form input#recipients").val();var f=$(".contact_form input#required").val();var g=$(".contact_form input#subject").val();var h=$(".contact_form input#derive_fields").val();var i=$(".contact_form input#mail_options").val();if(a==""){$(".contact_form p.name .error").css("visibility","visible");$("input#FullName").css("background-color","yellow").focus();return false}if(b==""){$(".contact_form p.email .error").css("visibility","visible");$("input#EmailAddr").css("background-color","yellow").focus();return false}if(c==""||c=="Type Message Here"){$("textarea#mesg").css("background-color","yellow").focus();return false}var j="FullName="+a+"&EmailAddr="+b+"&mesg="+c+"&env_report="+d+"&recipients="+e+"&required="+f+"&subject="+g+"&derive_fields="+h+"&mail_options="+i;$(".contact_form .loading").show().html("Loading...");$.ajax({url:"formmail.php",type:"POST",data:j,cache:false,success:function(){$(".contact_form .loading").html("Message Sent!");$(".contact_form .loading").fadeOut(6e3)},error:function(a,b,c){$(".contact_form .loading").html("Error! Please <a href='mailto:admin@chrisfiskaa.com' style='text-decoration:underline'>contact the Administrator</a>.")}});return false});if($("#welcome_content div").hasClass("default")){$("div.default").html("Loading, please wait.");$("#welcome_content").load("index.php #welcome_content");current_page=$("#content_wrap").attr("class");$("#accordion h2."+current_page).next().slideDown()}$("#accordion a.ajax").click(function(){function e(){$("#content_wrap div.page_loading").fadeOut()}function d(){$("#content_wrap .content").fadeIn(e)}function c(){$("#content_wrap .content").load(b,"",d)}var a=$(this).attr("name");$("#gallery_links li").removeClass("active");$("#gallery_links li."+a).addClass("active");var b=$(this).attr("href")+" .content";$("#content_wrap .content").fadeOut(c);$("#content_wrap").prepend("<div class='page_loading'>Loading please wait</div>").fadeIn();return false});$(".thumb_wrap a").live("click",function(){function e(){$("div.image_loading").fadeOut(function(){$("div.image_loading").remove()})}function d(){$("#ajax_gallery").fadeIn(function(){var a=$(document).height();$("#blanket").css("height",a+"px");e()})}function c(){var a=$("#ajax_gallery").width();var b=Math.floor((960-a)/2);$("#ajax_gallery").css("margin","0px"+" "+b+"px");$("#ajax_gallery #gallery_content").append("<div id='close_window'>Exit [X]</div>");d()}function b(){$("body").append("<div id='ajax_gallery'></div><div class='image_loading'><div>");$("#ajax_gallery, div.loading").hide();$("#ajax_gallery").load(a,"",c)}$("html").append("<div id='blanket'></div>");$("#blanket").fadeTo("fast",.8,function(){$("div.image_loading").append("Loading please wait").fadeIn()});var a=$(this).attr("href")+" .content";b();return false});$("#blanket, #close_window").live("click",function(){$("#blanket, #ajax_gallery").fadeOut();setTimeout(function(){$("#blanket, #ajax_gallery, div.loading").remove()},600)})})
