// coded by smashprogrammer
// about.me/smashprogrammer

jQuery(function(){

	jQuery.fn.wscroll = function(options) {

		// default settings
		var defaults = {
			speed : 1
		};

		var config = jQuery.extend(defaults, options);

		this.click(function(){
			play = setInterval(function(){
				var pos = jQuery(window).scrollTop();
				if( pos == 0 ) clearInterval(play);
				else {
					jQuery(window).scrollTop(pos - 20);
				}
			},config.speed);

			return false;
		});
	};
});

