(function ($) {
Drupal.behaviors.hegreGirls = {
  attach: function (context, settings) {
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    $.getScript(gaJsHost + "google-analytics.com/ga.js", function(){
      var pageTracker = _gat._getTracker("UA-252292-6");
      
      $('a.hegre-direct:not(".hegre-processed")').each( function() {      
        $(this).click( function() {
          pageTracker._trackPageview("/subscribe/join");
        });
      }).addClass("hegre-processed");
      
      $('.zip-options li:not(".hegre-processed"), .video-options li:not(".hegre-processed")').each( function() {
        $(this).click( function() {
          pageTracker._trackPageview("/subscribe/fileclick");
        });
      }).addClass("hegre-processed");
      
      $('a.hegre-tour:not(".hegre-processed")').each( function() {
        $(this).click( function() {
          pageTracker._trackPageview("/subscribe/tour");
        });
      }).addClass('hegre-processed');
      
      $('a.hegre-event:not(".hegre-processed")').each( function() {
        $(this).click( function() {
          pageTracker._trackPageview("/subscribe/event");
        });
      }).addClass('hegre-processed');
    
    });
  },
  detach: function (context, settings) {
  
  }
};

})(jQuery);;

