(function(){
  // firebugx.js optimized for compressability and Safari
  var win = window, emptyFn = function(){}, names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
  if (!win.console) {
    win.console = {};
  }
  var console = win.console;
  for (var i = 0; i < names.length; ++i) {
    if (!console[names[i]]) {
      console[names[i]] = emptyFn;
    }
  }
})();


﻿$().ready(function () {
    //$("#search_input").watermark("Find en kompetence / en person / en virksomhed");
    $("#search_holder input").inputHint();
	$("#leftcontent_leftcell textarea").inputHint();
	$(".fancybox").fancybox();
});

(function ($) {
	
	/**
	 * Initialise input hints on all matched inputs.
	 *
	 * Usage example:
	 *   $('*[hint]').inputHint();
	 *
	 * Options keys:
	 *   hintClass - CSS class to apply to inputs with active hints
	 */
	$.fn.inputHint = function(options) {
		options = $.extend({hintClass: 'hint'}, options || {});

		function showHint() {
			if ($(this).val() == '') {
				$(this).addClass(options.hintClass).val($(this).attr('hint'));
			}
		}

		function removeHint() {
			if ($(this).hasClass(options.hintClass)) $(this).removeClass(options.hintClass).val('');
		}
		
		this.focus(removeHint).blur(showHint).blur();

        var $form = this.parents('form:eq(0)');
        this.each(function() {
            var self = this;
            $form.submit(function() { removeHint.apply(self); });
        });
	};
	
})(jQuery);
