jQuery(function() { 

	jQuery('#banner_wrapper').cycle({
		fx: 'scrollLeft',
		timeout:  8500
	});

	jQuery("ul.sml-box-sizes li img").hover(function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split(".").join("-hover."));
	}, function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split("-hover.").join("."));
	});

	jQuery("ul.xxl-box-sizes li img").hover(function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split(".").join("-hover."));
	}, function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split("-hover.").join("."));
	});

	jQuery("a#online-application img").hover(function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split(".").join("-hover."));
	}, function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split("-hover.").join("."));
	});
	
	jQuery("a#download-application img").hover(function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split(".").join("-hover."));
	}, function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split("-hover.").join("."));
	});

	jQuery("input#btn_submit").hover(function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split(".").join("-hover."));
	}, function() {
		jQuery(this).attr("src", jQuery(this).attr("src").split("-hover.").join("."));
	});
	
	//Accordion
	jQuery('.accordion_btn').click(function() {
		
		//remove the '.on' class from all buttons
		jQuery('.accordion_btn').removeClass('on');
		
		//no matter what we close all open slides
		jQuery('.accordion_show_content').slideUp('normal');
		
		//if the next slide wasn't open then open it
		if(jQuery(this).next().is(':hidden') == true) {
		
			//add the '.on' class to the button
			jQuery(this).addClass('on');
			  
			//open the slide
			jQuery(this).next().slideDown('normal');
		} 
		
	});	
	
	//add / remove the '.over' class from the stylesheet on mouseover / mouseout 
	jQuery('.accordion_btn').mouseover(function() { jQuery(this).addClass('over'); }).mouseout(function() { jQuery(this).removeClass('over'); });
	
	//closes all s on page load
	jQuery('.accordion_show_content').hide();

	jQuery('.accordion_btn:first').addClass('on');
	jQuery('.accordion_show_content:first').slideDown('normal');

	jQuery('form#frm-contact-me div.realperson-challenge div.realperson-text').addClass('color_white');	

	jQuery('#spam_block').realperson({length: 5, regenerate: "CHANGE CHARACTERS"});	
	
});
