/*$(function() {
	$('.classificationnav a').css({'text-transform':'lowercase'});
});
*/
	dimint = 0;

	function showCube(workpackage) {
		if(workpackage.match(/\(/)) {
			workpackage = workpackage.match(/\((.*)\)/)[1];
		}
		$('.'+workpackage+'cube').parent().css({'border': '2px solid #c0a7c7'});
	}
	
	function showhide(id) {
		var el = document.getElementById(id+"more");
		if(el) {
			if(!el.style.display || el.style.display == 'none') {
				el.style.display = 'block';
				var el = document.getElementById('menuimg');
				if(el) el.setAttribute('src','/pub/System/MacospolPlatformSkin/css/menu_closed.png');
			} else {
				el.style.display = 'none';
				var el = document.getElementById('menuimg');
				if(el) el.setAttribute('src','/pub/System/MacospolPlatformSkin/css/menu_open.png');
			}
		}
		var el = document.getElementById(id+"morebutton");
		if(el) {
			if(el.style.display == 'none') {
				el.style.display = 'block';
			} else {
				$('#'+id+'more').parent().css({ 'z-index': $('#'+id+'more').parent().css('z-index')+100, 'background-color':'#fff'});
				el.style.display = 'none';
			}
		}
		return false;
	}
	function highlight(id) {
		var el = document.getElementById(id);
		if(el) {
			el.style.backgroundColor = "#f2f2f2";
			var img = el.getElementsByTagName('img');
			if(img.length > 0) {
				for(i=0;i<img.length;i++) {
					if(img[i].getAttribute('class') == 'toolgridclick') img[i].style.display = 'block';
				}
			}
		}
	}
	function lowlight(id) {
		var el = document.getElementById(id);
		if(el) el.style.backgroundColor = "";
		var img = el.getElementsByTagName('img');
		if(img.length > 0) {
			for(i=0;i<img.length;i++) {
				if(img[i].getAttribute('class') == 'toolgridclick') img[i].style.display = 'none';
			}
		}
	}
	function setactive(i) {
			var el = document.getElementById('tabs');
			if(el) {
				el.childNodes[i].setAttribute('class',el.childNodes[i].getAttribute('class') + ' active');	
			}
	}
	function setdimint(i) {
		if(i) dimint = i;
	}
	function checkdim() {
		var el = document.getElementById('toolnavmore');
		if(el && el.style.display == 'block') {
			dim();
		} else undim();
	}
	function dim() {
		var tabs = $("#tabs").children(); 
		if(tabs && dimint==1) { 
			tabs[0].style.backgroundColor = '#fff';
		}
		if(tabs && dimint==3) {
			tabs[1].style.backgroundColor = '#fff';
		}
		var el = document.getElementById('toolnavmore');
		if(el && el.style.display == 'block') {
			document.body.style.backgroundColor = "#f2f2f2";
			if(tabs) {
				if(dimint==1) { 
					tabs[1].style.backgroundColor = '#f2f2f2';
				}
				if(dimint==3) {
					tabs[0].style.backgroundColor = '#f2f2f2';
				}
				tabs[2].style.backgroundColor = '#f2f2f2';
				tabs[3].style.backgroundColor = '#f2f2f2';
				tabs[4].style.backgroundColor = '#f2f2f2';
			}
			var el = document.getElementById('content');
			if(el) el.style.backgroundColor = '#fff';
			var el = document.getElementById('itemlist');
			if(el) el.style.backgroundColor = '#f2f2f2';
			var el = document.getElementById('searchimg');
			if(el) el.setAttribute('src','/pub/System/MacospolPlatformSkin/css/icon-search_grey.png');
			var el = document.getElementById('userimg');
			if(el) el.setAttribute('src','/pub/System/MacospolPlatformSkin/css/icon-user_grey.png');
		}
	}
	function undim() {
		document.body.style.backgroundColor = "#fff";
		var tabs = $("#tabs").children();
		if(tabs) {
			if(dimint==1) tabs[1].style.backgroundColor = '#e1e1e0';
			if(dimint==3) tabs[0].style.backgroundColor = '#e1e1e0';
			tabs[2].style.backgroundColor = '#a7b0b8';
			tabs[3].style.backgroundColor = '#b59bbc';
			tabs[4].style.backgroundColor = '#e2d86a';
		}
		var el = document.getElementById('itemlist');
		if(el) el.style.backgroundColor = '#fff';
		var el = document.getElementById('searchimg');
		if(el) el.setAttribute('src','/pub/System/MacospolPlatformSkin/css/icon-search.png');
		var el = document.getElementById('userimg');
		if(el) el.setAttribute('src','/pub/System/MacospolPlatformSkin/css/icon-user.png');
	}
