  /* Paul's field label thingy */
  $.fn.textfieldLabel = function() {
	  this.each(function() {
		  $(this).hide();
		  var lt = $(this).html(); // label text
		  var f = $('#' + $(this).attr('for')); // field element

		  f.val(lt);
		  f.addClass('with-label');

		  f.focus(function () {
			  if ($(this).val() == lt) {
				  $(this).val('');
		      $(this).removeClass('with-label');
			  }
		  });

		  f.blur(function () {
			  if ($(this).val() == '') {
				  $(this).val(lt);
				  $(this).addClass('with-label');
			  }
		  });
	  })
  }

  $(document).ready(function () {
      $('body').addClass('js');

      $('table.results tbody tr:even td').addClass('zebra');


      // Labels in text fields
      $('#search-main-container label').textfieldLabel();


      $('#search-right-container label').textfieldLabel();


      // Datepicker
      $(".dp").datepicker({ dateFormat: 'dd/mm/y' });
      $(".from").datepicker('setDate', new Date());



      if ($('.content-holder-home').is(':visible')) {
          $('body').addClass('bluebg');
      } else {
          $('body').addClass('other');
          return;
      }


  });


