$(document).ready(function(){var myFile=document.location.toString();if(myFile.match('#')){var myAnchor='#'+myFile.split('#')[1];$('.panel:visible').fadeOut(300,function(){$(myAnchor).fadeIn(300);});}else{$('#nav ul li:first a').click();}
$('#back-to-input').click(function(event){event.preventDefault();$('.panel:visible').fadeOut(300,function(){$('#input').fadeIn(300);});});$('#what-trigger').click(function(event){if($('#what').is(':hidden'))
{$('.panel:visible').fadeOut(300,function(){$('#what').fadeIn(300)});}});$('#home-trigger').click(function(event){if($('#input').is(':hidden'))
{$('.panel:visible').fadeOut(300,function(){$('#input').fadeIn(300)});}});$('form').submit(function(event){event.preventDefault();$('#processing').fadeIn(100);$.ajax({type:'POST',url:$(this).attr('action'),data:$(this).serialize(),success:function(msg){$('#output').html(msg);$('.panel:visible').fadeOut(300,function(){$('#processing').fadeOut();$('#result').fadeIn(300);});}});});});