$().ready(function() {  
	$('#home-rotation').show();

	var target = '.bigLink';
	
	$(target).each(function(){
		$(this).hover(
			function(){
				status=$(this).find('a').attr('href');
			},
			function(){
				status='';
			});
		$(this).click(function(){
			location=$(this).find('a').attr('href');
		});
		$(this).css('cursor','pointer');
	});

	$('#rotate-thumbs img').each(function(){
		$(this).hover(
			function(){
				$(this).animate({opacity: 1.0},100);	
			},
			function(){
				$(this).animate({opacity: 0.3},100);	
			});
	});

	$('#rotate-nums a').each(function(){
		$(this).hover(
			function(){
				$(this).addClass("hoverSlide");
			},
			function(){
				$(this).removeClass("hoverSlide");
			});
	});


$('#home-rotation').cycle({ 
	fx:    'fade', 
	speed:  'fast',
	timeout: 8000,
	prev: '#rotate-prev',
	next: '#rotate-next',
	pager: '#rotate-nums',
	delay: 5000,
	
	pagerAnchorBuilder: function(idx, slide) { 
        // return selector string for existing anchor 
        return '#rotate-nums li:eq(' + idx + ') a'; 
    }
	});

	$('#rotate-prev').click(function() { 
		$('#home-rotation').cycle('pause'); 
	});
	$('#rotate-next').click(function() { 
		$('#home-rotation').cycle('pause'); 
	});

}); 