﻿$(document).ready(function(){      
    
    //generate a random starting slide, based on total # of slides availible
    var startSlide = Math.floor($('#photoTheater a').length*Math.random());   
  
    $('#photoTheater')
    .before('<div id="photoTheaterNav">') 
    .cycle({ 
        fx:     'fade', 
        speed:   600, 
        timeout: 5000, 
        pause:   1,
        startingSlide: startSlide,
        pager:  '#photoTheaterNav'  
    });  
});

