(function($) {
	$.fn.moveTo = function($el, f) {
		return this.each(function() {
			var $position = $el.offset(),
				bottom = $position.top + $el.height(),
				windowBottom = $(window).height() - 100,
				pixToTop = $('.wrap').scrollTop();
			
			console.log(pixToTop+' - '+bottom);
			if (windowBottom < bottom ) {
				$('.wrap').animate({scrollTop: (bottom + pixToTop)-windowBottom }, 500);
			}

			if (typeof f === "function") {
				f.call(this);
			}
		});
	};
}(jQuery));
