var resizeEvent = function(){
	if(jQuery(window).width() > 1000){
		jQuery(".sideBar").removeClass("min");
	}else{
		jQuery(".sideBar").addClass("min");
	}
}

jQuery(window).resize(function(){
	resizeEvent();
});


jQuery(function($){
	resizeEvent();
	
	var sideHeight = $(".sideBar").height();
	if(sideHeight > $(".container").height()) {
		$(".container").height(sideHeight);
	}
		var $tweetUl = $(".tweet ul");
		if( $tweetUl.size()){
		var tweetListWidth = 0;
		$(".tweet li").each(function(){
			tweetListWidth += $(this).width();	
		});
	
		var tweetScroll = function(){
			var left = $tweetUl.css("margin-left");
			left = left.replace("px","");
			left = left-0;
			var time = (tweetListWidth+left)*10;
			$tweetUl.animate({marginLeft:tweetListWidth*-1},time,"linear",function(){
				$(this).css({marginLeft:700});
				tweetScroll();
		
			});
		}
		tweetScroll();
	
		$tweetUl.mouseover(function(){
			$tweetUl.stop();
		}).mouseout(function(){
			tweetScroll();
		});
	}
	
	var $entrys = $(".home .entry");
	var maxHeight = 0;
	$entrys.each(function(){
		var boxHeight = $(this).height();
		if(maxHeight < boxHeight){
			maxHeight = boxHeight;	
		}
	});
	
	$entrys.height(maxHeight);
	
});

