


$(function() {
    //
    $("#book_post").submit(function(){
                
        $(this).ajaxSubmit({
            'url':api_url('post','save'),
            'type':'post',
            'dataType':'json',
            'success':function(rs){
                if(rs.status == 'ok'){
                    $.dialog.alert('留言成功，感谢您的提交',function(){
                        $.phpok.reload();
                    },'succeed');
                }else{
                    $.dialog.alert(rs.content,function(){
                        $("#update_vcode").phpok_vcode();
                        $("#_chkcode").val('');
                    });
                    return false;
                }
            }
        });
        return false;
    });

    $(window).resize(function() {
        var conwinw = $(window).width()
        var conwinlw = $('.nylx_tr').offset().left
        $('.nylx_trdw').css('width', conwinw - conwinlw)
    })
    $(window).resize()

})
