// Settings for the image rotation and navigation between slides below. Note the commented out code was from a request that they had to make the slides random. To be deleted at a later time.
$(function() {

	/*$('.pics a').css({
        opacity: 0
    });
setTimeout(function() {
*/
    $('#s4').cycle({
        fx:      'fade',
        speed:  3000,
        timeout: 1000,
        pager:   '#numbers',
        pagerAnchorBuilder: pagerFactory,
		pauseOnPagerHover: true,
		before:onLink
    });

    function pagerFactory(idx, slide) {
        var s = idx > 4 ? ' style="display:none"' : '';
		var n = idx > 4 ? document.getElementById('next').style.display='block': document.getElementById('next').style.display='none';
        return '<li'+s+'><a href="#"></a></li>';
    };
	
	/*$('.pics a').css({
	        opacity: 0
	    });
	
}, 500);*/
	function onLink() { 
	var thelink = $(this).children("a").attr("href");
    $('#over-link').attr('href',thelink);  
	};
    
});
