function homeFeature() {
  var containerWidth = $('#feature').width(),
      numItems = $('#feature-top .frame').length,
      startPos = '-'+containerWidth+'px';

  //Set the initial width of the feature areas
  $('#feature .feature-wrapper, #feature-top .feature-wrapper').width(containerWidth * numItems);

  //Function to clone the first item and move it to the end
  function manipulateFront() {
    var $mainFirstItem = $('#feature .frame:first').clone(true);
    var $topFirstItem = $('#feature-top .frame:first').clone(true);
    $('#feature .frame:first, #feature-top .frame:first').remove();
    $('#feature .feature-wrapper, #feature-top .feature-wrapper').css('left',0);
    $mainFirstItem.appendTo('#feature .feature-wrapper');
    $topFirstItem.appendTo('#feature-top .feature-wrapper');
  }

  //Function to clone the last item and move it to the beginning
  //Returns the items that were cloned so that you can choose when to show them
  function manipulateEnd() {
    var $mainLastItem = $('#feature .frame:last').clone(true);
    var $topLastItem = $('#feature-top .frame:last').clone(true);
      $('#feature .frame:last, #feature-top .frame:last').remove();
      $mainLastItem.hide().prependTo('#feature .feature-wrapper');
    $topLastItem.hide().prependTo('#feature-top .feature-wrapper');

    return { main : $mainLastItem, top : $topLastItem};
  }

  //Handles the clicking of the feature navigation
  //We kill the binding of the event and then add it back in so the animation doesn't get messed up
  function featureNav(e) {
    $('#nav-feature a').die('click',featureNav);
    var $this = $(this),
    $par = $this.parent(),
    action = $par.attr('class');

    $this.addClass('no-outline');

    if(action === 'prev') {
      var $items = manipulateEnd();
      $('#feature .feature-wrapper, #feature-top .feature-wrapper').animate({
        left: 0
      }, 750, function() {
        $items.main.show();
        $items.top.show();
        $('#feature .feature-wrapper, #feature-top .feature-wrapper').css('left',startPos);
        $('#nav-feature a').live('click',featureNav);
        $this.trigger('animation-finished');
      });
    } else if (action === 'next') {
      manipulateFront();
      $('#feature .feature-wrapper, #feature-top .feature-wrapper').animate({
        left: startPos
      }, 750, function() {
        $('#nav-feature a').live('click',featureNav);
        $this.trigger('animation-finished');
      });
    }
    $this.trigger('track-view');
    return false;
  }
  
  function analyticsTracking(elem) {
    if($(elem).attr('data-feature-track') !== undefined) {
      var track_array = $(elem).attr('data-feature-track').split(','),
          opt_int_value = track_array[3] === '' ? 4 : parseInt(track_array[3], 10);
      _gaq.push(['_trackEvent', track_array[0], track_array[1], track_array[2], opt_int_value]);
    }
  }

  //On load, move the item from the end to the front
  var $items = manipulateEnd();
  $items.main.show();
  $items.top.show();
  $('#feature .feature-wrapper, #feature-top .feature-wrapper').css('left',startPos);

  //Bind the animation to the clicking of the feature nav
  $('#nav-feature a').live('click',featureNav).bind('track-view', function() {
    analyticsTracking($('#feature').find('.frame').eq(1));
  });
  
  //On load, trigger the analytics tracking for the visible frame
  analyticsTracking($('#feature').find('.frame').eq(1));
  
  //IE6 didn't like this
  if(!($.browser.msie && $.browser.version == '6.0')) {
    $('#nav-feature a').pulsate();
  }
}
