$(document).ready( function(){
	if ($('#cig14')) {
		$('#pm_feature').css({backgroundColor:'black'});
		$('#cig14 img').css({position:'absolute',top:0,left:200, display:'none'});
		$('#cig14 img:nth-child(1)').show();
		$('#cig14 img').click( function() {
			//reset interval (proportional to length of caption in the future?)
			window.clearInterval(cycleImageInterval);
			cycleImageInterval = window.setInterval( function() { $('#cig14 img:visible').trigger('click'); }, 10000);
			//advance to next image
			$(this).fadeOut('slow');
			if ( !($(this).next().is("img")) ) {
				$('#cig14 img:first-child').fadeIn('slow');
			} else {
				$(this).next().fadeIn('slow');
			}
		})
		
		//Set initial interval
		var cycleImageInterval = window.setInterval( function() { $('#cig14 img:visible').trigger('click'); }, 10000);
		
		/*
		//Create rightclick behavior
		$(document).keydown(function(e){
			if (e.which==39) $('#cig14 img:visible').trigger('click');
		});
		*/
	}
})