/* 
 * A simple object to maintain any functions required by Shanif's Net sites
 *--------------------------------------------------------------------------*/
var ShanifsNet = 
{
	Version: '1.0.0',
	fullOpacity: true,
	intervalID: null,
	currentElement: null
}

ShanifsNet.pulse = function(element)
{
	Effect.Fade(element, {to: Constants.MIN_PULSE_OPACITY});
	ShanifsNet.fullOpacity = false;
	ShanifsNet.intervalID = setInterval(this.changePulseState, Constants.PULSE_DURATION);
	ShanifsNet.currentElement = element;
}

ShanifsNet.restore = function(element)
{
	Effect.Appear(element);
	clearInterval(ShanifsNet.intervalID);
}

ShanifsNet.changePulseState = function()
{
	if( ShanifsNet.fullOpacity )
		Effect.Fade(ShanifsNet.currentElement, {to: Constants.MIN_PULSE_OPACITY});
	else
		Effect.Appear(ShanifsNet.currentElement)
		
	ShanifsNet.fullOpacity = !ShanifsNet.fullOpacity;
}

/*
 * Constants
 */
var Constants =
{
}

Constants.MIN_PULSE_OPACITY = 0.2;
Constants.PULSE_DURATION = 1000;
Constants.NO_TRANSFORMATION_REL = "no_transform";