(function(b,a){a.showCampusSelection=function(c){b("#campuses").fadeIn("slow")};a.switchCampus=function(d){var c,e=b("body");b.cookie("campus",d,365);for(c=0;c<a.campusAry.length;c++){e.removeClass(a.campusAry[c])}e.addClass(d);b("#current-campus").html(a.campuses[d].name);b("#campuses").fadeOut("slow");return false};b(function(){var c=b.cookie("campus");if(c){b("#current-campus").html(a.campuses[c].name)}a.icampus.countdown();if(a.ie&&a.ie<7){b("ul#nav > li").hover(function(){b(this).addClass("hover")},function(){b(this).removeClass("hover")})}if(navigator.userAgent.toLowerCase().indexOf("mobile")>=0){b("ul#nav > li").click(function(){var d=b(this);if(d.hasClass("hover")){b("ul#nav > li").removeClass("hover")}else{b("ul#nav > li").removeClass("hover");b(this).addClass("hover")}})}b(".faq").faq()});jQuery.cookie=function(d,l,m){var f,e,g,k,h,j;if(typeof l==="undefined"){g=(d+"=");k=document.cookie.split(";");for(h=0;h<k.length;h++){j=k[h];while(j.charAt(0)===" "){j=j.substring(1,j.length);if(j.indexOf(g)===0){return j.substring(g.length,j.length)}}}return null}else{m=(l===null)?-1:m;if(m){f=new Date();f.setTime(f.getTime()+(m*24*60*60*1000));e="; expires="+f.toGMTString()}else{e=""}document.cookie=d+"="+l+e+"; path=/"}};if(typeof console==="undefined"){console={log:function(c){}}}b.gE_cache=b.gE_cache?b.gE_cache:{};b.gE=function(c,d){var d=d||true;if(!d||typeof b.gE_cache[c]==="undefined"){b.gE_cache[c]=b(c)}return b.gE_cache[c]};b.fn.faq=function(){return this.each(function(){var c=b(this);c.addClass("js");b(".question",c).addClass("a").toggle(function(){b(this).next(".answer").slideDown("slow")},function(){b(this).next(".answer").slideUp("slow")})})};b.fn.extendText=function(){return this.each(function(){var d=b(this);d.hide();var c=b('<span class="readmore">  Read more</span>').click(function(){b(this).hide().parent().next().slideDown("slow")});d.prev().append(c)})};b.reveal=function(d,c){c=typeof c!=="undefined"?c:true;b("#"+d)[c?"slideToggle":"toggle"](c?"slow":0);return false};b.extend(a.icampus,(function(){function c(){var l=new Date(),j=(a.icampus.SERVICESTARTTIMESTAMP+a.icampus.TIMEOFFSET)-Math.round(l.getTime()/1000),g={d:((Math.floor(j/86400))%100000).toString(),h:((Math.floor(j/3600))%24).toString(),m:((Math.floor(j/60))%60).toString(),s:(j%60).toString()},k=["d","h","m","s"],h,f="";if(j<=0){return d()}f=g.d>0?(g.d+" day")+(g.d!==1?"s ":" "):"";f+=(g.h+" hr")+(g.h!==1?"s ":" ");f+=((g.m.length>1?g.m:("0"+g.m))+" min ");f+=((g.s.length>1?g.s:("0"+g.s))+" sec");b.gE("#countdown_timer").html(f);setTimeout(c,1000)}function d(){var i=Math.round(new Date().getTime()/1000),h=(a.icampus.SERVICESTARTTIMESTAMP+a.icampus.TIMEOFFSET)-i,g=((i+a.icampus.TIMEOFFSET)-a.icampus.SERVICESTARTTIMESTAMP),f=a.icampus.SERVICEDURATION-g;setTimeout(e,f*1000);b.gE("#countdown_timer").html("Join Us Now")}function e(){b.getJSON("/ajax/icampus-next",function(h,j){var f=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],g=new Date(h.LIVESTART),i=f[g.getDay()]+" "+(g.getHours()>12?(g.getHours()-12).toString():g.getHours().toString())+(g.getMinutes()>0?(":"+g.getMinutes()):"")+((g.getHours()<12)?"am":"pm");b.extend(icampus,h);elems.countdown_time.html(i);c()})}return{countdown:c,onServiceEnd:e}})())})(jQuery,fp);
