// initialise plugins
$(function(){

  //Default value for Search box
  $('input.searchsite').defaultValue();

  $(".collapse").accordion({
    header: "h4", autoHeight: true ,
    collapsible: true
  }).children().css("visibility","visible");	

  $(".collapsed").accordion({
    header: "h4", autoHeight: true ,
    collapsible: true,
    active: false
  }).children().css("visibility","visible");

  $('ul.sf-menu').superfish({ 
    delay:       1000,                            // one second delay on mouseout
    animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
    speed:       'fast',                          // faster animation speed
    autoArrows:  false,                           // disable generation of arrow mark-up
    dropShadows: false                            // disable drop shadows
  });

  $('.top').mouseover(function(){
    if ($(this).attr('rel')!=""){
      $(this).next('ul').load($(this).attr('rel'));
    }
  });
  $('#promo-home').after('<ul id="promonav" style="margin-top: 3px">').cycle({
    cleartype: 1,
    fx: 'cover',
    speed: 500,
    timeout: 5000,
    pager:  '#promonav'
  });
  $('#news-and-events ul li:first').addClass('first');
  $('#news-and-events ul li:last').addClass('last');
  
  $('#home-hero p:first').addClass('first');
  $('#home-hero').cycle({
    speed: 500,
    pause: 1,
    timeout: 5000
  });
  
  
  //Footer Addthis button
  $('#addthat').bind({
    click: function(){
      return addthis_sendto();
    },
    mouseout: function(){
      addthis_close();
    },
    mouseover: function(){
      return addthis_open(this, '', '[URL]', '[TITLE]');
    }
  });
});

//Add this
var addthis_pub="troxelhelmets";
var addthis_brand="Troxel Helmets";
var addthis_options='facebook, twitter, digg, delicious, myspace, stumbleupon, google, more';
var addthis_header_color="#FFFFFF";
var addthis_header_background="#006524";

//blue hornet
function check_cdfs(form) {
  return true;
}
