$.fn.moveToTop = function()
{
	this.each(function()
	{
		if(this.parentNode.childNodes.length > 1)
			$(this).insertBefore(this.parentNode.firstChild);
	});
};

$.fn.moveToBottom = function()
{
	this.each(function()
	{
		if(this.parentNode.childNodes.length > 1)
			$(this).insertAfter(this.parentNode.lastChild);
	});
};

$.fn.moveUp = function()
{
	this.each(function()
	{
		if(this.previousSibling)
			$(this).insertBefore(this.previousSibling);
	});
};

$.fn.moveDown = function()
{
	this.each(function()
	{
		if(this.nextSibling)
			$(this).insertAfter(this.nextSibling);
	});
};
