// JavaScript Document
jQuery.noConflict();
jQuery(document).ready(function () {
				//var w = jQuery(".wttwitter").height();
				//var initY = 0 - w;
				//jQuery(".wttwitter").css('top',initY+'px');
				
				jQuery(".wttwitter").delay(500).scrollTwitter();
				jQuery('.wttwitter').hover(function() {
  					jQuery(this).stop(true);
				},function() {
					jQuery(this).scrollTwitter();
				});
				
				
				var w = jQuery(".teaser-feeds .twrss_table").height();
				//var initY = 0 - w;
				//jQuery(".teaser-feeds .twrss_table").css('top',initY+'px');
				
				jQuery(".teaser-feeds .twrss_table").delay(1000).scrollTeaserFeed();
				jQuery('.teaser-feeds .twrss_table').hover(function() {
  					jQuery(this).stop(true);
				},function() {
					jQuery(this).scrollTeaserFeed();
				});
				
				var w = jQuery("#feeds .twrss_table").height();
				//var initY = 0 - w;
				//jQuery("#feeds .twrss_table").css('top',initY+'px');
				
				jQuery("#feeds .twrss_table").delay(250).scrollFeeds();
				jQuery('#feeds .twrss_table').hover(function() {
  					jQuery(this).stop(true);
				},function() {
					jQuery(this).scrollFeeds();
				});
				
				//makeMap();
	
			});
jQuery.fn.scrollTwitter = function() {
	var w = jQuery(this).height();
	//var initY = 0 - w;
	//var wtg = w - (parseInt(jQuery(this).css('top'), 10)-initY);
	var wtg = w + parseInt(jQuery(this).css('top'), 10);
	var speed = wtg/8*1000;
	jQuery(this).animate({
					top:'-'+w+'px'
					//top:'150px'
					}, speed, "linear", function() {
						//alert("over");
						jQuery(this).css("top","150px");
						//jQuery(this).css('top',initY+'px');
						jQuery(this).scrollTwitter();
					} )
};
jQuery.fn.scrollTeaserFeed = function() {
	var w = jQuery(this).height();
	//var initY = 0 - w;
	var wtg = w + parseInt(jQuery(this).css('top'), 10);
	//var wtg = w - (parseInt(jQuery(this).css('top'), 10)-initY);
	var speed = wtg/8*1000;
	jQuery(this).animate({
					top:'-'+w+'px'
					//top:'90px'
					}, speed, "linear", function() {
						//alert("over");
						//jQuery(this).css("top","90px");
						jQuery(this).css("top","110px");
						//jQuery(this).css('top',initY+'px');
						jQuery(this).scrollTeaserFeed();
					} )
	
};
jQuery.fn.scrollFeeds = function() {
	var w = jQuery(this).height();
	//var initY = 0 - w;
	var wtg = w + parseInt(jQuery(this).css('top'), 10);
	//var wtg = w - (parseInt(jQuery(this).css('top'), 10)-initY);
	var speed = wtg/8*1000;
	jQuery(this).animate({
					top:'-'+w+'px'
					//top:'90px'
					}, speed, "linear", function() {
						//alert("over");
						//jQuery(this).css("top","90px");
						jQuery(this).css("top","200px");
						//jQuery(this).css('top',initY+'px');
						jQuery(this).scrollFeeds();
					} )
};