/** MeierHug Image Manipulation JavaScript.
 *
 * @author: hug.jason@gmail.com
 */
/** Executes functions after page has finished it's loading routine */
$(document).ready(function(){
    /* Image slideshow */
    /*$('#projectImage').cycle({
     fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
     });*/
	
    /* Image fades with click */
    $('#projectImage').cycle({
     fx: 'fade',
     speed: 400,
     next: '#projectImage, #next',
     timeout: 0,
	 after: updatePageCount
     });
	 
	 /* Image Cycle for welcome page.  When mouse over it pauses and you can manually advance by clicking */
    $('#welcomeImage').cycle({
     fx: 'fade',
        speed: 1000,
        next:'#welcomeImage',
        timeout: 4000,
        pause: 1
     });
	 
    /* Image Cycle automatically. When mouse over it pauses and you can manually advance by clicking*/
    /*$('#projectImage').cycle({
        fx: 'fade',
        speed: 300,
        next: '#next', prev: '#projectImage',
        timeout: 3000,
        pause: 1,
        after: updatePageCount
    });*/
});

// function called after an image changed
function updatePageCount(curr,next,opts) {
	var caption = (opts.currSlide + 1) + '/' + opts.slideCount;
	$('#next').html(caption);
}

