$(document).ready(function() {

    rotates = $(".rotate").get();

 
    (function loopy(){
      var rotate = rotates.shift();
      rotates.push( rotate );
      $("#header").css("background-image", "url(" + rotate.src + ")");

      setTimeout( loopy, 4000 );
      
     })();

	$("#chicago").hover(function() {
		$("#chicago img").attr("src","/images/chicago-thumb2.jpg");
			}, function() {
		$("#chicago img").attr("src","/images/chicago-thumb2-mono.jpg");
	});

	$("#security").hover(function() {
		$("#security img").attr("src","/images/security-thumb.png");
			}, function() {
		$("#security img").attr("src","/images/security-thumb-mono.png");
	});

	$("#tt3").hover(function() {
		$("#tt3 img").attr("src","/images/tt3-thumb.jpg");
			}, function() {
		$("#tt3 img").attr("src","/images/tt3-thumb-mono.jpg");
	});

	$("#itcs").hover(function() {
		$("#itcs img").attr("src","/images/itcs-thumb.jpg");
			}, function() {
		$("#itcs img").attr("src","/images/itcs-thumb-mono.jpg");
	});
    
	$("#remote").hover(function() {
		$("#remote img").attr("src","/images/remote-thumb.jpg");
			}, function() {
		$("#remote img").attr("src","/images/remote-thumb-mono.jpg");
	});    
    
	/*
	var cols = 25;
	var rows = 3;
	for(x=0; x<(cols * rows); x++) {
		$("<div>")
		.clone(false)
		.appendTo("#demo")
		.addClass("demo-square")
	}
	var demosquares = $('#demo .demo-square');
	$("#demo").mousemove(function(e) {
		pick = Math.round(demosquares.length * Math.random());
 		$(demosquares[pick]).toggleClass("demo-square-dark");
	}); 
	*/
});

