//$(document).ready(function() {
	//zoomImage();
	//toggleParagraph();
	//toggleButtonAt404();
	//footerAtBottomFix();
//});


function showCounter()
{

}


function toggleParagraph(){
	$(".toggleParagraphContainer").hide(); 

	//Switch the "Open" and "Close" state per click
	$("h2.paragraphTrigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.paragraphTrigger").click(function(){
		$(this).next(".toggleParagraphContainer").slideToggle("fast");
	});

};


function zoomImage(){
	$("a.single_image").fancybox({
		'zoomOpacity' : true,
		'overlayShow' : false,
		'zoomSpeedIn' : 150,
		'zoomSpeedOut' : 150 
	}); 
}


function toggleCalcTabs(curTab){
	$('#calculatorTabs > div').removeClass('curCalcTab');
	$('#' + curTab).addClass('curCalcTab');
	
	//подсчёт стоимости
	$("input[name^='calculatedField']").calculatePrice("keyup", "#calResValue");
}


function toggleButtonAt404(){
	$('#eggGlassed').css('opacity', 0);
	
	$('#errOnOff div').toggle(
		function(){
			$('#eggGlassed').animate({opacity: 1.0}, 200);
			$(this).addClass('turnedOn');}, 
		function(){
			$('#eggGlassed').animate({opacity: 0.0}, 400);	
			$(this).removeClass('turnedOn');
	});
}


function footerAtBottomFix (){
	var siteHeight = $('#around').height();
	var windowHeight = $(window).height();
	var marginValue = windowHeight - siteHeight;
	
	if(siteHeight < windowHeight){
		$('#around').height(windowHeight + 'px');
		$('#footer').css('padding-top', 100 + marginValue + 'px');
	}
}