$(document).ready(
  function() 
  { 
	$('.img_galery').lightBox();
  });
/*
function send_mail_response()
{
	$("#system_msg").html("Сообщение отправлено, и в ближайшее время будет просмотрено!");
	$("#fio").attr("value","");
	$("#email").attr("value","");
	$("#message").attr("value","");
}

function sendMessage()
{
	fio_ = $("#fio").attr("value");
	email_ = $("#email").attr("value");
	message_ = $("#message").attr("value");
	
	if (!fio_ || !email_ || !message_)
	{
		$("#system_msg").html("Пожалуйста, заполните все поля!");
	}
	else
	{
		$.post("/include/module/msg.php",
			{
			   fio:fio_,
			   email:email_,
			   message:message_
			},send_mail_response);
	}
	return false;
}
*/

function send_out_response()
{
	$("#system_msg").html("Сообщение отправлено, для просмотра обновите страницу");
	$("#out_fio").attr("value","");
	$("#out_city").attr("value","");
	$("#out_msg").attr("value","");
}

function sendOutform()
{
	name_ = $("#out_fio").attr("value");
	city_ = $("#out_city").attr("value");
	message_ = $("#out_msg").attr("value");
	
	if (!name_ || !city_ || !message_)
	{
		$("#system_msg").html("Пожалуйста, заполните все поля!");
	}
	else
	{
		$.post("/include/module/outform.php",
			{
			   name:name_,
			   city:city_,
			   text:message_
			},send_out_response);
	}
	return false;
}



function calculate()
{
	/*$("#code").html("");*/
	var total = 0;
	var price = 0;
	var current = 0;
	var inp = $('input');
	for (var i=0; i<inp.length; i++)
	{
		if ((i%2 == 0)||(i==0))
		{
			price = inp[i].value;
		}
		else
		{
			current  = eval(inp[i].value*price);
			total += current;
	
			curObj = "#"+inp[i].id+"_cnt";
			/*alert(curObj);*/
			$(curObj).html(current);
			//$('#price')[(i-i%2)].html(price);
			
			//$("").html
			//$("#code").append($("#price"+id_).html()+"<br>");
		}
	}

//	$("#totalPrice").innerHTML = "!!";
	$(".calculate_line #total").html(total);
	//alert($(".calculate_line #total").html());
}


function calc(id_)
{

}

