﻿(function($) { $.superfish = {}; $.superfish.o = []; $.superfish.op = {}; $.superfish.defaults = { hoverClass: 'sfHover', pathClass: 'overideThisToUse', delay: 100, animation: { opacity: 'show' }, speed: 'normal', oldJquery: false, disableHI: false, onInit: function() { }, onBeforeShow: function() { }, onShow: function() { }, onHide: function() { } }; $.fn.superfish = function(op) { var bcClass = 'sfbreadcrumb', over = function() { var $$ = $(this), menu = getMenu($$); getOpts(menu, true); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl() }, out = function() { var $$ = $(this), menu = getMenu($$); var o = getOpts(menu, true); clearTimeout(menu.sfTimer); if (!$$.is('.' + bcClass)) { menu.sfTimer = setTimeout(function() { $$.hideSuperfishUl(); if (o.$path.length) { over.call(o.$path) } }, o.delay) } }, getMenu = function($el) { return $el.parents('ul.superfish:first')[0] }, getOpts = function(el, menuFound) { el = menuFound ? el : getMenu(el); return $.superfish.op = $.superfish.o[el.serial] }, hasUl = function() { return $.superfish.op.oldJquery ? 'li[ul]' : 'li:has(ul)' }; return this.each(function() { var s = this.serial = $.superfish.o.length; var o = $.extend({}, $.superfish.defaults, op); o.$path = $('li.' + o.pathClass, this).each(function() { $(this).addClass(o.hoverClass + ' ' + bcClass).filter(hasUl()).removeClass(o.pathClass) }); $.superfish.o[s] = $.superfish.op = o; $(hasUl(), this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over, out).not('.' + bcClass).hideSuperfishUl(); var $a = $('a', this); $a.each(function(i) { var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function() { over.call($li) }).blur(function() { out.call($li) }) }); o.onInit.call(this) }).addClass('superfish') }; $.fn.extend({ hideSuperfishUl: function() { var o = $.superfish.op, $ul = $('li.' + o.hoverClass, this).add(this).removeClass(o.hoverClass).find('>ul').hide().css('visibility', 'hidden'); o.onHide.call($ul); return this }, showSuperfishUl: function() { var o = $.superfish.op, $ul = this.addClass(o.hoverClass).find('>ul:hidden').css('visibility', 'visible'); o.onBeforeShow.call($ul); $ul.animate(o.animation, o.speed, function() { o.onShow.call(this) }); return this } }); $(window).unload(function() { $('ul.superfish').each(function() { $('li', this).unbind('mouseover', 'mouseout', 'mouseenter', 'mouseleave') }) }) })(jQuery); (function($) { $.fn.bgIframe = $.fn.bgiframe = function(s) { if ($.browser.msie && parseInt($.browser.version) <= 6) { s = $.extend({ top: 'auto', left: 'auto', width: 'auto', height: 'auto', opacity: true, src: 'javascript:false;' }, s || {}); var prop = function(n) { return n && n.constructor == Number ? n + 'px' : n; }, html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="' + s.src + '"' + 'style="display:block;position:absolute;z-index:-1;' + (s.opacity !== false ? 'filter:Alpha(Opacity=\'0\');' : '') + 'top:' + (s.top == 'auto' ? 'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')' : prop(s.top)) + ';' + 'left:' + (s.left == 'auto' ? 'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')' : prop(s.left)) + ';' + 'width:' + (s.width == 'auto' ? 'expression(this.parentNode.offsetWidth+\'px\')' : prop(s.width)) + ';' + 'height:' + (s.height == 'auto' ? 'expression(this.parentNode.offsetHeight+\'px\')' : prop(s.height)) + ';' + '"/>'; return this.each(function() { if ($('> iframe.bgiframe', this).length == 0) this.insertBefore(document.createElement(html), this.firstChild); }); } return this; }; if (!$.browser.version) $.browser.version = navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]; })(jQuery); (function($) { $.fn.hoverIntent = function(f, g) { var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; cfg = $.extend(cfg, g ? { over: f, out: g} : f); var cX, cY, pX, pY; var track = function(ev) { cX = ev.pageX; cY = ev.pageY }; var compare = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) { $(ob).unbind("mousemove", track); ob.hoverIntent_s = 1; return cfg.over.apply(ob, [ev]) } else { pX = cX; pY = cY; ob.hoverIntent_t = setTimeout(function() { compare(ev, ob) }, cfg.interval) } }; var delay = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob, [ev]) }; var handleHover = function(e) { var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while (p && p != this) { try { p = p.parentNode } catch (e) { p = this } } if (p == this) { return false } var ev = jQuery.extend({}, e); var ob = this; if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t) } if (e.type == "mouseover") { pX = ev.pageX; pY = ev.pageY; $(ob).bind("mousemove", track); if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function() { compare(ev, ob) }, cfg.interval) } } else { $(ob).unbind("mousemove", track); if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function() { delay(ev, ob) }, cfg.timeout) } } }; return this.mouseover(handleHover).mouseout(handleHover) } })(jQuery); jQuery.fn.corner = function(o) { function hex2(s) { var s = parseInt(s).toString(16); return (s.length < 2) ? '0' + s : s }; function gpc(node) { for (; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode) { var v = jQuery.css(node, 'backgroundColor'); if (v.indexOf('rgb') >= 0) { rgb = v.match(/\d+/g); return '#' + hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]) } if (v && v != 'transparent') return v } return '#ffffff' }; function getW(i) { switch (fx) { case 'round': return Math.round(width * (1 - Math.cos(Math.asin(i / width)))); case 'cool': return Math.round(width * (1 + Math.cos(Math.asin(i / width)))); case 'sharp': return Math.round(width * (1 - Math.cos(Math.acos(i / width)))); case 'bite': return Math.round(width * (Math.cos(Math.asin((width - i - 1) / width)))); case 'slide': return Math.round(width * (Math.atan2(i, width / i))); case 'jut': return Math.round(width * (Math.atan2(width, (width - i - 1)))); case 'curl': return Math.round(width * (Math.atan(i))); case 'tear': return Math.round(width * (Math.cos(i))); case 'wicked': return Math.round(width * (Math.tan(i))); case 'long': return Math.round(width * (Math.sqrt(i))); case 'sculpt': return Math.round(width * (Math.log((width - i - 1), width))); case 'dog': return (i & 1) ? (i + 1) : width; case 'dog2': return (i & 2) ? (i + 1) : width; case 'dog3': return (i & 3) ? (i + 1) : width; case 'fray': return (i % 2) * width; case 'notch': return width; case 'bevel': return i + 1 } }; o = (o || "").toLowerCase(); var keep = /keep/.test(o); var cc = ((o.match(/cc:(#[0-9a-f]+)/) || [])[1]); var sc = ((o.match(/sc:(#[0-9a-f]+)/) || [])[1]); var width = parseInt((o.match(/(\d+)px/) || [])[1]) || 10; var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/; var fx = ((o.match(re) || ['round'])[0]); var edges = { T: 0, B: 1 }; var opts = { TL: /top|tl/.test(o), TR: /top|tr/.test(o), BL: /bottom|bl/.test(o), BR: /bottom|br/.test(o) }; if (!opts.TL && !opts.TR && !opts.BL && !opts.BR) opts = { TL: 1, TR: 1, BL: 1, BR: 1 }; var strip = document.createElement('div'); strip.style.overflow = 'hidden'; strip.style.height = '1px'; strip.style.backgroundColor = sc || 'transparent'; strip.style.borderStyle = 'solid'; return this.each(function(index) { var pad = { T: parseInt(jQuery.css(this, 'paddingTop')) || 0, R: parseInt(jQuery.css(this, 'paddingRight')) || 0, B: parseInt(jQuery.css(this, 'paddingBottom')) || 0, L: parseInt(jQuery.css(this, 'paddingLeft')) || 0 }; if (jQuery.browser.msie) this.style.zoom = 1; if (!keep) this.style.border = 'none'; strip.style.borderColor = cc || gpc(this.parentNode); var cssHeight = jQuery.curCSS(this, 'height'); for (var j in edges) { var bot = edges[j]; strip.style.borderStyle = 'none ' + (opts[j + 'R'] ? 'solid' : 'none') + ' none ' + (opts[j + 'L'] ? 'solid' : 'none'); var d = document.createElement('div'); var ds = d.style; bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild); if (bot && cssHeight != 'auto') { if (jQuery.css(this, 'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.bottom = ds.left = ds.padding = ds.margin = '0'; if (jQuery.browser.msie) ds.setExpression('width', 'this.parentNode.offsetWidth'); else ds.width = '100%' } else { ds.margin = !bot ? '-' + pad.T + 'px -' + pad.R + 'px ' + (pad.T - width) + 'px -' + pad.L + 'px' : (pad.B - width) + 'px -' + pad.R + 'px -' + pad.B + 'px -' + pad.L + 'px' } for (var i = 0; i < width; i++) { var w = Math.max(0, getW(i)); var e = strip.cloneNode(false); e.style.borderWidth = '0 ' + (opts[j + 'R'] ? w : 0) + 'px 0 ' + (opts[j + 'L'] ? w : 0) + 'px'; bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild) } } }) }; (function($) { $.fn.jqm = function(o) { var _o = { zIndex: 300, overlay: 50, overlayClass: 'jqmOverlay', closeClass: 'jqmClose', trigger: '.jqModal', ajax: false, target: false, modal: false, toTop: false, onShow: false, onHide: false, onLoad: false }; return this.each(function() { if (this._jqm) return; s++; this._jqm = s; H[s] = { c: $.extend(_o, o), a: false, w: $(this).addClass('jqmID' + s), s: s }; if (_o.trigger) $(this).jqmAddTrigger(_o.trigger) }) }; $.fn.jqmAddClose = function(e) { hs(this, e, 'jqmHide'); return this }; $.fn.jqmAddTrigger = function(e) { hs(this, e, 'jqmShow'); return this }; $.fn.jqmShow = function(t) { return this.each(function() { if (!H[this._jqm].a) $.jqm.open(this._jqm, t) }) }; $.fn.jqmHide = function(t) { return this.each(function() { if (H[this._jqm].a) $.jqm.close(this._jqm, t) }) }; $.jqm = { hash: {}, open: function(s, t) { var h = H[s], c = h.c, cc = '.' + c.closeClass, z = c.zIndex, o = $('<div></div>').css({ height: '100%', width: '100%', position: 'fixed', left: 0, top: 0, 'z-index': z - 1, opacity: c.overlay / 100 }); h.t = t; h.a = true; h.w.css('z-index', z); if (c.modal) { if (!A[0]) F('bind'); A.push(s); o.css('cursor', 'wait') } else if (c.overlay > 0) h.w.jqmAddClose(o); else o = false; h.o = (o) ? o.addClass(c.overlayClass).prependTo('body') : false; if (ie6) { $('html,body').css({ height: '100%', width: '100%' }); if (o) { o = o.css({ position: 'absolute' })[0]; for (var y in { Top: 1, Left: 1 }) o.style.setExpression(y.toLowerCase(), "(_=(document.documentElement.scroll" + y + " || document.body.scroll" + y + "))+'px'") } } if (c.ajax) { var r = c.target || h.w, u = c.ajax, r = (typeof r == 'string') ? $(r, h.w) : $(r), u = (u.substr(0, 1) == '@') ? $(t).attr(u.substring(1)) : u; r.load(u, function() { if (c.onLoad) c.onLoad.call(this, h); if (cc) h.w.jqmAddClose($(cc, h.w)); e(h) }) } else if (cc) h.w.jqmAddClose($(cc, h.w)); if (c.toTop && h.o) h.w.before('<span id="jqmP' + h.w[0]._jqm + '"></span>').insertAfter(h.o); (c.onShow) ? c.onShow(h) : h.w.show(); e(h); return false }, close: function(s) { var h = H[s]; h.a = false; if (A[0]) { A.pop(); if (!A[0]) F('unbind') } if (h.c.toTop && h.o) $('#jqmP' + h.w[0]._jqm).after(h.w).remove(); if (h.c.onHide) h.c.onHide(h); else { h.w.hide(); if (h.o) h.o.remove() } return false } }; var s = 0, H = $.jqm.hash, A = [], ie6 = $.browser.msie && ($.browser.version == "6.0"), i = $('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({ opacity: 0 }), e = function(h) { if (ie6) if (h.o) h.o.html('<p style="width:100%;height:100%"/>').prepend(i); else if (!$('iframe.jqm', h.w)[0]) h.w.prepend(i); f(h) }, f = function(h) { try { $(':input:visible', h.w)[0].focus() } catch (e) { } }, F = function(t) { $()[t]("keypress", m)[t]("keydown", m)[t]("mousedown", m) }, m = function(e) { var h = H[A[A.length - 1]], r = (!$(e.target).parents('.jqmID' + h.s)[0]); if (r) f(h); return !r }, hs = function(w, e, y) { var s = []; w.each(function() { s.push(this._jqm) }); $(e).each(function() { if (this[y]) $.extend(this[y], s); else { this[y] = s; $(this).click(function() { for (var i in { jqmShow: 1, jqmHide: 1 }) for (var s in this[i]) if (H[this[i][s]]) H[this[i][s]].w[i](this); return false }) } }) } })(jQuery);