 
	var sw_aricle_top = 0; 
	var sw_aricle_speed = 0; 
	var sw_aricle_max_speed = 9; 
	var sw_aricle_timer = 0; 
	var sw_aricle_obj = null; 
	var ind = 0;
	var end = 0;
 
	$(document).ready(function(){ 
		//replace div 
		/*
		if($("#main_content > .article_text"))
		{obj=$("#main_content").find(".article_text");
		azon="class='article_text'";}

		else if($("#main_content > #sw_16_gallery"))
		{obj=$("#main_content").find("#sw_16_gallery"); 
		azon="id='sw_16_gallery'";}

		var rep_div_txt=$(obj); 
		rep_div_txt = rep_div_txt.html(); 
		$(obj).ready(function(){ 
		  $(obj).replaceWith("<div "+azon+"><div id='aricle_txt'><p>" + rep_div_txt + "</p></div></div>"); 
			//get height-outherheight	 
			//article_txt_min=Math.round((29-rep_div_txt.length/40)*17); 
		*/	
			var oh = $('#main_content_roller').outerHeight(); 
		
			article_txt_min = 378 - oh - 120; 
			
			if(article_txt_min<-30){ 
				 
			$(".go_top").css({ 
					"display": "block" 
				}); 
			$(".go_bottom").css({ 
					"display": "block" 
				}); 
			} 
		
	 

	//rollover 
 
	(function($) { 
 
		var types = ['DOMMouseScroll', 'mousewheel']; 
		 
		$.event.special.mousewheel = { 
			setup: function() { 
				if ( this.addEventListener ) 
					for ( var i=types.length; i; ) 
						this.addEventListener( types[--i], handler, false ); 
				else 
					this.onmousewheel = handler; 
			}, 
			 
			teardown: function() { 
				if ( this.removeEventListener ) 
					for ( var i=types.length; i; ) 
						this.removeEventListener( types[--i], handler, false ); 
				else 
					this.onmousewheel = null; 
			} 
		}; 
		 
		$.fn.extend({ 
			mousewheel: function(fn) { 
				return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); 
			}, 
			 
			unmousewheel: function(fn) { 
				return this.unbind("mousewheel", fn); 
			} 
		}); 
		 
		 
		function handler(event) { 
			var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true; 
			 
			event = $.event.fix(event || window.event); 
			event.type = "mousewheel"; 
			 
			if ( event.wheelDelta ) delta = event.wheelDelta/120; 
			if ( event.detail     ) delta = -event.detail/3; 
			 
			// Add events and delta to the front of the arguments 
			args.unshift(event, delta); 
		 
			return $.event.handle.apply(this, args); 
		} 
		 
		})(jQuery); 
	
	$('#main_content_roller').mousewheel(function(event, delta) {
		if (delta > 0) 
		{
			end=60;
			sw_aricle_txt_stop();
			sw_aricle_txt_start( 1); }
			 
		else if (delta < 0) 
			{
			end=60;
			sw_aricle_txt_stop();
			sw_aricle_txt_start( -1 ) }
			
				return false;  //prevent default 
	}); 

}); 	 
 
	function sw_move_aricle_txt() { 			

		if (sw_aricle_top<=0 && sw_aricle_top>=article_txt_min && (ind<=end || end==0)) 
		{ 
			if ( Math.abs( sw_aricle_speed ) < sw_aricle_max_speed) { 
			sw_aricle_speed *= 1.1; 
			//alert(sw_aricle_speed)
			} 
		ind++;
		sw_aricle_top += sw_aricle_speed; 
		sw_aricle_obj.style.top=sw_aricle_top+'px'; 
		} 
		else if(sw_aricle_top<article_txt_min && sw_aricle_speed==1) 
		{ 
		ind=0;
		end=0;
		sw_aricle_top=article_txt_min; 
		sw_move_aricle_txt(); 
		} 
		else if(sw_aricle_top>0 && sw_aricle_speed==-1) 
		{ 
		sw_aricle_top=0; 
		end=0;
		ind=0;
		sw_move_aricle_txt(); 			
		} 	
		else{
		end=0;
		ind=0;
		sw_aricle_txt_stop()
		}
		
	} 
	 
	function sw_aricle_txt_start( speed ) { 
		sw_aricle_speed = speed; 
		sw_aricle_obj = document.getElementById('main_content_roller'); 
		sw_aricle_timer = setInterval( sw_move_aricle_txt, 33 ); 	 
	} 
 
	function sw_aricle_txt_stop() { 
		sw_aricle_speed = 0; 
		clearInterval( sw_aricle_timer ); 
	} 
	
	function sw_aricle_txt_top() { 
		sw_aricle_speed = 0; 
		clearInterval( sw_aricle_timer ); 
		sw_aricle_top=0;
		sw_aricle_obj.style.top="0px";
	} 

	 

 
