function irate(id,side){

        $('#img_rate_' + id).html("...");

	$.ajax({
	  type: "POST",
	  url: 'http://' + location.host + '/ajax/ajax.img.rate.php',
	  data: 'id=' + id + '&side=' + side,
	  success: function(msg){
		$('#img_rate_' + id).html(msg);
	  }
	});

}

function fch(id){

	$.ajax({
	  type: "POST",
	  url: 'http://' + location.host + '/ajax/ajax.img.fav.php',
	  data: 'id=' + id,
	  success: function(msg){
		if (msg == '1'){
			$('#fav_' + id).removeClass("img_fav").addClass("img_fav_inlove");
		}else{
			$('#fav_' + id).removeClass("img_fav_inlove").addClass("img_fav");
		}
	  }
	});

}


function del(id){

    $.ajax({
	  type: "POST",
	  url: 'http://' + location.host + '/ajax/ajax.img.del.php',
	  data: 'id=' + id,
	  success: function(msg){
              if (msg == "1"){
                  $("#img_" + id).hide();
              }
	  }
	});

}

function appr(id){

    $.ajax({
	  type: "POST",
	  url: 'http://' + location.host + '/ajax/ajax.img.appr.php',
	  data: 'id=' + id,
	  success: function(msg){
              if (msg == "1"){
                  $("#zakr_" + id).html("ok");
              }
	  }
	});

}

function zoom(id){
    $('#img_' + id + ' div.img_item').hide();
    $('#img_' + id + ' div.img_item_zoomed').show();

}