// PLEASE COMMENT YOUR JS WELL
$(function(){

// PLACE jQUERY HERE
	
	// Queue up the magical AnythingSlider: 
	// http://css-tricks.com/anythingslider-jquery-plugin/
	// https://github.com/ProLoser/AnythingSlider/wiki
	if ( $("#banner-wrapper").length ){
		$("#banner-wrapper").anythingSlider({
			// Appearance
			width               : null, //default
			height              : null, //default
			resizeContents      : true, //default - setting this to false will lock the dimensions. height will be determined by the image height.
			// Navigation
			buildArrows			: false,
			appendControlsTo	: $(".banner_tab"),
			navigationFormatter : function(i, panel){
				return ['Utility Bill<br />Analysis', 'Energy<br />Audits', 'Energy Management<br />Systems', 'Operations<br />Monitoring', 'Operational<br />Resources'][i - 1];
			},
			// Slideshow
			delay				: 7000,
			animationTime		: 400
		});
	}
	
	
	
	// Create links for CTA Middle
	$(".cta-middle").click(function(){
		var href = $(this).find("a").attr("href");
		window.location = href;					   
	});

	// Remove padding from <p> that contains <img class="float_right" /> as first child
	$(".inner_content_right p > img.float_right").parent().css("padding", 0);

	// Prepare to submit a form
	/*$(".btn-submit").click(function(){
		var target = $(this).closest("form");
		target.find("input[name='submitted']").val("y");
	});*/

	// Add zoom to .pdf links
	/*$("a[href*=.pdf]").each(function(){
		var href = $(this).attr("href");
		$(this).attr("href", href+"#zoom=90");								  
	});*/

});

// PLACE CUSTOM FUNCTIONS HERE

