$(function() {
    $('#content-slider-wrapper').cycle({
        fx:     'fade',
        speed:  'slow',
        nowrap:  1,
        timeout: 0,
        cleartypeNoBg: true,
        pager:  '#slider-navigation',
        activePagerClass: 'activeSlide',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#slider-navigation li:eq(' + (idx) + ') a';
        }
    });
});

$(document).ready(function() { 
    $('ul.sf-menu').superfish({ 
          delay:       1000,                            // one second delay on mouseout 
          animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
          speed:       'fast',                          // faster animation speed 
          autoArrows:  false,                           // disable generation of arrow mark-up 
          dropShadows: false                            // disable drop shadows 
    }); 
    
	$('#slides').slides({
		preload: true,
		preloadImage: 'img/loading.gif',
		play: 5000,
		pause: 2500,
		hoverPause: true,
		animationStart: function(){
		$('.caption').animate({bottom:-35},100);
		},
		animationComplete: function(current){
		$('.caption').animate({bottom:0},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log(current);
					};
				}
			});
});
