$().ready(function () {
	setLoads();
});

function setLoads() {
	$(".autoClear").focus(function (srcc) {
		if ($(this).val() == $(this)[0].title) {
			$(this).removeClass("autoClearActive");
			$(this).removeClass("invalidField");
			$(this).val("");
		}
	});

	$(".autoClear").blur(function () {
		if ($(this).val() == "") {
			$(this).addClass("autoClearActive");
			$(this).val($(this)[0].title);
		}
	});

	$(".autoClear").blur();

	$('.subSubMenu').removeClass('noJS');
	$('.subSubMenu').hide();
	$('.subMenu').removeClass('noJS');
	$('.subMenu').hide();

	$(".parentPanel:not(.inProgress)").hoverIntent(function () {
		$(this).addClass("inProgress");
		$('.subSubMenu').removeAttr('style').hide();
		$(this).find('.subMenu').clearQueue().slideDown();
	}, function() {
		$(this).find('.subMenu').clearQueue();
		$(this).find('.subMenu').fadeOut('fast').hide();
		$('.subSubMenu').removeAttr('style').hide();
		$(this).removeClass("inProgress");
	});

	$(".withArrow:not(.inProgress)").hoverIntent(function () {
		$(this).addClass("inProgress");
		$('.subSubMenu').removeAttr('style').hide();
		$(this).find('.subSubMenu').clearQueue();
		$(this).find('.subSubMenu').fadeIn('fast');
	},
	function () {
		$(this).find('.subSubMenu').clearQueue();
		$(this).find('.subSubMenu').fadeOut('fast').hide();
		$('.subSubMenu').removeAttr('style').hide();
		$(this).removeClass("inProgress");
	});

	$('.homepageBanners').cycle('fade');
	$('.testimonialText').cycle('fade');
	$('.testimonialText2').cycle('fade');
};

function pageLoad() {
	$(function () {
		setLoads();
	});
}

