//(function(a) { a.fn.clearform = function(d) { var b = a.extend({ defaultValue: "" }, d || {}); return this.each(function() { a(this).val(b.defaultValue); a(this).focus(function() { var e = a(this).val().split(" ").join(""), c = b.defaultValue.split(" ").join(""); if (e == "" || e == c) a(this).val(""); a(this).css("background-position", "100% 0") }); a(this).blur(function() { var e = a(this).val().split(" ").join(""), c = b.defaultValue.split(" ").join(""); if (e == "" || e == c) { a(this).val(b.defaultValue); a(this).css("background-position", "0 0") } }) }) }; a.fn.charactercount = function(d) { var b = a.extend({ maxchars: 3E3, label: "#replace" }, d || {}); return this.each(function() { function e() { c = a(f).val().length; a(b.label).html(c + " / " + b.maxchars + " characters"); if (c <= b.maxchars) { a(b.label).removeClass("error"); a(f).removeClass("error") } else { a(b.label).addClass("error"); a(f).addClass("error") } } var c, f = this; e(); a(this).keyup(function() { e() }); a(this).mouseup(function() { e() }); a(this).change(function() { e() }) }) }; a.fn.tooltip = function(d) { a.extend({ defaultValue: "" }, d || {}); return this.each(function() { a("#tooltip").length == 0 && a("#nx-wrap").append('<div id="tooltip"></div>'); a(this).hover(function(b) { b.preventDefault(); a("#tooltip").show().html(a(this).attr("alt")); b = a(this).offset(); a("#tooltip").css({ width: "auto", left: b.left + 14, top: b.top + 40 }); b = Math.min(a("#tooltip").width(), 200); a("#tooltip").css({ width: b, "margin-left": -b / 2 - 9 }) }, function() { a("#tooltip").hide().html("") }) }) }; a.fn.tabs = function(d) { var b = a.extend({ aclass: "active", tabs: "overwriteme", triggersuffix: ["", ""] }, d || {}), e = this; a(b.tabs).hide(); a(b.tabs).eq(0).show(); return this.each(function() { a(this).click(function(c) { c.preventDefault(); c = a(e).index(this); a(e).removeClass(b.aclass); a(this).addClass(b.aclass); for (var f = 0; f < a(b.tabs).length; f++) f != c && a(b.tabs).eq(f).trigger(b.triggersuffix[0]); for (f = 0; f < a(b.tabs).length; f++) f == c && a(b.tabs).eq(f).trigger(b.triggersuffix[1]); a(b.tabs).hide(); a(b.tabs).eq(a(e).index(this)).show() }) }) }; a.fn.popup = function(d) { function b() { a("#screen, #popup").fadeOut(200, function() { a("#popup-content").html(""); a("#popup-content").removeClass("static") }) } function e(f) { a("#popup-screenshot img").attr("src", f) } var c = a.extend({ width: 100, height: 100, contents: "", type: "video", index: "li" }, d || {}); return this.each(function() { if (a("#popup").length == 0) { a("body").append('<div id="popup"><div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div> <div class="t"></div><div class="b"></div><div class="l"></div><div class="r"></div><a href="#" id="popup-close"></a> <div id="popup-content"></div></div><div id="screen"></div>'); a("#screen, #popup").hide(); a("#screen, #popup-close").click(function(f) { f.preventDefault(); b() }) } a(this).click(function(f) { f.preventDefault(); f = a(document).scrollTop() + a(window).height() / 2; a("#popup").css({ top: f - parseInt(c.height) / 2, height: c.height + 60 }); a("#popup").css({ width: c.width + 20, "margin-left": -10 - c.width / 2 }); a("#screen, #popup").fadeIn(200); if (c.type == "images") { a("#popup").css({ top: f - parseInt(c.height) / 2 }); var h = a(c.index).index(this), j = a(c.index).length; a("#popup-content").html('<a href="#" class="hzbtnc" id="popup-prev"></a><div id="popup-screenshot"><img src="" alt="" /></div><a href="#" class="hzbtnc" id="popup-next"></a>'); a("#popup").css({ width: c.width + 126, "margin-left": -(c.width + 126) / 2, height: c.height + 66 }); a("#popup-prev, #popup-next").css({ height: c.height }); a("#popup-screenshot").css({ width: c.width, height: c.height }); e(a(c.index).eq(h).attr("href")); a("#popup-prev").click(function(k) { k.preventDefault(); h = (h + 1) % j; e(a(c.index).eq(h).attr("href")) }); a("#popup-next").click(function(k) { k.preventDefault(); h = (h - 1 + j) % j; e(a(c.index).eq(h).attr("href")) }) } if (c.type == "video") { f = a(this).attr("href"); f = a.flash.create({ swf: "http://nxcache.nexon.net/dungeonfighter/swf/popup-videoplayer.swf", width: 640, height: 360, params: { allowScriptAccess: "always" }, flashvars: { videourl: f} }); a("#popup-content").html('<div id="popup-video">' + f + "</div>"); a("#popup").css({ width: c.width + 106, "margin-left": -53 - c.width / 2, height: c.height + 66 }) } if (c.type == "static") { a("#popup").css({ top: a(document).scrollTop() + 100, height: "auto", width: c.width + 106, "margin-left": -53 - c.width / 2 }); a("#popup-content").addClass("static"); a("#popup-content").html(c.contents) } }) }) }; a.fn.newsexpand = function(d) { var b = a.extend({ activeClass: "expanded", childExpander: ".expander" }, d || {}); return this.each(function() { var e = this; a(this).find(b.childExpander).click(function(c) { c.preventDefault(); a(e).toggleClass(b.activeClass) }) }) }; a.fn.expand = function(d) { var b = a.extend({ oHeight: 0, eHeight: 0, activeClass: " ", hideThese: "#overridethis", flash: "", flashHere: "#overridethis", expandThis: "#overridethis", timeout: 300, defaultShow: false }, d || {}); return this.each(function() { var e; a(this).toggle(function(c) { function f() { a(b.flashHere).html(b.flash); a(b.expandThis).stop().animate({ height: b.eHeight }, b.timeout, "easeOut") } c.preventDefault(); a(b.hideThese).fadeOut(b.timeout); a(this).addClass(b.activeClass); clearTimeout(e); e = setTimeout(f, b.timeout) }, function(c) { function f() { a(b.hideThese).fadeIn(b.timeout); a(b.flashHere).empty() } a(b.expandThis).stop().animate({ height: b.oHeight }, b.timeout, "easeOut"); c.preventDefault(); a(this).removeClass(b.activeClass); clearTimeout(e); e = setTimeout(f, b.timeout) }); if (b.defaultShow) { a(b.expandThis).css({ height: b.eHeight }); a(this).click() } else { a(b.expandThis).css({ height: b.oHeight }); a(this).removeClass(b.activeClass) } }) }; a.fn.funexpand = function(d) { var b = a.extend({ oHeight: 108, eHeight: 37, expandThese: "#overridethis", timeout: 200 }, d || {}); return this.each(function() { a(this).toggle(function() { a(b.expandThese).stop().animate({ height: b.oHeight }, b.timeout) }, function() { a(b.expandThese).stop().animate({ height: b.eHeight }, b.timeout) }) }) }; a.fn.sameheight = function(d) { var b = a.extend({ child: "ul", useFilter: false }, d || {}); if (b.useFilter) { var e = 0; a(this).filter(b.child).each(function() { e = Math.max(a(this).height(), e) }); a(this).filter(b.child).height(e); return this } else return this.each(function() { var c = 0; a(this).find(b.child).each(function() { c = Math.max(a(this).height(), c) }); a(this).find(b.child).height(c) }) }; a.fn.hoverdropdown = function(d) { var b = a.extend({ oHeight: 0, eHeight: 400, timeout: 100, expandThese: "#overridethis" }, d || {}); return this.each(function() { a(b.expandThese).hide().css({ height: b.oHeight }); a(this).hover(function(e) { e.preventDefault(); a(b.expandThese).show().stop().animate({ height: b.eHeight }, b.timeout, "easeOut") }, function(e) { e.preventDefault(); a(b.expandThese).stop().animate({ height: b.oHeight + "px" }, b.timeout, "easeOut", function() { a(this).hide() }) }) }) }; a.fn.pseudohover = function(d) { var b = a.extend({ hover: "#overridethis", pseudo: "#overridethis", className: "" }, d || {}); return this.each(function() { var e = a(b.hover).index(this); a(this).hover(function(c) { c.preventDefault(); a(b.pseudo).removeClass(b.className); a(b.pseudo).eq(e).addClass(b.className) }, function(c) { c.preventDefault(); a(b.pseudo).removeClass(b.className) }) }) }; a.fn.rotban = function(d) { var b = a.extend({ slides: "#m-items-carousel li", slider: "#m-rotban-ban", buttons: "#m-items-carousel li", fadetimeout: 2E3, pausetimeout: 5600, activeclass: "active", height: 164 }, d || {}); return this.each(function() { function e() { h = (h + 1) % j; c(h) } function c(k) { h = k; var g = a(b.slides).eq(k); k = a(b.buttons).eq(k); a(b.slides).removeClass(b.activeclass); g.addClass(b.activeclass); g.stop().fadeIn(b.fadetimeout, function() { a(b.slides).not("." + b.activeclass).fadeOut(0) }); a(b.buttons).removeClass(b.activeclass); k.addClass(b.activeclass); clearTimeout(f); f = setTimeout(e, b.pausetimeout + b.fadetimeout) } var f = setTimeout(e, b.pausetimeout), h = 0, j = a(b.slides).length; c(0); a(b.slider).height(b.height * j); a(b.buttons).click(function(k) { k.preventDefault(); c(a(b.buttons).index(this)) }) }) }; a.fn.highlightcarousel = function(d) { var b = a.extend({ slides: "#m-items-carousel li", animtimeout: 1E3, pausetimeout: 5600, nextbtn: ".next", prevbtn: ".prev", slider: ".images", descholder: "#m-items-display-text a", classholder: "#m-feat-detail", imgholder: "#m-items-display-image", width: 77, trigger: "", autostart: true, popup: false }, d || {}); return this.each(function() { function e() { k = k == j - 3 ? 0 : Math.min(j - 3, g); h(k) } function c() { g = g == j - 1 ? 0 : Math.min(j - 1, g + 1); if (g > k + 2 || g < k) e(); f(g) } function f(m) { g = m; m = a(b.slides).eq(m); var p = m.find("a").attr("href"), q = m.find("img").attr("alt"), r = m.find(".dn").html(); a(b.imgholder + " img").attr("src", q); a(b.imgholder).attr("href", p); a(b.descholder).attr("href", p); a(b.descholder).html(r); m.addClass("active").siblings().removeClass("active"); clearTimeout(l); l = setTimeout(c, b.pausetimeout + b.animtimeout) } function h(m) { a(b.slider).stop().animate({ left: -m * b.width }, b.animtimeout, "easeOut") } var j = a(b.slides).length, k = 0, g = 0, l = setTimeout(c, b.pausetimeout); a(b.slider).css({ width: j * b.width }); a(b.slides).click(function(m) { m.preventDefault(); f(a(b.slides).index(this)) }); a(this).bind("play", function() { g = k = 0; f(0); a(b.slider).css({ left: 0 }); b.popup ? a(b.imgholder).popup({ width: 640, height: 360, type: "video" }) : a(b.imgholder).unbind("click") }); a(this).bind("pause", function() { clearTimeout(l) }); b.autostart ? a(this).trigger("play") : clearTimeout(l); a(b.nextbtn).click(function(m) { m.preventDefault(); if (j > 3) { k = Math.min(j - 3, k + 3); h(k) } }); a(b.prevbtn).click(function(m) { m.preventDefault(); if (j > 3) { k = Math.max(0, k - 3); h(k) } }) }) }; a.fn.simplecarousel = function(d) { var b = a.extend({ slides: "#m-items-carousel li", animtimeout: 1E3, pausetimeout: 5600, nextbtn: ".next", prevbtn: ".prev", indexbtns: ".index a", slider: ".images", width: 190 }, d || {}); return this.each(function() { function e() { h = h == f - 3 ? 0 : Math.min(f - 3, h + 3); c(h) } function c(k) { clearTimeout(j); j = setTimeout(e, b.pausetimeout + b.animtimeout); var g = Math.ceil(k / 3); a(b.indexbtns + " a").removeClass("active"); a(b.indexbtns + " a").eq(g).addClass("active"); a(b.slider).stop().animate({ left: -k * b.width }, b.animtimeout, "easeOut") } var f = a(b.slides).length, h = 0, j = setTimeout(e, b.pausetimeout); a(b.slider).css({ width: f * b.width }); for (i = 0; i < Math.ceil(f / 3); i++) a(b.indexbtns).append('<a href="#"></a>'); a(b.indexbtns + " a").eq(0).addClass("active"); a(b.nextbtn).click(function(k) { k.preventDefault(); if (f > 3) { h = Math.min(f - 3, h + 3); c(h) } }); a(b.prevbtn).click(function(k) { k.preventDefault(); if (f > 3) { h = Math.max(0, h - 3); c(h) } }); a(b.indexbtns + " a").click(function(k) { k.preventDefault(); k = a(b.indexbtns + " a").index(this) * 3; h = Math.max(Math.min(k, f - 3), 0); c(h) }) }) }; a.fn.pngfix = function(d) { a.extend({ blankgif: "blank.gif" }, d || {}); d = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1; a.browser.msie && d && a(this).each(function() { var b = a(this).css("background-image"); if (b.indexOf(".png") != -1) { b = b.split('url("')[1].split('")')[0]; a(this).css("background-image", "none"); a(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + b + "',sizingMethod='scale')" } }) }; a.fn.navBuilder = function(d, b) { function e(h, j) { var k = a("<ul>"); j && k.attr("id", j); for (j = 0; j < h.sub_categories.length; j++) k.append(a("<li>").append(a("<a>").attr("href", h.urls[j]).append(a("<span>").text(h.sub_categories[j])))); return k } function c(h) { for (var j = f.headerElement, k = f.dropList, g = 0; g < h.length; g++) { var l = h[g].main_category; j.append(a("<li>").attr("id", "n-" + l.toLowerCase()).append(a("<a>").attr("href", h[g].urls[0]).text(l))); k.append(e(h[g])) } a(this).prepend(j) } if (d === null) return this; var f = a.extend({ listID: null, buildMenu: true, headerElement: a("<ul>").attr("id", "main"), dropList: a("#drop-items") }, b || {}); return this.each(function() { if (f.buildMenu) { c.call(this, d); var h = f.dropList; h.find("ul:first").addClass("first"); h.find("ul:last").addClass("last") } else a(this).append(e(d, f.listID)) }) }; a.cookie = function(d, b, e) { if (typeof b != "undefined") { e = e || {}; if (b === null) { b = ""; e.expires = -1 } var c = ""; if (e.expires && (typeof e.expires == "number" || e.expires.toUTCString)) { if (typeof e.expires == "number") { c = new Date; c.setTime(c.getTime() + e.expires * 24 * 60 * 60 * 1E3) } else c = e.expires; c = "; expires=" + c.toUTCString() } var f = e.path ? "; path=" + e.path : "", h = e.domain ? "; domain=" + e.domain : "", j = e.secure ? "; secure" : ""; document.cookie = [d, "=", e.unescape == "true" ? b : encodeURIComponent(b), c, f, h, j].join("") } else { b = null; if (document.cookie && document.cookie != "") { e = document.cookie.split(";"); for (c = 0; c < e.length; c++) { f = jQuery.trim(e[c]); if (f.substring(0, d.length + 1) == d + "=") { b = decodeURIComponent(f.substring(d.length + 1)); break } } } return b } }; a.fn.login = function(d) { function b() { a(f.logoutSelector).click(function(k) { k.preventDefault(); a.cookie("returnURL", location.href, { expires: 1, path: "/", domain: "nexon.net", unescape: "true" }); location.href = "http://passport.nexon.net/WZ.ASPX?PART=/Logout" }) } function e() { setTimeout(function() { doUpdateSession() }, 1) } function c() { var k = a(f.idSelector), g = a(f.passSelector), l = k.add(g), m = a(f.rememberMeSelector), p = a("input").not(a(this).find("input").not("[disabled=true]")), q = f.loginCookieName, r = a.cookie(q); p.disabled = true; l.attr("value", "").focus(function() { a(this).css("background-position", "100% 0") }).blur(function() { a(this).val().split(" ").join("") == "" && a(this).val("").css("background-position", "0 0") }).keydown(function(o) { if (o.keyCode == 13) { o.preventDefault(); a(f.submitSelector).click(); return false } }); if (r !== null) { k.css("background-position", "100% 0").val(r); m.click() } m.click(function() { f.checkbox.toggle.apply(this) }); a(f.submitSelector).click(function(o) { o.preventDefault(); o = g.val().split(" ").join("") == "" ? "Please enter your Password" : k.val().split(" ").join("") == "" ? "Please input your ID" : ""; o != "" ? alert(o) : a.ajax({ url: f.moduleURL, type: "POST", data: { tbID: k.val(), tbPass: g.val() }, datatype: "html", success: function(n) { n = n.split("<script type='text/javascript'>"); if (n[1] !== undefined) { n = n[1].split("<\/script>"); eval(n[0]) } else { f.checkbox.isChecked.apply(m) ? a.cookie(q, k.val(), { expires: 365, path: "/", domain: "nexon.net" }) : a.cookie(q, null, { path: "/", domain: "nexon.net" }); h.load(j, function() { p.removeAttr("disabled"); e(); b() }) } }, error: function(n) { alert("I'm sorry. There was an error. Please Try again later. " + n.status + " " + n.statusText) } }); return false }) } var f = a.extend({ loginCookieName: "DFOPassport", logoutSelector: ".to-logout", idSelector: "#m-start-id", passSelector: "#m-start-pw", rememberMeSelector: "#remember-me", submitSelector: "#m-start-submit", checkbox: { isChecked: function() { return this.hasClass("checked") }, toggle: function() { a(this).toggleClass("checked") } }, moduleURL: "../Modules/Passport.aspx", moduleSelector: "#module" }, d || {}), h = a(this), j = f.moduleURL + " " + f.moduleSelector; return this.each(function() { a.ajaxSetup({ cache: false }); a(this).load(j, function() { if (loggedIn) { e(); b() } else c() }) }) } })(jQuery); jQuery.extend(jQuery.easing, { easeIn: function(a, d, b, e, c) { return e * (d /= c) * d * d * d * d + b }, easeOut: function(a, d, b, e, c) { return e * ((d = d / c - 1) * d * d * d * d + 1) + b }, easeInOut: function(a, d, b, e, c) { if ((d /= c / 2) < 1) return e / 2 * d * d * d * d * d + b; return e / 2 * ((d -= 2) * d * d * d * d + 2) + b } }); (function(a, d) { var b = function(h) { var j, k = []; for (j in h) /string|number/.test(typeof h[j]) && h[j] !== "" && k.push(j + '="' + h[j] + '"'); return k[f]("") }, e = function(h) { var j, k, g = [], l; if (typeof h == "object") { for (j in h) { if (typeof h[j] == "object") { l = []; for (k in h[j]) l.push([k, "=", encodeURIComponent(h[j][k])][f]("")); h[j] = l[f]("&amp;") } h[j] && g.push(['<param name="', j, '" value="', h[j], '" />'][f]("")) } h = g[f]("") } return h }, c = false, f = "join"; a[d] = function() { try { var h = "0,0,0", j = navigator.plugins["Shockwave Flash"] || ActiveXObject; h = j.description || function() { try { return (new j("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version") } catch (g) { } } () } catch (k) { } h = h.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+[d|r]|,)(\d+)/); return { available: h[1] > 0, activeX: j && !j.name, version: { major: h[1] * 1, minor: h[2] * 1, release: h[3] * 1 }, hasVersion: function(g) { var l = this.version; g = /string|number/.test(typeof g) ? g.toString().split(".") : g || [0, 0, 0]; g = [g.major || g[0] || l.major, g.minor || g[1] || l.minor, g.release || g[2] || l.release]; return g[0] < l.major || g[0] == l.major && g[1] < l.minor || g[0] == l.major && g[1] == l.minor && g[2] <= l.release }, expressInstall: "expressInstall.swf", create: function(g) { if (!a[d].available || c || !typeof g == "object" || !g.swf) return false; if (g.hasVersion && !a[d].hasVersion(g.hasVersion)) { g = { swf: g.expressInstall || a[d].expressInstall, attrs: { id: g.id || "SWFObjectExprInst", name: g.name, height: Math.max(g.height || 137), width: Math.max(g.width || 214) }, params: { flashvars: { MMredirectURL: location.href, MMplayerType: a[d].activeX ? "ActiveX" : "PlugIn", MMdoctitle: document.title.slice(0, 47) + " - Flash Player Installation"}} }; c = true } else g = a.extend(true, { attrs: { id: g.id, name: g.name, height: g.height || 180, width: g.width || 320 }, params: { wmode: g.wmode || "opaque", flashvars: g.flashvars} }, g); if (a[d].activeX) { g.attrs.classid = g.attrs.classid || "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; g.params.movie = g.params.movie || g.swf } else { g.attrs.type = g.attrs.classid || "application/x-shockwave-flash"; g.attrs.data = g.attrs.data || g.swf } return ["<object ", b(g.attrs), ">", e(g.params), "</object>"][f]("") } } } (); a.fn[d] = function(h) { if (typeof h == "object") this.each(function() { var j = document.createElement(d), k = a[d].create(h); if (k) { j.innerHTML = k; j.childNodes[0] && this.appendChild(j.childNodes[0]) } }); else typeof h == "function" && this.find("object").andSelf().filter("object").each(function() { var j = this; j.jsInteractionTimeoutMs = j.jsInteractionTimeoutMs || 0; if (j.jsInteractionTimeoutMs < 660) j.clientWidth || j.clientHeight ? h.call(this) : setTimeout(function() { a(j)[d](h) }, j.jsInteractionTimeoutMs + 66) }); return this } })(jQuery, "flash");

