﻿/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.0.3
* Requires jQuery 1.1.3+
* Docs: http://docs.jquery.com/Plugins/livequery
*/

(function ($) { $.extend($.fn, { livequery: function (type, fn, fn2) { var self = this, q; if ($.isFunction(type)) fn2 = fn, fn = type, type = undefined; $.each($.livequery.queries, function (i, query) { if (self.selector == query.selector && self.context == query.context && type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid)) return (q = query) && false }); q = q || new $.livequery(this.selector, this.context, type, fn, fn2); q.stopped = false; q.run(); return this }, expire: function (type, fn, fn2) { var self = this; if ($.isFunction(type)) fn2 = fn, fn = type, type = undefined; $.each($.livequery.queries, function (i, query) { if (self.selector == query.selector && self.context == query.context && (!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped) $.livequery.stop(query.id) }); return this } }); $.livequery = function (selector, context, type, fn, fn2) { this.selector = selector; this.context = context || document; this.type = type; this.fn = fn; this.fn2 = fn2; this.elements = []; this.stopped = false; this.id = $.livequery.queries.push(this) - 1; fn.$lqguid = fn.$lqguid || $.livequery.guid++; if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++; return this }; $.livequery.prototype = { stop: function () { var query = this; if (this.type) this.elements.unbind(this.type, this.fn); else if (this.fn2) this.elements.each(function (i, el) { query.fn2.apply(el) }); this.elements = []; this.stopped = true }, run: function () { if (this.stopped) return; var query = this; var oEls = this.elements, els = $(this.selector, this.context), nEls = els.not(oEls); this.elements = els; if (this.type) { nEls.bind(this.type, this.fn); if (oEls.length > 0) $.each(oEls, function (i, el) { if ($.inArray(el, els) < 0) $.event.remove(el, query.type, query.fn) }) } else { nEls.each(function () { query.fn.apply(this) }); if (this.fn2 && oEls.length > 0) $.each(oEls, function (i, el) { if ($.inArray(el, els) < 0) query.fn2.apply(el) }) } } }; $.extend($.livequery, { guid: 0, queries: [], queue: [], running: false, timeout: null, checkQueue: function () { if ($.livequery.running && $.livequery.queue.length) { var length = $.livequery.queue.length; while (length--) $.livequery.queries[$.livequery.queue.shift()].run() } }, pause: function () { $.livequery.running = false }, play: function () { $.livequery.running = true; $.livequery.run() }, registerPlugin: function () { $.each(arguments, function (i, n) { if (!$.fn[n]) return; var old = $.fn[n]; $.fn[n] = function () { var r = old.apply(this, arguments); $.livequery.run(); return r } }) }, run: function (id) { if (id != undefined) { if ($.inArray(id, $.livequery.queue) < 0) $.livequery.queue.push(id) } else $.each($.livequery.queries, function (id) { if ($.inArray(id, $.livequery.queue) < 0) $.livequery.queue.push(id) }); if ($.livequery.timeout) clearTimeout($.livequery.timeout); $.livequery.timeout = setTimeout($.livequery.checkQueue, 20) }, stop: function (id) { if (id != undefined) $.livequery.queries[id].stop(); else $.each($.livequery.queries, function (id) { $.livequery.queries[id].stop() }) } }); $.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove'); $(function () { $.livequery.play() }); var init = $.prototype.init; $.prototype.init = function (a, c) { var r = init.apply(this, arguments); if (a && a.selector) r.context = a.context, r.selector = a.selector; if (typeof a == 'string') r.context = c || document, r.selector = a; return r }; $.prototype.init.prototype = $.prototype })(jQuery);

/*
* jQuery Address Plugin v1.2.1
* http://www.asual.com/jquery/address/
*
* Copyright (c) 2009-2010 Rostislav Hristov
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Date: 2010-05-20 09:39:26 +0300 (Thu, 20 May 2010)
*/
;(function (c) { c.address = function () { var v = function (a) { c(c.address).trigger(c.extend(c.Event(a), function () { for (var b = {}, g = c.address.parameterNames(), h = 0, q = g.length; h < q; h++) b[g[h]] = c.address.parameter(g[h]); return { value: c.address.value(), path: c.address.path(), pathNames: c.address.pathNames(), parameterNames: g, parameters: b, queryString: c.address.queryString()} } .call(c.address))) }, w = function (a, b, g) { c(c.address).bind(a, b, g); return c.address }, p = function () { var a = d.href.indexOf("#"); return a != -1 ? W(J(t(d.href.substr(a + 1), j))) : "" }, X = function () { return "javascript" }, Y = function (a, b) { if (i.strict) a = b ? a.substr(0, 1) != "/" ? "/" + a : a : a == "" ? "/" : a; return a }, K = function (a, b) { return u && d.protocol == "file:" ? b ? f.replace(/\?/, "%3F") : f.replace(/%253F/, "?") : a }, t = function (a, b) { if (i.crawlable && b) return (a != "" ? "!" : "") + a; return a.replace(/^\!/, "") }, x = function (a, b) { return parseInt(a.css(b), 10) }, Z = function (a) { for (var b, g, h = 0, q = a.childNodes.length; h < q; h++) { if (a.childNodes[h].src) b = String(a.childNodes[h].src); if (g = Z(a.childNodes[h])) b = g } return b }, H = function () { if (!L) { var a = p(), b = f != a; if (y && m < 523) { if (D != F.length) { D = F.length; if (typeof z[D - 1] != A) f = z[D - 1]; G(j) } } else if (u && m < 7 && b) d.reload(); else if (b) { f = a; G(j) } } }, G = function (a) { v($); v(a ? aa : ba); E(ca, 10) }, ca = function () { var a = (d.pathname + (/\/$/.test(d.pathname) ? "" : "/") + (c.address ? c.address.value() : "")).replace(/\/\//, "/").replace(/^\/$/, ""), b = n[i.tracker]; if (typeof b == M) b(a); else if (typeof urchinTracker == M) urchinTracker(a); else if (typeof pageTracker != A && typeof pageTracker._trackPageview == M) pageTracker._trackPageview(a); else typeof _gaq != A && typeof _gaq.push == M && _gaq.push(["_trackPageview", a]) }, da = function () { var a = l.contentWindow.document; a.open(); a.write("<html><head><title>" + k.title + "</title><script>var " + o + ' = "' + p() + '";<\/script></head></html>'); a.close() }, fa = function () { if (!ea) { ea = e; var a = c("body").ajaxComplete(function () { ja.call(this) }).trigger("ajaxComplete"); if (i.wrap) { c("body > *").wrapAll('<div style="padding:' + (x(a, "marginTop") + x(a, "paddingTop")) + "px " + (x(a, "marginRight") + x(a, "paddingRight")) + "px " + (x(a, "marginBottom") + x(a, "paddingBottom")) + "px " + (x(a, "marginLeft") + x(a, "paddingLeft")) + 'px;" />').parent().wrap('<div id="' + o + '" style="height:100%; overflow:auto;' + (y ? window.statusbar.visible && !/chrome/i.test(O) ? "" : " resize:both;" : "") + '" />'); c("html, body").css({ height: "100%", margin: 0, padding: 0, overflow: "hidden" }); y && c('<style type="text/css" />').appendTo("head").text("#" + o + "::-webkit-resizer { background-color: #fff; }") } if (u && m < 8) { a = k.getElementsByTagName("frameset")[0]; l = k.createElement((a ? "" : "i") + "frame"); if (a) { a.insertAdjacentElement("beforeEnd", l); a[a.cols ? "cols" : "rows"] += ",0"; l.src = X() + ":" + j; l.noResize = e; l.frameBorder = l.frameSpacing = 0 } else { l.src = X() + ":" + j; l.style.display = "none"; k.body.insertAdjacentElement("afterBegin", l) } E(function () { c(l).bind("load", function () { var b = l.contentWindow; f = typeof b[o] != A ? b[o] : ""; if (f != p()) { G(j); d.hash = K(t(f, e), e) } }); typeof l.contentWindow[o] == A && da() }, 50) } else if (y) { if (m < 418) { c(k.body).append('<form id="' + o + '" style="position:absolute;top:-9999px;" method="get"></form>'); P = k.getElementById(o) } if (typeof d[o] == A) d[o] = {}; if (typeof d[o][d.pathname] != A) z = d[o][d.pathname].split(",") } E(function () { v("init"); G(j) }, 1); if (u && m > 7 || !u && "on" + I in n) if (n.addEventListener) n.addEventListener(I, H, false); else n.attachEvent && n.attachEvent("on" + I, H); else ka(H, 50); c("a").filter("[rel*=address:]").address() } }, la = function () { if (n.removeEventListener) n.removeEventListener(I, H, false); else n.detachEvent && n.detachEvent("on" + I, H) }, ja = function () { var a = d.pathname.replace(/\/$/, ""); c("body").html().indexOf("_escaped_fragment_") != -1 && c("a[href]:not([href^=http])", this).each(function () { var b = c(this).attr("href").replace(new RegExp(a + "/?$"), ""); if (b == "" || b.indexOf("_escaped_fragment_") != -1) c(this).attr("href", "#" + decodeURIComponent(b.replace(/\/(.*)\?_escaped_fragment_=(.*)$/, "!$2"))) }) }, o = "jQueryAddress", M = "function", A = "undefined", I = "hashchange", $ = "change", aa = "internalChange", ba = "externalChange", e = true, j = false, i = { autoUpdate: e, crawlable: j, history: e, strict: e, wrap: j }, r = c.browser, m = parseFloat(c.browser.version), ga = r.mozilla, u = r.msie, s = r.opera, y = r.safari, Q = j, n = function () { try { return top.document !== undefined ? top : window } catch (a) { return window } } (), k = n.document, F = n.history, d = n.location, ka = setInterval, E = setTimeout, J = decodeURI, W = encodeURI, O = navigator.userAgent, l, P, B = Z(document), ha = B ? B.indexOf("?") : -1, R = k.title, D = F.length, L = j, ea = j, S = e, ia = e, N = j, z = [], f = p(); if (u) { m = parseFloat(O.substr(O.indexOf("MSIE") + 4)); if (k.documentMode && k.documentMode != m) m = k.documentMode != 8 ? 7 : 8; c(document).bind("propertychange", function () { if (k.title != R && k.title.indexOf("#" + p()) != -1) k.title = R }) } if (Q = ga && m >= 1 || u && m >= 6 || s && m >= 9.5 || y && m >= 312) { for (r = 1; r < D; r++) z.push(""); z.push(f); if (u && d.hash != f) d.hash = "#" + K(t(f, e), e); if (s) history.navigationMode = "compatible"; if (B && ha != -1) { B = B.substr(ha + 1).split("&"); for (r = 0; r < B.length; r++) { s = B[r].split("="); if (/^(autoUpdate|crawlable|history|strict|wrap)$/.test(s[0])) i[s[0]] = isNaN(s[1]) ? /^(true|yes)$/i.test(s[1]) : parseInt(s[1], 10) !== 0; if (/^tracker$/.test(s[0])) i[s[0]] = s[1] } } document.readyState == "complete" && fa(); c(fa); c(window).bind("unload", la) } else if (!Q && p() != "" || y && m < 418 && p() != "" && d.search != "") { k.open(); k.write('<html><head><meta http-equiv="refresh" content="0;url=' + encodeURI(d.href.substr(0, d.href.indexOf("#"))) + '" /></head></html>'); k.close() } else ca(); return { bind: function (a, b, g) { return w(a, b, g) }, init: function (a) { return w("init", a) }, change: function (a) { return w($, a) }, internalChange: function (a) { return w(aa, a) }, externalChange: function (a) { return w(ba, a) }, baseURL: function () { var a = d.href; if (a.indexOf("#") != -1) a = a.substr(0, a.indexOf("#")); if (/\/$/.test(a)) a = a.substr(0, a.length - 1); return a }, autoUpdate: function (a) { if (a !== undefined) { i.autoUpdate = a; return this } return i.autoUpdate }, crawlable: function (a) { if (a !== undefined) { i.crawlable = a; return this } return i.crawlable }, history: function (a) { if (a !== undefined) { i.history = a; return this } return i.history }, strict: function (a) { if (a !== undefined) { i.strict = a; return this } return i.strict }, tracker: function (a) { if (a !== undefined) { i.tracker = a; return this } return i.tracker }, wrap: function (a) { if (a !== undefined) { i.wrap = a; return this } return i.wrap }, update: function () { N = e; this.value(f); N = j; return this }, title: function (a) { if (a !== undefined) { a = J(a); E(function () { R = k.title = a; if (ia && l && l.contentWindow && l.contentWindow.document) { l.contentWindow.document.title = a; ia = j } if (!S && ga) d.replace(d.href.indexOf("#") != -1 ? d.href : d.href + "#"); S = j }, 50); return this } return k.title }, value: function (a) { if (a !== undefined) { a = W(J(Y(a, e))); if (a == "/") a = ""; if (f == a && !N) return; S = e; f = a; if (i.autoUpdate || N) { L = e; G(e); z[F.length] = f; if (y) if (i.history) { d[o][d.pathname] = z.toString(); D = F.length + 1; if (m < 418) { if (d.search == "") { P.action = "#" + t(f, e); P.submit() } } else if (m < 523 || f == "") { a = k.createEvent("MouseEvents"); a.initEvent("click", e, e); var b = k.createElement("a"); b.href = "#" + t(f, e); b.dispatchEvent(a) } else d.hash = "#" + t(f, e) } else d.replace("#" + t(f, e)); else if (f != p()) if (i.history) d.hash = "#" + K(t(f, e), e); else d.replace("#" + t(f, e)); u && m < 8 && i.history && E(da, 50); if (y) E(function () { L = j }, 1); else L = j } return this } if (!Q) return null; return J(Y(K(f, j), j)) }, path: function (a) { if (a !== undefined) { var b = this.queryString(), g = this.hash(); this.value(a + (b ? "?" + b : "") + (g ? "#" + g : "")); return this } return this.value().split("#")[0].split("?")[0] }, queryString: function (a) { if (a !== undefined) { var b = this.hash(); this.value(this.path() + (a ? "?" + a : "") + (b ? "#" + b : "")); return this } a = this.value().split("?"); return a.slice(1, a.length).join("?").split("#")[0] }, parameter: function (a, b, g) { var h, q; if (b !== undefined) { var T = this.parameterNames(); q = []; for (h = 0; h < T.length; h++) { var U = T[h], C = this.parameter(U); if (typeof C == "string") C = [C]; if (U == a) C = b === null || b === "" ? [] : g ? C.concat([b]) : [b]; for (var V = 0; V < C.length; V++) q.push(U + "=" + C[V]) } c.inArray(a, T) == -1 && b !== null && b !== "" && q.push(a + "=" + b); this.queryString(q.join("&")); return this } if (b = this.queryString()) { q = b.split("&"); b = []; for (h = 0; h < q.length; h++) { g = q[h].split("="); g[0] == a && b.push(g[1]) } if (b.length !== 0) return b.length != 1 ? b : b[0] } }, pathNames: function () { var a = this.path(), b = a.replace(/\/{2,9}/g, "/").split("/"); if (a.substr(0, 1) == "/" || a.length === 0) b.splice(0, 1); a.substr(a.length - 1, 1) == "/" && b.splice(b.length - 1, 1); return b }, parameterNames: function () { var a = this.queryString(), b = []; if (a && a.indexOf("=") != -1) { a = a.split("&"); for (var g = 0; g < a.length; g++) { var h = a[g].split("=")[0]; c.inArray(h, b) == -1 && b.push(h) } } return b }, hash: function (a) { if (a !== undefined) { this.value(this.value().split("#")[0] + (a ? "#" + a : "")); return this } a = this.value().split("#"); return a.slice(1, a.length).join("#") } } } (); c.fn.address = function (v) { var w = function () { if (c(this).is("a")) { var p = v ? v.call(this) : /address:/.test(c(this).attr("rel")) ? c(this).attr("rel").split("address:")[1].split(" ")[0] : c(this).attr("href").replace(/^#\!?/, ""); c.address.value(p); return false } }; c(this).click(w).live("click", w); c(this).live("submit", function () { if (c(this).is("form")) { var p = v ? v.call(this) : c(this).attr("action") + "?" + c(this).serialize(); c.address.value(p); return false } }); return this } })(jQuery);

/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
;(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 Form Plugin
* version: 2.37 (13-FEB-2010)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html
*/

;(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this}if(typeof options=='function')options={success:options};var url=$.trim(this.attr('action'));if(url){url=(url.match(/^([^#]+)/)||[])[1]}url=url||window.location.href||'';options=$.extend({url:url,type:this.attr('method')||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this}var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n]instanceof Array){for(var k in options.data[n])a.push({name:n,value:options.data[n][k]})}else a.push({name:n,value:options.data[n]})}}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this}this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this}var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null}else options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm()});if(options.clearForm)callbacks.push(function(){$form.clearForm()});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments)})}else if(options.success)callbacks.push(options.success);options.success=function(data,status,xhr){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i].apply(options,[data,status,xhr||$form,$form])};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)if(files[j])found=true;var multipart=false;if((files.length&&options.iframe!==false)||options.iframe||found||multipart){if(options.closeKeepAlive)$.get(options.closeKeepAlive,fileUpload);else fileUpload()}else $.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return}var opts=$.extend({},$.ajaxSettings,options);var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" src="'+opts.iframeSrc+'" />');var io=$io[0];$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr('src',opts.iframeSrc)}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&$.active--;return}if(xhr.aborted)return;var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y}}}setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(form.getAttribute('method')!='POST')form.setAttribute('method','POST');if(form.getAttribute('action')!=opts.url)form.setAttribute('action',opts.url);if(!options.skipEncodingOverride){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'})}if(opts.timeout)setTimeout(function(){timedOut=true;cb()},opts.timeout);var extraInputs=[];try{if(options.extraData)for(var n in options.extraData)extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit()}finally{form.setAttribute('action',a);t?form.setAttribute('target',t):$form.removeAttr('target');$(extraInputs).remove()}},10);var domCheckCount=50;function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;var isXml=opts.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){cbInvoked=0;setTimeout(cb,100);return}log('Could not access iframe DOM after 50 tries.');return}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header]};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];if(ta)xhr.responseText=ta.value;else{var pre=doc.getElementsByTagName('pre')[0];if(pre)xhr.responseText=pre.innerHTML}}else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText)}data=$.httpData(xhr,opts.dataType)}catch(e){ok=false;$.handleError(opts,xhr,'error',e)}if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts])}if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null},100)};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s)}else doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null}}};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false}).bind('click.form-plugin',function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length==0)return;target=t[0]}var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null},100)})};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin')};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y})}continue}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(v!==null&&typeof v!='undefined')a.push({name:n,value:v})}if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0],n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y})}}return a};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic))};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!='undefined')a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))continue;v.constructor==Array?$.merge(val,v):val.push(v)}return val};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;if(one)return v;a.push(v)}}return a}return el.value};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')this.value='';else if(t=='checkbox'||t=='radio')this.checked=false;else if(tag=='select')this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))this.reset()})};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.selected=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false)}this.selected=select}})};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''))}})(jQuery);

/*!
* jCarousel - Riding carousels with jQuery
*   http://sorgalla.com/jcarousel/
*
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Built on top of the jQuery library
*   http://jquery.com
*
* Inspired by the "Carousel Component" by Bill Scott
*   http://billwscott.com/carousel/
*/

(function (i) { i.fn.jcarousel = function (a) { if (typeof a == "string") { var c = i(this).data("jcarousel"), b = Array.prototype.slice.call(arguments, 1); return c[a].apply(c, b) } else return this.each(function () { i(this).data("jcarousel", new h(this, a)) }) }; var p = { vertical: false, rtl: false, start: 1, offset: 1, size: null, scroll: 3, visible: null, animation: "normal", easing: "swing", auto: 0, wrap: null, initCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, buttonNextHTML: "<div></div>", buttonPrevHTML: "<div></div>", buttonNextEvent: "click", buttonPrevEvent: "click", buttonNextCallback: null, buttonPrevCallback: null, itemFallbackDimension: null }, q = false; i(window).bind("load.jcarousel", function () { q = true }); i.jcarousel = function (a, c) { this.options = i.extend({}, p, c || {}); this.locked = false; this.buttonPrev = this.buttonNext = this.list = this.clip = this.container = null; if (!c || c.rtl === undefined) this.options.rtl = (i(a).attr("dir") || i("html").attr("dir") || "").toLowerCase() == "rtl"; this.wh = !this.options.vertical ? "width" : "height"; this.lt = !this.options.vertical ? this.options.rtl ? "right" : "left" : "top"; for (var b = "", d = a.className.split(" "), e = 0; e < d.length; e++) if (d[e].indexOf("jcarousel-skin") != -1) { i(a).removeClass(d[e]); b = d[e]; break } if (a.nodeName.toUpperCase() == "UL" || a.nodeName.toUpperCase() == "OL") { this.list = i(a); this.container = this.list.parent(); if (this.container.hasClass("jcarousel-clip")) { if (!this.container.parent().hasClass("jcarousel-container")) this.container = this.container.wrap("<div></div>"); this.container = this.container.parent() } else if (!this.container.hasClass("jcarousel-container")) this.container = this.list.wrap("<div></div>").parent() } else { this.container = i(a); this.list = this.container.find("ul,ol").eq(0) } b != "" && this.container.parent()[0].className.indexOf("jcarousel-skin") == -1 && this.container.wrap('<div class=" ' + b + '"></div>'); this.clip = this.list.parent(); if (!this.clip.length || !this.clip.hasClass("jcarousel-clip")) this.clip = this.list.wrap("<div></div>").parent(); this.buttonNext = i(".jcarousel-next", this.container); if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) this.buttonNext = this.clip.after(this.options.buttonNextHTML).next(); this.buttonNext.addClass(this.className("jcarousel-next")); this.buttonPrev = i(".jcarousel-prev", this.container); if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) this.buttonPrev = this.clip.after(this.options.buttonPrevHTML).next(); this.buttonPrev.addClass(this.className("jcarousel-prev")); this.clip.addClass(this.className("jcarousel-clip")).css({ overflow: "hidden", position: "relative" }); this.list.addClass(this.className("jcarousel-list")).css({ overflow: "hidden", position: "relative", top: 0, margin: 0, padding: 0 }).css(this.options.rtl ? "right" : "left", 0); this.container.addClass(this.className("jcarousel-container")).css({ position: "relative" }); !this.options.vertical && this.options.rtl && this.container.addClass("jcarousel-direction-rtl").attr("dir", "rtl"); var f = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; b = this.list.children("li"); var g = this; if (b.size() > 0) { var j = 0; e = this.options.offset; b.each(function () { g.format(this, e++); j += g.dimension(this, f) }); this.list.css(this.wh, j + 100 + "px"); if (!c || c.size === undefined) this.options.size = b.size() } this.container.css("display", "block"); this.buttonNext.css("display", "block"); this.buttonPrev.css("display", "block"); this.funcNext = function () { g.next() }; this.funcPrev = function () { g.prev() }; this.funcResize = function () { g.reload() }; this.options.initCallback != null && this.options.initCallback(this, "init"); if (!q && i.browser.safari) { this.buttons(false, false); i(window).bind("load.jcarousel", function () { g.setup() }) } else this.setup() }; var h = i.jcarousel; h.fn = h.prototype = { jcarousel: "0.2.5" }; h.fn.extend = h.extend = i.extend; h.fn.extend({ setup: function () { this.prevLast = this.prevFirst = this.last = this.first = null; this.animating = false; this.tail = this.timer = null; this.inTail = false; if (!this.locked) { this.list.css(this.lt, this.pos(this.options.offset) + "px"); var a = this.pos(this.options.start); this.prevFirst = this.prevLast = null; this.animate(a, false); i(window).unbind("resize.jcarousel", this.funcResize).bind("resize.jcarousel", this.funcResize) } }, reset: function () { this.list.empty(); this.list.css(this.lt, "0px"); this.list.css(this.wh, "10px"); this.options.initCallback != null && this.options.initCallback(this, "reset"); this.setup() }, reload: function () { this.tail != null && this.inTail && this.list.css(this.lt, h.intval(this.list.css(this.lt)) + this.tail); this.tail = null; this.inTail = false; this.options.reloadCallback != null && this.options.reloadCallback(this); if (this.options.visible != null) { var a = this, c = Math.ceil(this.clipping() / this.options.visible), b = 0, d = 0; this.list.children("li").each(function (e) { b += a.dimension(this, c); if (e + 1 < a.first) d = b }); this.list.css(this.wh, b + "px"); this.list.css(this.lt, -d + "px") } this.scroll(this.first, false) }, lock: function () { this.locked = true; this.buttons() }, unlock: function () { this.locked = false; this.buttons() }, size: function (a) { if (a != undefined) { this.options.size = a; this.locked || this.buttons() } return this.options.size }, has: function (a, c) { if (c == undefined || !c) c = a; if (this.options.size !== null && c > this.options.size) c = this.options.size; for (var b = a; b <= c; b++) { var d = this.get(b); if (!d.length || d.hasClass("jcarousel-item-placeholder")) return false } return true }, get: function (a) { return i(".jcarousel-item-" + a, this.list) }, add: function (a, c) { var b = this.get(a), d = 0, e = i(c); if (b.length == 0) { var f; b = this.create(a); for (var g = h.intval(a); f = this.get(--g); ) if (g <= 0 || f.length) { g <= 0 ? this.list.prepend(b) : f.after(b); break } } else d = this.dimension(b); if (e.get(0).nodeName.toUpperCase() == "LI") { b.replaceWith(e); b = e } else b.empty().append(c); this.format(b.removeClass(this.className("jcarousel-item-placeholder")), a); e = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; d = this.dimension(b, e) - d; a > 0 && a < this.first && this.list.css(this.lt, h.intval(this.list.css(this.lt)) - d + "px"); this.list.css(this.wh, h.intval(this.list.css(this.wh)) + d + "px"); return b }, remove: function (a) { var c = this.get(a); if (!(!c.length || a >= this.first && a <= this.last)) { var b = this.dimension(c); a < this.first && this.list.css(this.lt, h.intval(this.list.css(this.lt)) + b + "px"); c.remove(); this.list.css(this.wh, h.intval(this.list.css(this.wh)) - b + "px") } }, next: function () { this.stopAuto(); this.tail != null && !this.inTail ? this.scrollTail(false) : this.scroll((this.options.wrap == "both" || this.options.wrap == "last") && this.options.size != null && this.last == this.options.size ? 1 : this.first + this.options.scroll) }, prev: function () { this.stopAuto(); this.tail != null && this.inTail ? this.scrollTail(true) : this.scroll((this.options.wrap == "both" || this.options.wrap == "first") && this.options.size != null && this.first == 1 ? this.options.size : this.first - this.options.scroll) }, scrollTail: function (a) { if (!(this.locked || this.animating || !this.tail)) { var c = h.intval(this.list.css(this.lt)); !a ? c -= this.tail : c += this.tail; this.inTail = !a; this.prevFirst = this.first; this.prevLast = this.last; this.animate(c) } }, scroll: function (a, c) { this.locked || this.animating || this.animate(this.pos(a), c) }, pos: function (a) { var c = h.intval(this.list.css(this.lt)); if (this.locked || this.animating) return c; if (this.options.wrap != "circular") a = a < 1 ? 1 : this.options.size && a > this.options.size ? this.options.size : a; for (var b = this.first > a, d = this.options.wrap != "circular" && this.first <= 1 ? 1 : this.first, e = b ? this.get(d) : this.get(this.last), f = b ? d : d - 1, g = null, j = 0, l = false, k = 0; b ? --f >= a : ++f < a; ) { g = this.get(f); l = !g.length; if (g.length == 0) { g = this.create(f).addClass(this.className("jcarousel-item-placeholder")); e[b ? "before" : "after"](g); if (this.first != null && this.options.wrap == "circular" && this.options.size !== null && (f <= 0 || f > this.options.size)) { e = this.get(this.index(f)); if (e.length) g = this.add(f, e.clone(true)) } } e = g; k = this.dimension(g); if (l) j += k; if (this.first != null && (this.options.wrap == "circular" || f >= 1 && (this.options.size == null || f <= this.options.size))) c = b ? c + k : c - k } d = this.clipping(); var o = [], n = 0; f = a; var m = 0; for (e = this.get(a - 1); ++n; ) { g = this.get(f); l = !g.length; if (g.length == 0) { g = this.create(f).addClass(this.className("jcarousel-item-placeholder")); e.length == 0 ? this.list.prepend(g) : e[b ? "before" : "after"](g); if (this.first != null && this.options.wrap == "circular" && this.options.size !== null && (f <= 0 || f > this.options.size)) { e = this.get(this.index(f)); if (e.length) g = this.add(f, e.clone(true)) } } e = g; k = this.dimension(g); if (k == 0) throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); if (this.options.wrap != "circular" && this.options.size !== null && f > this.options.size) o.push(g); else if (l) j += k; m += k; if (m >= d) break; f++ } for (g = 0; g < o.length; g++) o[g].remove(); if (j > 0) { this.list.css(this.wh, this.dimension(this.list) + j + "px"); if (b) { c -= j; this.list.css(this.lt, h.intval(this.list.css(this.lt)) - j + "px") } } j = a + n - 1; if (this.options.wrap != "circular" && this.options.size && j > this.options.size) j = this.options.size; if (f > j) { n = 0; f = j; for (m = 0; ++n; ) { g = this.get(f--); if (!g.length) break; m += this.dimension(g); if (m >= d) break } } f = j - n + 1; if (this.options.wrap != "circular" && f < 1) f = 1; if (this.inTail && b) { c += this.tail; this.inTail = false } this.tail = null; if (this.options.wrap != "circular" && j == this.options.size && j - n + 1 >= 1) { b = h.margin(this.get(j), !this.options.vertical ? "marginRight" : "marginBottom"); if (m - b > d) this.tail = m - d - b } for (; a-- > f; ) c += this.dimension(this.get(a)); this.prevFirst = this.first; this.prevLast = this.last; this.first = f; this.last = j; return c }, animate: function (a, c) { if (!(this.locked || this.animating)) { this.animating = true; var b = this, d = function () { b.animating = false; a == 0 && b.list.css(b.lt, 0); if (b.options.wrap == "circular" || b.options.wrap == "both" || b.options.wrap == "last" || b.options.size == null || b.last < b.options.size) b.startAuto(); b.buttons(); b.notify("onAfterAnimation"); if (b.options.wrap == "circular" && b.options.size !== null) for (var e = b.prevFirst; e <= b.prevLast; e++) if (e !== null && !(e >= b.first && e <= b.last) && (e < 1 || e > b.options.size)) b.remove(e) }; this.notify("onBeforeAnimation"); if (!this.options.animation || c == false) { this.list.css(this.lt, a + "px"); d() } else this.list.animate(!this.options.vertical ? this.options.rtl ? { right: a} : { left: a} : { top: a }, this.options.animation, this.options.easing, d) } }, startAuto: function (a) { if (a != undefined) this.options.auto = a; if (this.options.auto == 0) return this.stopAuto(); if (this.timer == null) { var c = this; this.timer = setTimeout(function () { c.next() }, this.options.auto * 1E3) } }, stopAuto: function () { if (this.timer != null) { clearTimeout(this.timer); this.timer = null } }, buttons: function (a, c) { if (a == undefined || a == null) { a = !this.locked && this.options.size !== 0 && (this.options.wrap && this.options.wrap != "first" || this.options.size == null || this.last < this.options.size); if (!this.locked && (!this.options.wrap || this.options.wrap == "first") && this.options.size != null && this.last >= this.options.size) a = this.tail != null && !this.inTail } if (c == undefined || c == null) { c = !this.locked && this.options.size !== 0 && (this.options.wrap && this.options.wrap != "last" || this.first > 1); if (!this.locked && (!this.options.wrap || this.options.wrap == "last") && this.options.size != null && this.first == 1) c = this.tail != null && this.inTail } var b = this; this.buttonNext[a ? "bind" : "unbind"](this.options.buttonNextEvent + ".jcarousel", this.funcNext)[a ? "removeClass" : "addClass"](this.className("jcarousel-next-disabled")).attr("disabled", a ? false : true); this.buttonPrev[c ? "bind" : "unbind"](this.options.buttonPrevEvent + ".jcarousel", this.funcPrev)[c ? "removeClass" : "addClass"](this.className("jcarousel-prev-disabled")).attr("disabled", c ? false : true); this.options.buttonNextCallback != null && this.buttonNext.data("jcarouselstate") != a && this.buttonNext.each(function () { b.options.buttonNextCallback(b, this, a) }).data("jcarouselstate", a); this.options.buttonPrevCallback != null && this.buttonPrev.data("jcarouselstate") != c && this.buttonPrev.each(function () { b.options.buttonPrevCallback(b, this, c) }).data("jcarouselstate", c) }, notify: function (a) { var c = this.prevFirst == null ? "init" : this.prevFirst < this.first ? "next" : "prev"; this.callback("itemLoadCallback", a, c); if (this.prevFirst !== this.first) { this.callback("itemFirstInCallback", a, c, this.first); this.callback("itemFirstOutCallback", a, c, this.prevFirst) } if (this.prevLast !== this.last) { this.callback("itemLastInCallback", a, c, this.last); this.callback("itemLastOutCallback", a, c, this.prevLast) } this.callback("itemVisibleInCallback", a, c, this.first, this.last, this.prevFirst, this.prevLast); this.callback("itemVisibleOutCallback", a, c, this.prevFirst, this.prevLast, this.first, this.last) }, callback: function (a, c, b, d, e, f, g) { if (!(this.options[a] == undefined || typeof this.options[a] != "object" && c != "onAfterAnimation")) { var j = typeof this.options[a] == "object" ? this.options[a][c] : this.options[a]; if (i.isFunction(j)) { var l = this; if (d === undefined) j(l, b, c); else if (e === undefined) this.get(d).each(function () { j(l, this, d, b, c) }); else for (var k = d; k <= e; k++) k !== null && !(k >= f && k <= g) && this.get(k).each(function () { j(l, this, k, b, c) }) } } }, create: function (a) { return this.format("<li></li>", a) }, format: function (a, c) { a = i(a); for (var b = a.get(0).className.split(" "), d = 0; d < b.length; d++) b[d].indexOf("jcarousel-") != -1 && a.removeClass(b[d]); a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-" + c)).css({ "float": this.options.rtl ? "right" : "left", "list-style": "none" }).attr("jcarouselindex", c); return a }, className: function (a) { return a + " " + a + (!this.options.vertical ? "-horizontal" : "-vertical") }, dimension: function (a, c) { var b = a.jquery != undefined ? a[0] : a, d = !this.options.vertical ? (b.offsetWidth || h.intval(this.options.itemFallbackDimension)) + h.margin(b, "marginLeft") + h.margin(b, "marginRight") : (b.offsetHeight || h.intval(this.options.itemFallbackDimension)) + h.margin(b, "marginTop") + h.margin(b, "marginBottom"); if (c == undefined || d == c) return d; d = !this.options.vertical ? c - h.margin(b, "marginLeft") - h.margin(b, "marginRight") : c - h.margin(b, "marginTop") - h.margin(b, "marginBottom"); i(b).css(this.wh, d + "px"); return this.dimension(b) }, clipping: function () { return !this.options.vertical ? this.clip[0].offsetWidth - h.intval(this.clip.css("borderLeftWidth")) - h.intval(this.clip.css("borderRightWidth")) : this.clip[0].offsetHeight - h.intval(this.clip.css("borderTopWidth")) - h.intval(this.clip.css("borderBottomWidth")) }, index: function (a, c) { if (c == undefined) c = this.options.size; return Math.round(((a - 1) / c - Math.floor((a - 1) / c)) * c) + 1 } }); h.extend({ defaults: function (a) { return i.extend(p, a || {}) }, margin: function (a, c) { if (!a) return 0; var b = a.jquery != undefined ? a[0] : a; if (c == "marginRight" && i.browser.safari) { var d = { display: "block", "float": "none", width: "auto" }, e, f; i.swap(b, d, function () { e = b.offsetWidth }); d.marginRight = 0; i.swap(b, d, function () { f = b.offsetWidth }); return f - e } return h.intval(i.css(b, c)) }, intval: function (a) { a = parseInt(a); return isNaN(a) ? 0 : a } }) })(jQuery);

/*
* Popup Window
* http://swip.codylindley.com/popupWindowDemo.html
*/

(function ($) { $.fn.popupWindow = function (instanceSettings) { return this.each(function () { $(this).unbind(); $(this).click(function () { $.fn.popupWindow.defaultSettings = { centerBrowser: 0, centerScreen: 0, height: 500, left: 0, location: 0, menubar: 0, resizable: 0, scrollbars: 0, status: 0, width: 500, windowName: null, windowURL: null, top: 0, toolbar: 0 }; settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {}); var windowFeatures = 'height=' + settings.height + ',width=' + settings.width + ',toolbar=' + settings.toolbar + ',scrollbars=' + settings.scrollbars + ',status=' + settings.status + ',resizable=' + settings.resizable + ',location=' + settings.location + ',menuBar=' + settings.menubar; settings.windowName = this.name || settings.windowName; settings.windowURL = this.href || settings.windowURL; var centeredY, centeredX; if (settings.centerBrowser) { if ($.browser.msie) { centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120) / 2) - (settings.height / 2))); centeredX = window.screenLeft + ((((document.body.offsetWidth + 20) / 2) - (settings.width / 2))) } else { centeredY = window.screenY + (((window.outerHeight / 2) - (settings.height / 2))); centeredX = window.screenX + (((window.outerWidth / 2) - (settings.width / 2))) } window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + centeredX + ',top=' + centeredY).focus() } else if (settings.centerScreen) { centeredY = (screen.height - settings.height) / 2; centeredX = (screen.width - settings.width) / 2; window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + centeredX + ',top=' + centeredY).focus() } else { window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + settings.left + ',top=' + settings.top).focus() } return false }) }) } })(jQuery);


/*
* Global Overlay Function
* Jon Cazier
*/
(function ($) {

    jQuery.fn.getOverlay = function (overlay) {
        var config = {
            over: showOverlay, // function = onMouseOver callback (REQUIRED)    
            timeout: 200, // number = milliseconds delay before onMouseOut    
            out: hideOverlay // function = onMouseOut callback (REQUIRED)    
        };

        $(this).hoverIntent(config);


        function showOverlay() {
            $(this).addClass("active");
            overlay.fadeIn(100);
        }

        function hideOverlay() {
            $(this).removeClass("active");
            overlay.fadeOut(300);
        }
    };
})(jQuery);

/*
* Global Thumb Tip
* Jon Cazier
*/
(function ($) {
    jQuery.fn.getThumbTip = function (overlay) {
        var config = {
            over: showOverlay, // function = onMouseOver callback (REQUIRED)    
            timeout: 150, // number = milliseconds delay before onMouseOut    
            out: hideOverlay // function = onMouseOut callback (REQUIRED)    
        };

        $(this).hoverIntent(config);

        var title = $(this).parent().data("info").videoData.Title;
        var desc = $(this).parent().data("info").videoData.Description;

        overlay.html("<strong>" + title + "</strong>" + desc);

        overlay.css({top: -200, left: $(this).offset().left});

        function showOverlay() {
            $(this).addClass("active");
            overlay.fadeIn(300);
        }

        function hideOverlay() {
            $(this).removeClass("active");
            overlay.fadeOut(300);
        }
    };
})(jQuery);
