String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

$(document).ready(function(){
	var active_p = document.getElementById("active");
	if(active_p) {
		$("#sidebar1 p#active")
			.addClass("hover")
			.css("background-color", active_p.className.replace("color_","").replace(" hover","").trim() )
			.css("cursor","default")
			.SlideInLeft()
			;
	}
	$("#sidebar1 p")
		.not(".special")
		.mouseover(function(){
			$(this).css("background-color", this.className.replace("color_","").replace(" hover","").trim() ).addClass("hover");
		})
		.click(function(){
			location.href= this.childNodes[0].href;
		})
		.mouseout(function(){
			if(this.id!="active") {
				$(this).css("background-color", '' ).removeClass("hover");
			}
		})
		;
	
	$(".dropshadow")
		.wrap("<div class='wrap0'><div class='wrap1'><div class='wrap2'>" +
		"<div class='wrap3'></div></div></div></div>");
});