$today = {
	init: function(){
		$today.cont = $('#today>div.content');
		$today.films = $today.cont.find('.film');
		
    $today.isHidden = false;
	  $today.setSizes();

		var thread = false;
		$(window).resize(function(){
			return (function(){
				if (thread) clearTimeout(thread);
				thread = setTimeout($today.setSizes,0);
			})();
		}); 
		
	},    
	
	setSizes: function(){
		
    jQuery.each($("#slider_films_box .slide_item"), function() {
      
      $(this).css({'padding-top':($("#slider_films_box").height()-$(this).height())/2 });
    });

    $today.cont.height(/*$today.bigest.height()+150*/$("#slider_films_box").height()+150);
		workspace.height($today.cont.height()+225);	
	},
	
	toggle: function(){
		if ($today.isHidden) {
			$today.cont.parent().stop(true,false);
			$today.cont.parent().animate({
				bottom: 0
			});
		} else {
			$today.cont.parent().stop(true,false);
			$today.cont.parent().animate({
				bottom: -$today.cont.parent().height()+14
			});
		}
		$today.isHidden = !$today.isHidden;	
	}    

,	moveLeft: function(){
		var left = $today.cont.offset().left;
		$today.cont.css({
			position: 'absolute'
		,	left: left
		});
		$today.cont.animate({
			left: '-100%'
		},0);
		return left;
	}
,	moveRight: function(){
    var left = $today.cont.offset().left;
		$today.cont.css({
      position: 'relative'
		,	left: left
		});
		$today.cont.animate({
			left: '0'
		});
		return left;
		
	}
}

