(function(a) {
  a.fn.Qbox = function(d) {
    var b = a.extend({
      title: "",
      fadespeed: 1E3,
      width: 300,
      height: 0,
      url: "",
      param: "",
      minTop: 0,
      minWidth: "",
      minHeight: "",
      data: ""
    }, d);
    a("#q_content").remove();
    a(this).append('<div id="overlay"></div><div id="q_content"><div id="title_box"></div><div id="close_box"></div><div id="q_box"></div></div>');
    a("#q_content").css({
      "border": "0px solid #f5f5f5",
      position: "fixed",
      display: "none",
      "z-index": "5",
      "box-shadow": "0 0 5px rgba(0,0,0,0.3)"
    });
    a("#q_box").css({
      overflow: "auto",
      height: "auto",
      width: "auto",
      background: "#F7F7F7",
      color: "#3e3e3e",
      padding: "9px",
      "padding-bottom": "5px",
      "font-size": "13px"
    });
    a("#title_box").css({
      "border-bottom": "2px solid #124668",
      color: "#333",
      "font-size": "15px",
      "font-weight": "none",
      "padding-top": "9px",
      "padding-bottom": "11px",
      "padding-left": "9px",
      "padding-right": "9px",
      background: "#F7F7F7"
    });
    a("#overlay").css({
      display: "none",
      position: "fixed",
      top: "0",
      left: "0",
      width: "100%",
      height: "100%",
      "z-index": "4",
      background: "#000000",
      opacity: "0.5",
      filter: "blur(200px)",
      overflow: "hidden"
    });
    a("#close_box").css({
      position: "absolute",
      right: "15px",
      top: "15px",
      width: "11px",
      height: "11px",
      cursor: "pointer",
      "text-shadow": "none",
      backgroundImage: "url(../../theme/images/box_del.gif)",
      "-khtml-opacity": "1",
      opacity: "1"
    });
    a("#close_box").hover(
      function() {
        a(this).css({
          "-khtml-opacity": "0.9",
          opacity: "0.9"
        })
      },
      function() {
        a(this).css({
          "-khtml-opacity": "0.7",
          opacity: "0.7"
        })
      });
    "" != b.url && a.ajax({
      type: "POST",
      url: b.url,
      data: b.param,
      success: function(b) {
        a("#q_box").html(b)
      }
    });
    "" != b.data && a("#q_box").html(b.data);
    a("#title_box").html(b.title);
    d = a(window);
    var e = document.documentElement;
    d.scrollTop();
    var c = a("#q_content");
    0 == b.height ? a("#q_box").css("height", c.height() + "px") : a("#q_box").css("height", b.height + "px");
    a("#q_box").css("width", b.width + "px");
    "" !== b.minHeight && a("#q_box").css("min-height", b.minHeight + "px").css("height", "auto");
    a("#overlay").css("display", "block");
    a("#overlay").css({
      height: e.clientHeight
    });
    a("#overlay").css({
      width: d.width()
    });
    a("#overlay").css("top", 0);
    a("#close_box").click(
      function() {
        c.fadeOut(b.fadespeed,
          function() {
            a("#q_content").remove();
            a("#q_box").remove();
            a("#title_box").remove();
            a("#close_box").remove();
            a("#box_bg").remove();
            a("#overlay").remove()
          });
        return !1
      });
    c.css({
      left: (a(window).width() - c.outerWidth()) / 2 - 8
    }).css({
      top: 100 + 'px'
    });
    c.fadeIn(b.fadespeed, function() {
      c.show()
    })
  }

})
(jQuery);

function box_close() {
  $("#q_box").remove();
  $("#title_box").remove();
  $("#close_box").remove();
  $("#box_bg").remove();
  $("#q_content").remove();
  $("#overlay").remove()
};
