if (typeof window.console === 'undefined') {
	window.console = {
		log: function () {
			void(0);
		}
	};
}

jQuery(function($) {
	var currContentHeight = 0;
	var maxContentHeight = 0;
	var currTitleHeight = 0;
	var maxTitleHeight = 0;
	var rowLeveler = $('.rowLeveler');
	rowLeveler.each(function() {
		var titleLeveler = $(this).find('.titleLeveler');
		titleLeveler.each(function() {
			currTitleHeight = $(this).height();
			//console.log(this, 'title height:', currTitleHeight, 'px');
			if (currTitleHeight > maxTitleHeight) {
				maxTitleHeight = currTitleHeight;
			}
		});
		titleLeveler.height(maxTitleHeight);
		//console.log('Setting all above objects\' title height to:', maxTitleHeight, 'px');
		currTitleHeight = 0;
		maxTitleHeight = 0;
		
		var contentLeveler = $(this).find('.contentLeveler');
		contentLeveler.each(function() {
			currContentHeight = $(this).height();
			//console.log(this, 'content height:', currContentHeight, 'px');
			if (currContentHeight > maxContentHeight) {
				maxContentHeight = currContentHeight;
			}
		});
		contentLeveler.height(maxContentHeight);
		//console.log('Setting all above objects\' content height to:', maxContentHeight, 'px');
		currContentHeight = 0;
		maxContentHeight = 0;
	});
	
	/*$('input:text')
		.hint()
	;*/
	
	$('.target_blank')
		.attr('target', '_blank')
	;
	
	$('.submitCheck')
		.attr('value', '1')
	;
	
	$('a.inputButton')
		.click(function() {
			$(this)
				.parents('form')
					.submit()
			;
		})
	;
	
	$('.shadow')
		.dropShadow({
			left    : -1,
			top     : 0,
			blur    : 1,
			opacity : 0.8,
			color   : '#000000',
			swap    : false
		})
	;
	$('.shadow2')
		.dropShadow({
			left    : 0,
			top     : 4,
			blur    : 1,
			opacity : 0.8,
			color   : '#000000',
			swap    : false
		})
	;
	
	var subMenuShower = $('#servicesMenu .level2').siblings('a');
	subMenuShower
		.click(function(e) {
			e.preventDefault();
			$(this)
				.siblings('.level2')
					.slideToggle(200)
			;
		})
	;
	
	$('#mainMenuList')
		.lavaLamp({
			fx		: 'backout',
			speed	: 700
		})
	;
	
	$('#innerFade')
		.innerfade({
			animationtype: 'fade',
			speed: 2000,
			timeout: 5000,
			type: 'sequence',
			containerheight: 'auto',
			runningclass: 'innerfade'
		})
	;
});