// apostropheReady is called at domReady
// it hooks into the a_js javascript framework
// it can be used for progressive enhancements at runtime
// such as Cufon text replacement
function apostropheReady()
{
  $('ul.a-nav-main').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 
  }); 
  
  if(window.location.hash == '#preview')
  {
    $('.container .a-controls').hide();
    $('#a-preview-button').addClass('active');
  }
  
  $('#a-preview-button').click(function(){
    $('.container .a-controls, .a-footer-wrapper .a-controls').toggle();
    $(this).toggleClass('active');
    if(window.location.hash == '#preview')
    {
      window.location.hash = null;
    } else {
      window.location.hash = '#preview'
    }
  });
  
  $('ul.locations').each(function(){
    $(this).find('li:odd').addClass('odd');    
  });
  $('.listview h4').addClass("plus").click(function(){
    $(this).next().slideToggle();
    $(this).toggleClass("plus").toggleClass("minus");
    return false;
  }).next().hide();
  
  $('.jobsview .list').addClass("plus").click(function(){
    $(this).next().slideToggle();
    $(this).toggleClass("plus").toggleClass("minus");
    return false;
  }).next().hide();
}

