var mainDoc = {
	basePath: null,
	onReady: function() {
		//alert("in on ready function");
		//console.log(SungevitySite);
		// Set base path
		//SungevitySite.basePath = document.location.protocol + '//' + document.location.host;
		
		for (var selector in this.elements) {
			var $elms = $(selector);
			//alert("for loop");
			if ($elms.size() > 0) {
				this.elements[selector]($elms);
			}
		}
	},
		
	comb: function(ems,classname){
			
			if ($(ems).is("'." + classname+ "'")){
				//alert($(ems).html());
				
				return ($(ems));
				//alert($(ems).html());
				//$(this).addClass('blue');
			}
			else
			{
				return false;
			}
	},
	
	elements: {
		
		'#contactForm':function($elms){
			
			$("#contactForm").validate();

			
		},
		
		'#commercialQuoteRequest':function($elms){
			
			$("#commercialQuoteRequest").validate();

			
		},
		
		'#freeOvenWindowClean':function($elms){
			
			$("#freeOvenWindowClean").validate();

			
		}
		
	
		
		
		
	}
}



$(document).ready(
	function()
	{
		//alert("Main on ready");
		mainDoc.onReady();
		
	
		
	}
);