/* Js for http://www.baidu.com, Version=1737513933 */
 v.objectType = "article";;v.objectID = 307;;v.showDetail = "\u663e\u793a\u5168\u90e8";;v.hideDetail = "\u6536\u8d77";;$(document).ready(function()
{
    $.setAjaxForm('#commentForm', function(response)
    {
        if(response.result == 'success')
        {
            setTimeout(function()
            {
                var link = createLink('message', 'comment', 'objecType=' + v.objectType + '&objectID=' + v.objectID);
                 $('#commentForm').closest('#commentBox').load(link, location.href="#first");
            },  
            1000);   
        }
        else
        {
            if(response.reason == 'needChecking')
            {
                $('#captchaBox').html(Base64.decode(response.captcha)).show();
            }
        }
    });
    $('#pager').find('a').click(function()
    {
        $('#commentBox').load($(this).attr('href'));
        return false;
    });
    $('a[id*=reply]').modalTrigger();
    /* Process contents. */
    $('.content-detail').each(function()
    {
        var obj = $(this);
        if(obj.height() > 100)
        {
            var buttons = " ... " + v.showDetail + "";
            buttons    += " " + v.hideDetail + "";
            obj.parent().append(buttons);
            obj.parent().find('.hideDetail').hide();
            obj.addClass('content-abstract');
        }
    });
});
function showDetail(obj)
{
    var tdContent = $(obj).parents('.td-content');
    tdContent.find('.content-detail').removeClass('content-abstract');
    tdContent.find('.showDetail').hide();
    tdContent.find('.hideDetail').show();
}
function hideDetail(obj)
{
    var tdContent = $(obj).parents('.td-content');
    tdContent.find('.content-detail').addClass('content-abstract');
    tdContent.find('.showDetail').show();
    tdContent.find('.hideDetail').hide();
}
$(document).ready(function()
{
    $('#pager').find('a').click(function()
    {
        if(v.objectType == 'order') $('#commentForm').closest('.modal-body').load($(this).attr('href'));
        if(v.objectType != 'order') $('#commentForm').closest('#commentBox').load($(this).attr('href'));
        return false;
    });
    /* Process contents. */
    $('.content-detail').each(function()
    {
        var obj = $(this);
        if(obj.height() > 100)
        {
            var buttons = " ... " + v.showDetail + "";
            buttons    += " " + v.hideDetail + "";
            obj.parent().append(buttons);
            obj.parent().find('.hideDetail').hide();
            obj.addClass('content-abstract');
        }
    });
});
function showDetail(obj)
{
    var tdContent = $(obj).parents('.td-content');
    tdContent.find('.content-detail').removeClass('content-abstract');
    tdContent.find('.showDetail').hide();
    tdContent.find('.hideDetail').show();
}
function hideDetail(obj)
{
    var tdContent = $(obj).parents('.td-content');
    tdContent.find('.content-detail').addClass('content-abstract');
    tdContent.find('.showDetail').show();
    tdContent.find('.hideDetail').hide();
}
if(screen.width > 767){
    $('#siteNav').insertAfter('#navbarWrapper');
}
$('#foot').insertBefore('#footer');
$('.carousel').insertAfter('#header');
var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
if(screen.width > 767){
    $('#siteNav').insertAfter('#navbarWrapper');
}
$('#foot').insertBefore('#footer');
$('.carousel').insertAfter('#header');