(function($){  
	$.fn.loadBounce = function(options){
		var defaults = {  
			Speed: 1500,
			ActiveClass: "doBounce",
			MovingElement: "",
			Bounce: 1
		};
	  var options = $.extend(defaults, options);  
		return this.each(function(){
			obj = $(this);
		
			$(obj).click(function(){
				$(options.MovingElement).stop();
				var GetUrl = $(this).attr("href");
				doLoad(GetUrl);
				return false;
			});

		function doLoad(Url){
				var MoveMe = options.MovingElement;
				if(Url.length > 0){
					var HidePx = ($(MoveMe).height());
					$(MoveMe).animate({
						marginTop: "-"+HidePx+"px"
					}, 300, "linear", function(){
						$.get(Url, function(data){
							doDrop(data);
						});
					});
				}
			}
			
			function doDrop(data){
				var elem = options.MovingElement;
				$(elem).html(data);
				var HidePx = ($(elem).height()) / 10;
				$(elem).animate({
					marginTop: HidePx+"px"
				}, 300, "linear", function(){
					for(i=1;i<=options.Bounce;i++){
						var Speed = 75 * i;
						mt = (20 / i);
						$(elem).animate({
							marginTop: mt+"px"
						},Speed);
						mt2 = (5 / i);
						$(elem).animate({
							marginTop: "-"+mt2+"px"
						},Speed);
						$(elem).animate({
							marginTop: "0px"
						},Speed, "linear");
					}
				});
			}
		});
};})(jQuery);