$(document).ready(function() {
	var mh=$(".ms-sidebar").height()+100; /*$(".ms-main").css("height", mh); $(".ms-main").css("*height", mh);*/ $(".ms-main").css("min-height", mh);
	$(".ms-intro-place").html($(".ms-intro").contents());
	$(".ms-carousel").jCarouselLite({ btnNext:".ms-carousel-next", btnPrev:".ms-carousel-prev", visible:1, auto:3000, speed:1000, easing:"easeInOutQuint", scroll:1, mouseWheel:true });

	$('a.callMeLink').click(function(){$('#callMeWindow').fadeIn('fast','easeOutCubic'); $('#callMeWindowFormName').focus(); return false;});
	$('#callMeWindowClose').click(function(){$('#callMeWindow').fadeOut('fast','easeOutCubic');$('#callMeWindowFormName').val('');$('#callMeWindowFormPhone').val('');});
	$('#callMeWindowSend').click(function(){$.ajax({type:'post',url:'/callme.html',data:{'name':$('#callMeWindowFormName').val(),'phone':$('#callMeWindowFormPhone').val()},success:function(reply){if(reply=='fields_error'){alert('Вы не заполнили все поля!');return false;}else if(reply=='error'){alert('Проблемы при отправке :(');return false;}else{$('#callMeWindowClose').trigger('click');$('a.callMeLink').unbind().html('Спасибо, мы перезвоним!');}}});});

});

