// JavaScript Slideshow JQuery

$(document).ready(function(){

	$('#s1').cycle({ 
		fx:    'fade', 
		width: 422, 
		height: 322,
		speed:  2500 
	});	
	
	$('#s2').cycle({ 
    fx:     'scrollDown', 
	width: 422, 
    height: 322,
    random:  1 
	});
	
	$('#s3').cycle({ 
    fx:    'zoom', 
    sync:   0, 
	width: 422, 
	height: 322,
    delay: -4000 
	});
	
	$('#s4').cycle({ 
    fx:    'shuffle',
	width: 422,
	height: 322,
    delay: -4000 
	});
	
	$('#s5').cycle({ 
    fx:     'slideY', 
	width: 422,
	height: 322,
    speed:  300, 
    next:   '#s5', 
    timeout: 0 
	});
	
	$('#s6').cycle({ 
    fx:     'fade', 
    speed:  'fast',
	width: 422,
	height: 322, 
    timeout: 0, 
    next:   '#next2', 
    prev:   '#prev2' 
	});
	
	$('#s7').cycle({ 
    fx: 'custom',
	width: 422,
	height: 322, 
    cssBefore: {  
        top:  0, 
        left: 0, 
        width: 0, 
        height: 0,  
        zIndex: 1  
    }, 
    animIn:  {  
        width: 400, 
        height: 300  
    }, 
    animOut: {  
        top:  0, 
        left: 0, 
        width: 0, 
        height: 0 
    }, 
    cssAfter: {  
        zIndex: 0  
    } 
	});
	
	$('#s8').cycle({ 
    fx:     'scrollHorz',
	width: 422,
	height: 322, 
    prev:   '#prev3', 
    next:   '#next3', 
    timeout: 0 
	});
	
	$('#s9').cycle({ 
	fx:     'wipe',
	width: 422,
	height: 322, 
	speed:   1000, 
	timeout: 6000, 
	clip:   'zoom' 
	});   
	
	//#s10
	$('#pause').click(function() { $('#slides').cycle('pause'); return false; });
	$('#play').click(function() { $('#slides').cycle('resume'); return false; });
	
	$('#slideshow').hover(
		function() { $('#controls').fadeIn(); },
		function() { $('#controls').fadeOut(); }
	);
	
	$('#slides').cycle({
		fx:     'fade',
		width: 422,
		height: 322,
		speed:   400,
		timeout: 3000,
		next:   '#next',
		prev:   '#prev'
	});


});
