/* * * Copyright (c) 2006/2007 Sam Collett (http://www.texotela.co.uk) * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * Version 2.0 * Demo: http://www.texotela.co.uk/code/jquery/newsticker/ * * $LastChangedDate$ * $Rev$ * */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(1($){$.9.D=$.9.g=1(b){b=b||p;i=1(a){j(a);a.4=$("r",a);a.4.q(":o(0)").l().C();a.5=0;h(a)};h=1(a){a.m=t(1(){f(a)},b)};j=1(a){s(a.m)};8=1(a){a.3=7};d=1(a){a.3=c};f=1(a){e(a.3)6;a.3=7;$(a.4[a.5]).n("k",1(){$(2).l();a.5=++a.5%(a.4.B());$(a.4[a.5]).z("k",1(){a.3=c})})};2.y(1(){e(2.x.w()!="A")6;i(2)}).v("g").u(1(){8(2)},1(){d(2)});6 2}})(E);',41,41,'|function|this|pause|items|currentitem|return|true|pauseTicker|fn|||false|resumeTicker|if|doTick|newsticker|startTicker|initTicker|stopTicker|slow|hide|tickfn|fadeOut|eq|4000|not|li|clearInterval|setInterval|hover|addClass|toLowerCase|nodeName|each|fadeIn|ul|size|end|newsTicker|jQuery'.split('|'),0,{})) $(document).ready(function() { $("#slideshow").flash({ swf: '/assets/flash/homepage.swf', width: 700, height: 270 }); $("#latest-news ul").newsticker(); $("#loading").ajaxStart(function() {$(this).show();}).ajaxStop(function() {$(this).hide();}); $("#home-tabs li:eq(0)").addClass("current"); $(".panel:eq(0)").show(); $("#home-tabs li").click(function(){ var tab = $("a", this).attr("rel"); $("#home-tabs li").removeClass("current"); $(this).addClass("current"); $(".panel").hide(); $("#" + tab).show(); }); $("#calendar a.cal-nav").live("click",function(){ var h = $("#calendar").height(); $("#loading").height(h); var url = $(this).attr("rel"); $(this).parent().fadeOut(function() { $(this).empty().load(url, function() { Cufon.refresh(); $(this).fadeIn(); }); }); }); $("a.donate").click(function(){ window.open(this.href); return false; }); $('#subForm').RSV({ displayType: "display-html", errorTextIntro: "", rules: [ "required,cm-name,Please enter your name.", "required,cm-olibi-olibi,Please enter your email address.", "valid_email,cm-olibi-olibi,Please enter a valid email address." ] }); }); 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 button").click(function() { // First, disable the form from submitting $('form#subForm').submit(function() { return false; }); // Grab form action var formAction = $("form#subForm").attr("action"); // Hacking together id for email field // Replace the xxxxx below: // If your form action were http://mysiteaddress.createsend.com/t/r/s/abcde/, then you'd enter "abcde" below var id = "olibi"; var emailId = id + "-" + id; // Validate email address with regex if (!checkEmail(emailId)) {return;} // Serialize form values to be submitted with POST var str = $("form#subForm").serialize(); // Add form action to end of serialized data // CDATA is used to avoid validation errors // // Submit the form via ajax $.ajax({ url: "/assets/scripts/proxy.php", type: "POST", data: serialized, success: function(data){ // Server-side validation if (data.search(/invalid/i) != -1) { } else { $("#confirmation").slideDown("slow"); // Shows "Thanks for subscribing" div $("#confirmation").tabIndex = -1; $("#confirmation").focus(); // For screen reader accessibility // Fire off Google Analytics fake pageview //var pageTracker = _gat._getTracker("UA-XXXXX-X"); //pageTracker._trackPageview("/newsletter_signup"); } } }); }); });