// JavaScript Document
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        wrap: 'circular',
		scroll:1

    });
}); 
	
$(window).load(function() {
$('#slider').nivoSlider({
effect:'boxRainGrow',
boxCols: 10, // For box animations
boxRows: 6, // For box animations
animSpeed:800,
pauseTime:5000,
directionNav:false, //Next & Prev
directionNavHide:false, //Only show on hover
controlNav:false, //1,2,3...
keyboardNav:false, //Use left & right arrows
pauseOnHover:false, //Stop animation while hovering
manualAdvance:false, //Force manual transitions
captionOpacity:0.8, //Universal caption opacity
beforeChange: function(){},
afterChange: function(){},
slideshowEnd: function(){} //Triggers after all slides have been shown
});
}); 

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

$(document).ready(function(){ 
	 $("#contactform").validate();
});

$(document).ready(function(){ 
	 $("#newsletterform").validate();
	 
	 $('#survey_topics').addClass('gray');
	
	
	$('#survey').click(function(){
		if ($('#survey').attr('checked')) {
			$('#survey_topics').removeClass('gray');
			$('#survey_topics_area').addClass('required');
		} else {
			$('#survey_topics_area').removeClass('required');
			$('#survey_topics').addClass('gray');
		}
	}) 
	


	
});	

