function init(){
	$('#header .menu ul li, #sidebar #sidemenu ul li').mouseover(function(){
		$(this).addClass('hover');
	});
	$('#header .menu ul li, #sidebar #sidemenu ul li').mouseout(function(){
		$(this).removeClass('hover');
	});		
	$(window).bind('resize', function() {
		initPage();
	});
	initPage();		
}
function initPhotoPage(){
		$('#sidebar-shadow').css({"height": "7577px"});
		$('#right-shadow').css({"height": "7577px"});		
}
function initPage(){
		var osize = $(window).height();
		if(osize <= $('#docs-wrap').height()) osize = $('#docs-wrap').height();
		if(osize<800) osize = 845;
	//var osize = 1200;
		var height = osize - 97;
		if ($.browser.msie){
			if($('#main-content').height()<=height){
				$('#main-content').css({"height": height});
			}
		}
		else{
			$('#main-content').css({"min-height": height});
		}	
		$('#sidebar-shadow').css({"height": osize});
		$('#right-shadow').css({"height": osize});	
}
function initList(){
	$('#mem-list ul li').mouseover(function(){
			if($(this).hasClass('first')) return;
			$(this).addClass('hover');
			$(this).prev('li').addClass('hover-prev');
	});
	$('#mem-list ul li').mouseout(function(){
			$(this).removeClass('hover');
			$(this).prev('li').removeClass('hover-prev');										   
	});	
	var trs = $('#mem-list ul li');
	for(var i=0; i<trs.length; i++){
		var tr = $(trs[i]);
		tr.removeClass('active-prev');
		if(tr.hasClass('active')){
			tr.prev('li').addClass('active-prev');
		}
	}	
}
function sortedTb(table){
	$(table).tableSorter({
		sortClassAsc: 'sorted-down',
		sortClassDesc: 'sorted-up',
		tableId: table
	});	
	initTr(table);
}
function initTr(tab){
	$(tab).find('tbody tr').mouseover(function(){
		$(this).addClass('hover');
		$(this).prev('tr').addClass('hover-prev');
	});
	$(tab).find('tbody tr').mouseout(function(){
		$(this).removeClass('hover');
		$(this).prev('tr').removeClass('hover-prev');
	});	
	var trs = $(tab).find('tbody tr');
	for(var i=0; i<trs.length; i++){
		var tr = $(trs[i]);
		tr.removeClass('active-prev');
		if(tr.hasClass('active')){
			tr.prev('tr').addClass('active-prev');
		}
	}
}