/* ---------------------01. MA Logo Animation02. External Windows03. Hide Form Errors04. Gallery Cycler05. FAQ Show/HideNon jQuery:06. Gallery Cycle Next/Prev07. Form Validation--------------------- */$(document).ready(function(){	/*	----------------------------------------------------------	01. MA LOGO ANIMATION	---------------------------------------------------------- */	$("#moncur a").hover(function() {		$(this).prev("span").animate({opacity: "show", right: "5"}, "slow");	}, function() {		$(this).prev("span").animate({opacity: "hide"}, "fast");	});			/*	----------------------------------------------------------	02. EXTERNAL WINDOWS	---------------------------------------------------------- */	$(function(){	    $('a.external').click(function(){		   window.open(this.href);		   return false;	    });	});		/*	----------------------------------------------------------	03. HIDE FORM ERRORS ON LOAD	---------------------------------------------------------- */	$("#errors").hide();		/*	----------------------------------------------------------	04. GALLERY CYCLE	---------------------------------------------------------- */	$('#gallery').cycle({ 	    fx:     'scrollHorz', 	    speed:  'slow', 	    next:   '#next',		after:   onAfter,	    prev:   '#prev' ,		timeout:0	});		/*	----------------------------------------------------------	05. FAQ SHOW/HIDE	---------------------------------------------------------- */	$("dl.slide dd").hide(); //hide 	$("dl.slide dt").click(function(){ //toggle 		$(this).next("dd").slideToggle(500)		$(this).toggleClass("expanded")		return false;	});		$("#logo").click(function(){		window.location.attr('default.asp');return false;		    	//window.location=$(this).find("a").attr("href");return false;	});});// end jQuery-specific/*----------------------------------------------------------06. GALLERY CYCLE PREV/NEXT---------------------------------------------------------- */function onAfter(curr, next, opts) {    var index = $(this).parent().children().index(this);    $('#prev')[index == 0 ? 'hide' : 'show']();    $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();}/*----------------------------------------------------------07. FORM VALIDATION---------------------------------------------------------- */function verifyForm(theform) {	var isError = false;	// Hide any errors previously shown	$("#errors").hide();	$("#errors li").hide();	if ( document.getElementById('name').value.length == 0 ) {		isError = true;		$("#error-name").show();	}	if ( document.getElementById('email').value.length == 0 ) {		isError = true;		$("#error-email").show();	}	if ( document.getElementById('message').value.length == 0 ) {		isError = true;		$("#error-message").show();	}	if (isError) {		$("#errors").show();		return false;	} else {		return true;	}	return false;						}
