(function($){
	$.fn.hoverIcon=function(c){
		c=jQuery.extend({newWindow:false,fadeSpeed:500,xOffset:10,yOffset:20,icon:''},c);
		var d='';
		do{d=Math.ceil(Math.random()*10000)+'hi'}while($('#'+d).length);
		$("body").append('<div id="'+d+'" style="position:absolute; display:none;"><img src="'+c.icon+'" alt="" /></div>');
		d='#'+d;this.each(function(){$(this).hover(function(e){$(d).stop().css('top',(e.pageY-c.xOffset)+'px').css('left',(e.pageX+c.yOffset)+'px').fadeTo(c.fadeSpeed,1)},function(){$(d).stop().fadeTo(c.fadeSpeed,0)});
		$(this).mousemove(function(e){$(d).css("top",(e.pageY-c.xOffset)+'px').css("left",(e.pageX+c.yOffset)+'px')});
		var a=$(this).parent();
		var b=null;
		if(c.newWindow&&($(this).is('a')||a.is('a'))){if($(this).is('a')){b=$(this)}else{b=a}b.click(function(){window.open(b.attr('href'));
	return false})}});
	return this}})(jQuery);

