/*
* Plugin: Link Prodder // Version 1 // 11-9-2009
* Author: Eric Ditmer <http://ericditmer.com>
*/
(function ($) {
	$.fn.prod = function(params) {
		var params = $.extend({
			distance: 25,		//Number of pixels to pad
			duration: 250,		//Duration of the prod
			direction: 'left'	//Direction to prod from
		}, params);
		
		//Loop through each element and apply prod
		return this.each(function() {
			var direction = params.direction;
			var property = 'padding' + direction.charAt(0).toUpperCase() + direction.slice(1);
			var startPadding = parseInt($(this).css(property));
	
			var effect_in = {};
			effect_in[property] = parseInt(params.distance) + startPadding;
			var effect_out = {};
			effect_out[property] = startPadding;
			
			//Prod on hover
			$(this).hover(
				function() {
					$(this).stop().animate(effect_in, params.duration);
				},
				function() {
					$(this).stop().animate(effect_out, params.duration);
				}
			);
		});
	};
})(jQuery);