(function (b) { b.fn.themeswitcher = function (c) { function d(f) { a.onselect !== null && a.onselect(); m.text(a.buttonpretext + " " + f.title); var e = b("").attr("type", "text/css").attr("rel", "stylesheet"); if(f.url) { e.attr("href", f.url); $.ajax({url:gs.xsltParams.library_name + "?a=g&rt=r&configChangeName=cssTheme&configChangeValue=" + f.url}); } else { e.attr("href", "http://ajax.googleapis.com/ajax/libs/jqueryui/" + a.jqueryuiversion + "/themes/" + f.name + "/jquery-ui.css"); $.ajax({url:gs.xsltParams.library_name + "?a=g&rt=r&configChangeName=cssTheme&configChangeValue=" + "http://ajax.googleapis.com/ajax/libs/jqueryui/" + a.jqueryuiversion + "/themes/" + f.name + "/jquery-ui.css"}); } e.appendTo("head"); b.cookie(a.cookiename, f.name); g.find(".jquery-ui-switcher-title").text(a.buttonpretext + " " + f.title); a.closeonselect && h() } function j(f) { var e = null; b.each(l, function (n, i) { if (i.name.toLowerCase() === f.toLowerCase() || i.title.toLowerCase() === f.toLowerCase()) { e = i; return false } }); if (!e) return l[0]; return e } function h() { a.onclose !== null && a.onclose(); g.find(".jquery-ui-switcher-list-hldr").slideUp("fast", function () { g.find(".jquery-ui-switcher-link").css( { color: "#000", background: "#fff" }) }) } var g = this, o = {}, a = { loadtheme: "", height: 200, width: 175, rounded: true, imgpath: "", jqueryuiversion: "1.8.10", initialtext: gs.text.pref.switch_theme, buttonpretext: "Theme:", closeonselect: true, buttonheight: 14, cookiename: "jquery-ui-theme", themes: [], additionalthemes: [], onopen: null, onclose: null, onselect: null }; if (c) { b.each(c, function (f, e) { o[f.toLowerCase()] = e }); b.extend(a, o) } var l = a.themes.length ? a.themes : [ { title: "Black Tie", name: "black-tie", icon: "theme_90_black_tie.png" }, { title: "Blitzer", name: "blitzer", icon: "theme_90_blitzer.png" }, { title: "Cupertino", name: "cupertino", icon: "theme_90_cupertino.png" }, { title: "Dark Hive", name: "dark-hive", icon: "theme_90_dark_hive.png" }, { title: "Dot Luv", name: "dot-luv", icon: "theme_90_dot_luv.png" }, { title: "Eggplant", name: "eggplant", icon: "theme_90_eggplant.png" }, { title: "Excite Bike", name: "excite-bike", icon: "theme_90_excite_bike.png" }, { title: "Flick", name: "flick", icon: "theme_90_flick.png" }, { title: "Hot Sneaks", name: "hot-sneaks", icon: "theme_90_hot_sneaks.png" }, { title: "Humanity", name: "humanity", icon: "theme_90_humanity.png" }, { title: "Le Frog", name: "le-frog", icon: "theme_90_le_frog.png" }, { title: "Mint Choc", name: "mint-choc", icon: "theme_90_mint_choco.png" }, { title: "Overcast", name: "overcast", icon: "theme_90_overcast.png" }, { title: "Pepper Grinder", name: "pepper-grinder", icon: "theme_90_pepper_grinder.png" }, { title: "Redmond", name: "redmond", icon: "theme_90_windoze.png" }, { title: "Smoothness", name: "smoothness", icon: "theme_90_smoothness.png" }, { title: "South Street", name: "south-street", icon: "theme_90_south_street.png" }, { title: "Start", name: "start", icon: "theme_90_start_menu.png" }, { title: "Sunny", name: "sunny", icon: "theme_90_sunny.png" }, { title: "Swanky Purse", name: "swanky-purse", icon: "theme_90_swanky_purse.png" }, { title: "Trontastic", name: "trontastic", icon: "theme_90_trontastic.png" }, { title: "UI Darkness", name: "ui-darkness", icon: "theme_90_ui_dark.png" }, { title: "UI Lightness", name: "ui-lightness", icon: "theme_90_ui_light.png" }, { title: "Vader", name: "vader", icon: "theme_90_black_matte.png" }]; a.additionalthemes.length && b.extend(l, a.additionalthemes); c = { cursor: "pointer", "font-family": "'Trebuchet MS', Verdana, sans-serif", "font-size": "11px", color: "#000", background: "#fff", border: "1px solid #CCC", "text-decoration": "none", padding: "3px 3px 3px 8px", width: a.width + "px", display: "block", height: a.buttonheight + "px", outline: "0px", "line-height": a.buttonheight + "px" }; if (a.rounded) { //c["border-radius"] = "6px"; //c["-moz-border-radius"] = "6px"; //c["-webkit-border-radius"] = "6px" } c = b("").addClass("jquery-ui-switcher-link").css(c).bind( { mouseenter: function () { b(this).css( { background: "#fff" }) }, mouseleave: function () { g.find(".jquery-ui-switcher-list-hldr").is(":visible") || b(this).css( { background: "#fff" }) }, click: function () { if (g.find(".jquery-ui-switcher-list-hldr").is(":visible")) h(); else { a.onopen !== null && a.onopen(); g.find(".jquery-ui-switcher-link").css( { color: "#AAA", background: "#000" }); g.find(".jquery-ui-switcher-list-hldr").slideDown("fast") } } }); var m = b("").addClass("jquery-ui-switcher-title").appendTo(c); b("").addClass("jquery-ui-switcher-arrow").css( { "float": "right", width: "16px", height: "16px", background: "url(" + a.imgpath + "icon_color_arrow.gif) no-repeat 50% 50%" }).appendTo(c); if (b.cookie(a.cookiename)) d(j(b.cookie(a.cookiename))); else a.loadtheme.length ? d(j(a.loadtheme)) : m.text(a.initialtext); var k = b("
").addClass("jquery-ui-switcher-list-hldr").css( { width: eval(a.width + 8) + "px", background: "#000", color: "#FFF", "font-family": "'Trebuchet MS', Verdana, sans-serif", "font-size": "12px", border: "1px solid #CCC", "border-top": "none", "z-index": "999999", position: "absolute", top: eval(a.buttonheight + 3) + "px", left: "0px", padding: "3px 3px 3px 0", display: "none" }).bind( { mouseleave: function () { h() } }); if (a.rounded) { k.css("border-radius", "0 0 6px 6px"); k.css("-moz-border-radius", "0 0 6px 6px"); k.css("-webkit-border-radius", "0 0 6px 6px") } var p = b("