/* $Id: navamedic.js 157 2011-02-16 08:50:36Z adam $ */

(function ($) {

  Drupal.behaviors.clickableElement = {
    attach: function(context, settings) {
      $('li.clickable, .clickable .content, .clickable .pane-content', context).click(function () {
        var href = $(this).find("a").attr("href");
        console.log(href);
        if (href) {
          window.location = href;
        }
      });
    }
  };

  Drupal.behaviors.searchText = {
    attach: function (context, settings) { 
      var def = 'search';

      if($('#edit-search-block-form--2', context).val() == "") {
        $('#edit-search-block-form--2').val(def);
      }

      $('#edit-search-block-form--2', context).focus(function() {
        if($('#edit-search-block-form--2').val() == def) {
          $('#edit-search-block-form--2').val('');
        }
      });

      $('#edit-search-block-form--2', context).blur(function() {
        if($('#edit-search-block-form--2').val() == '') {
          $('#edit-search-block-form--2').val(def);
        }
      });
    }
  }
})(jQuery);

;

