//site.js - Modified 03/03/2008
var Site = {
   start : function() {
      if ($('log')) {
         Site.getYear();
         }
      if ($('video_player')) {
         Site.getVideo();
         }
		 var smooth = new SmoothScroll();
      }
   , getYear : function() {
      $$('.years').each(function(el, i) {
         el.addEvent('click', function(e) {
            var event = new Event(e).stop(); var ajUrl = this.getProperty('href'); var jesplit = ajUrl.split('?'); var ajData = jesplit[1]; $$('.active').removeClass('active'); el.addClass('active'); //and then comes your ajax call
            var myAjax = new Ajax('http://' + location.hostname + '/wp-content/themes/new_bobcat/history_text.php?' + ajData, {
               update : 'log', onRequest : function() { 
                  $('log').setHTML("Loading..."); }, onComplete : function() {  /* mySlider.slideIn(); */ }
               }
            ).request(); }
         ); }
      );
      }
   , getVideo : function() {
      $$('.video_select').each(function(el, i) {
         el.addEvent('click', function(e) {
            var event = new Event(e).stop(); var guid = this.getProperty('id').substr(2); //and then comes your ajax call
            var myAjax = new Ajax('http://' + location.hostname + '/wp-content/themes/new_bobcat/vimeo_embed.php?guid=' + guid, {
               update : 'video_player', onRequest : function() {
                  $('video_player').setHTML("Loading..."); }
               }
            ).request(); }
         ); }
      );
      }
   };
window.addEvent('load', Site.start); 