// JavaScript Document

preload01 = new Image(); preload01.src = "images/splash/left_out.jpg";
preload02 = new Image(); preload02.src = "images/splash/left_over.jpg";
preload03 = new Image(); preload03.src = "images/splash/right_out.jpg";
preload04 = new Image(); preload04.src = "images/splash/right_over.jpg";
preload05 = new Image(); preload05.src = "stiel/images/layout/bar_top.jpg";
preload06 = new Image(); preload06.src = "stiel/images/layout/bar_middle.jpg";
preload07 = new Image(); preload07.src = "stiel/images/layout/bar_bottom.jpg";

preload08 = new Image(); preload08.src = "kingsbridge/images/layout/button_top_out.jpg";
preload09 = new Image(); preload09.src = "kingsbridge/images/layout/button_top_selected.jpg";
preload10 = new Image(); preload10.src = "kingsbridge/images/layout/button_top_select.jpg";
preload11 = new Image(); preload11.src = "kingsbridge/images/layout/logo.jpg";

$(document).ready(function(){
	$("#splash_left ").hide();
	$("#splash_left ").fadeIn(800);
	$("#splash_left").mouseover(function() { changeImgSrc('splash_left', 'images/splash/left_over.jpg'); } );
	$("#splash_left").mouseout(function() { changeImgSrc('splash_left', 'images/splash/left_out.jpg'); } );
	$("#splash_left").click(function() { window.location = "stiel/index.html"; return false; } );
	
	$("#splash_right").hide();
	$("#splash_right").fadeIn(800);
	$("#splash_right").mouseover(function() { changeImgSrc('splash_right', 'images/splash/right_over.jpg'); } );
	$("#splash_right").mouseout(function() { changeImgSrc('splash_right', 'images/splash/right_out.jpg'); } );
	$("#splash_right").click(function() { window.location = "kingsbridge/index.html"; return false; } );
	
	/*
	$("#splash_right").click(function() { 
		$().toastmessage('showToast', {
                text: 'This website is currently under contruction.\nPlease try again later.',
                sticky: false,
				stayTime: 3000,
                position: 'middle-center',
                type: 'warning',
                closeText: '',
                close: function () { console.log("toast is closed ...");
                }
		});} 
	);
	*/
});

//change image source with a new image source
function changeImgSrc(id, src)
{
	id = "#" + id;
	$(id).attr('src', src); 
}
