$(document).ready(function(){var DocumentHeight=$(document).height();var DocumentHeight=DocumentHeight+70;$("<div id='modalLayer'></div>").css({"height":DocumentHeight+"px","opacity":0.5}).insertAfter("#outerwrapper").hide();});$(document).ready(function(){$('ul.sf-menu').superfish({delay:500,animation:{opacity:'show',height:'show'},speed:'fast',autoArrows:false,dropShadows:false});});$(function(){$("#sectionA div:last").css({"border":"none"})});$(function(){$(".sf-menu li:last").css({"border":"none"})});$(function(){$(".external_url").colorbox({width:"80%",height:"80%",iframe:true});});$(document).ready(function(){$("input.btn, a.inputStyle").hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});});$(document).ready(function(){$("input.btn, a.inputStyle").focus(function(){$(this).addClass("hover");});});$(function(){$(".success").hide().slideDown("slow").delay(3500).fadeOut("slow",function(){location.href="contact"});});function imageZeroFade(){$("#box1").delay(0).css({opacity:0,top:"-50px"}).fadeIn("slow").animate({top:25,opacity:0.7},2000,function(){$(this).delay(2000).fadeOut("slow",imageOneFade);})}
function imageOneFade(){$("#box2").css({top:"-50px"}).fadeIn("slow").animate({top:55,opacity:0.7},2000,function(){$(this).delay(2000).fadeOut("slow",imageTwoFade);});};function imageTwoFade(){$("#box3").css({top:"-50px"}).fadeIn("slow").animate({top:85,opacity:0.7},2000,function(){$(this).delay(2000).fadeOut("slow",imageThreeFade);});};function imageThreeFade(){$("#box4").css({top:"-50px"}).fadeIn("slow").animate({top:115,opacity:0.7},2000,function(){$(this).delay(2000).fadeOut("slow",imageFourFade);});};function imageFourFade(){$("#box5").css({top:"-50px"}).fadeIn("slow").animate({top:145,opacity:0.7},2000,function(){$(this).delay(2000).fadeOut("slow",imageOneFade);});};$(function(){imageZeroFade();});$(document).ready(function(){var Errors=$(".errors");Errors.hide();Errors.slideDown("slow");});$(document).ready(function()
{$(".trigger").tooltip({position:['center','right'],offset:[0,100],effect:'fade',opacity:0.9,tip:'.tooltip'});});$(document).ready(function(){$("form:not(.search) input:not(:submit),textarea ").focus(function(){$(this).addClass("inputFocus");}).blur(function(){$(this).removeClass("inputFocus");}).keyup(function(){$(this).removeClass("inputFocus");});});$(document).ready(function(){$("fieldset").each(function(){var heading=$("legend",this).remove().text();$("<h3></h3>").text(heading).prependTo(this);});});function getUrlVars(url)
{var vars=[],hash;var hashes=url.slice(url.indexOf('?')+1).split('&');for(var i=0;i<hashes.length;i++)
{hash=hashes[i].split('=');vars.push(hash[0]);vars[hash[0]]=hash[1];}
return vars;}
$(document).ready(function(){var WrapperWidth=$("#wrapper").width();var ContainerWidth=$("#feedbackContainer").width();var DiffWidth=(WrapperWidth-ContainerWidth)/2;var Title=$("#feedbackTitle").html();$("#feedbackContainer").css({left:DiffWidth+"px",top:"0px"});$("form.feedback").hide();$("a.feedback").click(function(){$(this).hide();$("#modalLayer").show();$("#feedbackError").hide();$("#feedbackContainer").css({"z-index":100}).fadeIn("slow",function(){$("form.feedback").slideDown("slow",function(){$("#feedbackTitle").html("<h2>Send us a message</h2>");});})
return false;});$("a.close").click(function(){$("#feedbackContainer").slideUp("slow",function(){$("#modalLayer").fadeOut("slow");$("a.feedback").show();$("label").removeClass("req");$("label span.errorMessage").hide();$("#feedbackTitle").html(Title)
$("form.feedback").clearForm().hide();$("#feedbackError").hide();});return false;});});$(document).ready(function(){$('form.feedback').ajaxForm({dataType:'json',url:'ajax/feedbackAjax.php',success:processjson});});function processjson(data)
{if(data.goodresult)
{$("label span.errorMessage").hide();$("label").removeClass("req");$("form.feedback").slideUp("slow",function(){$("#feedbackTitle").html("<h2>Your message has been sent!</h2>");$("#feedbackContainer").delay(2000).fadeOut("slow",function(){$("#modalLayer").fadeOut("slow");$("a.feedback").show();$("#feedbackTitle").html("<h2>Loading...</h2>")
$(this).clearForm();});});}
else
{$("label span.errorMessage").hide();$("label").removeClass("req");for(var key in data)
{if(data.hasOwnProperty(key))
{$(".feedback :input#"+key).prev("label").append("<span class='errorMessage'>"+data[key]+"</span>");$(".feedback :input#"+key).prev("label").addClass("req");if(data.repeat)
{$("#feedbackError").fadeIn("slow").html(data.repeat);}}}}}
$(document).ready(function(){$('#loading').ajaxStart(function(){$(this).show();}).ajaxStop(function(){$(this).hide();});});
