
$(document).ready(function() {

  //search box text
  if ($('input.search').val() == "") {$('input.search').val("Search site");}
  $('input.search').focus(function() { if ($(this).val() == "Search site") { $(this).val(""); } });
  $('input.search').blur(function() { if ($(this).val() == "") { $(this).val("Search site"); } });

  /*$(".accordian").hrzAccordion({containerClass     : "container3",
  listItemClass      : "listItem3",					
			
  contentWrapper     : "contentWrapper3",
  contentInnerWrapper: "contentInnerWrapper3",
  handleClass        : "handle3",
  handleClassOver    : "handleOver3",
  handleClassSelected: "handleSelected3",
  openOnLoad   : "-1"
  });*/



  $('.listItem3').click(function() {
    $('.default_accordian').hide();
  });

  $("#accordianListItem0").click(function() {
    $("div:first").removeClass().addClass("outer_background_teal");
  });

  $("#accordianListItem1").click(function() {
    $("div:first").removeClass().addClass("outer_background_purple");
  });

  $("#accordianListItem3").click(function() {
    $("div:first").removeClass().addClass("outer_background_green");
  });

  $("#accordianListItem4").click(function() {
    $("div:first").removeClass().addClass("outer_background_orange");
  });


  /* Dropdown menu toggle */
  $('div#dropdown').hide();
  $('a#newShow').click(function() {
    $('#dropdown').slideToggle(400);
    $(this).toggleClass('newHide')
    return false;
  });


  /* FAQ Accordion */
  if ($('.accordion').length) {
    $(".accordion").accordion({
      header: "h3",
      active: -1,
      collapsible: true,
      autoHeight: false
    });
  }

  /* Tabs */
  if ($('#tabs').length) {
    $('#tabs').tabs({
      selected: 0,
      fx: { opacity: 'toggle' }
    });
  }

  /* Bubble Tip */
  if ($('#a1_up').length) {
    $('#a1_up').bubbletip($('#tip1_up'), {
      deltaDirection: 'right',
      calculateOnShow: true,
      offsetTop: -7
    });
  }

  if ($('#a1_right').length) {
    $('#a1_right').bubbletip($('#tip1_right'), {
      deltaDirection: 'left',
      calculateOnShow: true,
      offsetTop: -7
    });
  }

  if ($('#a1_left').length) {
    $('#a1_left').bubbletip($('#tip1_left'), {
      deltaDirection: 'left',
      calculateOnShow: true,
      offsetTop: -7
    });
  }

  /* Checkbox */


  $('input').checkBox();


  /* Nav dropdown menu */

  $('div.topnav ul li').hover(function () {
    $(this).not($('div.topnav ul li ul li')).addClass('li_hover');
    $(this).children('ul').fadeIn('fast');
  },
  function () {
    $(this).removeClass('li_hover');
    $('li_hover ul').addClass('hide');
    $(this).children('ul').hide();
  });
            


});
 

