loadingBg = new Image();
loadingBg.src = "/images/loadingBg.jpg";
bg = new Image();
bg.src = "/images/bg.jpg";
$(document).ready(function() {
    function preloader(){
    	document.body.style.backgroundImage = "url(/images/bg.jpg)"; 
        document.getElementById("preloader").style.display = "none";
        document.getElementById("container").style.display = "block";
	}
	window.onload = preloader;
	if((location.hash == '#photos') || (location.hash == '')) {
    	$("#contentPhotos").show();
    	$("#titlePhotos").show();
    	$("#contentWebsites").hide();
    	$("#titleWebsites").hide();
    	$("#contentProfile").hide();
    	$("#titleProfile").hide();		
	} else if (location.hash == '#websites') {
    	$("#contentPhotos").hide();
    	$("#titlePhotos").hide();
    	$("#contentWebsites").show();
    	$("#titleWebsites").show();
    	$("#contentProfile").hide();
    	$("#titleProfile").hide();		
	} else if (location.hash == '#profile') {
    	$("#contentPhotos").hide();
    	$("#titlePhotos").hide();
    	$("#contentWebsites").hide();
    	$("#titleWebsites").hide();
    	$("#contentProfile").show();
    	$("#titleProfile").show();		
	}
	$(document).pngFix();
	$(function() {
        $('#contentPhotos a').lightBox();
        $('#contentWebsites a').lightBox();
    });
	$("#tabPhotos").click(function () {
    	$("#contentPhotos").fadeIn();
    	$("#titlePhotos").fadeIn();
    	$("#contentWebsites").hide();
    	$("#titleWebsites").hide();
    	$("#contentProfile").hide();
    	$("#titleProfile").hide();
    });
	$("#tabWebsites").click(function () {
    	$("#contentPhotos").hide();
    	$("#titlePhotos").hide();
    	$("#contentWebsites").fadeIn();
    	$("#titleWebsites").fadeIn();
    	$("#contentProfile").hide();
    	$("#titleProfile").hide();
    });
	$("#tabProfile").click(function () {
    	$("#contentPhotos").hide();
    	$("#titlePhotos").hide();
    	$("#contentWebsites").hide();
    	$("#titleWebsites").hide();
    	$("#contentProfile").fadeIn();
    	$("#titleProfile").fadeIn();
    });
});