
    jQuery(document).ready(function($) {
      document.body.onresize=function() {
        $('#content').each(function() {
        	this.style.position = 'absolute';
        	this.style.top = $(this).parent().height()/2 + 'px';
        	this.style.marginTop = -$(this).height()/2 + 'px';
        	this.style.left = ($(this).parent().width() - $(this).width())/2 + 'px';
        });
      };
    });
    
    $(function() {
      $('#content').each(function() {
      	this.style.position = 'absolute';
      	this.style.top = $(this).parent().height()/2 + 'px';
      	this.style.marginTop = -$(this).height()/2 + 'px';
      	this.style.left = ($(this).parent().width() - $(this).width())/2 + 'px';
      });
    });
    
    
		$(function(){
			$('#slides').slides({
				preload: true,
				preloadImage: 'img/progress.gif',
				play: 10000,
				pause: 5000,
				hoverPause: true,
				animationStart: function(current){
					$('.caption').animate({
						bottom:-35
					},100);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationStart on slide: ', current);
					};
				},
				animationComplete: function(current){
					$('.caption').animate({
						bottom:0
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationComplete on slide: ', current);
					};
				},
				slidesLoaded: function() {
					$('.caption').animate({
						bottom:0
					},200);
				}
			});
      
      
      
		});

