﻿$(document).ready(function() {        
    $('#Pause1').click(function() { $('#slides1').cycle('pause'); return false; });
    $('#Play1').click(function() { $('#slides1').cycle('resume'); return false; });
    
    $('#Pause2').click(function() { $('#slides2').cycle('pause'); return false; });
    $('#Play2').click(function() { $('#slides2').cycle('resume'); return false; });
    
    $('#slideshow1').hover(
        function() { $('#controls1').fadeIn(); },
        function() { $('#controls1').fadeOut(); }
    );
    
    $('#slideshow2').hover(
        function() { $('#controls2').fadeIn(); },
        function() { $('#controls2').fadeOut(); }
    );
    
    $('#spotlight').hover(
        function() {$('#slides').cycle('pause');},
        function() { $('#slides').cycle('resume');}
    );

    $('.fade').cycle({ 
        fx:          'fade',
        cleartype:   false,
        random:      1,                         
        speed:       3000, 
        timeout:     3000
    });      
    
    $('.fadespotlight').cycle({ 
        fx:          'fade',
        cleartype:   false,
        random:      1,                         
        speed:       3000, 
        timeout:     10000
    });    
});