  /**
  * Rollover effect, changes element's src attribute on hover.
  * Scans all <img> tags with images ending with '_n.*' and replaces that with '_h.*' (*=any extension -> gif, jpg, png)
  * image_n.png => image_h.png 
  * To handle images inside <INPUT> and other tags have 'class=rolloverimage' to it
  * Pass true to preload images (for fast feedback).
  *
  * By M. Azmeer (www.azmeer.info)
  * 12-Sep-2010
  */
  jQuery.fn.rollover = function(preload) {
	this.filter('[src*="_n."]').each(function() {
		  var a = this.src; 
		  var b = this.src.replace('_n','_h'); 
		  $(this).hover(function() { this.src = b; }, function() { this.src = a; });
		  if (preload) {
			  var i = new Image;
			  i.src = b;
		  }
		  //alert('  '+a+'   '+b);
	  });
	  return this;
	};
  
  $(function() {
	  $('img').rollover(1);
	  $('.rolloverimage').rollover(1);
  });


