jQuery.fn.animateProbe = function() {
  args = arguments[0] || {}; 
  imgwidth = 200;
  imgheight = $(this).outerHeight();
  bodywidth = $(".container").outerWidth();
  //set the start position, slight delay makes sure it works properly
  $(this).delay(300).css({position: 'absolute', left: '0', top: '0', cursor: 'pointer'}).animate({
    left: bodywidth - imgwidth + 'px',
  }, args.speed / 2, function() {
    $(this).animate({
	    left: args.endPoint,
		}, args.speed / 2, function() {
			//add a click function so the user can hide the thing
			$(this).click(function () {
			$(this).animate({
	        top: '-' + args.moveUp,
			margin: '0px',
		    }, 1000)		
		})			
	 })
  })
}


$(document).ready(function() {

//time of animation, how far away from the left to end, how far you want the probe to move up when clicked
$("#probe-animate").animateProbe({speed: 5000, endPoint: "100px", moveUp: "150px"});

});

