$(document).ready(function(){Cufon.replace("h1");$("#search-form input:text").click(function(){if(this.value=="Search"){this.value="";}else{this.select();}}).blur(function(){if(this.value==""){this.value="Search";}});$("#product-panel .gallery").jcarousel({scroll:1,animation:"slow"});$("#product-panel .gallery *").disableTextSelect();$("#tabs-home, #tabs-services").tabs();if($(".home").length){loadHomeForm();}else if($(".App_WebForm_inner").length&&!$("#WebForm").length){$(".App_WebForm").css('background','none');}
if($(".App_WebForm").length){var classes=$('body').attr('class').split(" ");var color=classes[1];$(".App_WebForm_submit").html('<input type="image" value="Submit" src="'+_visioncms_interfaceUrl+'images/submit_'+color+'.png" />');}
if($('#carousel-home').length){$('#carousel-home li h3 a').hover(function(){$(this).addClass('highlight');},function(){$(this).removeClass('highlight');})}});function loadHomeForm(){$(".home .App_WebForm").addClass("form-closed");$(".home .App_WebForm").find('.App_WebForm_field').each(function(index){if(index!=0){$(this).hide();}else{$(this).find("label").hide();$(this).find("input").val("Name");}});$(".home .App_WebForm .App_WebForm_submit").hide();$(".home .App_WebForm").click(function()
{if($(".App_WebForm").hasClass("form-closed"))
{$(this).removeClass("form-closed");$(".home .App_WebForm").find('.App_WebForm_field').show();$(".home .App_WebForm").find('.App_WebForm_field').each(function(index){if(index==0){$(this).find("label").show();$(this).find("input").val("");}});$(".home .App_WebForm .App_WebForm_submit").show();}});$("body.home .App_WebForm").click(function(event)
{event.stopPropagation();});}