jQuery(function(){
// 	jQuery(".field-item [style]").each(function(i, e){ console.log(e.style) ; });
// 	jQuery(".field-item [style]").each(function(i, e){ console.log(e.style.length) ; });
if(false){
	var toRemove=[];
	if(jQuery(".field-item").get(0)!==undefined){
		jQuery.each(jQuery(".field-item").get(0).childNodes, function(i, e){
			if(e.nodeType===8){
				toRemove.push(e);
				console.log(i, e.nodeType);
			}
		});
	}
	jQuery.each(toRemove, function(i, e){
		//console.log(i, e.nodeType);
		e.parentNode.removeChild(e)
	});
	jQuery(".field-item *").each(function(i, e){
		if(e.nodeName==='META'){
			e.parentNode.removeChild(e);
			return;
		}
		if(e.nodeName==='LINK'){
			e.parentNode.removeChild(e);
			return;
		}
			if(!e.attributes.length) {return ;}
			//console.log(e, e.attributes);
			var redo=true;
			while(redo){
				redo=false;
				jQuery.each(e.attributes, function(i2, e2){
					if(e2===undefined){ redo=true; return; }
					if(e2===null){ redo=true; return; }
					console.log(e2);
	 				if(e2.nodeName==='unselectable'){ return; }
	 				if(e2.nodeName==='id'){ return; }
	 				if(e2.nodeName==='class'){ return; }
	 				if(e2.nodeName==='target'){ return; }
	 				if(e.nodeName==='UL' && e2.nodeName==='type'){ return; }
	 				if(e.nodeName==='A' && e2.nodeName==='href'){ return; }
	 				if(e.nodeName==='IMG' && e2.nodeName==='src'){ return; }
	 				if(e.nodeName==='IMG' && e2.nodeName==='height'){ return; }
	 				if(e.nodeName==='IMG' && e2.nodeName==='width'){ return; }
	 				if(e.nodeName==='IMG' && e2.nodeName==='align'){ return; }
	// 				if(e.nodeName==='A' && e2.nodeName==='title'){ return; }
	// 				if(e.nodeName==='INPUT' && e2.nodeName==='value'){ return; }
	// 				if(e.nodeName==='INPUT' && e2.nodeName==='length'){ return; }
	// 				if(e.nodeName==='INPUT' && e2.nodeName==='type'){ return; }
					
	 				if(e2.nodeName==='style'){
						//console.log(e.nodeName, e2.nodeName, e2.nodeValue);
		 				var keepStyle={};
		 				var anyStyle=false;
						jQuery.each(e.style, function(i3, e3){
							if(
								e3==='valign'
								|| e3==='border-collapse'
								|| e3==='border-top-style'
								|| e3==='border-right-style'
								|| e3==='border-bottom-style'
								|| e3==='border-left-style'
								|| e3==='border-width'
								|| e3==='border-color'
								|| e3==='width'
								|| e3==='padding-top'
								|| e3==='padding-right'
								|| e3==='padding-bottom'
								|| e3==='padding-left'
								|| e3==='margin-top'
								|| e3==='margin-right'
								|| e3==='margin-left'
								|| e3==='margin-bottom'
								|| e3==='text-align'
								|| e3==='font-style'
								|| e3==='float'
								|| e3==='display'
								|| e3==='border-bottom-color'
								|| e3==='border-bottom-width'
								|| e3==='border-left-color'
								|| e3==='border-left-width'
								|| e3==='border-top-color'
								|| e3==='border-top-width'
								|| e3==='border-right-color'
								|| e3==='border-right-width'
								|| e3==='font-weight'
								|| e3==='color'
								|| e3==='list-style-type'
								|| e3==='list-style-position'
								|| e3==='list-style-image'
								|| e3==='cellspacing'
								|| e3==='cellspacing'
								|| e3==='cellspacing'
								|| e3==='cellspacing'
								|| e3==='cellpadding'){
								anyStyle=true;
								keepStyle[e3]=e.style[e3];
							} else if(
								e3==='font-size'
								|| e3==='font-family'
								|| e3==='line-height'
								|| e3==='font'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								|| e3==='zzzzzzz'
								){
									//discard
							}else {
								console.log(e3, e.style[e3], e.outerHTML);
							}
							//jQuery(e).css(e3, "");
						});
						e.removeAttributeNode(e2);
						if(anyStyle){
							jQuery(e).css(keepStyle);
//							console.log(e.nodeName, 'style', e.style, keepStyle);
						}
							//console.log(e.nodeName, 'style', e.style, keepStyle);
						return;
		 			}
	 				
					if(e.nodeName==='P'     && e2.nodeName==='normal"'     ){ e.removeAttributeNode(e2); return; }
					if(e.nodeName==='LI'    && e2.nodeName==='normal"'     ){ e.removeAttributeNode(e2); return; }
					if(e.nodeName==='P'     && e2.nodeName==='plaintext"'  ){ e.removeAttributeNode(e2); return; }
					if(e.nodeName==='TABLE' && e2.nodeName==='normaltable"'){ e.removeAttributeNode(e2); return; }
					if(e.nodeName==='DIV'   && e2.nodeName==='contenteditable'){ e.removeAttributeNode(e2); return; }
					if(e.nodeName==='DIV'   && e2.nodeName==='contentEditable'){ e.removeAttributeNode(e2); return; }
					
					console.log(e.nodeName, e2.nodeName, e2.nodeValue, e.outerHTML);
					e.removeAttributeNode(e2);
	// 				jQuery.each(e2, function(i3, e3){
	// 					console.log(i3);
	// 				});
				});
			}
	});
// 	jQuery(".field-item [style]").each(function(i, e){
// 		jQuery.each(e.style, function(i2, e2){
// 			//console.log(e, e2);
// 			jQuery(e).css(e2, "");
// 		});
// 		jQuery(e).removeAttr("style");
// 	});
	//jQuery("#menu-main>div>div").toggle();
	//jQuery("#menu-main>div>div>div").toggle();
}
	jQuery("#menu-main").find("*").attr("UNSELECTABLE", "on");
	jQuery("#menu-main>div").delegate("span", "click", function(){
		jQuery("#menu-main>div>table").not(jQuery(this).parent().children("table")).fadeOut("fast");
		jQuery(this).parent().children("table").fadeToggle("fast");
	});
	jQuery("#SearchBox-input").val("Search").addClass("emptyBlur");
	jQuery("#SearchBox-input").focus(function(){
		if(jQuery(this).hasClass("emptyBlur")){
			jQuery(this).val("").removeClass("emptyBlur");
		}
	});
	jQuery("#SearchBox-input").blur(function(){
		if(jQuery(this).val().length<1){
			jQuery(this).val("Search").addClass("emptyBlur");
		}
	});
});
