(function($)
{
	$.fn.centerElement = function() {
        return this.each(function()
        {
			var el = this;
			$(el).remove().appendTo("body")
					.wrap("<div style='position:absolute;top:50%;left:50%;width:1px;height:1px;'></div>")
					.css({position: 'relative', left: el.offsetWidth / -2 + "px", top: el.offsetHeight / -2 + "px"});
		});
	};

	$.fn.centerInWindow = function() {
        return this.each(function()
        {
			var el = this;
			var posTop = $(document).scrollTop() + ($(window).innerHeight() / 2) - ($(this).height() / 2);
			var posLeft = $(document).scrollLeft() + ($(window).innerWidth() / 2) - ($(this).width() / 2);
			$(el).remove().appendTo("body")
				.wrap("<div style='position:absolute;top:"+posTop+"px;left:"+posLeft+"px;width:1px;height:1px;'></div>");
		});
	};

	$.fn.defaultIndicator = function() {
        return this.each(function()
        {
			var el = this;
			var posTop = $(document).scrollTop() + ($(window).innerHeight() / 3) - ($(this).height() / 2);
			var posLeft = $(document).scrollLeft() + ($(window).innerWidth() / 2) - ($(this).width() / 2);
			$(el).remove().appendTo("body")
				.wrap("<div style='position:absolute;top:"+posTop+"px;left:"+posLeft+"px;width:1px;height:1px;'></div>");
		});
	};

})(jQuery);