// production team plugins
(function ($) {
    $.fn.clearform = function (options) {
        var s = $.extend({
            defaultValue: '' //the text to show to show
        }, options || {});
        return this.each(function () {
            $(this).val(s.defaultValue);
            $(this).focus(function () {
                var curVal = $(this).val().split(' ').join('');
                var defaultStripped = s.defaultValue.split(' ').join('');
                if (curVal == '' || curVal == defaultStripped) {
                    $(this).val('');
                }
                $(this).css('background-position', '100% 0');
            });
            $(this).blur(function () {
                var curVal = $(this).val().split(' ').join('');
                var defaultStripped = s.defaultValue.split(' ').join('');
                if (curVal == '' || curVal == defaultStripped) {
                    $(this).val(s.defaultValue);
                    $(this).css('background-position', '0 0');
                }
            });
        });
    };
    $.fn.charactercount = function (options) {
        var s = $.extend({
            maxchars: 3000,
            label: '#replace'
        }, options || {});
        return this.each(function () {
            var curcount;
            var newthis = this;
            check();
            function check() {
                curcount = $(newthis).val().length;
                $(s.label).html(curcount + ' / ' + s.maxchars + ' characters');
                if (curcount <= s.maxchars) {
                    $(s.label).removeClass('error');
                    $(newthis).removeClass('error');
                } else {
                    $(s.label).addClass('error');
                    $(newthis).addClass('error');
                }
            }
            $(this).keyup(function (e) {
                check();
            });
            $(this).mouseup(function (e) {
                check();
            });
            $(this).change(function (e) {
                check();
            });
        });
    };
    $.fn.tooltip = function (options) {
        var s = $.extend({
            defaultValue: '' //the text to show to show
        }, options || {});
        return this.each(function () {
            if ($('#tooltip').length == 0) {
                $('#nx-wrap').append('<div id="tooltip"></div>');
            }
            $(this).hover(function (e) {
                e.preventDefault();
                $('#tooltip').show().html($(this).attr('alt'));
                var os = $(this).offset();
                $('#tooltip').css({ width: 'auto', left: os.left + 14, top: os.top + 40 });
                var width = Math.min($('#tooltip').width(), 200);
                $('#tooltip').css({ width: width, 'margin-left': -width / 2 - 9 });
            }, function () {
                $('#tooltip').hide().html('');
            });
        });
    };
    $.fn.tabs = function (options) { //plugin start
        var s = $.extend({
            aclass: 'active', //tabs to be shown
            tabs: 'overwriteme', //tabs to be shown
            triggersuffix: ['', '']
        }, options || {});
        var p = this;
        $(s.tabs).hide();
        $(s.tabs).eq(0).show();
        return this.each(function () {
            $(this).click(function (e) {
                e.preventDefault();
                var index = $(p).index(this);
                $(p).removeClass(s.aclass);
                $(this).addClass(s.aclass);
                for (var i = 0; i < $(s.tabs).length; i++) {
                    if (i != index) {
                        $(s.tabs).eq(i).trigger(s.triggersuffix[0]);
                    }
                }
                for (var i = 0; i < $(s.tabs).length; i++) {
                    if (i == index) {
                        $(s.tabs).eq(i).trigger(s.triggersuffix[1]);
                    }
                }
                $(s.tabs).hide();
                $(s.tabs).eq($(p).index(this)).show();
            });
        });
    };
    $.fn.popupinit = function () {
        /* check if the popup exists and create it */
        if ($('#popup').length == 0) {
            $('body').append('<div id="popup">');
        }
        /* check if the screen exists and create it */
        if ($('#screen').length == 0) {
            $('body').append('<div id="screen">');
        }
        /* hide the popup */
        $('#screen, #popup').hide();
        /* check if the popup has been processed and process it */
        if (!$('#popup').hasClass('processed')) {
            $('#popup').html('<div id="popup-close"></div><div id="popup-content"></div>');
            $('#screen, #popup-close').click(function (e) {
                e.preventDefault();
                $().popuphide();
            });
            $('#popup').addClass('processed');
        }
    };
    $.fn.popuphide = function () {
        $('#popup').hide();
        $('#popup-content').html('');
        $('#screen').fadeOut(200);
        $('#popup').removeClass();
        $('#popup').addClass('processed');
    };
    $.fn.popupYouTubeLb = function (url, popupName) {
        $('#popup-content').load(url, function () {
            $('#popup').addClass(popupName);
            $('#popup').css({ top: $(document).scrollTop() + 100 });
            $('#screen, #popup').fadeIn(200);
        }
	)
    };
    $.fn.popup = function (options) {
        var s = $.extend({
            width: 100, //width of screenshot or video
            height: 100,
            contents: '',
            type: 'video', //use 'images' to create a slideshow of images
            youtubeURL: '', //use to populate a Youtube video into the popup, added May 19th
            index: 'li'//where to pull the images from
        }, options || {});
        function closePopup() {
            $('#screen, #popup').fadeOut(200, function () {
                $('#popup-content').html('');
                $('#popup-content').removeClass('static');
            });
        }
        function updateImage(url) {
            $('#popup-screenshot img').attr('src', url);
        }
        return this.each(function () {
            if ($('#popup').length == 0) {
                $('body').append('<div id="popup"><div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div> \
					<div class="t"></div><div class="b"></div><div class="l"></div><div class="r"></div><a href="#" id="popup-close"></a> \
					<div id="popup-content"></div></div><div id="screen"></div>');
                $('#screen, #popup').hide();
                $('#screen, #popup-close').click(function (e) {
                    e.preventDefault();
                    closePopup();
                });
            }
            $(this).click(function (e) {
                e.preventDefault();
                var top = $(document).scrollTop() + ($(window).height() / 2);
                $('#popup').css({ top: top - (parseInt(s.height) / 2), height: s.height + 60 });
                $('#popup').css({ 'width': s.width + 20, 'margin-left': -10 - s.width / 2 });
                $('#screen, #popup').fadeIn(200);
                //$('#popup-content').html(s.contents );
                if (s.type == 'images') {
                    $('#popup').css({ top: top - (parseInt(s.height) / 2) });
                    var i = $(s.index).index(this);
                    var le = $(s.index).length;
                    $('#popup-content').html('<a href="#" class="hzbtnc" id="popup-prev"></a><div id="popup-screenshot"><img src="" alt="" /></div><a href="#" class="hzbtnc" id="popup-next"></a>');
                    $('#popup').css({ 'width': s.width + 126, 'margin-left': -(s.width + 126) / 2, height: s.height + 66 });
                    $('#popup-prev, #popup-next').css({ height: s.height });
                    $('#popup-screenshot').css({ width: s.width, height: s.height });
                    updateImage($(s.index).eq(i).attr('href'));
                    $('#popup-prev').click(function (ex) {
                        ex.preventDefault();
                        i = (i + 1) % le;
                        updateImage($(s.index).eq(i).attr('href'));
                    });
                    $('#popup-next').click(function (ex) {
                        ex.preventDefault();
                        i = (i - 1 + le) % le;
                        updateImage($(s.index).eq(i).attr('href'));
                    });
                }
                if (s.type == 'video') {
                    var vidurl = $(this).attr('href');
                    var videoplayer = $.flash.create({ swf: 'http://nxcache.nexon.net/dungeonfighter/swf/popup-videoplayer.swf', width: 640, height: 360, params: { allowScriptAccess: "always" }, flashvars: { videourl: vidurl} });
                    $('#popup-content').html('<div id="popup-video">' + videoplayer + '</div>');
                    $('#popup').css({ 'width': s.width + 106, 'margin-left': -53 - s.width / 2, height: s.height + 66 });
                }
                if (s.type == 'static') {
                    $('#popup').css({ top: $(document).scrollTop() + 100, height: 'auto', 'width': s.width + 106, 'margin-left': -53 - s.width / 2 });
                    $('#popup-content').addClass('static');
                    $('#popup-content').html(s.contents);
                }
                if (s.type == 'event') {
                    $('#popup').css({ top: $(document).scrollTop() + 100, height: 'auto', 'width': s.width + 106, 'margin-left': -53 - s.width / 2 });
                    $('#popup-content').addClass('event');
                    $('#popup-content').html(s.contents);
                }
                //edit May 19th 2011
                if (s.type == 'act12') {
                    $('#popup').css({ top: $(document).scrollTop() + 100, height: 'auto', 'width': s.width, 'margin-left': -53 - s.width / 2 });
                    $('#popup-content').addClass('act12');
                    $('.tl, .tr, .bl, .br, .t, .b, .l, .r').remove();
                    $('#popup-content').html(s.contents);
                    $('#popup-close').addClass('act12');
                    $('#video').flash({
                        swf: 'http://www.youtube.com/v/' + s.youtubeURL + '?version=3',
                        width: 640,
                        height: 385,
                        flashvars: {
                            hd: 1,
                            rel: 0,
                            showsearch: 0,
                            showinfo: 0,
                            iv_load_policy: 3,
                            cc_load_policy: 0,
                            autoplay: 0,
                            fs: 1
                        },
                        allowFullScreen: 'true',
                        allowScriptAccess: 'always'
                    });
                }
                //end edit May 19th 2011
				// Added 12.20.11
				if (s.type == 'ytvideo') {
					var ytLink = $(this).attr('href');
					var ytURL = '<iframe width="640" height="360" src="http://www.youtube.com/embed/' + ytLink + '?autoplay=1&rel=0" frameborder="0" allowfullscreen></iframe>';
					$('#popup').css({ top: $(document).scrollTop() + 100, height: 'auto', 'width': s.width, 'margin-left': - 53 - s.width / 2 });
					$('#popup-content').html('<div id="popup-video">' + ytURL + '</div>');
					$('#popup').css({ 'width': s.width + 106, 'margin-left': -53 - s.width / 2, height: s.height + 66 });
					$('#popup-video').css('height', 360);
				}
            });
        });
    };
    $.fn.newsexpand = function (options) { //plugin start
        var s = $.extend({
            activeClass: 'expanded', //the text to show to show
            childExpander: '.expander' //the items to hide
        }, options || {});
        return this.each(function () {
            var parent = this;
            $(this).find(s.childExpander).click(function (e) {
                if (parent.className.indexOf('expanded') > -1) {
                    if ($("." + s.activeClass).length == 1)
                        return;
                }
                e.preventDefault();
                $(parent).toggleClass(s.activeClass);
            });
        });
    };
    $.fn.expand = function (options) { //plugin start
        var s = $.extend({
            oHeight: 0, //collapsed height
            eHeight: 0, //expanded height
            activeClass: ' ', //the text to show to show
            hideThese: '#overridethis', //the items to hide
            flash: '', //the flash to add 
            flashHere: '#overridethis', //where to add the flash
            expandThis: '#overridethis', //the items to expand
            timeout: 300, //animation time
            defaultShow: false//if set to true, the expanded view will be the default state
        }, options || {});
        return this.each(function () {
            var t;
            $(this).toggle(function (e) {
                function show() {
                    $(s.flashHere).html(s.flash);
                    $(s.expandThis).stop().animate({ height: s.eHeight }, s.timeout, 'easeOut');
                }
                e.preventDefault();
                $(s.hideThese).fadeOut(s.timeout);
                $(this).addClass(s.activeClass);
                clearTimeout(t);
                t = setTimeout(show, s.timeout);
            }, function (e) {
                function hide() {
                    $(s.hideThese).fadeIn(s.timeout);
                    $(s.flashHere).empty();
                }
                $(s.expandThis).stop().animate({ height: s.oHeight }, s.timeout, 'easeOut');
                e.preventDefault();
                $(this).removeClass(s.activeClass);
                clearTimeout(t);
                t = setTimeout(hide, s.timeout);
            });
            if (s.defaultShow) {
                $(s.expandThis).css({ height: s.eHeight });
                $(this).click();
            } else {
                $(s.expandThis).css({ height: s.oHeight });
                $(this).removeClass(s.activeClass);
            }
        });
    };
    $.fn.funexpand = function (options) { //plugin start
        var s = $.extend({
            oHeight: 108,
            eHeight: 37,
            expandThese: '#overridethis', //the items to expand
            timeout: 200 //animation time
        }, options || {});
        return this.each(function () {
            var t;
            $(this).toggle(function (e) {
                $(s.expandThese).stop().animate({ height: s.oHeight }, s.timeout);
            }, function (e) {
                $(s.expandThese).stop().animate({ height: s.eHeight }, s.timeout);
            });
        });
    };
    $.fn.sameheight = function (options) {
        var s = $.extend({
            child: 'ul',
            useFilter: false
        }, options || {});
        if (s.useFilter) {
            var endheight = 0;
            $(this).filter(s.child).each(function (e) {
                endheight = Math.max($(this).height(), endheight);
            });
            $(this).filter(s.child).height(endheight);
            return this;
        } else {
            return this.each(function () {
                var endheight = 0;
                $(this).find(s.child).each(function (e) {
                    endheight = Math.max($(this).height(), endheight);
                });
                $(this).find(s.child).height(endheight);
            });
        }
    };
    $.fn.hoverdropdown = function (options) {
        var s = $.extend({
            oHeight: 0, //collapsed height
            eHeight: 400, //expanded height
            timeout: 100, //animation time
            expandThese: '#overridethis'
        }, options || {});
        return this.each(function () {
            $(s.expandThese).hide().css({ height: s.oHeight });
            $(this).hover(function (e) {
                e.preventDefault();
                $(s.expandThese).show().stop().animate({ height: s.eHeight }, s.timeout, 'easeOut');
            }, function (e) {
                e.preventDefault();
                $(s.expandThese).stop().animate({ height: s.oHeight + 'px' }, s.timeout, 'easeOut', function () { $(this).hide() });
            });
        });
    };
    $.fn.pseudohover = function (options) {
        var s = $.extend({
            hover: '#overridethis',
            pseudo: '#overridethis',
            className: ''
        }, options || {});
        return this.each(function () {
            var index = $(s.hover).index(this);
            $(this).hover(function (e) {
                e.preventDefault();
                $(s.pseudo).removeClass(s.className);
                $(s.pseudo).eq(index).addClass(s.className)
            }, function (e) {
                e.preventDefault();
                $(s.pseudo).removeClass(s.className);
            });
        });
    };
    $.fn.rotban = function (options) {
        var s = $.extend({
            slides: '#m-items-carousel li', //the jquery object of items
            slider: '#m-rotban-ban', //the jquery object of the container of the banners
            buttons: '#m-items-carousel li', //the jquery object of items
            fadetimeout: 2000, //use this to control length of animation
            pausetimeout: 5600, //use this to control how long between timed animations
            activeclass: 'active', //use this to control how long between timed animations
            height: 164 //height of slide
        }, options || {});
        return this.each(function () {
            var t = setTimeout(nextslide, s.pausetimeout);
            var slide = 0;
            var count = $(s.slides).length;
            displayslide(0);
            $(s.slider).height(s.height * count);
            $(s.buttons).click(function (e) {
                e.preventDefault();
                displayslide($(s.buttons).index(this));
            });
            function nextslide() {
                slide = (slide + 1) % count;
                displayslide(slide);
            }
            function displayslide(number) {
                slide = number;

                var selected = $(s.slides).eq(number);
                var button = $(s.buttons).eq(number);

                $(s.slides).removeClass(s.activeclass);
                selected.addClass(s.activeclass);
                selected.stop().fadeIn(s.fadetimeout, function () {
                    $(s.slides).not('.' + s.activeclass).fadeOut(0);
                });
                //selected.addClass(s.activeclass).stop().fadeIn(s.fadetimeout);

                $(s.buttons).removeClass(s.activeclass);
                button.addClass(s.activeclass);

                //$(s.slider).stop().animate({ top: (-number * s.height) }, s.fadetimeout,'easeInOut');

                clearTimeout(t);
                t = setTimeout(nextslide, s.pausetimeout + s.fadetimeout);
            }
        });
    };
    $.fn.highlightcarousel = function (options) {
        var s = $.extend({
            slides: '#m-items-carousel li', //the jquery object of items
            animtimeout: 1000, //use this to control length of animation
            pausetimeout: 5600, //use this to control how long between timed animations
            nextbtn: '.next', //next button
            prevbtn: '.prev', //previous button
            slider: '.images', //the thing that is slid
            descholder: '#m-items-display-text a',
            classholder: '#m-feat-detail',
            imgholder: '#m-items-display-image',
            width: 77, //width of slide
            trigger: '',
            autostart: true,
            popup: false
        }, options || {});
        return this.each(function () {
            var count = $(s.slides).length;
            var page = 0;
            var slide = 0;
            var t = setTimeout(nextslide, s.pausetimeout);
            $(s.slider).css({ width: count * s.width });
            $(s.slides).click(function (e) {
                e.preventDefault();
                displayslide($(s.slides).index(this));
            });
            $(this).bind('play', function () {
                page = 0;
                slide = 0;
                displayslide(0);
                $(s.slider).css({ left: 0 });
                if (s.popup) {
                    $(s.imgholder).popup({
                        width: 640,
                        height: 360,
                        type: 'video'
                    });
                } else {
                    $(s.imgholder).unbind('click');
                }
            });
            $(this).bind('pause', function () {
                clearTimeout(t);
            });
            if (s.autostart) {
                $(this).trigger('play');
            } else {
                clearTimeout(t);
            }
            function nextpage() {
                if (page == count - 3) {
                    page = 0
                } else {
                    page = Math.min(count - 3, slide);
                }
                gotopage(page);
            }
            function nextslide() {
                if (slide == count - 1) {
                    slide = 0
                } else {
                    slide = Math.min(count - 1, slide + 1);
                }
                if (slide > page + 2 || slide < page) {
                    nextpage();
                }
                displayslide(slide);
            }
            function displayslide(number) {
                slide = number;
                var selected = $(s.slides).eq(number);
                var imglink = selected.find('a').attr('href');
                var imgpath = selected.find('img').attr('alt');
                var imgdesc = selected.find('.dn').html();
                $(s.imgholder + ' img').attr('src', imgpath);
                $(s.imgholder).attr('href', imglink);
                $(s.descholder).attr('href', imglink);
                $(s.descholder).html(imgdesc);
                selected.addClass('active').siblings().removeClass('active');
                clearTimeout(t);
                t = setTimeout(nextslide, s.pausetimeout + s.animtimeout);
            }
            function gotopage(number) {
                $(s.slider).stop().animate({ left: -number * s.width }, s.animtimeout, 'easeOut');
            }
            $(s.nextbtn).click(function (e) {
                e.preventDefault();
                if (count > 3) {
                    page = Math.min(count - 3, page + 3);
                    gotopage(page);
                }
            });
            $(s.prevbtn).click(function (e) {
                e.preventDefault();
                if (count > 3) {
                    page = Math.max(0, page - 3);
                    gotopage(page);
                }
            });
        });
    };
    $.fn.simplecarousel = function (options) {
        var s = $.extend({
            slides: '#m-items-carousel li', //the jquery object of items
            animtimeout: 1000, //use this to control length of animation
            pausetimeout: 5600, //use this to control how long between timed animations
            nextbtn: '.next', //next button
            prevbtn: '.prev', //previous button
            indexbtns: '.index a', //previous button
            slider: '.images', //the thing that is slid
            width: 190 //width of slide including margins
        }, options || {});
        return this.each(function () {
            var count = $(s.slides).length;
            var page = 0;
            var slide = 0;
            var t = setTimeout(nextpage, s.pausetimeout);
            $(s.slider).css({ width: count * s.width });
            for (i = 0; i < Math.ceil(count / 3); i++) {
                $(s.indexbtns).append('<a href="#"></a>');
            }
            $(s.indexbtns + ' a').eq(0).addClass('active');
            function nextpage() {
                if (page == count - 3) {
                    page = 0;
                } else {
                    page = Math.min(count - 3, page + 3);
                }
                gotopage(page);
            }
            function gotopage(number) {
                clearTimeout(t);
                t = setTimeout(nextpage, s.pausetimeout + s.animtimeout);
                var cur = Math.ceil(number / 3);
                $(s.indexbtns + ' a').removeClass('active');
                $(s.indexbtns + ' a').eq(cur).addClass('active');
                $(s.slider).stop().animate({ left: -number * s.width }, s.animtimeout, 'easeOut');
            }
            $(s.nextbtn).click(function (e) {
                e.preventDefault();
                if (count > 3) {
                    page = Math.min(count - 3, page + 3);
                    gotopage(page);
                }
            });
            $(s.prevbtn).click(function (e) {
                e.preventDefault();
                if (count > 3) {
                    page = Math.max(0, page - 3);
                    gotopage(page);
                }
            });
            $(s.indexbtns + ' a').click(function (e) {
                e.preventDefault();
                var ind = $(s.indexbtns + ' a').index(this) * 3;
                page = Math.max(Math.min(ind, count - 3), 0);
                gotopage(page);
            });
        });
    };
    $.fn.pngfix = function (options) {
        var s = $.extend({
            blankgif: 'blank.gif'
        }, options || {});
        var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);
        if ($.browser.msie && ie6) {
            // fix css background pngs
            $(this).each(function () {
                var bgIMG = $(this).css('background-image');
                if (bgIMG.indexOf(".png") != -1) {
                    var iebg = bgIMG.split('url("')[1].split('")')[0];
                    $(this).css('background-image', 'none');
                    $(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
                }
            });
        }
    };
    $.fn.navBuilder = function (json, options) { //authored by Neil
        if (json === null) {// if json is null 
            return this;
        } //return selector unmolested
        var settings = $.extend({
            listID: null,
            buildMenu: true, // set to false if you only want to build list
            headerElement: $('<ul>').attr('id', 'main'),
            dropList: $('#drop-items')
        }, options || {});
        function buildList(o, id) {
            var ul = $('<ul>');
            if (id) {
                ul.attr('id', id);
            }
            for (var a = 0; a < o.sub_categories.length; a++) {
                ul.append($('<li>').append($('<a>').attr('href', o.urls[a]).append($('<span>').text(o.sub_categories[a]))));
            }
            return ul;
        }
        function buildMenu(ob) {
            var head = settings.headerElement;
            var drop = settings.dropList;
            for (var a = 0; a < ob.length; a++) {
                var title = ob[a].main_category;
                head.append($('<li>').attr('id', ('n-' + title.toLowerCase())).append($('<a>').attr('href', ob[a].urls[0]).text(title)));
                drop.append(buildList(ob[a]));
            }
            $(this).prepend(head);
        }
        return this.each(function () {
            if (settings.buildMenu) {
                buildMenu.call(this, json);
                var list = settings.dropList;
                list.find('ul:first').addClass('first');
                list.find('ul:last').addClass('last');
            } else {
                $(this).append(buildList(json, settings.listID));
            }
        });
    };
    $.cookie = function (name, value, options) {
        if (typeof value != 'undefined') { // name and value given, set cookie
            options = options || {};
            if (value === null) {
                value = '';
                options.expires = -1;
            }
            var expires = '';
            if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
                var date;
                if (typeof options.expires == 'number') {
                    date = new Date();
                    date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
                } else {
                    date = options.expires;
                }
                expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
            }
            // CAUTION: Needed to parenthesize options.path and options.domain
            // in the following expressions, otherwise they evaluate to undefined
            // in the packed version for some reason...
            var path = options.path ? '; path=' + (options.path) : '';
            var domain = options.domain ? '; domain=' + (options.domain) : '';
            var secure = options.secure ? '; secure' : '';
            document.cookie = [name, '=', (options.unescape == "true" ? value : encodeURIComponent(value)), expires, path, domain, secure].join('');
        } else { // only name given, get cookie
            var cookieValue = null;
            if (document.cookie && document.cookie != '') {
                var cookies = document.cookie.split(';');
                for (var i = 0; i < cookies.length; i++) {
                    var cookie = jQuery.trim(cookies[i]);
                    // Does this cookie string begin with the name we want?
                    if (cookie.substring(0, name.length + 1) == (name + '=')) {
                        cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                        break;
                    }
                }
            }
            return cookieValue;
        }
    };
    //Login module plugin
    $.fn.login = function (options) { // authored by Neil
        var o = $.extend({
            loginCookieName: 'DFOPassport',
            logoutSelector: '.to-logout',
            idSelector: '#m-start-id',
            passSelector: '#m-start-pw',
            rememberMeSelector: '#remember-me',
            submitSelector: '#m-start-submit',
            checkbox:
            { //default is CSS controlled checkbox. if checkbox is an input, these properties should be overwritten in plugin initializer 
                isChecked: function () { return this.hasClass('checked'); },
                toggle: function () { $(this).toggleClass('checked'); }
            },
            moduleURL: '../Modules/Passport.aspx',
            moduleSelector: '#module'
        }, options || {});
        var parent = $(this);
        var loadPath = o.moduleURL + ' ' + o.moduleSelector;
        function attachLogout() { //makes sure logout returns user to correct page from passport by setting cookie manually
            $(o.logoutSelector).click(function (e) {
                e.preventDefault();
                $.cookie("returnURL", location.href, { expires: 1, path: "/", domain: "nexon.net", unescape: "true" });
                location.href = "http://passport.nexon.net/WZ.ASPX?PART=/Logout";
            });
        }
        function startUpdateSession() {
            setTimeout(function () { doUpdateSession(); }, 1);
        }
        function loginLoad() {
            var id = $(o.idSelector);
            var pass = $(o.passSelector);
            var idAndPass = id.add(pass);
            var remember = $(o.rememberMeSelector);
            var otherInputs = $('input').not($(this).find('input').not('[disabled=true]'));
            var cookieName = o.loginCookieName;
            var loginCookie = $.cookie(cookieName);
            otherInputs.disabled = true;
            //these functions control the css display of id/pass inputs.
            idAndPass.attr('value', '').focus(function () {
                $(this).css('background-position', '100% 0');
            }).blur(function () {
                if ($(this).val().split(' ').join('') == '') {
                    $(this).val('').css('background-position', '0 0');
                }
            }).keydown(function (e) {
                if (e.keyCode == 13) {
                    e.preventDefault();
                    $(o.submitSelector).click();
                    return false;
                }
            });
            //check for cookie
            if (loginCookie !== null) {
                id.css('background-position', '100% 0').val(loginCookie);
                remember.click();
            }
            //attach event handler for checkbox
            remember.click(function (e) { o.checkbox.toggle.apply(this); }); //e.preventDefault(); removed for weird input handling
            //handle login submit
            $(o.submitSelector).click(function (e) {
                e.preventDefault();
                var alertStr = (pass.val().split(' ').join('') == '' ? 'Please enter your Password' :
                            (id.val().split(' ').join('') == '' ? 'Please input your ID' : ''));
                if (alertStr != '') {//make sure user has entered an ID and Password
                    alert(alertStr);
                    return false;
                }
                else {//submit info
                    $.ajax({
                        url: o.moduleURL,
                        type: 'POST',
                        data: { "tbID": id.val(), "tbPass": pass.val() }, // Passport.aspx should look for tbID and tbPass
                        datatype: 'html',
                        success: function (data) {
                            var alertData = data.split('<script type=\'text/javascript\'>');
                            if (alertData[1] !== undefined) {
                                alertData = alertData[1].split('</script>');
                                eval(alertData[0]);
                            }
                            else {
                                if (o.checkbox.isChecked.apply(remember)) {
                                    $.cookie(cookieName, id.val(), { expires: 365, path: '/', domain: 'nexon.net' });
                                }
                                else {
                                    $.cookie(cookieName, null, { path: '/', domain: 'nexon.net' });
                                }
                                parent.load(loadPath, function () {
                                    otherInputs.removeAttr('disabled');
                                    startUpdateSession();
                                    attachLogout();
                                });
                            }
                        },
                        error: function (xhr) {
                            alert('I\'m sorry. There was an error. Please Try again later. ' + xhr.status + ' ' + xhr.statusText);
                        }
                    });
                    return false;
                }
            });
        }
        return this.each(function () {
            $.ajaxSetup({ cache: false });
            $(this).load(loadPath, function () {
                if (loggedIn) {// loggedIn needs to be defined before plugins library is loaded
                    startUpdateSession();
                    attachLogout();
                }
                else {
                    loginLoad();
                }
            });
        });
    };
})(jQuery);
// easing
jQuery.extend(jQuery.easing,
{
    easeIn: function (x, t, b, c, d) {
        return c * (t /= d) * t * t * t * t + b;
    },
    easeOut: function (x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
    },
    easeInOut: function (x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
    }
});

