var activeID = 1;

$(document).ready(function(){
	
	for (var i = 2; i < 14; i++)
	{
	$("#box"+i).hide();
	}
	
	var myFile = document.location.toString();
	if (myFile.match('#')) { 
    var myAnchor = myFile.split('#box')[1];
        if (myAnchor > 0 && myAnchor < 14) {
	        $("#box1").hide();
		    $("#box"+myAnchor).show();			
        }
    }
    
	$("#btnBox1").click(function(){
		$("#box2").fadeOut(1000);
		$("#box1").fadeIn(1000);
	});
	
	$("#btnBox2").click(function(){
		$("#box2").fadeIn(1000);
		$("#box1").fadeOut(1000);
	});
	
});

function showLayer(id){
    var localID = ++id;
    if(localID != activeID) {
    $("#box"+activeID).fadeOut(1000);
	$("#box"+localID).fadeIn(1000);
	activeID = localID; }
}

