﻿(function($){
	$.fn.moveIcon = function(options)
	{
		var defaults = {
			queue: false,
			duration: 300,
			easing: 'linear',
			txtColor: '#000',
			txtColorHover: '#fff',
			bgPosition: '0 0',
			hoverBgPosition: '0 20px'
		};

		var options = $.extend(defaults, options);
		
		return this.each(function(){
			var $this = $(this);
			var data = $this.html();
			var newdata = $(document.createElement('span')).html(data);
			
			$this.empty().append(newdata);

			$this.bind('mouseenter', function(e){
				$('dt, dt a', this).stop().animate({
					backgroundPosition: options.bgPosition
				},{
					queue: options.queue,
					duration: options.duration
				});
				
			}).bind('mouseleave', function(e){
				$('dt, dt a', this).stop().animate({
					backgroundPosition: options.hoverBgPosition
				},{
					queue: options.queue,
					duration: options.duration
				});
				
			});
		});
	};
})(jQuery); 


