(function (g) { g.fn.matchHeight = function (e) { var a = 0; this.each(function () { a = Math.max(a, g(this).outerHeight()) }); return this.each(function () { var c = g(this), b = e ? c.find(e + ":first") : g(this); c = b.height() + (a - c.outerHeight()); b.css("min-height", c + "px") }) }; g.fn.matchWidth = function (e) { return this.each(function () { var a = g(this), c = a.children(e), b = 0; c.width(function (d, f) { if (d < c.length - 1) { b += f; return f } return a.width() - b }) }) }; g.fn.morph = function (e, a, c, b, d) { var f = { duration: 500, transition: "swing", ignore: null }; c = g.extend(f, c); b = g.extend(f, b); var h = c.ignore ? g(c.ignore) : null; if (h) h = h.toArray(); return this.each(function () { var i = g(this); if (!(h && g.inArray(this, h) != -1)) { var k = d ? i.find(d).css(a) : [i.css(a)]; i.bind({ mouseenter: function () { g(k).each(function () { var j = g(this).stop(); e["background-color"] && a["background-color"] && j.attr("background-color") == "transparent" && j.attr("background-color", a["background-color"]); j.animate(e, c.duration, c.transition) }) }, mouseleave: function () { g(k).each(function () { g(this).stop().animate(a, b.duration, b.transition) }) } }) } }) }; g.fn.smoothScroller = function (e) { e = g.extend({ duration: 1E3, transition: "easeOutExpo" }, e); return this.each(function () { g(this).bind("click", function () { var a = this.hash, c = g(this.hash).offset().top, b = window.location.href.replace(window.location.hash, ""), d = g.browser.opera ? "html:not(:animated)" : "html:not(:animated),body:not(:animated)"; if (b + a == this) { g(d).animate({ scrollTop: c }, e.duration, e.transition, function () { window.location.hash = a.replace("#", "") }); return false } }) }) }; g.fn.backgroundFx = function (e) { e = g.extend({ duration: 9E3, transition: "swing", colors: ["#FFFFFF", "#999999"] }, e); return this.each(function () { var a = g(this), c = 0, b = e.colors; window.setInterval(function () { a.stop().animate({ "background-color": b[c] }, e.duration, e.transition); c = c + 1 >= b.length ? 0 : c + 1 }, e.duration * 2) }) } })(jQuery); (function (g) { function e(c) { var b; if (c && c.constructor == Array && c.length == 3) return c; if (b = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)) return [parseInt(b[1]), parseInt(b[2]), parseInt(b[3])]; if (b = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)) return [parseFloat(b[1]) * 2.55, parseFloat(b[2]) * 2.55, parseFloat(b[3]) * 2.55]; if (b = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)) return [parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)]; if (b = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)) return [parseInt(b[1] + b[1], 16), parseInt(b[2] + b[2], 16), parseInt(b[3] + b[3], 16)]; if (/rgba\(0, 0, 0, 0\)/.exec(c)) return a.transparent; return a[g.trim(c).toLowerCase()] } g.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function (c, b) { g.fx.step[b] = function (d) { if (!d.colorInit) { var f; f = d.elem; var h = b, i; do { i = g.curCSS(f, h); if (i != "" && i != "transparent" || g.nodeName(f, "body")) break; h = "backgroundColor" } while (f = f.parentNode); f = e(i); d.start = f; d.end = e(d.end); d.colorInit = true } d.elem.style[b] = "rgb(" + [Math.max(Math.min(parseInt(d.pos * (d.end[0] - d.start[0]) + d.start[0]), 255), 0), Math.max(Math.min(parseInt(d.pos * (d.end[1] - d.start[1]) + d.start[1]), 255), 0), Math.max(Math.min(parseInt(d.pos * (d.end[2] - d.start[2]) + d.start[2]), 255), 0)].join(",") + ")" } }); var a = { aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0], transparent: [255, 255, 255]} })(jQuery); (function (g) { g.easing.jswing = g.easing.swing; g.extend(g.easing, { def: "easeOutQuad", swing: function (e, a, c, b, d) { return g.easing[g.easing.def](e, a, c, b, d) }, easeInQuad: function (e, a, c, b, d) { return b * (a /= d) * a + c }, easeOutQuad: function (e, a, c, b, d) { return -b * (a /= d) * (a - 2) + c }, easeInOutQuad: function (e, a, c, b, d) { if ((a /= d / 2) < 1) return b / 2 * a * a + c; return -b / 2 * (--a * (a - 2) - 1) + c }, easeInCubic: function (e, a, c, b, d) { return b * (a /= d) * a * a + c }, easeOutCubic: function (e, a, c, b, d) { return b * ((a = a / d - 1) * a * a + 1) + c }, easeInOutCubic: function (e, a, c, b, d) { if ((a /= d / 2) < 1) return b / 2 * a * a * a + c; return b / 2 * ((a -= 2) * a * a + 2) + c }, easeInQuart: function (e, a, c, b, d) { return b * (a /= d) * a * a * a + c }, easeOutQuart: function (e, a, c, b, d) { return -b * ((a = a / d - 1) * a * a * a - 1) + c }, easeInOutQuart: function (e, a, c, b, d) { if ((a /= d / 2) < 1) return b / 2 * a * a * a * a + c; return -b / 2 * ((a -= 2) * a * a * a - 2) + c }, easeInQuint: function (e, a, c, b, d) { return b * (a /= d) * a * a * a * a + c }, easeOutQuint: function (e, a, c, b, d) { return b * ((a = a / d - 1) * a * a * a * a + 1) + c }, easeInOutQuint: function (e, a, c, b, d) { if ((a /= d / 2) < 1) return b / 2 * a * a * a * a * a + c; return b / 2 * ((a -= 2) * a * a * a * a + 2) + c }, easeInSine: function (e, a, c, b, d) { return -b * Math.cos(a / d * (Math.PI / 2)) + b + c }, easeOutSine: function (e, a, c, b, d) { return b * Math.sin(a / d * (Math.PI / 2)) + c }, easeInOutSine: function (e, a, c, b, d) { return -b / 2 * (Math.cos(Math.PI * a / d) - 1) + c }, easeInExpo: function (e, a, c, b, d) { return a == 0 ? c : b * Math.pow(2, 10 * (a / d - 1)) + c }, easeOutExpo: function (e, a, c, b, d) { return a == d ? c + b : b * (-Math.pow(2, -10 * a / d) + 1) + c }, easeInOutExpo: function (e, a, c, b, d) { if (a == 0) return c; if (a == d) return c + b; if ((a /= d / 2) < 1) return b / 2 * Math.pow(2, 10 * (a - 1)) + c; return b / 2 * (-Math.pow(2, -10 * --a) + 2) + c }, easeInCirc: function (e, a, c, b, d) { return -b * (Math.sqrt(1 - (a /= d) * a) - 1) + c }, easeOutCirc: function (e, a, c, b, d) { return b * Math.sqrt(1 - (a = a / d - 1) * a) + c }, easeInOutCirc: function (e, a, c, b, d) { if ((a /= d / 2) < 1) return -b / 2 * (Math.sqrt(1 - a * a) - 1) + c; return b / 2 * (Math.sqrt(1 - (a -= 2) * a) + 1) + c }, easeInElastic: function (e, a, c, b, d) { e = 1.70158; var f = 0, h = b; if (a == 0) return c; if ((a /= d) == 1) return c + b; f || (f = d * 0.3); if (h < Math.abs(b)) { h = b; e = f / 4 } else e = f / (2 * Math.PI) * Math.asin(b / h); return -(h * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * d - e) * 2 * Math.PI / f)) + c }, easeOutElastic: function (e, a, c, b, d) { e = 1.70158; var f = 0, h = b; if (a == 0) return c; if ((a /= d) == 1) return c + b; f || (f = d * 0.3); if (h < Math.abs(b)) { h = b; e = f / 4 } else e = f / (2 * Math.PI) * Math.asin(b / h); return h * Math.pow(2, -10 * a) * Math.sin((a * d - e) * 2 * Math.PI / f) + b + c }, easeInOutElastic: function (e, a, c, b, d) { e = 1.70158; var f = 0, h = b; if (a == 0) return c; if ((a /= d / 2) == 2) return c + b; f || (f = d * 0.3 * 1.5); if (h < Math.abs(b)) { h = b; e = f / 4 } else e = f / (2 * Math.PI) * Math.asin(b / h); if (a < 1) return -0.5 * h * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * d - e) * 2 * Math.PI / f) + c; return h * Math.pow(2, -10 * (a -= 1)) * Math.sin((a * d - e) * 2 * Math.PI / f) * 0.5 + b + c }, easeInBack: function (e, a, c, b, d, f) { if (f == undefined) f = 1.70158; return b * (a /= d) * a * ((f + 1) * a - f) + c }, easeOutBack: function (e, a, c, b, d, f) { if (f == undefined) f = 1.70158; return b * ((a = a / d - 1) * a * ((f + 1) * a + f) + 1) + c }, easeInOutBack: function (e, a, c, b, d, f) { if (f == undefined) f = 1.70158; if ((a /= d / 2) < 1) return b / 2 * a * a * (((f *= 1.525) + 1) * a - f) + c; return b / 2 * ((a -= 2) * a * (((f *= 1.525) + 1) * a + f) + 2) + c }, easeInBounce: function (e, a, c, b, d) { return b - g.easing.easeOutBounce(e, d - a, 0, b, d) + c }, easeOutBounce: function (e, a, c, b, d) { return (a /= d) < 1 / 2.75 ? b * 7.5625 * a * a + c : a < 2 / 2.75 ? b * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + c : a < 2.5 / 2.75 ? b * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + c : b * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + c }, easeInOutBounce: function (e, a, c, b, d) { if (a < d / 2) return g.easing.easeInBounce(e, a * 2, 0, b, d) * 0.5 + c; return g.easing.easeOutBounce(e, a * 2 - d, 0, b, d) * 0.5 + b * 0.5 + c } }) })(jQuery); (function (g) { function e(f) { var h = {}, i = /^jQuery\d+$/; g.each(f.attributes, function (k, j) { if (j.specified && !i.test(j.name)) h[j.name] = j.value }); return h } function a() { var f = g(this); if (f.val() === f.attr("placeholder") && f.hasClass("placeholder")) f.data("placeholder-password") ? f.hide().next().show().focus() : f.val("").removeClass("placeholder") } function c() { var f, h = g(this); if (h.val() === "" || h.val() === h.attr("placeholder")) { if (h.is(":password")) { if (!h.data("placeholder-textinput")) { try { f = h.clone().attr({ type: "text" }) } catch (i) { f = g("<input>").attr(g.extend(e(h[0]), { type: "text" })) } f.removeAttr("name").data("placeholder-password", true).bind("focus.placeholder", a); h.data("placeholder-textinput", f).before(f) } h = h.hide().prev().show() } h.addClass("placeholder").val(h.attr("placeholder")) } else h.removeClass("placeholder") } var b = "placeholder" in document.createElement("input"), d = "placeholder" in document.createElement("textarea"); g.fn.placeholder = b && d ? function () { return this } : function () { return this.filter((b ? "textarea" : ":input") + "[placeholder]").bind("focus.placeholder", a).bind("blur.placeholder", c).trigger("blur.placeholder").end() }; g(function () { g("form").bind("submit.placeholder", function () { var f = g(".placeholder", this).each(a); setTimeout(function () { f.each(c) }, 10) }) }); g(window).bind("unload.placeholder", function () { g(".placeholder").val("") }) })(jQuery);
(function (c) { var d = function () { }; c.extend(d.prototype, { name: "accordionMenu", options: { mode: "default", display: null, collapseall: false, toggler: "span.level1.parent", content: "ul.level2" }, initialize: function (g, a) { a = c.extend({}, this.options, a); var f = g.find(a.toggler); f.each(function (b) { var e = c(this), i = e.next(a.content).wrap("<div>").parent(); i.data("height", i.height()); e.hasClass("active") || b == a.display ? i.show() : i.hide().css("height", 0); e.bind("click", function () { h(b) }) }); var h = function (b) { b = c(f.get(b)); var e = c([]); if (b.hasClass("active")) { e = b; b = c([]) } if (a.collapseall) e = f.filter(".active"); switch (a.mode) { case "slide": b.next().stop().show().animate({ height: b.next().data("height") }); e.next().stop().animate({ height: 0 }, function () { e.next().hide() }); break; default: b.next().show().css("height", b.next().data("height")); e.next().hide().css("height", 0) } b.addClass("active").parent().addClass("active"); e.removeClass("active").parent().removeClass("active") } } }); c.fn[d.prototype.name] = function () { var g = arguments, a = g[0] ? g[0] : null; return this.each(function () { var f = c(this); if (d.prototype[a] && f.data(d.prototype.name) && a != "initialize") f.data(d.prototype.name)[a].apply(f.data(d.prototype.name), Array.prototype.slice.call(g, 1)); else if (!a || c.isPlainObject(a)) { var h = new d; d.prototype.initialize && h.initialize.apply(h, c.merge([f], g)); f.data(d.prototype.name, h) } else c.error("Method " + a + " does not exist on jQuery." + d.name) }) } })(jQuery);
(function (c) { var m = function () { }; c.extend(m.prototype, { name: "dropdownMenu", options: { mode: "default", itemSelector: "li", firstLevelSelector: "li.level1", dropdownSelector: "ul", duration: 600, remainTime: 800, remainClass: "remain", transition: "easeOutExpo", withopacity: true, centerDropdown: false, reverseAnimation: false, fixWidth: false, fancy: null }, initialize: function (i, d) { this.options = c.extend({}, this.options, d); var a = this, l = null, q = false; this.menu = i; this.dropdowns = []; this.options.withopacity = c.browser.msie && parseFloat(c.browser.version) < 9 ? false : this.options.withopacity; if (this.options.fixWidth) { var t = 5; this.menu.children().each(function () { t += c(this).width() }); this.menu.css("width", t) } this.menu.find(this.options.firstLevelSelector).each(function (k) { var g = c(this), h = g.find(a.options.dropdownSelector).css({ overflow: "hidden" }); if (h.length) { h.css("overflow", "hidden"); var e = c("<div>").data("dpwidth", parseFloat(h.width())).data("dpheight", parseFloat(h.height())).css({ overflow: "hidden" }).append("<div></div>"), u = e.find("div:first").css({ "min-width": e.data("dpwidth"), "min-height": e.data("dpheight") }); h.children().appendTo(u); e.appendTo(h); a.options.centerDropdown && h.css("margin-left", (parseFloat(h.css("width")) / 2 - g.width() / 2) * -1); a.dropdowns.push({ dropdown: h, div: e, innerdiv: u }) } g.bind({ mouseenter: function () { q = true; a.menu.trigger("menu:enter", [g, k]); if (l) { if (l.index == k) return; l.item.removeClass(a.options.remainClass); l.div.hide() } if (h.length) { g.addClass(a.options.remainClass); e.stop().show(); var f = e.data("dpwidth"), j = e.data("dpheight"); switch (a.options.mode) { case "diagonal": var b = { width: 0, height: 0 }; f = { width: f, height: j }; if (a.options.withopacity) { b.opacity = 0; f.opacity = 1 } e.css(b).animate(f, a.options.duration, a.options.transition); break; case "height": b = { width: f, height: 0 }; f = { height: j }; if (a.options.withopacity) { b.opacity = 0; f.opacity = 1 } e.css(b).animate(f, a.options.duration, a.options.transition); break; case "width": b = { width: 0, height: j }; f = { width: f }; if (a.options.withopacity) { b.opacity = 0; f.opacity = 1 } e.css(b).animate(f, a.options.duration, a.options.transition); break; case "slide": h.css({ width: f, height: j }); e.css({ width: f, height: j, "margin-top": j * -1 }).animate({ "margin-top": 0 }, a.options.duration, a.options.transition); break; default: b = { width: f, height: j }; f = {}; if (a.options.withopacity) { b.opacity = 0; f.opacity = 1 } e.css(b).animate(f, a.options.duration, a.options.transition) } l = { item: g, div: e, index: k} } else l = active = null }, mouseleave: function (f) { if (f.srcElement && c(f.srcElement).hasClass("module")) return false; q = false; h.length ? window.setTimeout(function () { if (!(q || e.css("display") == "none")) { a.menu.trigger("menu:leave", [g, k]); var j = function () { g.removeClass(a.options.remainClass); l = null; e.hide() }; if (a.options.reverseAnimation) switch (a.options.mode) { case "diagonal": var b = { width: 0, height: 0 }; if (a.options.withopacity) b.opacity = 0; e.stop().animate(b, a.options.duration, a.options.transition, function () { j() }); break; case "height": b = { height: 0 }; if (a.options.withopacity) b.opacity = 0; e.stop().animate(b, a.options.duration, a.options.transition, function () { j() }); break; case "width": b = { width: 0 }; if (a.options.withopacity) b.opacity = 0; e.stop().animate(b, a.options.duration, a.options.transition, function () { j() }); break; case "slide": e.stop().animate({ "margin-top": parseFloat(e.data("dpheight")) * -1 }, a.options.duration, a.options.transition, function () { j() }); break; default: b = {}; if (a.options.withopacity) b.opacity = 0; e.stop().animate(b, a.options.duration, a.options.transition, function () { j() }) } else j() } }, a.options.remainTime) : a.menu.trigger("menu:leave") } }) }); if (this.options.fancy) { var n = c.extend({ mode: "move", transition: "easeOutExpo", duration: 500, onEnter: null, onLeave: null }, this.options.fancy), o = this.menu.append('<div class="fancy bg1"><div class="fancy-1"><div class="fancy-2"><div class="fancy-3"></div></div></div></div>').find(".fancy:first").hide(), p = this.menu.find(".active:first"), r = null, s = function (k, g) { if (!(g && r && k.get(0) == r.get(0))) { o.stop().show().css("visibility", "visible"); if (n.mode == "move") !p.length && !g ? o.hide() : o.animate({ left: k.position().left + "px", width: k.width() + "px" }, n.duration, n.transition); else g ? o.css({ opacity: p ? 0 : 1, left: k.position().left + "px", width: k.width() + "px" }).animate({ opacity: 1 }, n.duration) : o.animate({ opacity: 0 }, n.duration); r = g ? k : null } }; this.menu.bind({ "menu:enter": function (k, g, h) { s(g, true); if (n.onEnter) n.onEnter(g, h, o) }, "menu:leave": function (k, g, h) { s(p, false); if (n.onLeave) n.onLeave(g, h, o) } }); p.length && n.mode == "move" && s(p, true) } }, matchHeight: function () { if (this.menu) { this.menu.find("li.level2 div.sub").each(function () { var i = c(this), d = i.parent().find("div.hover-box4:first"), a = Math.max(i.height(), d.height()); c([i, d]).each(function () { this.css("height", a) }) }); this._updateDimensions() } }, matchUlHeight: function () { if (this.menu) { this.menu.find("div.dropdown-3").each(function () { var i = c(this).children(), d = 0; c(i).each(function () { d = Math.max(c(this).height(), d) }); c(i).each(function () { c(this).css("height", d) }) }); this._updateDimensions() } }, _updateDimensions: function () { c(this.dropdowns).each(function (i, d) { d.div.stop().show().data({ dpwidth: d.innerdiv.width(), dpheight: d.innerdiv.height() }).hide(); d.dropdown.css({ "min-width": d.div.data("dpwidth"), "min-height": d.div.data("dpheight") }) }) } }); c.fn[m.prototype.name] = function () { var i = arguments, d = i[0] ? i[0] : null; return this.each(function () { var a = c(this); if (m.prototype[d] && a.data(m.prototype.name) && d != "initialize") a.data(m.prototype.name)[d].apply(a.data(m.prototype.name), Array.prototype.slice.call(i, 1)); else if (!d || c.isPlainObject(d)) { var l = new m; m.prototype.initialize && l.initialize.apply(l, c.merge([a], i)); a.data(m.prototype.name, l) } else c.error("Method " + d + " does not exist on jQuery." + m.name) }) } })(jQuery);
jQuery(function ($) { $('.menu-sidebar').accordionMenu({ mode: 'slide' }); $('#menu').dropdownMenu({ mode: 'slide', dropdownSelector: 'div.dropdown' }); $('a[href="#page"]').smoothScroller({ duration: 500 }); $('.grid-block').matchWidth('.grid-h'); var matchHeight = function () { $('#top-a .grid-h').matchHeight('.deepest'); $('#top-b .grid-h').matchHeight('.deepest'); $('#bottom-a .grid-h').matchHeight('.deepest'); $('#bottom-b .grid-h').matchHeight('.deepest'); $('#innertop .grid-h').matchHeight('.deepest'); $('#innerbottom .grid-h').matchHeight('.deepest'); $('#maininner, #sidebar-a, #sidebar-b').matchHeight(); }; matchHeight(); $(window).bind('load', matchHeight); });


