;(function($) {
	$.fn.iconLink = function(options) {
		return this.each(function() {
			var $settings = jQuery.extend(true, {}, $.fn.iconLink.defaults, options);
			var $this = $(this);

			$this.html("<span style=\"position:relative;left: -10000px;\">" + $this.html() + "</span>");
			$this.css({
				"text-decoration" : "none",
				"overflow"   : "hidden",
				"height" 	 : $settings.height,
				"width" 	 : $settings.width,
				"background-repeat" : "no-repeat",
				"background-position": "center",
				"background-image" : "url("+$settings.image+")"
			});

			if ($settings.mouseover) {
				$this.mouseenter(function() {

					$this.css({
						"background-image" : "url("+$settings.hover+")"
					});
					return null;
				});

				$this.mouseleave(function() {

					$this.css({
						"background-image" : "url("+$settings.image+")"
					});
					return null;
				});
			}

			return null;
		});
	};

	$.fn.iconLink.defaults = {
			mouseover: true,
			image : '../../images/layout/go-link.gif',
			hover : '../../images/layout/go-link-over.gif',
			height: 9,
			width : 8
	};
})(jQuery);

