// JavaScript Document
$(document).ready(function() {
	jQuery.preloadImages = function()
	{
	  for(var i = 0; i<arguments.length; i++)
	  {
		jQuery("<img>").attr("src", arguments[i]);
	  }
	  var x=Math.floor(Math.random()*7)
	  $('#wrapper').css({
			'backgroundImage': 'url(' + arguments[x] +')'
	  });
	  
	}	
	$.preloadImages("images/bg1.jpg", "images/bg2.jpg", "images/bg3.jpg", "images/bg4.jpg", "images/bg5.jpg", "images/bg6.jpg", "images/bg7.jpg");

});


function tabs(obj,section){
	hideAll();	
	var obj = "#" + section;
	$(obj).show();
	return false;
}

function hideAll(){
	$('#home').hide();
	$('#services').hide();
	$('#contact').hide();
}
