// JavaScript Document
$(function() {
    var index = 0, hash = window.location.hash;
    if (hash) {
        index = /\d+/.exec(hash)[0];
        index = (parseInt(index) || 1) - 1; // slides are zero-based
    }
    $('.content').cycle({ 
        fx:     'fade', 
        startingSlide: index, // <-- don't forget this!
        speed:  'fast', 
        timeout: 0, 
        next:   '#next',
        prev:   '#prev', 

        after: function(curr,next,opts) {
            window.location.hash = opts.currSlide + 1;
			$('#caption').html(this.title);
        }
    });
});
