(function(e) {
    e.fn.fix = function(t) {
        var n = {
            "float": "left",
            minStatue: !1,
            skin: "gray",
            durationTime: 1e3
        },
        t = e.extend(n, t);
        this.each(function() {
            var n = e(this),
            r = n.find(".close_btn"),
            i = n.find(".show_btn"),
            s = n.find(".side_content"),
            o = n.find(".side_list").width(),
            u = n.find(".side_list"),
            a = n.offset().top;
            n.css(t.float, 0),
            t.minStatue && (e(".show_btn").css("float", t.float), s.css("width", 0), i.css("width", 25)),
            t.skin && n.addClass("side_" + t.skin),
            e(window).bind("scroll",
            function() {
                var r = a + e(window).scrollTop() + "px";
                n.animate({
                    top: r
                },
                {
                    duration: t.durationTime,
                    queue: !1
                })
            }),
            r.bind("click",
            function() {
                s.animate({
                    width: "0"
                },
                "fast"),
                i.stop(!0, !0).delay(300).animate({
                    width: "55px"
                },
                "fast").css("float", "left")
            }),
            i.click(function() {
                e(this).animate({
                    width: "0px"
                },
                "fast"),
                n.width(o),
                s.stop(!0, !0).delay(200).animate({
                    width: "240px"
                },
                "fast")
            })
        })
    }
})(jQuery)