jQuery(function() {
	
	$("a.decal").click(function(event){
		event.preventDefault();
		$("a.decal").each(function(){
			$(this).attr("class", "decal");
		});
		$(this).attr("class", "decal selected")
		$(".box").each(function(){
			$(this).hide();
		});
		
		$("div[name=" + $(this).attr("id") + "]").show();
		
	});
	
	$("div.tab a").click(function(event){
		// clear select tab
		$(this).parent("div.tab").siblings("div.selected").removeClass("selected");
		$(this).parent("div.tab").addClass("selected");
		
		page = $(this).attr("href")
		
		$("div.tab_page").each(function(e){
			$(this).hide();
		});
		
		$("div#" + page).show();
		
		/*$(this).parent("li").addClass("selected");
		
		src = $(this).children("img").attr("src");
		
		split_src = src.split("/");
		
		split_src[split_src.length - 1] = "selected_" + split_src[split_src.length - 1];
		
		new_src = split_src.join("/");
		$(this).children("img").attr({src:new_src});*/
		
		event.preventDefault();
	});
	
	$('#gallery a').lightBox({fixedNavigation:true});
		
});