$(document).ready(function(){

	$.fn.cycle.defaults.timeout = 6000;
	$('#s4').cycle({ 
			fx:     'fade',  
			speed: 	1000,
			pager:  '#news-pager',
			before:   onBeforeNews
	});
	function onBeforeNews() {
		$('#news-caption').hide().html('<a href="' + $('a',this).attr('href') + '">' + this.title + "</a>").fadeIn(); 
	}


	$("div.pointleft").hover(function(){
		$(this)
			.stop()
			.css('z-index','99')
			.animate({marginLeft:'-8px',width:'168px'},80)
			.animate({marginLeft:'-18px',width:'178px'},40);
    }, function(){
    	$(this)
    		.stop()
    		.animate({marginLeft:'0px',width:'160px'},160);
    });
	$("div.pointright").hover(function(){
		$(this)
			.stop()
			.css('z-index','99')
			.animate({paddingLeft:'8px'},80)
			.animate({paddingLeft:'18px'},40);
    }, function(){
    	$(this)
    		.stop()
    		.animate({paddingLeft:'0px'},160);
    });
	$("div.pointdown").hover(function(){
		$(this)
			.stop()
			.css('z-index','99')
			.animate({paddingTop:'8px'},80)
			.animate({paddingTop:'18px'},40);
    }, function(){
    	$(this)
    		.stop()
    		.animate({paddingTop:'0px'},160);
    });
	$("div.pointup").hover(function(){
		$(this)
			.stop()
			.css('z-index','99')
			.animate({marginTop:'-8px',height:'168px'},80)
			.animate({marginTop:'-18px',height:'178px'},40);
    }, function(){
    	$(this)
    		.stop()
    		.animate({marginTop:'0px',height:'160px'},160);
    });
});

function pauseCycle(){
  $('#s4').cycle('pause');
}
function resumeCycle(){
  $('#s4').cycle('resume');
}
