Rev 13213 | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(document).ready(function(){/* ---- Countdown timer ---- */$('#counter').countdown({timestamp : (new Date(1418409000000)).getTime()});/* ---- Animations ---- */$('#links a').hover(function(){ $(this).animate({ left: 3 }, 'fast'); },function(){ $(this).animate({ left: 0 }, 'fast'); });$('footer a').hover(function(){ $(this).animate({ top: 3 }, 'fast'); },function(){ $(this).animate({ top: 0 }, 'fast'); });/* ---- Using Modernizr to check if the "required" and "placeholder" attributes are supported ---- */if (!Modernizr.input.placeholder) {$('.email').val('Input your e-mail address here...');$('.email').focus(function() {if($(this).val() == 'Input your e-mail address here...') {$(this).val('');}});}// for detecting if the browser is Safarivar browser = navigator.userAgent.toLowerCase();if(!Modernizr.input.required || (browser.indexOf("safari") != -1 && browser.indexOf("chrome") == -1)) {$('form').submit(function() {$('.popup').remove();if(!$('.email').val() || $('.email').val() == 'Input your e-mail address here...') {$('form').append('<p class="popup">Please fill out this field.</p>');$('.email').focus();return false;}});$('.email').keydown(function() {$('.popup').remove();});$('.email').blur(function() {$('.popup').remove();});}$("#gosf-form").live('submit', function(){var userEmail = $('.gosf-email').val();console.log(userEmail);jQuery.ajax({url: "/gosf!notifyGosf?email="+userEmail,type: 'POST',async: false,success: function (data) {showMsg(data);},error : function() {showMsg("OOPS!!!Please try again.");},cache: false,contentType: "application/x-www-form-urlencoded",processData: false});return false;});function showMsg(msg){$("#msg").html(msg);$("#msg").attr('style', 'color:green;border:1px solid red;box-shadow: red 0 0 30px 1px;');$("#msg").fadeIn(600, function() {window.setTimeout(function() {$("#msg").fadeOut(800, function() {$("#msg").removeAttr('style');});}, 3000);});}});