text: /*
   * contactable 1.5 - jQuery Ajax contact form
   *
   * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/)
   * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
   * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
   *
   * Revision: $Id: jquery.contactable.min.js 2012-05-26 $
   *
   */
  
  (function(a){a.fn.contactable=function(b){var c={url:"mail.php",name:"Name",email:"Email",dropdownTitle:"",dropdownOptions:["General","Website bug","Feature request"],message:"Message",subject:"A contactable message",submit:"SEND",recievedMsg:"Thank you for your message",notRecievedMsg:"Sorry but your message could not be sent, try again later",disclaimer:"Please feel free to get in touch, we value your feedback",hideOnSubmit:true};var b=a.extend(c,b);return this.each(function(){function h(){a(c+".holder").hide();a(c+"#loading").show();a.ajax({type:"POST",url:b.url,data:{subject:b.subject,name:a(c+"#name").val(),email:a(c+"#email").val(),issue:a(c+"#dropdown").val(),message:a(c+"#message").val()},success:function(d){a(c+"#loading").css({display:"none"});if(d.response==="success"){a(c+"#callback").show().append(b.recievedMsg);if(b.hideOnSubmit===true){a(c+"#contactForm").animate({dummy:1},2e3).animate({marginLeft:"-=450px"},"slow");a(c+"div#contactable_inner").animate({dummy:1},2e3).animate({marginLeft:"-=447px"},"slow").animate({marginLeft:"+=5px"},"fast");a(c+"#overlay").css({display:"none"})}}else{a(c+"#callback").show().append(b.notRecievedMsg);setTimeout(function(){a(c+".holder").show();a(c+"#callback").hide().html("")},2e3)}},error:function(d){a(c+"#loading").css({display:"none"});a(c+"#callback").show().append(b.notRecievedMsg)}})}var c="#"+this.id+" ",d="",e=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,f=b.dropdownOptions.length,g;if(b.dropdownTitle){d+='<p><label for="issue">'+b.dropdownTitle+' </label><br /><select name="dropdown" id="dropdown" class="dropdown">';for(g=0;g<f;g++){d+='<option value="'+b.dropdownOptions[g]+'">'+b.dropdownOptions[g]+"</option>"}d+="</select></p>"}a(this).html('<div id="contactable_inner"></div><form id="contactForm" method="" action=""><div id="loading"></div><div id="callback"></div><div class="holder"><p><label for="name">'+b.name+'<span class="green"> * </span></label><br /><input id="name" class="contact validate" name="name" /></p><p><label for="email">'+b.email+' <span class="green"> * </span></label><br /><input id="email" class="contact validate" name="email" /></p>'+d+'<p><label for="message">'+b.message+' <span class="green"> * </span></label><br /><textarea id="message" name="message" class="message validate" rows="4" cols="30" ></textarea></p><p><input class="submit" type="submit" value="'+b.submit+'"/></p><p class="disclaimer">'+b.disclaimer+"</p></div></form>");a(c+"div#contactable_inner").toggle(function(){a(c+"#overlay").css({display:"block"});a(this).animate({marginLeft:"-=5px"},"2000");a(c+"#contactForm").animate({marginLeft:"-=0px"},"2000");a(this).animate({marginLeft:"+=387px"},"4000");a(c+"#contactForm").animate({marginLeft:"+=390px"},"4000")},function(){a(c+"#contactForm").animate({marginLeft:"-=390px"},"4000");a(this).animate({marginLeft:"-=387px"},"4000").animate({marginLeft:"+=5px"},"2000");a(c+"#overlay").css({display:"none"})});a(c+"#contactForm").submit(function(){var b=true,d;a(c+"#contactForm .validate").each(function(){a(this).removeClass("invalid")});a(c+"#contactForm .validate").each(function(){if(a(this).val().length<2){a(this).addClass("invalid");b=false}if(!e.test(a(c+"#contactForm #email").val())){a(c+"#contactForm #email").addClass("invalid");b=false}});if(b===true){h()}return false})})}})(jQuery)