$(document).ready(function(){
$.fn.preload = function() {
	this.each(function(){
		$('<img/>')[0].src = this;
		});
	}

$([
	'/wp-content/themes/osyswptheme/images/home-tab-content-bg-1.jpg',
	'/wp-content/themes/osyswptheme/images/home-tab-content-bg-2.jpg',
	'/wp-content/themes/osyswptheme/images/home-tab-content-bg-3.jpg',
	'/wp-content/themes/osyswptheme/images/home-tab-content-bg-4.jpg',
	'/wp-content/themes/osyswptheme/images/home-tab-content-bg-5.jpg',
	'/wp-content/themes/osyswptheme/images/home-tab-content-bg-6.jpg',
	]).preload();


	var tabContainers = $('.tabs-container > div');
	tabContainers.hide().filter(':first').show();

	$('ul.tabs-navigation li a').mouseover(function () {
		tabContainers.hide();
		tabContainers.filter(this.hash).show();
		//alert(this.hash);
		$('#page').css({'background-image':'url(/wp-content/themes/osyswptheme/images/home-tab-content-bg-'+this.hash.substr(2)+'.jpg)'});
		//$('#page').parent('li').removeClass('selected');
		//$('ul.tab-navigation a').parent('li').removeClass('selected');
		//$(this).parent('li').addClass('selected');
		return false;
		});
	$('.home-tabs').hover(function(){
		}, function(){
			tabContainers.hide();
			tabContainers.filter('#t0').show();
			$('#page').css({'background-image':'url(/wp-content/themes/osyswptheme/images/home-content-bg.jpg)'});
			});
	
	});
