(function($) {

$(document).ready(function() {
  $('#searchbutton input').click(function(e) {
    e.preventDefault();
    var term = $('#searchbox').val();
    document.location.href="/search/site/" + term;
  });
});

})(jQuery);;
// $Id: field_group.js,v 1.5.2.12 2011/01/07 09:52:30 stalski Exp $

(function($) {

/**
 * Drupal FieldGroup object.
 */
Drupal.FieldGroup = Drupal.FieldGroup || {};
Drupal.FieldGroup.Effects = Drupal.FieldGroup.Effects || {};

/**
 * Implements Drupal.FieldGroup.processHook().
 */
Drupal.FieldGroup.Effects.processAccordion = {
  execute: function (context, settings) {
    $('div.field-group-accordion-wrapper', context).accordion({
      autoHeight: false,
      active: '.field-group-accordion-active'
    });
  }
}

/**
 * Implements Drupal.FieldGroup.processHook().
 */
Drupal.FieldGroup.Effects.processHtabs = {
  execute: function (context, settings) {
  }
}

/**
 * Implements Drupal.FieldGroup.processHook().
 * 
 * TODO clean this up meaning check if this is really 
 *      necessary.
 */
Drupal.FieldGroup.Effects.processDiv = {
  execute: function (context, settings) {

    $('div.collapsible', context).each(function() {
      var $wrapper = $(this);

      // Turn the legend into a clickable link, but retain span.field-group-format-toggler
      // for CSS positioning.
      var $toggler = $('span.field-group-format-toggler:first', $wrapper);
      var $link = $('<a class="field-group-format-title" href="#"></a>');
      $link.prepend($toggler.contents()).appendTo($toggler);
      
      // .wrapInner() does not retain bound events.
      $link.click(function () {
        var wrapper = $wrapper.get(0);
        // Don't animate multiple times.
        if (!wrapper.animating) {
          wrapper.animating = true;
          var speed = $wrapper.hasClass('speed-fast') ? 300 : 1000;
          if ($wrapper.hasClass('effect-none') && $wrapper.hasClass('speed-none')) {
            $('> .field-group-format-wrapper', wrapper).toggle();
          }
          else if ($wrapper.hasClass('effect-blind')) {
            $('> .field-group-format-wrapper', wrapper).toggle('blind', {}, speed);
          }
          else {
            $('> .field-group-format-wrapper', wrapper).toggle(speed);
          }
          wrapper.animating = false;
        }
        return false;
      });
      
    });
  }
};

/**
 * Behaviors.
 */
Drupal.behaviors.fieldGroup = {
  attach: function (context, settings) {
    if (settings.field_group == undefined) {
      return;
    }
    $('body', context).once('fieldgroup-effects', function () {
      // Execute all of them.
      $.each(Drupal.FieldGroup.Effects, function (func) {
        // We check for a wrapper function in Drupal.field_group as 
        // alternative for dynamic string function calls.
        if (settings.field_group[func.toLowerCase().replace("process", "")] != undefined && $.isFunction(this.execute)) {
          this.execute(context, settings);
        }
      });
    });
  }
};

})(jQuery);;
(function($) {
  
$(document).ready(function() {
  setEvents();
  $('#billboard').cycle({
		fx: 'fade',
		timeout: 10000,
		pause: 8
	});
  $('.cycler').click(function(){ 
		$('#billboard').cycle($(this).attr('cyclenum') - 1);
  });
});

function setEvents() {
  $('#features-editors-picks').click(function(e) {
    e.preventDefault();
    $('#featurebox-wrapper').fadeTo('med', 0.01, function() {
      $('#features-wrapper').load('/front #features-wrapper', function() { 
        setEvents(); 
        Cufon.replace('#featurestitle', { fontFamily: 'DINBold' });
        $('#featurebox-wrapper').fadeTo('med', 1.0);
      });
    });
  });
  $('#features-most-popular').click(function(e) {
    e.preventDefault();
    $('#featurebox-wrapper').fadeTo('med', 0.01, function() {
      $('#features-wrapper').load('/front/popular #features-wrapper', function() { 
        setEvents(); 
        Cufon.replace('#featurestitle', { fontFamily: 'DINBold' });
        $('#featurebox-wrapper').fadeTo('med', 1.0);
      });
    });
  });
}

})(jQuery);
;

