$(function(){
    $('#header .pir').stripe('#00c800', '#dedede').removeClass('pir').find('span').addClass('pir');
    $('.pir :header, :header.pir, .pir').pir();
    
    $('.coach-image > img').reflect();
    
    $('.slideshow').cycle();
    
    $('#main-header').css('cursor','pointer').click(function(){
        window.location.href = '/';
    });
    
      $('a').live('click',function(){
    try {
      var loc = $(this).attr('href');
      if (loc.match(/rowcjr\.org|chattanoogajuniorrowing\.org/)){
        if (m = loc.match(/\.(.{2,4})$/)){
           pageTracker._trackPageview(loc);}}
      else { pageTracker._trackEvent('Outbound Link', loc); }
    } catch (e){} finally { return true; }
  });
    
    //var els = "hgroup section header footer aside article date".split(' ');
    /*var emails = $('span.email');
    if (emails.length){
        emails.each(function(){
            text = this.innerHTML;
            var email = {
                user: text.match(/(\w+[^ \(])/i)[1],
                site: text.match(/(\(at\)|@) ?(\w+) /i)[2],
                domain: text.match(/(\(dot\)|\.) ?(\w{2,})/i)[2],
                text: function(){return (this.user+'@'+this.site+'.'+this.domain)}
            }
            if (email.user && email.site && email.domain){
                $(this).replaceWith(
                    $('<a />', {href: 'mailto:'+email.text()+';', class: 'email-link', text: email.text()}));
            }
        });
    }*/
});
