willow.ready(function($) {
	var menuOptions = {
		direction:"down",
		showL3s:false
	};

	willow.getMenu("133612|133614|133615|133616|133617|133618|133619",function(data){
		$('#L1').menu(data.menu,menuOptions);
	});

	var emOptions = {
		emButtonPosition: "right",
		emButton: false
	};

	willow.getNews("12135",function(data){$('#Form1').bulletin(data,emOptions);},{"backlink":window.location});
	
	$("#photos").cycle();
	
	for(var i=0; i < $("#stories").children().length; i++){
		$("#stories").children().eq(i).css("top",i*90);
		if(i === $("#stories").children().length - 1){
			var lastP = $("#stories").children().eq(i).position().top;
			willow.moveUp(lastP);		
		}
	}
	
	$(".eventTitle a").fsplit(28);
});	

willow.moveUp = function(lp){
	$("#stories").children().each(function(){
		var $this = $(this);
	
		setTimeout(function(){
			var curP = $this.position().top;
			var nextP = curP - 90;
			$this.animate({top:nextP}, 2000, function(){
				if($this.position().top < 0){
					$this.css("top",lp);
					willow.moveUp(lp);
				}
			});			
		},5000);
	});
}


