$(document).ready(function(){  

	// убираем последний border в таблице
	$(".border td:not(:last-child)").css({ "border-right":"1px solid #cccccc" });
	$(".border td").css({ "border-bottom":"1px solid #cccccc" });

	$(".service_tbl td:not(:last-child)").css({ "border-right":"1px solid #cccccc" });
	$(".service_tbl td").css({ "border-bottom":"1px solid #cccccc" });

	$(".rama2").live("click", function() {
		var i = $(this).attr("name");
		$("#image").css({"background":"url('"+i+"') top center no-repeat"});
	});

	$("#post_comment").live("click", function() {
		var name = $("#post_name").val();
		var text = $("#post_text").val();
		var s = $("#s").val();
		var cp = $("#cp").val();

		$.post("http://honda-pac.com/ajax.php", {post_comment: s, n: name, t: text, c: cp}, function(data){ $(".comments").prepend(data).fadeIn("slow") })
		$.post("http://honda-pac.com/ajax.php", {upd_capcha: 1}, function(data){ $(".cp").html(data) })

		$("#post_text").val('');
		$("#cp").val('');
		
		return false;
	});

});

var ie=document.all?1:0;
var ns=document.getElementById&&!document.all?1:0;

function InsertSmile(SmileId){
    if(ie) {
	    document.all.post_text.focus();
	    document.all.post_text.value+=" "+SmileId+" ";
    } else if(ns) {

	    document.forms['reply'].elements['post_text'].focus();
	    document.forms['reply'].elements['post_text'].value+=" "+SmileId+" ";
    } else {
    	alert("Ваш браузер не поддерживается!");
	}
}	


var ns6=document.getElementById&&!document.all?1:0 
var head="display:''" 
var folder='' 
function expandit(curobj){ 
	folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style 
		if (folder.display=="none") {
			folder.display="" 
		}else {
			folder.display="none" 
		}
}
function show_hide_text(divObj) {
    var div = divObj.parentNode.getElementsByTagName('div')[1];
    if (div.style.display == 'none') {
        div.style.display = 'block';
    } else {
        div.style.display = 'none';
    }
} 
