﻿/**
* Drop Shadow Plugin
* Wraps elements with 4 divs (wrap0-3) so the element is
* ready for a 360 degree drop shadow.
* The drop shadow must be applied by CSS according to the
* Onion Skinned method described here: http://www.ploughdeep.com/onionskin/
* and here: http://www.ploughdeep.com/onionskin/360.html
* 
* Version 1.0
* Updated 12/04/2009
*
* Copyright (c) 2009 inCaptiva (Soren Hansen, shn@incaptiva.dk)
*
* Usage: $(object).dropshadow([shadowClass]);
* 
* Example 1: $(".dropshadow").dropshadow(); Applies drop shadow to all elements with the dropshadow class.
* Example 1: $(".dropshadow").dropshadow("class1"); Applies drop shadow to all elements with the dropshadow class
* and adds the class "class1" to all surrounding elements.
*/
(function($)
{
	$.fn.dropshadow = function(shadowClass)
	{
		if (shadowClass)
		{
			shadowClass = " " + shadowClass;
		}
		else
		{
			shadowClass = "";
		}

		this.wrap("<div class='wrap0" + shadowClass + "'><div class='wrap1" + shadowClass + "'>" +
		 "<div class='wrap2" + shadowClass + "'><div class='wrap3" + shadowClass + "'></div></div></div></div>");

		return this;
	};
})(jQuery);

/*
(function($)
{
	$.fn.dropshadow2 = function()
	{
		this.wrap("<div class='shadow-one'><div class='shadow-two'><div class='shadow-three'><div class='shadow-four'></div></div></div></div></div>");
		this.closest(".shadow-two").before("<div class='corner-a'></div><div class='corner-b'>");
		return this;
	};
})(jQuery);
*/