$(document).ready(function() {
//  Действие при наведении курсора
   $('#clim1').hover(function() {
        $(this).stop().animate({ width: "400px" }, 300);
		$('#clim2').stop().animate({ width: "75px" }, 300);
		$('#clim3').stop().animate({ width: "75px" }, 300);
		$('#clim4').stop().animate({ width: "75px" }, 300);
        },function(){
   });
   $('#clim2').hover(function() {
        $(this).stop().animate({ width: "400px" }, 300);
		$('#clim1').stop().animate({ width: "75px" }, 300);
		$('#clim3').stop().animate({ width: "75px" }, 300);
		$('#clim4').stop().animate({ width: "75px" }, 300);
        },function(){
   });
   $('#clim3').hover(function() {
        $(this).stop().animate({ width: "400px" }, 300);
		$('#clim1').stop().animate({ width: "75px" }, 300);
		$('#clim2').stop().animate({ width: "75px" }, 300);
		$('#clim4').stop().animate({ width: "75px" }, 300);
        },function(){
   });
   $('#clim4').hover(function() {
        $(this).stop().animate({ width: "400px" }, 200);
		$('#clim1').stop().animate({ width: "75px" }, 200);
		$('#clim2').stop().animate({ width: "75px" }, 200);
		$('#clim3').stop().animate({ width: "75px" }, 200);
        },function(){
   });
});

$(document).ready(function() {
	$('.link_t').click(function() {
		if($('.towns_list').css('display') == "none"){
        	$('.towns_list').stop().animate({ height: 'show' }, 300);
		}else{
			$('.towns_list').stop().animate({ height: 'hide' }, 200);
		}
	});
});


function changePic(newSrc, id)
{
	pic = document.getElementById(id);
	pic.src = "/images/" + newSrc;

}

function showSubmenue(id, id2){
	$(document).ready(function() {
		if($('#'+id).css('display') == "none"){
        	$('#'+id).stop().animate({ height: 'show' }, 700);
			$('#'+id2).stop().animate({ height: 'show' }, 700);
		}else{
			$('#'+id2).stop().animate({ height: 'hide' }, 700);
			$('#'+id).stop().animate({ height: 'hide' }, 700);
		}
	});
}

$(function(){

    $('.img').hover(function(){

      $(this).children('img').stop().animate({width:"320px",height:"240px"}, 400);

    }, function(){ $(this).children('img').stop().animate({width:"150px",height:"113px"}, 400); });

});

function checkTovChange(tovID, charID, typ){
	if(typ == 0){//проверяем товар
		document.getElementById(charID).checked = false;
		document.getElementById(tovID).checked = true;
	}else{
		document.getElementById(charID).checked = true;
		document.getElementById(tovID).checked = false;
	}
	
}
