﻿DropShadows = function()
{
	return {
		init : function()
		{
			var items = document.getElementsByTagName("div");
			var i;

			for(i = 0; i < items.length; i++)
			{
				if(cls(items[i].className, "drop-shadow"))
				{
					DropShadows.addShadow(items[i], items[i].className);
				}
			}

		},
		addShadow : function(el, extra)
		{
			var p;
			var s, si, sc;
			var c;

			p = el.parentNode;

			if(typeof p === "object")
			{
				s = document.createElement("span");
				//si = document.createElement("span");
				sc = document.createElement("span");
				s.appendChild(sc);
				//si.appendChild(sc);
				for(c = el.firstChild; c != null; c = c.nextSibling)
				{
					sc.appendChild(c.cloneNode(true));
				}
				while(el.hasChildNodes())
				{
					el.removeChild(el.firstChild);
				}
				//
				el.appendChild(s);
				s.className = "drop-shadow-bottom";
				//si.className = "drop-shadow-inner";
				sc.className = "drop-shadow-content";
				el.className = "drop-shadow-active";
				if(extra != null)
				{
					el.className += " " + extra;
				}
			}

		},
		forceShadow : function(el)
		{
			
		}
	}
}();

