$(document).ready(function(){

//INITALIZE HOMEPAGE CALLOUTS***************************************************
  $('div.hp_box > div')
    .click(function() {
      
      var toutMap = {
        hp_copay:'/patients/about_betaseron/affording_betaseron.jsp',
        hp_treatments:'/patients/about_betaseron/why_choose_betaseron/compare_ms_treatments.jsp',
        hp_support:'/patients/betaplus/index.jsp'
      };
       window.location = toutMap[$(this).attr('id')];
       
      return false;
    })
    .mouseover(function(){ $(this).css('cursor', 'pointer'); });

//INITALIZE CALLOUTS************************************************************
  
  $('div.content_callouts > div')
    .click(function() {
      
      var toutMap = {
        thin_callout:'/patients/about_betaseron/why_choose_betaseron/thinnest_needle.jsp',
        copay:'/patients/about_betaseron/affording_betaseron.jsp',
        compare_top:'/patients/about_betaseron/why_choose_betaseron/compare_ms_treatments.jsp',
        why_choose: '/patients/about_betaseron/why_choose_betaseron/',
        why_choose_middle: '/patients/about_betaseron/why_choose_betaseron/',
        mentor:'/patients/betaplus/peer_mentor/index.jsp',
        compare_middle:'patients/about_betaseron/why_choose_betaseron/compare_ms_treatments.jsp',
        betaplus_tout:'/patients/betaplus/index.jsp',
        compare_bottom:'/patients/about_betaseron/why_choose_betaseron/compare_ms_treatments.jsp'
      };
       window.location = toutMap[$(this).attr('id')];
       
      return false;
    })
    .mouseover(function(){ $(this).css('cursor', 'pointer'); });

//CLEARS SEARCH BOX*************************************************************  
  $('#txt_search')
    .click(function(){
      $(this).attr('value', '');
      return false;
    })
    .blur(function(){
      if($(this).attr('value') == '') {
        $(this).attr('value','Search');
      }
    });

//FONT RESIZER******************************************************************
  $('ul.font_resizer > li > a').click(function(){
    if($(this).attr('id') == 'font_small') {
      setActiveStyleSheet('');
    } else {
     setActiveStyleSheet($(this).attr('id'));
    }
    return false;
  });
  
//FAQS PAGE*********************************************************************
  if ($('body').hasClass('faqs')) {
    $('.question').click(function(){
      if ($(this).next().hasClass('currently')) {
        $('.answer.currently').slideUp('slow').removeClass('currently');
      } else {
        $('.answer.currently').slideUp('slow').removeClass('currently');
        $(this).next().slideDown('slow').addClass('currently');
      }
      return false;
    });
  }
});



