$(document).ready(function() {
	var ident=window.location.hash.substring(1);
	
	


	
//load menu
$('.worklist').load('content/02_navigation.html', function(){ident=window.location.hash.substring(1);
if(ident != "")
	{
		firstPage=ident;
	}

//mark link parsed from menu
$('#'+firstPage).css({color:'#000000'});

//load content to loaded link
$('.gal').load('content/'+firstPage+'/content.html #gallery',function(){
	$('.gal').jScrollPane({showArrows:true, scrollbarWidth:16});
					$('.gal')[0].scrollTo(0);
});
$('.description').load('content/'+firstPage+'/content.html #detail');

//scroller

$('.scrollDown').click(function(){
	$('.gal').animate({top: '-=200'});
	
});

$('.scrollUp').click(function(){
	//alert($('.gal').css('top'));//if($('.gal').css('top') > 0 ){
	$('.gal').animate({top: '+=200'});
	//}
});
// menu click
	$('.worklist a').click(function() {
			$(".worklist a").css({color:'#a2a4a7'});
	 		$(this).css({color:'#000000'});
			var loc=(this.href);
	 		var locshort = loc.slice(loc.indexOf("#")+1,loc.length);
			$('.gal').slideUp(function(){	$('.gal').load('content/'+locshort+'/content.html #gallery',function(){
				
				$('.gal').slideDown(function(){
					$('.gal').jScrollPane({showArrows:true, scrollbarWidth:16});
					$('.gal')[0].scrollTo(0);
				});});
	 	
			
				

});
			$('.description').load('content/'+locshort+'/content.html #detail');
	}); //click
	

});	





});
