// JavaScript Document
if ($.browser.webkit) {
function startAnimatingLogo() {
			var fps = 12.0;
			var seconds = 120.0;
			var degrees = 0.0;
			var step = (360.0 / fps) * (1.0 / seconds);
			
			setInterval(function() {
				$("#spinLogo").css({"-webkit-transform": "rotate(" + degrees + "deg)"})
				degrees += step;
			}, 1000.0 / fps);
		}
		startAnimatingLogo();
}
(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)
jQuery.preLoadImages("img/home-gallery-1.jpg", "img/home-gallery-2.jpg", "img/home-gallery-3.jpg", "img/home-gallery-4.jpg",  "img/home-gallery-5.jpg");

function startGallery() {
	
	var counter = 1;
	var total = 5;
var url = "";
	
		setInterval(function() {
			$("#imgCont").fadeOut('slow', function() {
								
								url = '<img src="img/home-gallery-'+counter+'.jpg" width="603" height="338" alt="Recompute Photo" />';	   
								$(this).html(url);		
								counter = (counter+1<total)? counter+1 : 1;
		   $(this).fadeIn('slow');
    // Animation complete.
  });
							 },8000);
}
			startGallery();
