/* Js for , Version=1775477163 */
 v.theme = {"template":"mobile","theme":"colorful","device":"mobile"};;v.quoteTitle = "<div class='quote-title'>\u539f\u5e16\u7531 %s \u4e8e %s \u53d1\u8868<\/div>";;v.discussion = 0;;
  $(function()
  {
      $.refreshRepliesList = function()
      {
          $('#repliesListWrapper').load(window.location.href + ' #repliesList', function()
          {
              $(window).scrollTop($('#bottomSpace').offset().top);
          });
      };
  
      var $replyForm = $('#replyForm');
      $replyForm.ajaxform({onResultSuccess: function(response)
      {
          $('#replyDialog').modal('hide')
          if($.isFunction($.refreshRepliesList))
          {
              response.locate = false;
              setTimeout($.refreshRepliesList, 200);
          }
      }, onSuccess: function(response)
      {
          if(response.reason == 'needChecking')
          {
              $replyForm.find('.captcha-box').html(Base64.decode(response.captcha)).removeClass('hide');
          }
      }
      });
  
      $('.thread-reply-btn').click(function()
      {
          if($(this).data('reply')) $('input[name=reply]').val($(this).data('reply'));
      })
  });
  ;$(function()
{
    $('.thread > .card-footer').each(function()
    {
        var $footer = $(this);
        var $children = $footer.children();
        var length = $children.length;
        if(length < 1 
           || (length === 1 && $children.filter('.actions').length === 1 && $children.filter('.actions').children().length < 1))
        {
            $footer.hide();
        }
    });

    $(document).on('click', '.quote', function()
    {
        if($(this).parents('.alert-replies').length)
        {
            var $quote = $(this).parents('.thread-content');
            var date   = $quote.find('.reply-date').html();
            var user   = $quote.find('.reply-author').html().replace('\：', '');
            var quoteTitle = v.quoteTitle.replace('\%\s', user).replace('\%\s', date);

            var quoteContent = '[quote]';
            quoteContent += quoteTitle;
            quoteContent += $quote.find('.reply-content').html();
            quoteContent += '[/quote]';
        }
        else
        {
            var $quote     = $(this).parents('.panel.reply');
            var date       = $quote.find('.panel-heading span.muted')[0].childNodes[1].textContent;
            var user       = $quote.find('.table .speaker .thread-author')[0].childNodes[1].textContent;
            var quoteTitle = v.quoteTitle.replace('\%\s', user).replace('%s', date);
            
            var quoteContent = '[quote]';
            quoteContent += quoteTitle;
            quoteContent += $quote.find('.table .thread-wrapper .thread-content').html();
            quoteContent += '<br/>[/quote]';
        }

        $('#content').focus().val(quoteContent);
    })

    $(document).on('click', 'input[name=stick]', function()
    {
        if($('#stick1').prop('checked'))
        {
            $(this).parents('.form-group').next(".form-group").hide().next('.form-group').hide();
        }
        else
        {
            $(this).parents('.form-group').next(".form-group").show().next('.form-group').show();
        }
    });
});

;
  var logLink = "/Index.php/log-record.mhtml";
  var browserLanguage = navigator.language || navigator.userLanguage; 
  var resolution      = screen.availWidth + ' X ' + screen.availHeight;
  $.get(logLink, {browserLanguage:browserLanguage, resolution:resolution});
  