/**
* A jquery plugin wrapper for the jquery.scrollTo plugin.
* It handles IE6 scrolling issues related to the docking bar
*/

(function ($) {

	//map $.mwScrollTo calls as needed
	$.mwScrollTo = function( target, duration, settings ){
		if( $('#blanket #sheet').length == 1 ) {
			//ie6 has a special wrapper div that should be scrolled instead of the main window
			$('#blanket').scrollTo(target, duration, settings);
		}
		else {
			//for decent browsers, just scroll the window
			$.scrollTo(target, duration, settings);
		}
	};

	$.fn.mwScrollTo = function (target, duration, settings) {
		return this.each(function () {
			//pass all calls directly to scrollTo
			$(this).scrollTo(target, duration, settings);
		});
	};

})(jQuery);