// JavaScript Document var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); function checkEmail(email) { var pattern = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; var emailVal = $("#" + email).val(); return pattern.test(emailVal); } $(function() { $('#subForm').submit(function(e) { e.preventDefault(); var formAction = this.action; var id = "aljutu"; var emailId = id + "-" + id; if (!checkEmail(emailId)) { alert("Please enter a valid email address"); return; } var str = $(this).serialize(); // $.ajax({ url: "proxy.php", type: "POST", data: serialized, dataType: 'html', success: function(data){ if (data.search(/invalid/i) != -1) { alert('The email address you supplied is invalid and needs to be fixed before you can subscribe to this list.'); } else { var $confirmation = $('#confirmation'); $("#theForm").hide(); // If successfully submitted hides the form $confirmation.slideDown("slow"); // Shows "Thanks for subscribing" div $confirmation.prop('tabIndex', -1); $confirmation.focus(); // For screen reader accessibility } } }); }); }); function equalHeight(group) { var tallest = 0; group.each(function() { var thisHeight = $(this).height(); if(thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest); } $(function(){ $(".element div.wrap").hover(function(){ $(this).stop().animate({top:"-301px"},{queue:false,duration:200}); }, function() { $(this).stop().animate({top:"0px"},{queue:false,duration:200}); }); }); $(document).ready(function() { $(function() { $(".slidetabs").tabs(".images > div", { // enable "cross-fading" effect effect: 'fade', fadeOutSpeed: '1500', fadeInSpeed: '1500', // start from the beginning after the last tab rotate: true // use the slideshow plugin. It accepts its own configuration }).slideshow({autoplay: true, interval: 5000}); }); equalHeight($(".equalise")); });