(function (a)
{
    a.fn.extend(
    {
        freshlineDemo_init: function ()
        {
            var a = this;
            return this.each(function ()
            {
                var i = "#left",
                    h = "auto",
                    o = ".slider-menu ul",
                    g = "#center",
                    d = "#A6B8CC",
                    f = "#dark",
                    n = ".head_type_2",
                    b = "#1f2120",
                    m = ".content_type_1",
                    l = ".main_type_1",
                    k = ".slider-menu ul li ul li >div",
                    j = ".slider-menu",
                    e = "#light",
                    c = "#panel";
                a.find("#demo-settings,#panel").hover(function ()
                {
                    a.find(c).stop();
                    a.find(c).animate(
                    {
                        opacity: 1,
                        height: "60px",
                        "margin-top": "-40px"
                    }, {
                        duration: 400
                    })
                }, function ()
                {
                    a.find(c).stop();
                    a.find(c).animate(
                    {
                        opacity: 0,
                        height: "0px",
                        "margin-top": "0px"
                    }, {
                        duration: 400
                    })
                });
                a.find(e).click(function ()
                {
                    var c = $(this);
                    $(document).find(j).css(
                    {
                        "background-color": "#f5f5f5"
                    });
                    $(document).find(k).css(
                    {
                        "background-color": "#fff"
                    });
                    $(document).find(l).css(
                    {
                        color: "#D10C27"
                    });
                    $(document).find(m).css(
                    {
                        color: b
                    });
                    $(document).find(n).css(
                    {
                        color: b
                    });
                    $(document).find(".menu-head").each(function ()
                    {
                        var a = $(this),
                            b = a.parent().parent().parent().parent().parent().parent().index();
                        (b == 2 || b == 4) && a.wrapInner('<span id="lig" class="light2"></span>')
                    });
                    a.find(f).css(
                    {
                        color: d
                    });
                    a.find(e).css(
                    {
                        color: b
                    })
                });
                a.find(f).click(function ()
                {
                    var c = $(this);
                    $(document).find(j).css(
                    {
                        "background-color": b
                    });
                    $(document).find(k).css(
                    {
                        "background-color": "#353736"
                    });
                    $(document).find(n).css(
                    {
                        color: "#00b0e9"
                    });
                    $(document).find(l).css(
                    {
                        color: "#9bb94b"
                    });
                    $(document).find(m).css(
                    {
                        color: "#e4e4e4"
                    });
                    $(document).find("#lig").remove();
                    a.find(e).css(
                    {
                        color: d
                    });
                    a.find(f).css(
                    {
                        color: b
                    })
                });
                a.find(g).click(function ()
                {
                    var c = $(this);
                    $(document).find(o).css(
                    {
                        "margin-left": h,
                        "margin-right": h,
                        width: "600px",
                        "float": "none"
                    });
                    a.find(i).css(
                    {
                        color: d
                    });
                    a.find(g).css(
                    {
                        color: b
                    })
                });
                a.find(i).click(function ()
                {
                    var c = $(this);
                    $(document).find(o).css(
                    {
                        "margin-left": "0px",
                        "float": "left",
                        width: h
                    });
                    a.find(g).css(
                    {
                        color: d
                    });
                    a.find(i).css(
                    {
                        color: b
                    })
                })
            })
        }
    })
})(jQuery);
