$(document).ready(function(){
	if(navigator.platform == 'BlackBerry'){
		$("#tabs").tabs();
	}else{
		$("#tabs").tabs({
			fx: { opacity: 'toggle' }
		});
	}
	/*
	setInterval(function(){

		// Selecting only the visible layers:
		var versions = $('.textVersion:visible');

		if(versions.length<2){
			// If only one layer is visible, show the other
			$('.textVersion').fadeIn(800);
		}
		else{
			// Hide the upper layer
			versions.eq(0).fadeOut(800);
		}
	},1000);
	*/
	setInterval(function(){

		var wichita = $('li.active .textVersionWichita:visible');
		var hutch = $('li.active .textVersionHutch:visible');
		var salina = $('li.active .textVersionSalina:visible');

		if(wichita.length<2){
			$('li.active .textVersionWichita').fadeIn(800);
		}
		else{
			wichita.eq(0).fadeOut(800);
		}
		if(hutch.length<2){
			$('li.active .textVersionHutch').fadeIn(800);
		}
		else{
			hutch.eq(0).fadeOut(800);
		}
		if(salina.length<2){
			$('li.active .textVersionSalina').fadeIn(800);
		}
		else{
			salina.eq(0).fadeOut(800);
		}
	},1000);
	/*$('#flashCatering').flash({
    	src: 'flash/catering.swf',
    	width: 320,
    	height: 150
	});*/
	$('#flashCatering').media({ 
		width: 320, 
		height: 150, 
		src: 'flash/catering.swf',
		params: { param1: 'wmode', param2: 'transparent' }
	});
});