// jQuery swfobject plugin //
(function (F, C) { var D = function (H) { var G, I = []; for (G in H) { if (/string|number/.test(typeof H[G]) && H[G] !== "") { I.push(G + '="' + H[G] + '"') } } return I[A]("") }, E = function (I) { var G, K, J = [], H; if (typeof I == "object") { for (G in I) { if (typeof I[G] == "object") { H = []; for (K in I[G]) { H.push([K, "=", encodeURIComponent(I[G][K])][A]("")) } I[G] = H[A]("&amp;") } if (I[G]) { J.push(['<param name="', G, '" value="', I[G], '" />'][A]("")) } } I = J[A]("") } return I }, B = false, A = "join"; F[C] = (function () { try { var G = "0,0,0", H = navigator.plugins["Shockwave Flash"] || ActiveXObject; G = H.description || (function () { try { return (new H("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version") } catch (J) { } } ()) } catch (I) { } G = G.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+[d|r]|,)(\d+)/); return { available: G[1] > 0, activeX: H && !H.name, version: { major: G[1] * 1, minor: G[2] * 1, release: G[3] * 1 }, hasVersion: function (K) { var N = this.version, L = "major", M = "minor", J = "release"; K = (/string|number/.test(typeof K)) ? K.toString().split(".") : K || [0, 0, 0]; K = [K[L] || K[0] || N[L], K[M] || K[1] || N[M], K[J] || K[2] || N[J]]; return (K[0] < N[L]) || (K[0] == N[L] && K[1] < N[M]) || (K[0] == N[L] && K[1] == N[M] && K[2] <= N[J]) }, expressInstall: "expressInstall.swf", create: function (J) { if (!F[C].available || B || !typeof J == "object" || !J.swf) { return false } if (J.hasVersion && !F[C].hasVersion(J.hasVersion)) { J = { swf: J.expressInstall || F[C].expressInstall, attrs: { id: J.id || "SWFObjectExprInst", name: J.name, height: Math.max(J.height || 137), width: Math.max(J.width || 214) }, params: { flashvars: { MMredirectURL: location.href, MMplayerType: (F[C].activeX) ? "ActiveX" : "PlugIn", MMdoctitle: document.title.slice(0, 47) + " - Flash Player Installation"}} }; B = true } else { J = F.extend(true, { attrs: { id: J.id, name: J.name, height: J.height || 180, width: J.width || 320 }, params: { wmode: J.wmode || "opaque", flashvars: J.flashvars} }, J) } if (F[C].activeX) { J.attrs.classid = J.attrs.classid || "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; J.params.movie = J.params.movie || J.swf } else { J.attrs.type = J.attrs.classid || "application/x-shockwave-flash"; J.attrs.data = J.attrs.data || J.swf } return ["<object ", D(J.attrs), ">", E(J.params), "</object>"][A]("") } } } ()); F.fn[C] = function (G) { if (typeof G == "object") { this.each(function () { var I = document.createElement(C); var H = F[C].create(G); if (H) { I.innerHTML = H; if (I.childNodes[0]) { this.appendChild(I.childNodes[0]) } } }) } else { if (typeof G == "function") { this.find("object").andSelf().filter("object").each(function () { var I = this, H = "jsInteractionTimeoutMs"; I[H] = I[H] || 0; if (I[H] < 660) { if (I.clientWidth || I.clientHeight) { G.call(this) } else { setTimeout(function () { F(I)[C](G) }, I[H] + 66) } } }) } } return this } } (jQuery, "flash"));

