/* plugin name: stickyfooter */

(function($) {

$.fn.stickyfooter = function(options) {

	// build main options before element iteration
	var opts = $.extend({}, $.fn.stickyfooter.defaults, options);
	// iterate and reformat each matched element
	return this.each(function() {
			$this = $(this);
			
			$('body').append($this);
			
			positionFooter(); 
			function positionFooter(){
				$this.css({
					position: "absolute",
					top:($(window).scrollTop()+$(window).height()-$this.height())+"px",
					zIndex: 100
				})
			}
		 
			$(window)
				.scroll(positionFooter)
				.resize(positionFooter);
			
		});
}

//
// plugin settings
//

$.fn.stickyfooter.defaults = {};

})(jQuery);
