/* -------------------------------------------------- */
/* SOURCE CODE                                        */
/* -------------------------------------------------- */
/**
*
* @copyright Copyright (c) 2008, a4pe.web
*
*/

function getURL() {
	url = new String(document.URL);

	pos = url.indexOf("//") + 2;
	tam = url.length;
	url = url.slice(pos, tam);

	pos = url.indexOf("/");
	tam = url.length;
	url = url.slice(0, pos);

	url = 'http://aimar.englishfield.com.br/'

	return url;
}

$(document).ready(function() {
	$("#nav ul li a").jFade({
		trigger: "mouseover",
		property: 'background',
		start: '111111',
		end: '18080a',
		steps: 30,
		duration: 20
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '18080a',
		end: '111111',
		steps: 30,
		duration: 20
	});


/* -------------------------------------------------- */
/* fale-conosco                                       */
/* -------------------------------------------------- */
	if ($("#fale-conosco").length > 0)
	{
		if ($("#frmFaleConosco").length > 0)
		{
			// Máscara(s)
			$("#f_Telefone").mask("(99) 9999-9999");

			// Validação
			$("#frmFaleConosco").validate();
		}
	}
/* -------------------------------------------------- */


/* -------------------------------------------------- */
/* intro                                              */
/* -------------------------------------------------- */
	if ($("#intro").length > 0)
	{
		$('#intro').cycle({ fx:'fade', speed:1000, timeout:2000 });
	}
/* -------------------------------------------------- */


/* -------------------------------------------------- */
/* sugestoes-ambiente                                 */
/* -------------------------------------------------- */
	if ($("#sugestoes-ambiente").length > 0)
	{
		hs.graphicsDir = getURL() + '_lib/js/highslide/';
		hs.outlineType = 'outer-glow';
	}
/* -------------------------------------------------- */
});