// JavaScript Document

$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		random: 1,
		pager:'#main-nav-home', 
    	pagerEvent: 'mouseover',
		pauseOnPagerHover: 1,
		pagerAnchorBuilder: function(idx, slide) { 
        // return selector string for existing anchor 
        return '#main-nav-home li:eq(' + idx + ') a'; 
    },
		timeout:  3000 
	});
	
	
	
	$('.slideshow-drink').cycle({
		fx:     'scrollHorz', 
    	prev:   '#prev1', 
    	next:   '#next1', 
		pager:  '#slidenav',
		timeout:  0 
	});
	
	$('.slideshow-intro').cycle({
		fx:     'fade', 
		timeout:  1000 
	});


	$("#main-nav-home li a").hover(
		function(){
			$('#main-nav-home li a').not(this).fadeTo(0, 0.3);
		},
		function(){
			$('#main-nav-home li a').fadeTo(0, 1);
		}
	);



	
	///// superfish menu for subpages
	/*
    $("ul.sf-menu").superfish({ 
	   pathClass: 'currentpage',
       animation: {height:'show'},   // slide-down effect without fade-in 
	   autoArrows:    false, 
       delay:     0               // .6 second delay on mouseout 
    }); 
	*/
	
	var path = window.location.pathname;
	pathArray = window.location.pathname.split( '/' );
	myl = pathArray.length-1;
	$('a[href$="' + pathArray[myl] + '"]').addClass('currentpage');
	

});
