jQuery(document).ready(function(){Validate.form('form.validate');jQuery('#print').click(function(elem){print();});jQuery('#mail').attr('href',"mailto:?body="+location.href+"&subject="+document.title);var fbpage="";var tweeter="";var blog="";jQuery('a.share').each(function(){if(jQuery(this).hasClass("twitter")){jQuery(this).attr('href',"http://twitter.com/home?status="+location.href).attr("target","_blank");jQuery(this).bind("click",function(e){jQuery.GaTrackEvent('Social Link','twitter',window.location,'');});}
if(jQuery(this).hasClass("twitterfollow")){jQuery(this).attr('href',"http://twitter.com/"+tweeter).attr("target","_blank");jQuery(this).bind("click",function(e){jQuery.GaTrackEvent('Social Link','twitter-follow',window.location,'');});}
if(jQuery(this).hasClass("facebook")){jQuery(this).attr('href',"http://www.facebook.com/share.php?u="+location.href).attr("target","_blank");jQuery(this).bind("click",function(e){jQuery.GaTrackEvent('Social Link','facebook',window.location,'');});}
if(jQuery(this).hasClass("facebookfan")){jQuery(this).attr('href',fbpage).attr("target","_blank");jQuery(this).bind("click",function(e){jQuery.GaTrackEvent('Social Link','facebookfan',window.location,'');});}
if(jQuery(this).hasClass("blog")){jQuery(this).attr('href',blog).attr("target","_blank");jQuery(this).bind("click",function(e){jQuery.GaTrackEvent('Social Link','blog',window.location,'');});}
if(jQuery(this).hasClass("email")){jQuery(this).attr('href',"mailto:?body="+location.href+"&subject="+document.title);jQuery(this).bind("click",function(e){jQuery.GaTrackEvent('Social Link','email',window.location,'');});}});});jQuery(window).load(function(){jQuery('.gallerystack img.thumb').imageScan();jQuery('img.zoom, #content2 table.imagegrid img').imageZoom({'size':'850','group':"content"});try{if(headers.length>1){Slideshowheaders=[];var n=0;jQuery.each(headers,function(){Slideshowheaders.push({'src':this});});jQuery('#header').crossSlide({sleep:3,fade:1},Slideshowheaders);}}catch(err){}});function signup(theform){var theform=theform;console.log(jQuery('#email').val());readytosend="yes";if(jQuery('#name').val()==""){jQuery('#name').val("Name is Required ").addClass("error");setTimeout("jQuery('#name').val('')",1500)
readytosend="no"}else{jQuery('#name').removeClass("error");}
if(jQuery('#email').val()==""||!isValidEmail(jQuery('#email').val())){tmpemail=jQuery('email').val()||"";jQuery('#email').val("Invalid Address").addClass("error");setTimeout("jQuery('#email').val(tmpemail)",1500)
readytosend="no"}else{jQuery('#email').removeClass("error");}
console.log(readytosend);if(readytosend=="yes"){var url='/modules/members/signup.php';formcontent=jQuery(theform).html();var pars=jQuery(theform).serialize();jQuery.ajax({type:"POST",url:url,data:pars,success:function(msg){jQuery(theform).html(msg);setTimeout("jQuery('#newsbubbleform').html(formcontent)",7000)
goal="/goals/newslettersignup.html";try{if(pageTracker&&formgoal!=false){pageTracker._trackPageview(goal);}}catch(err){}}});return false;}}
function isValidEmail(str){return(str.indexOf(".")>2)&&(str.indexOf("@")>0);}
var Cookie={set:function(name,value,seconds){if(seconds){d=new Date();d.setTime(d.getTime()+(seconds*1000));expiry='; expires='+d.toGMTString();}else
expiry='';document.cookie=name+"="+value+expiry+"; path=/";},get:function(name){nameEQ=name+"=";ca=document.cookie.split(';');for(i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)==' ')
c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)
return c.substring(nameEQ.length,c.length);}
return null},unset:function(name){Cookie.set(name,'',-1);}}
function opengallery(id){var url="/modules/Gallery/FlashGallery.php?id="+id;var windowheight=document.viewport.getHeight();if(Prototype.Browser.IE){windowheight=10;}
if(windowheight<650){window.open(url,"gallery","height=547,width=752,status=no,toolbar=no,menubar=no,location=no");}else{this.lightWindow=new lightwindow({hideGalleryTab:true});this.lightWindow.activateWindow({href:url,height:547,width:752,scrolling:false});}}