/* FUNCTION TO MAKE SMOOTH SCROLLING ANCHORS */
window.addEvent('domready', function()
{
	$each($$('a[href^=#]'), function(el)
	{			
		var href = el.get('href').split('#');
					
				
		var elId = href[1];
		
		if($(elId))
		{
			el.addEvent('click', function(e)
			{
				new Fx.Scroll(window, {duration: 700}).toElement(elId);
				new Event(e).stop();
			});
		}
		
		return;
	});
	
	
	
	
	var toolTipsTwo = new Tips('.tooltip2', {	
		className: 'tooltipStyle' //default is null
	});
		
	
		
	
});



/* FUNCTION TO CLEAR INPUT ON CLICK */
function ClearInput(value, id){ // This calls our function ClearInput, and the two variables we will need for it to function the original value and the id.
var input = document.getElementById(id); // Gets the input field based on its id.

if(value == input.value){ // If the default value is equal to the current value.
input.value = ''; // Empty It.
}else{ // Else the value is not equal to the current input field value.
input.value = input.value; // Leave it the same.
} // End Else.
} // Close Function.


// To call this simply use the following:
// onclick="ClearInput('YOUR TEXT', this.id);"


/* FUNCTION TO SUBMIT FORM ON KEYPRESS ENTER */
	function pressenter(e) {
		if (e.keyCode == 13) {
			document.getElementById('search').submit(); return false
		}
	}