/*!
 * jQuery JavaScript Library v1.6
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Mon May 2 13:50:00 2011 -0400
 */
(function(a,b){function cw(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function ct(a){if(!ch[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ci||(ci=c.createElement("iframe"),ci.frameBorder=ci.width=ci.height=0),c.body.appendChild(ci);if(!cj||!ci.createElement)cj=(ci.contentWindow||ci.contentDocument).document,cj.write("<!doctype><html><body></body></html>");b=cj.createElement(a),cj.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ci)}ch[a]=d}return ch[a]}function cs(a,b){var c={};f.each(cn.concat.apply([],cn.slice(0,b)),function(){c[this]=a});return c}function cr(){co=b}function cq(){setTimeout(cr,0);return co=f.now()}function cg(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cf(){try{return new a.XMLHttpRequest}catch(b){}}function b_(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function b$(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bZ(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):bZ(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bZ(a+"["+e+"]",b[e],c,d);else d(a,b)}function bY(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bY(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bY(a,c,d,e,"*",g));return l}function bX(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?bv:bw,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){name="data-"+c.replace(j,"$1-$2").toLowerCase(),d=a.getAttribute(name);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(e){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:E?function(a){return a==null?"":E.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?C.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(F)return F.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=D.call(arguments,2),g=function(){return a.apply(c,f.concat(D.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(c,d){d&&d instanceof e&&!(d instanceof a)&&(d=a(d));return e.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){G["[object "+b+"]"]=b.toLowerCase()}),x=e.uaMatch(w),x.browser&&(e.browser[x.browser]=!0,e.browser.version=x.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?z=function(){c.removeEventListener("DOMContentLoaded",z,!1),e.ready()}:c.attachEvent&&(z=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",z),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b,d,e,f,g,h,i,j,k,l,m,n,o,p,q;a.setAttribute("className","t"),a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",b=a.getElementsByTagName("*"),d=a.getElementsByTagName("a")[0];if(!b||!b.length||!d)return{};e=c.createElement("select"),f=e.appendChild(c.createElement("option")),g=a.getElementsByTagName("input")[0],i={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.55$/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:g.value==="on",optSelected:f.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},g.checked=!0,i.noCloneChecked=g.cloneNode(!0).checked,e.disabled=!0,i.optDisabled=!f.disabled;try{delete a.test}catch(r){i.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function click(){i.noCloneEvent=!1,a.detachEvent("onclick",click)}),a.cloneNode(!0).fireEvent("onclick")),g=c.createElement("input"),g.value="t",g.setAttribute("type","radio"),i.radioValue=g.value==="t",g.setAttribute("checked","checked"),a.appendChild(g),j=c.createDocumentFragment(),j.appendChild(a.firstChild),i.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",k=c.createElement("body"),l={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(p in l)k.style[p]=l[p];k.appendChild(a),c.documentElement.appendChild(k),i.appendChecked=g.checked,i.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,i.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",i.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",m=a.getElementsByTagName("td"),q=m[0].offsetHeight===0,m[0].style.display="",m[1].style.display="none",i.reliableHiddenOffsets=q&&m[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(h=c.createElement("div"),h.style.width="0",h.style.marginRight="0",a.appendChild(h),i.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(h,null).marginRight,10)||0)===0),k.innerHTML="",c.documentElement.removeChild(k);if(a.attachEvent)for(p in{submit:1,change:1,focusin:1})o="on"+p,q=o in a,q||(a.setAttribute(o,"return;"),q=typeof a[o]=="function"),i[p+"Bubbles"]=q;return i}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[c]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function l(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark";while(g--)if(tmp=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,tmp.done(l);l();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:data-|aria-)/,u=/\:/,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.addClass(a.call(this,b,c.attr("class")||""))});if(a&&typeof a=="string"){var b=(a||"").split(o);for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.nodeType===1)if(!e.className)e.className=a;else{var g=" "+e.className+" ",h=e.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);e.className=f.trim(h)}}}return this},removeClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string"||a===b){var c=(a||"").split(o);for(var d=0,e=this.length;d<e;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(n," ");for(var i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){var d=f(this);d.toggleClass(a.call(this,c,d.attr("class"),b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||"set"in c&&c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b=a.selectedIndex,c=[],d=a.options,e=a.type==="select-one";if(b<0)return null;for(var g=e?b:0,h=e?b+1:d.length;g<h;g++){var i=d[g];if(i.selected&&(f.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!f.nodeName(i.parentNode,"optgroup"))){value=f(i).val();if(e)return value;c.push(value)}}if(e&&!c.length&&d.length)return f(d[b]).val();return c},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex",readonly:"readOnly"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c]||(v&&(f.nodeName(a,"form")||u.test(c))?v:b);if(d!==b){if(d===null||d===!1&&!t.test(c)){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;d===!0&&!t.test(c)&&(d=c),a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.getAttribute("value");a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),f.support.getSetAttribute||(f.attrFix=f.extend(f.attrFix,{"for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder"}),v=f.attrHooks.name=f.attrHooks.value=f.valHooks.button={get:function(a,c){var d;if(c==="value"&&!f.nodeName(a,"button"))return a.getAttribute(c);d=a.getAttributeNode(c);return d&&d.specified?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=Object.prototype.hasOwnProperty,x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,f.event.handle.apply(this,arguments))}catch(d){}},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function J(a){var c=a.target,d,e;if(!!y.test(c.nodeName)&&!c.readOnly){d=f._data(c,"_change_data"),e=I(c),(a.type!=="focusout"||c.type!=="radio")&&f._data(c,"_change_data",e);if(d===b||e===d)return;if(d!=null||e)a.type="change",a.liveFired=b,f.event.trigger(a,arguments[1],c)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){return a.nodeName.toLowerCase()==="input"&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!be[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[];for(var i=0,j;(j=a[i])!=null;i++){typeof j=="number"&&(j+="");if(!j)continue;if(typeof j=="string")if(!ba.test(j))j=b.createTextNode(j);else{j=j.replace(Z,"<$1></$2>");var k=($.exec(j)||["",""])[1].toLowerCase(),l=be[k]||be._default,m=l[0],n=b.createElement("div");n.innerHTML=l[1]+j+l[2];while(m--)n=n.lastChild;if(!f.support.tbody){var o=_.test(j),p=k==="table"&&!o?n.firstChild&&n.firstChild.childNodes:l[1]==="<table>"&&!o?n.childNodes:[];for(var q=p.length-1;q>=0;--q)f.nodeName(p[q],"tbody")&&!p[q].childNodes.length&&p[q].parentNode.removeChild(p[q])}!f.support.leadingWhitespace&&Y.test(j)&&n.insertBefore(b.createTextNode(Y.exec(j)[0]),n.firstChild),j=n.childNodes}var r;if(!f.support.appendChecked)if(j[0]&&typeof (r=j.length)=="number")for(i=0;i<r;i++)bk(j[i]);else bk(j);j.nodeType?h.push(j):h=f.merge(h,j)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(i=0;h[i];i++)if(e&&f.nodeName(h[i],"script")&&(!h[i].type||h[i].type.toLowerCase()==="text/javascript"))e.push(h[i].parentNode?h[i].parentNode.removeChild(h[i]):h[i]);else{if(h[i].nodeType===1){var s=f.grep(h[i].getElementsByTagName("script"),g);h.splice.apply(h,[i+1,0].concat(s))}d.appendChild(h[i])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/-([a-z])/ig,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz,bA=function(a,b){return b.toUpperCase()};f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,widows:!0,orphans:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c))),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bo,bA)}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){a.offsetWidth!==0?e=bB(a,b,d):f.swap(a,bu,function(){e=bB(a,b,d)});if(e<=0){e=bx(a,b,b),e==="0px"&&bz&&(e=bz(a,b,b));if(e!=null)return e===""||e==="auto"?"0px":e}if(e<0||e==null){e=a.style[b];return e===""||e==="auto"?"0px":e}return typeof e=="string"?e:e+"px"}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV;try{bU=e.href}catch(bW){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bX(bS),ajaxTransport:bX(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?b$(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b_(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bY(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bY(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bZ(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var ca=f.now(),cb=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+ca++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cb.test(b.url)||e&&cb.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cb,l),b.url===j&&(e&&(k=k.replace(cb,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cc=a.ActiveXObject?function(){for(var a in ce)ce[a](0,1)}:!1,cd=0,ce;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cf()||cg()}:cf,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cc&&delete ce[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cd,cc&&(ce||(ce={},f(a).unload(cc)),ce[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ch={},ci,cj,ck=/^(?:toggle|show|hide)$/,cl=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cm,cn=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],co,cp=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cs("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",ct(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cs("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cs("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g];if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=ct(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block")),b.animatedProperties[g]=f.isArray(h)?h[1]:b.specialEasing&&b.specialEasing[g]||b.easing||"swing"}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],ck.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=cl.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[g]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cs("show",1),slideUp:cs("hide",1),slideToggle:cs("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this),f.isFunction(d.old)&&d.old.call(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=co||cq(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cm&&(cp?(cm=1,g=function(){cm&&(cp(g),e.tick())},cp(g)):cm=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=co||cq(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a=f.timers,b=a.length;while(b--)a[b]()||a.splice(b,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cm),cm=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cu=/^t(?:able|d|h)$/i,cv=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cw(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cu.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cv.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cv.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cw(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cw(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);;
// $Id: drupal.js,v 1.41.2.4 2009/07/21 08:59:10 goba Exp $

var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} };

/**
 * Set the variable that indicates if JavaScript behaviors should be applied
 */
Drupal.jsEnabled = document.getElementsByTagName && document.createElement && document.createTextNode && document.documentElement && document.getElementById;

/**
 * Attach all registered behaviors to a page element.
 *
 * Behaviors are event-triggered actions that attach to page elements, enhancing
 * default non-Javascript UIs. Behaviors are registered in the Drupal.behaviors
 * object as follows:
 * @code
 *    Drupal.behaviors.behaviorName = function () {
 *      ...
 *    };
 * @endcode
 *
 * Drupal.attachBehaviors is added below to the jQuery ready event and so
 * runs on initial page load. Developers implementing AHAH/AJAX in their
 * solutions should also call this function after new page content has been
 * loaded, feeding in an element to be processed, in order to attach all
 * behaviors to the new content.
 *
 * Behaviors should use a class in the form behaviorName-processed to ensure
 * the behavior is attached only once to a given element. (Doing so enables
 * the reprocessing of given elements, which may be needed on occasion despite
 * the ability to limit behavior attachment to a particular element.)
 *
 * @param context
 *   An element to attach behaviors to. If none is given, the document element
 *   is used.
 */
Drupal.attachBehaviors = function(context) {
  context = context || document;
  if (Drupal.jsEnabled) {
    // Execute all of them.
    jQuery.each(Drupal.behaviors, function() {
      this(context);
    });
  }
};

/**
 * Encode special characters in a plain-text string for display as HTML.
 */
Drupal.checkPlain = function(str) {
  str = String(str);
  var replace = { '&': '&amp;', '"': '&quot;', '<': '&lt;', '>': '&gt;' };
  for (var character in replace) {
    var regex = new RegExp(character, 'g');
    str = str.replace(regex, replace[character]);
  }
  return str;
};

/**
 * Translate strings to the page language or a given language.
 *
 * See the documentation of the server-side t() function for further details.
 *
 * @param str
 *   A string containing the English string to translate.
 * @param args
 *   An object of replacements pairs to make after translation. Incidences
 *   of any key in this array are replaced with the corresponding value.
 *   Based on the first character of the key, the value is escaped and/or themed:
 *    - !variable: inserted as is
 *    - @variable: escape plain text to HTML (Drupal.checkPlain)
 *    - %variable: escape text and theme as a placeholder for user-submitted
 *      content (checkPlain + Drupal.theme('placeholder'))
 * @return
 *   The translated string.
 */
Drupal.t = function(str, args) {
  // Fetch the localized version of the string.
  if (Drupal.locale.strings && Drupal.locale.strings[str]) {
    str = Drupal.locale.strings[str];
  }

  if (args) {
    // Transform arguments before inserting them
    for (var key in args) {
      switch (key.charAt(0)) {
        // Escaped only
        case '@':
          args[key] = Drupal.checkPlain(args[key]);
        break;
        // Pass-through
        case '!':
          break;
        // Escaped and placeholder
        case '%':
        default:
          args[key] = Drupal.theme('placeholder', args[key]);
          break;
      }
      str = str.replace(key, args[key]);
    }
  }
  return str;
};

/**
 * Format a string containing a count of items.
 *
 * This function ensures that the string is pluralized correctly. Since Drupal.t() is
 * called by this function, make sure not to pass already-localized strings to it.
 *
 * See the documentation of the server-side format_plural() function for further details.
 *
 * @param count
 *   The item count to display.
 * @param singular
 *   The string for the singular case. Please make sure it is clear this is
 *   singular, to ease translation (e.g. use "1 new comment" instead of "1 new").
 *   Do not use @count in the singular string.
 * @param plural
 *   The string for the plural case. Please make sure it is clear this is plural,
 *   to ease translation. Use @count in place of the item count, as in "@count
 *   new comments".
 * @param args
 *   An object of replacements pairs to make after translation. Incidences
 *   of any key in this array are replaced with the corresponding value.
 *   Based on the first character of the key, the value is escaped and/or themed:
 *    - !variable: inserted as is
 *    - @variable: escape plain text to HTML (Drupal.checkPlain)
 *    - %variable: escape text and theme as a placeholder for user-submitted
 *      content (checkPlain + Drupal.theme('placeholder'))
 *   Note that you do not need to include @count in this array.
 *   This replacement is done automatically for the plural case.
 * @return
 *   A translated string.
 */
Drupal.formatPlural = function(count, singular, plural, args) {
  var args = args || {};
  args['@count'] = count;
  // Determine the index of the plural form.
  var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1);

  if (index == 0) {
    return Drupal.t(singular, args);
  }
  else if (index == 1) {
    return Drupal.t(plural, args);
  }
  else {
    args['@count['+ index +']'] = args['@count'];
    delete args['@count'];
    return Drupal.t(plural.replace('@count', '@count['+ index +']'));
  }
};

/**
 * Generate the themed representation of a Drupal object.
 *
 * All requests for themed output must go through this function. It examines
 * the request and routes it to the appropriate theme function. If the current
 * theme does not provide an override function, the generic theme function is
 * called.
 *
 * For example, to retrieve the HTML that is output by theme_placeholder(text),
 * call Drupal.theme('placeholder', text).
 *
 * @param func
 *   The name of the theme function to call.
 * @param ...
 *   Additional arguments to pass along to the theme function.
 * @return
 *   Any data the theme function returns. This could be a plain HTML string,
 *   but also a complex object.
 */
Drupal.theme = function(func) {
  for (var i = 1, args = []; i < arguments.length; i++) {
    args.push(arguments[i]);
  }

  return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args);
};

/**
 * Parse a JSON response.
 *
 * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message.
 */
Drupal.parseJson = function (data) {
  if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) {
    return { status: 0, data: data.length ? data : Drupal.t('Unspecified error') };
  }
  return eval('(' + data + ');');
};

/**
 * Freeze the current body height (as minimum height). Used to prevent
 * unnecessary upwards scrolling when doing DOM manipulations.
 */
Drupal.freezeHeight = function () {
  Drupal.unfreezeHeight();
  var div = document.createElement('div');
  $(div).css({
    position: 'absolute',
    top: '0px',
    left: '0px',
    width: '1px',
    height: $('body').css('height')
  }).attr('id', 'freeze-height');
  $('body').append(div);
};

/**
 * Unfreeze the body height
 */
Drupal.unfreezeHeight = function () {
  $('#freeze-height').remove();
};

/**
 * Wrapper around encodeURIComponent() which avoids Apache quirks (equivalent of
 * drupal_urlencode() in PHP). This function should only be used on paths, not
 * on query string arguments.
 */
Drupal.encodeURIComponent = function (item, uri) {
  uri = uri || location.href;
  item = encodeURIComponent(item).replace(/%2F/g, '/');
  return (uri.indexOf('?q=') != -1) ? item : item.replace(/%26/g, '%2526').replace(/%23/g, '%2523').replace(/\/\//g, '/%252F');
};

/**
 * Get the text selection in a textarea.
 */
Drupal.getSelection = function (element) {
  if (typeof(element.selectionStart) != 'number' && document.selection) {
    // The current selection
    var range1 = document.selection.createRange();
    var range2 = range1.duplicate();
    // Select all text.
    range2.moveToElementText(element);
    // Now move 'dummy' end point to end point of original range.
    range2.setEndPoint('EndToEnd', range1);
    // Now we can calculate start and end points.
    var start = range2.text.length - range1.text.length;
    var end = start + range1.text.length;
    return { 'start': start, 'end': end };
  }
  return { 'start': element.selectionStart, 'end': element.selectionEnd };
};

/**
 * Build an error message from ahah response.
 */
Drupal.ahahError = function(xmlhttp, uri) {
  if (xmlhttp.status == 200) {
    if (jQuery.trim($(xmlhttp.responseText).text())) {
      var message = Drupal.t("An error occurred. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText });
    }
    else {
      var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri, '@text': xmlhttp.responseText });
    }
  }
  else {
    var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status });
  }
  return message;
}

// Global Killswitch on the <html> element
if (Drupal.jsEnabled) {
  // Global Killswitch on the <html> element
  $(document.documentElement).addClass('js');
  // 'js enabled' cookie
  document.cookie = 'has_js=1; path=/';
  // Attach all behaviors.
  $(document).ready(function() {
    Drupal.attachBehaviors(this);
  });
}

/**
 * The default themes.
 */
Drupal.theme.prototype = {

  /**
   * Formats text for emphasized display in a placeholder inside a sentence.
   *
   * @param str
   *   The text to format (plain-text).
   * @return
   *   The formatted text (html).
   */
  placeholder: function(str) {
    return '<em>' + Drupal.checkPlain(str) + '</em>';
  }
};
;
Drupal.locale = { 'strings': { "Unspecified error": "Uspesifisert feil", "The changes to these blocks will not be saved until the \x3cem\x3eSave blocks\x3c/em\x3e button is clicked.": "Forandringene for disse blokkene blir ikke lagret før du klikker på \x3cem\x3eLagre blokker\x3c/em\x3e.", "Your server has been successfully tested to support this feature.": "Din tjener støtter denne tjenesten.", "Your system configuration does not currently support this feature. The \x3ca href=\"http://drupal.org/node/15365\"\x3ehandbook page on Clean URLs\x3c/a\x3e has additional troubleshooting information.": "Ditt system støtter for tiden ikke denne funksjonen. \x3ca href=\"http://drupal.org/node/15365\"\x3eHåndbokens beskrivelse av rene URL-er\x3c/a\x3e har mer informasjon om dette.", "Testing clean URLs...": "Tester rene URL-er...", "Edit": "Rediger", "An error occurred. \n@uri\n@text": "Det oppstod en feil.\r\n@uri\r\n@text", "An error occurred. \n@uri\n(no information available).": "Det oppstod en feil. \r\n@uri\r\n(ingen informasjon tilgjengelig).", "An HTTP error @status occurred. \n@uri": "En HTTP feil @status oppsto.\r\n@uri", "Drag to re-order": "Dra og slipp for å forandre rekkefølgen", "Changes made in this table will not be saved until the form is submitted.": "Endringer i denne tabellen vil ikke bli lagret før skjemaet sendes.", "Select all rows in this table": "Velg alle rader i denne tabellen", "Deselect all rows in this table": "Ikke velg noen rader i denne tabellen", "Split summary at cursor": "Del oppsummeringen ved peker", "Join summary": "Sammenføy oppsummering" } };;

$(document).ready(function() {

  // Attach onclick event to document only and catch clicks on all elements.
  $(document.body).click(function(event) {
    // Catch only the first parent link of a clicked element.
    $(event.target).parents("a:first,area:first").andSelf().filter("a,area").each(function() {

      var ga = Drupal.settings.googleanalytics;
      // Expression to check for absolute internal links.
      var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
      // Expression to check for special links like gotwo.module /go/* links.
      var isInternalSpecial = new RegExp("(\/go\/.*)$", "i");
      // Expression to check for download links.
      var isDownload = new RegExp("\\.(" + ga.trackDownloadExtensions + ")$", "i");

      // Is the clicked URL internal?
      if (isInternal.test(this.href)) {
        // Is download tracking activated and the file extension configured for download tracking?
        if (ga.trackDownload && isDownload.test(this.href)) {
          // Download link clicked.
          var extension = isDownload.exec(this.href);
          _gaq.push(["_trackEvent", "Downloads", extension[1].toUpperCase(), this.href.replace(isInternal, '')]);
        }
        else if (isInternalSpecial.test(this.href)) {
          // Keep the internal URL for Google Analytics website overlay intact.
          _gaq.push(["_trackPageview", this.href.replace(isInternal, '')]);
        }
      }
      else {
        if (ga.trackMailto && $(this).is("a[href^=mailto:],area[href^=mailto:]")) {
          // Mailto link clicked.
          _gaq.push(["_trackEvent", "Mails", "Click", this.href.substring(7)]);
        }
        else if (ga.trackOutgoing && this.href) {
          if (ga.trackOutboundAsPageview) {
            // Track all external links as page views after URL cleanup.
            // Currently required, if click should be tracked as goal.
            _gaq.push(["_trackPageview", '/outbound/' + this.href.replace(/^(https?|ftp|news|nntp|telnet|irc|ssh|sftp|webcal):\/\//i, '').split('/').join('--')]);
          }
          else {
            // External link clicked.
            _gaq.push(["_trackEvent", "Outbound links", "Click", this.href]);
          }
        }
      }
    });
  });
});
;
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.88 (08-JUN-2010)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.2.6 or later
 */
(function($){var ver="2.88";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,(!opts2.rev&&!opts.backwards));},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,(!opts.rev&&!opts.backwards));}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.72
 * 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.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);;
// $Id: views_slideshow.js,v 1.1.2.1.2.39 2010/07/01 03:29:08 redndahead Exp $

/**
 *  @file
 *  A simple jQuery SingleFrame Div Slideshow Rotator.
 */

/**
 * This will set our initial behavior, by starting up each individual slideshow.
 */
Drupal.behaviors.viewsSlideshowSingleFrame = function (context) {
  $('.views_slideshow_singleframe_main:not(.viewsSlideshowSingleFrame-processed)', context).addClass('viewsSlideshowSingleFrame-processed').each(function() {
    var fullId = '#' + $(this).attr('id');
    var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId];
    settings.targetId = '#' + $(fullId + " :first").attr('id');
    settings.paused = false;

    settings.opts = {
      speed:settings.speed,
      timeout:parseInt(settings.timeout),
      delay:parseInt(settings.delay),
      sync:settings.sync==1,
      random:settings.random==1,
      pause:false,
      allowPagerClickBubble:(settings.pager_hover==1 || settings.pager_click_to_page),
      prev:(settings.controls > 0)?'#views_slideshow_singleframe_prev_' + settings.vss_id:null,
      next:(settings.controls > 0)?'#views_slideshow_singleframe_next_' + settings.vss_id:null,
      pager:(settings.pager > 0)?'#views_slideshow_singleframe_pager_' + settings.vss_id:null,
      nowrap:parseInt(settings.nowrap),
      pagerAnchorBuilder: function(idx, slide) {
        var classes = 'pager-item pager-num-' + (idx+1);
        if (idx == 0) {
          classes += ' first';
        }
        if ($(slide).siblings().length == idx) {
          classes += ' last';
        }

        if (idx % 2) {
          classes += ' odd';
        }
        else {
          classes += ' even';
        }
        
        var theme = 'viewsSlideshowPager' + settings.pager_type;
        return Drupal.theme.prototype[theme] ? Drupal.theme(theme, classes, idx, slide, settings) : '';
      },
      after:function(curr, next, opts) {
        // Used for Image Counter.
        if (settings.image_count) {
          $('#views_slideshow_singleframe_image_count_' + settings.vss_id + ' span.num').html(opts.currSlide + 1);
          $('#views_slideshow_singleframe_image_count_' + settings.vss_id + ' span.total').html(opts.slideCount);
        }
      },
      before:function(curr, next, opts) {
        // Remember last slide.
        if (settings.remember_slide) {
          createCookie(settings.vss_id, opts.currSlide + 1, settings.remember_slide_days);
        }

        // Make variable height.
        if (settings.fixed_height == 0) {
          //get the height of the current slide
          var $ht = $(this).height();
          //set the container's height to that of the current slide
          $(this).parent().animate({height: $ht});
        }
      },
      cleartype:(settings.ie.cleartype == 'true')? true : false,
      cleartypeNoBg:(settings.ie.cleartypenobg == 'true')? true : false
    }
    
    // Set the starting slide if we are supposed to remember the slide
    if (settings.remember_slide) {
      var startSlide = readCookie(settings.vss_id);
      if (startSlide == null) {
        startSlide = 0;
      }
      settings.opts.startingSlide =  startSlide;
    }

    if (settings.pager_hover == 1) {
      settings.opts.pagerEvent = 'mouseover';
      settings.opts.pauseOnPagerHover = true;
    }

    if (settings.effect == 'none') {
      settings.opts.speed = 1;
    }
    else {
      settings.opts.fx = settings.effect;
    }

    // Pause on hover.
    if (settings.pause == 1) {
      $('#views_slideshow_singleframe_teaser_section_' + settings.vss_id).hover(function() {
        $(settings.targetId).cycle('pause');
      }, function() {
        if (settings.paused == false) {
          $(settings.targetId).cycle('resume');
        }
      });
    }

    // Pause on clicking of the slide.
    if (settings.pause_on_click == 1) {
      $('#views_slideshow_singleframe_teaser_section_' + settings.vss_id).click(function() { 
        viewsSlideshowSingleFramePause(settings);
      });
    }

    // Add additional settings.
		if (settings.advanced != "\n") {
      var advanced = settings.advanced.split("\n");
      for (i=0; i<advanced.length; i++) {
        var prop = '';
        var value = '';
        var property = advanced[i].split(":");
        for (j=0; j<property.length; j++) {
          if (j == 0) {
            prop = property[j];
          }
          else if (j == 1) {
            value = property[j];
          }
          else {
            value += ":" + property[j];
          }
        }

        // Need to evaluate so true, false and numerics aren't a string.
        if (value == 'true' || value == 'false' || IsNumeric(value)) {
          value = eval(value);
        }
        else {
          // Parse strings into functions.
          var func = value.match(/function\s*\((.*?)\)\s*\{(.*)\}/i);
          if (func) {
            value = new Function(func[1].match(/(\w+)/g), func[2]);
          }
        }
	
        // Call both functions if prop was set previously.
        if (typeof(value) == "function" && prop in settings.opts) {
          var callboth = function(before_func, new_func) {
            return function() {
              before_func.apply(null, arguments);
              new_func.apply(null, arguments);
            };
          };
          settings.opts[prop] = callboth(settings.opts[prop], value);
        }
        else {
          settings.opts[prop] = value;
        }
      }
    }
    
    $(settings.targetId).cycle(settings.opts);

    // Start Paused
    if (settings.start_paused) {
      viewsSlideshowSingleFramePause(settings);
    }
    
    // Pause if hidden.
    if (settings.pause_when_hidden) {
      var checkPause = function(settings) {
        // If the slideshow is visible and it is paused then resume.
        // otherwise if the slideshow is not visible and it is not paused then
        // pause it.
        var visible = viewsSlideshowSingleFrameIsVisible(settings.targetId, settings.pause_when_hidden_type, settings.amount_allowed_visible);
        if (visible && settings.paused) {
          viewsSlideshowSingleFrameResume(settings);
        }
        else if (!visible && !settings.paused) {
          viewsSlideshowSingleFramePause(settings);
        }
      }
     
      // Check when scrolled.
      $(window).scroll(function() {
       checkPause(settings);
      });
      
      // Check when the window is resized.
      $(window).resize(function() {
        checkPause(settings);
      });
    }

    // Show image count for people who have js enabled.
    $('#views_slideshow_singleframe_image_count_' + settings.vss_id).show();

    if (settings.controls > 0) {
      // Show controls for people who have js enabled browsers.
      $('#views_slideshow_singleframe_controls_' + settings.vss_id).show();
      
      $('#views_slideshow_singleframe_playpause_' + settings.vss_id).click(function(e) {
      	if (settings.paused) {
      	  viewsSlideshowSingleFrameResume(settings);
      	}
      	else {
      	  viewsSlideshowSingleFramePause(settings);
      	}
        e.preventDefault();
      });
    }
  });
}

// Pause the slideshow 
viewsSlideshowSingleFramePause = function (settings) {
  //make Resume translatable
  var resume = Drupal.t('Resume');

  $(settings.targetId).cycle('pause');
  if (settings.controls > 0) {
    $('#views_slideshow_singleframe_playpause_' + settings.vss_id)
      .addClass('views_slideshow_singleframe_play')
      .addClass('views_slideshow_play')
      .removeClass('views_slideshow_singleframe_pause')
      .removeClass('views_slideshow_pause')
      .text(resume);
  }
  settings.paused = true;
}

// Resume the slideshow
viewsSlideshowSingleFrameResume = function (settings) {
  $(settings.targetId).cycle('resume');
  if (settings.controls > 0) {
    $('#views_slideshow_singleframe_playpause_' + settings.vss_id)
      .addClass('views_slideshow_singleframe_pause')
      .addClass('views_slideshow_pause')
      .removeClass('views_slideshow_singleframe_play')
      .removeClass('views_slideshow_play')
      .text('Pause');
  }
  settings.paused = false;
}

Drupal.theme.prototype.viewsSlideshowPagerThumbnails = function (classes, idx, slide, settings) {
  var href = '#';
  if (settings.pager_click_to_page) {
    href = $(slide).find('a').attr('href');
  }
  return '<div class="' + classes + '"><a href="' + href + '"><img src="' + $(slide).find('img').attr('src') + '" /></a></div>';
}

Drupal.theme.prototype.viewsSlideshowPagerNumbered = function (classes, idx, slide, settings) {
  var href = '#';
  if (settings.pager_click_to_page) {
    href = $(slide).find('a').attr('href');
  }
  return '<div class="' + classes + '"><a href="' + href + '">' + (idx+1) + '</a></div>';
}

// Verify that the value is a number.
function IsNumeric(sText) {
  var ValidChars = "0123456789";
  var IsNumber=true;
  var Char;

  for (var i=0; i < sText.length && IsNumber == true; i++) { 
    Char = sText.charAt(i); 
    if (ValidChars.indexOf(Char) == -1) {
      IsNumber = false;
    }
  }
  return IsNumber;
}

/**
 * Cookie Handling Functions
 */
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else {
    var expires = "";
  }
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) {
      return c.substring(nameEQ.length,c.length);
    }
  }
  return null;
}

function eraseCookie(name) {
  createCookie(name,"",-1);
}

/**
 * Checks to see if the slide is visible enough.
 * elem = element to check.
 * type = The way to calculate how much is visible.
 * amountVisible = amount that should be visible. Either in percent or px. If
 *                it's not defined then all of the slide must be visible.
 *
 * Returns true or false
 */
function viewsSlideshowSingleFrameIsVisible(elem, type, amountVisible) {
  // Get the top and bottom of the window;
  var docViewTop = $(window).scrollTop();
  var docViewBottom = docViewTop + $(window).height();
  var docViewLeft = $(window).scrollLeft();
  var docViewRight = docViewLeft + $(window).width();

  // Get the top, bottom, and height of the slide;
  var elemTop = $(elem).offset().top;
  var elemHeight = $(elem).height();
  var elemBottom = elemTop + elemHeight;
  var elemLeft = $(elem).offset().left;
  var elemWidth = $(elem).width();
  var elemRight = elemLeft + elemWidth;
  var elemArea = elemHeight * elemWidth;
  
  // Calculate what's hiding in the slide.
  var missingLeft = 0;
  var missingRight = 0;
  var missingTop = 0;
  var missingBottom = 0;
  
  // Find out how much of the slide is missing from the left.
  if (elemLeft < docViewLeft) {
    missingLeft = docViewLeft - elemLeft;
  }

  // Find out how much of the slide is missing from the right.
  if (elemRight > docViewRight) {
    missingRight = elemRight - docViewRight;
  }
  
  // Find out how much of the slide is missing from the top.
  if (elemTop < docViewTop) {
    missingTop = docViewTop - elemTop;
  }

  // Find out how much of the slide is missing from the bottom.
  if (elemBottom > docViewBottom) {
    missingBottom = elemBottom - docViewBottom;
  }
  
  // If there is no amountVisible defined then check to see if the whole slide
  // is visible.
  if (type == 'full') {
    return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)
    && (elemBottom <= docViewBottom) &&  (elemTop >= docViewTop)
    && (elemLeft >= docViewLeft) && (elemRight <= docViewRight)
    && (elemLeft <= docViewRight) && (elemRight >= docViewLeft));
  }
  else if(type == 'vertical') {
    var verticalShowing = elemHeight - missingTop - missingBottom;
    
    // If user specified a percentage then find out if the current shown percent
    // is larger than the allowed percent.
    // Otherwise check to see if the amount of px shown is larger than the
    // allotted amount.
    if (amountVisible.indexOf('%')) {
      return (((verticalShowing/elemHeight)*100) >= parseInt(amountVisible));
    }
    else {
      return (verticalShowing >= parseInt(amountVisible));
    }
  }
  else if(type == 'horizontal') {
    var horizontalShowing = elemWidth - missingLeft - missingRight;
    
    // If user specified a percentage then find out if the current shown percent
    // is larger than the allowed percent.
    // Otherwise check to see if the amount of px shown is larger than the
    // allotted amount.
    if (amountVisible.indexOf('%')) {
      return (((horizontalShowing/elemWidth)*100) >= parseInt(amountVisible));
    }
    else {
      return (horizontalShowing >= parseInt(amountVisible));
    }
  }
  else if(type == 'area') {
    var areaShowing = (elemWidth - missingLeft - missingRight) * (elemHeight - missingTop - missingBottom);
    
    // If user specified a percentage then find out if the current shown percent
    // is larger than the allowed percent.
    // Otherwise check to see if the amount of px shown is larger than the
    // allotted amount.
    if (amountVisible.indexOf('%')) {
      return (((areaShowing/elemArea)*100) >= parseInt(amountVisible));
    }
    else {
      return (areaShowing >= parseInt(amountVisible));
    }
  }
}

;
// $Id: views_slideshow.js,v 1.1.2.2.2.35 2010/07/01 03:29:08 redndahead Exp $

/**
 * @file
 * A simple jQuery ThumbnailHover Div Slideshow Rotator.
 */

/**
 * This will set our initial behavior, by starting up each individual slideshow.
 */
Drupal.behaviors.viewsSlideshowThumbnailHover = function (context) {
  $('.views_slideshow_thumbnailhover_main:not(.viewsSlideshowThumbnailHover-processed)', context).addClass('viewsSlideshowThumbnailHover-processed').each(function() {
    var fullId = '#' + $(this).attr('id');
    var settings = Drupal.settings.viewsSlideshowThumbnailHover[fullId];
    settings.targetId = '#' + $(fullId + " :first").attr('id');
		settings.paused = false;
		
    settings.opts = {
      speed:settings.speed,
      timeout:parseInt(settings.timeout),
      delay:parseInt(settings.delay),
      sync:settings.sync==1,
      random:settings.random==1,
      pause:false,
      allowPagerClickBubble:(settings.pager_event=='click')? false : true,
      pager:(settings.pager_event == 'hoverIntent') ? null : '#views_slideshow_breakout_teasers_' + settings.vss_id,
      nowrap:parseInt(settings.nowrap),
      pagerAnchorBuilder:(settings.pager_event == 'hoverIntent') ? null : function(idx, slide) { 
        return '#views_slideshow_thumbnailhover_div_breakout_teaser_' + settings.vss_id + '_' + idx; 
      },
      after:function(curr, next, opts) {
        // Used for Image Counter.
        if (settings.image_count) {
          $('#views_slideshow_thumbnailhover_image_count_' + settings.vss_id + ' span.num').html(opts.currSlide + 1);
          $('#views_slideshow_thumbnailhover_image_count_' + settings.vss_id + ' span.total').html(opts.slideCount);
        }
      },
      before:function(current, next, opts) {
        // Remember last slide.
        if (settings.remember_slide) {
          createCookie(settings.view_id, opts.currSlide + 1, settings.remember_slide_days);
        }

        // Make variable height.
        if (settings.fixed_height == 0) {
          //get the height of the current slide
          var $ht = $(this).height();
          //set the container's height to that of the current slide
          $(this).parent().animate({height: $ht});
        }
        
        var currId = (currId=$(current).attr('id')).substring(currId.lastIndexOf('_')+1)
        var nextId = (nextId=$(next).attr('id')).substring(nextId.lastIndexOf('_')+1)
        $('#views_slideshow_thumbnailhover_div_breakout_teaser_' + settings.vss_id + '_' + currId).removeClass('activeSlide');
        $('#views_slideshow_thumbnailhover_div_breakout_teaser_' + settings.vss_id + '_' + nextId).addClass('activeSlide');
      },
      pagerEvent: (settings.pager_event == 'hoverIntent') ? null : settings.pager_event,
      prev:(settings.controls > 0)?'#views_slideshow_thumbnailhover_prev_' + settings.vss_id:null,
      next:(settings.controls > 0)?'#views_slideshow_thumbnailhover_next_' + settings.vss_id:null,
      cleartype:(settings.ie.cleartype == 'true')? true : false,
      cleartypeNoBg:(settings.ie.cleartypenobg == 'true')? true : false
    };

    // Set the starting slide if we are supposed to remember the slide
    if (settings.remember_slide) {
      var startSlide = readCookie(settings.view_id);
      if (startSlide == null) {
        startSlide = 0;
      }
      settings.opts.startingSlide =  startSlide;
    }

    if (settings.effect == 'none') {
      settings.opts.speed = 1;
    }
    else {
      settings.opts.fx = settings.effect;
    }

    // Pause on hover.
    if (settings.pause == 1) {
      $('#views_slideshow_thumbnailhover_teaser_section_' + settings.vss_id).hover(function() {
        $(settings.targetId).cycle('pause');
      }, function() {
        if (settings.paused == false) {
          $(settings.targetId).cycle('resume');
        }
      });
    }

    // Pause on clicking of the slide.
    if (settings.pause_on_click == 1) {
      $('#views_slideshow_thumbnailhover_teaser_section_' + settings.vss_id).click(function() { 
        viewsSlideshowThumbnailHoverPause(settings);
      });
    }
    
    // Add additional settings.
		if (settings.advanced != "\n") {
      var advanced = settings.advanced.split("\n");
      for (i=0; i<advanced.length; i++) {
        var prop = '';
        var value = '';
        var property = advanced[i].split(":");
        for (j=0; j<property.length; j++) {
          if (j == 0) {
            prop = property[j];
          }
          else if (j == 1) {
            value = property[j];
          }
          else {
            value += ":" + property[j];
          }
        }

        // Need to evaluate so true, false and numerics aren't a string.
        if (value == 'true' || value == 'false' || IsNumeric(value)) {
          value = eval(value);
        }
        else {
          // Parse strings into functions.
          var func = value.match(/function\s*\((.*?)\)\s*\{(.*)\}/i);
          if (func) {
            value = new Function(func[1].match(/(\w+)/g), func[2]);
          }
        }
	
        // Call both functions if prop was set previously.
        if (typeof(value) == "function" && prop in settings.opts) {
          var callboth = function(before_func, new_func) {
            return function() {
              before_func.apply(null, arguments);
              new_func.apply(null, arguments);
            };
          };
          settings.opts[prop] = callboth(settings.opts[prop], value);
        }
        else {
          settings.opts[prop] = value;
        }
      }
    }

    $(settings.targetId).cycle(settings.opts);

    // Start Paused
    if (settings.start_paused) {
      viewsSlideshowThumbnailHoverPause(settings);
    }
    
    // Pause if hidden.
    if (settings.pause_when_hidden) {
      var checkPause = function(settings) {
        // If the slideshow is visible and it is paused then resume.
        // otherwise if the slideshow is not visible and it is not paused then
        // pause it.
        var visible = viewsSlideshowThumbnailHoverIsVisible(settings.targetId, settings.pause_when_hidden_type, settings.amount_allowed_visible);
        if (visible && settings.paused) {
          viewsSlideshowThumbnailHoverResume(settings);
        }
        else if (!visible && !settings.paused) {
          viewsSlideshowThumbnailHoverPause(settings);
        }
      }
     
      // Check when scrolled.
      $(window).scroll(function() {
       checkPause(settings);
      });
      
      // Check when window is resized.
      $(window).resize(function() {
        checkPause(settings);
      });
    }

    // Show image count for people who have js enabled.
    $('#views_slideshow_thumbnailhover_image_count_' + settings.vss_id).show();
    
    if (settings.pager_event == 'hoverIntent') {
      $('#views_slideshow_thumbnailhover_breakout_teasers_' + settings.vss_id + ' .views_slideshow_thumbnailhover_div_breakout_teaser').each(function(i,obj) {
        $(obj).hoverIntent(
          function() {
            $('.views_slideshow_thumbnailhover_div_breakout_teaser').removeClass('activeSlide');
            var id = $(this).attr('id');
            id = parseInt(id.substring(id.lastIndexOf('_')+1));
            $(settings.targetId).cycle(id);
            $('#views_slideshow_thumbnailhover_div_breakout_teaser_' + settings.vss_id + '_' + id).addClass('activeSlide');
            $(settings.targetId).cycle('stop');
          },
          function() {
            var id = $(this).attr('id');
            settings.opts.startingSlide = parseInt(id.substring(id.lastIndexOf('_')+1));
            $(settings.targetId).cycle(settings.opts);
          }
        );
      });
    }

    if (settings.controls > 0) {
      // Show controls for people who have js enabled browsers.
      $('#views_slideshow_thumbnailhover_controls_' + settings.vss_id).show();
      
      $('#views_slideshow_thumbnailhover_playpause_' + settings.vss_id).click(function(e) {
        if (settings.paused) {
          viewsSlideshowThumbnailHoverResume(settings);
        }
        else {
          viewsSlideshowThumbnailHoverPause(settings);
        }
        e.preventDefault();
      });
    }
  });
}

// Pause the slideshow 
viewsSlideshowThumbnailHoverPause = function (settings) {
  //make Resume translatable
  var resume = Drupal.t('Resume');

  $(settings.targetId).cycle('pause');
  if (settings.controls > 0) {
    $('#views_slideshow_thumbnailhover_playpause_' + settings.vss_id)
      .addClass('views_slideshow_thumbnailhover_play')
      .addClass('views_slideshow_play')
      .removeClass('views_slideshow_thumbnailhover_pause')
      .removeClass('views_slideshow_pause')
      .text(resume);
  }
  settings.paused = true;
}

// Resume the slideshow
viewsSlideshowThumbnailHoverResume = function (settings) {
  $(settings.targetId).cycle('resume');
  if (settings.controls > 0) {
    $('#views_slideshow_thumbnailhover_playpause_' + settings.vss_id)
      .addClass('views_slideshow_thumbnailhover_pause')
      .addClass('views_slideshow_pause')
      .removeClass('views_slideshow_thumbnailhover_play')
      .removeClass('views_slideshow_play')
      .text('Pause');
  }
  settings.paused = false;
}

// Verify that the value is a number.
function IsNumeric(sText) {
  var ValidChars = "0123456789";
  var IsNumber=true;
  var Char;

  for (var i=0; i < sText.length && IsNumber == true; i++) { 
    Char = sText.charAt(i); 
    if (ValidChars.indexOf(Char) == -1) {
      IsNumber = false;
    }
  }
  return IsNumber;
}

/**
 * Cookie Handling Functions
 */
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else {
    var expires = "";
  }
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) {
      return c.substring(nameEQ.length,c.length);
    }
  }
  return null;
}

function eraseCookie(name) {
  createCookie(name,"",-1);
}

/**
 * Checks to see if the slide is visible enough.
 * elem = element to check.
 * amountVisible = amount that should be visible. Either in percent or px. If
 *                it's not defined then all of the slide must be visible.
 *
 * Returns true or false
 */
function viewsSlideshowThumbnailHoverIsVisible(elem, type, amountVisible) {
  // Get the top and bottom of the window;
  var docViewTop = $(window).scrollTop();
  var docViewBottom = docViewTop + $(window).height();
  var docViewLeft = $(window).scrollLeft();
  var docViewRight = docViewLeft + $(window).width();

  // Get the top, bottom, and height of the slide;
  var elemTop = $(elem).offset().top;
  var elemHeight = $(elem).height();
  var elemBottom = elemTop + elemHeight;
  var elemLeft = $(elem).offset().left;
  var elemWidth = $(elem).width();
  var elemRight = elemLeft + elemWidth;
  var elemArea = elemHeight * elemWidth;
  
  // Calculate what's hiding in the slide.
  var missingLeft = 0;
  var missingRight = 0;
  var missingTop = 0;
  var missingBottom = 0;
  
  // Find out how much of the slide is missing from the left.
  if (elemLeft < docViewLeft) {
    missingLeft = docViewLeft - elemLeft;
  }

  // Find out how much of the slide is missing from the right.
  if (elemRight > docViewRight) {
    missingRight = elemRight - docViewRight;
  }
  
  // Find out how much of the slide is missing from the top.
  if (elemTop < docViewTop) {
    missingTop = docViewTop - elemTop;
  }

  // Find out how much of the slide is missing from the bottom.
  if (elemBottom > docViewBottom) {
    missingBottom = elemBottom - docViewBottom;
  }
  
  // If there is no amountVisible defined then check to see if the whole slide
  // is visible.
  if (type == 'full') {
    return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)
    && (elemBottom <= docViewBottom) &&  (elemTop >= docViewTop)
    && (elemLeft >= docViewLeft) && (elemRight <= docViewRight)
    && (elemLeft <= docViewRight) && (elemRight >= docViewLeft));
  }
  else if(type == 'vertical') {
    var verticalShowing = elemHeight - missingTop - missingBottom;
    
    // If user specified a percentage then find out if the current shown percent
    // is larger than the allowed percent.
    // Otherwise check to see if the amount of px shown is larger than the
    // allotted amount.
    if (amountVisible.indexOf('%')) {
      return (((verticalShowing/elemHeight)*100) >= parseInt(amountVisible));
    }
    else {
      return (verticalShowing >= parseInt(amountVisible));
    }
  }
  else if(type == 'horizontal') {
    var horizontalShowing = elemWidth - missingLeft - missingRight;
    
    // If user specified a percentage then find out if the current shown percent
    // is larger than the allowed percent.
    // Otherwise check to see if the amount of px shown is larger than the
    // allotted amount.
    if (amountVisible.indexOf('%')) {
      return (((horizontalShowing/elemWidth)*100) >= parseInt(amountVisible));
    }
    else {
      return (horizontalShowing >= parseInt(amountVisible));
    }
  }
  else if(type == 'area') {
    var areaShowing = (elemWidth - missingLeft - missingRight) * (elemHeight - missingTop - missingBottom);
    
    // If user specified a percentage then find out if the current shown percent
    // is larger than the allowed percent.
    // Otherwise check to see if the amount of px shown is larger than the
    // allotted amount.
    if (amountVisible.indexOf('%')) {
      return (((areaShowing/elemArea)*100) >= parseInt(amountVisible));
    }
    else {
      return (areaShowing >= parseInt(amountVisible));
    }
  }
}
;
function actb(_1,ca){this.actb_timeOut=-1;this.actb_lim=4;this.actb_firstText=false;this.actb_mouse=true;this.actb_delimiter=new Array(";",",");this.actb_startcheck=1;this.actb_bgColor="#888888";this.actb_textColor="#FFFFFF";this.actb_hColor="#000000";this.actb_fFamily="Verdana";this.actb_fSize="11px";this.actb_hStyle="text-decoration:underline;font-weight=\"bold\"";var _2=new Array();var _3=0;var _4=new Array();var _5=false;var _6=0;var _7=0;var _8=null;var _9=0;var _a=0;var _b=new Array();var _c=0;var _d;var _e=false;var _f="";var _10=1;var _11=0;var _12=false;this.actb_keywords=new Array();this.actb_keywords=ca;var _13=this;_8=_1;addEvent(_8,"focus",_14);function _14(){addEvent(document,"keydown",_15);addEvent(_8,"blur",_16);addEvent(document,"keypress",_17);};function _16(evt){if(!evt){evt=event;}removeEvent(document,"keydown",_15);removeEvent(_8,"blur",_16);removeEvent(document,"keypress",_17);_18();};function _19(n){if(_13.actb_delimiter.length>0){var t=_2[_3].trim().addslashes();var _1a=_2[_3].trim().length;}else{var t=_8.value.addslashes();var _1a=_8.value.length;}var _1b="";var i;if(_13.actb_firstText){var re=new RegExp("^"+t,"i");}else{var re=new RegExp(t,"i");}var p=n.search(re);for(i=0;i<p;i++){_1b+=n.substr(i,1);}_1b+="<font style='"+(_13.actb_hStyle)+"'>";for(i=p;i<_1a+p;i++){_1b+=n.substr(i,1);}_1b+="</font>";for(i=_1a+p;i<n.length;i++){_1b+=n.substr(i,1);}return _1b;};function _1c(){if(document.getElementById("tat_table")){_5=false;document.body.removeChild(document.getElementById("tat_table"));}if(_11==0){_5=false;return;}a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.top=eval(curTop(_8)+_8.offsetHeight)+"px";a.style.left=curLeft(_8)+"px";a.style.backgroundColor=_13.actb_bgColor;a.id="tat_table";document.body.appendChild(a);var i;var _1d=true;var j=1;if(_13.actb_mouse){a.onmouseout=_1e;a.onmouseover=_1f;}var _20=0;for(i=0;i<_13.actb_keywords.length;i++){if(_b[i]){_20++;r=a.insertRow(-1);if(_1d&&!_e){r.style.backgroundColor=_13.actb_hColor;_1d=false;_6=_20;}else{if(_c==i){r.style.backgroundColor=_13.actb_hColor;_1d=false;_6=_20;}else{r.style.backgroundColor=_13.actb_bgColor;}}r.id="tat_tr"+(j);c=r.insertCell(-1);c.style.color=_13.actb_textColor;c.style.fontFamily=_13.actb_fFamily;c.style.fontSize=_13.actb_fSize;c.innerHTML=_19(_13.actb_keywords[i]);c.id="tat_td"+(j);c.setAttribute("pos",j);if(_13.actb_mouse){c.style.cursor="pointer";c.onclick=_21;c.onmouseover=_22;}j++;}if(j-1==_13.actb_lim&&j<_7){r=a.insertRow(-1);r.style.backgroundColor=_13.actb_bgColor;c=r.insertCell(-1);c.style.color=_13.actb_textColor;c.style.fontFamily="arial narrow";c.style.fontSize=_13.actb_fSize;c.align="center";replaceHTML(c,"\\/");if(_13.actb_mouse){c.style.cursor="pointer";c.onclick=_23;}break;}}_9=1;_a=j-1;_5=true;if(_6<=0){_6=1;}};function _24(){document.body.removeChild(document.getElementById("tat_table"));a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.top=eval(curTop(_8)+_8.offsetHeight)+"px";a.style.left=curLeft(_8)+"px";a.style.backgroundColor=_13.actb_bgColor;a.id="tat_table";if(_13.actb_mouse){a.onmouseout=_1e;a.onmouseover=_1f;}document.body.appendChild(a);var i;var _25=true;var j=1;if(_9>1){r=a.insertRow(-1);r.style.backgroundColor=_13.actb_bgColor;c=r.insertCell(-1);c.style.color=_13.actb_textColor;c.style.fontFamily="arial narrow";c.style.fontSize=_13.actb_fSize;c.align="center";replaceHTML(c,"/\\");if(_13.actb_mouse){c.style.cursor="pointer";c.onclick=_26;}}for(i=0;i<_13.actb_keywords.length;i++){if(_b[i]){if(j>=_9&&j<=_a){r=a.insertRow(-1);r.style.backgroundColor=_13.actb_bgColor;r.id="tat_tr"+(j);c=r.insertCell(-1);c.style.color=_13.actb_textColor;c.style.fontFamily=_13.actb_fFamily;c.style.fontSize=_13.actb_fSize;c.innerHTML=_19(_13.actb_keywords[i]);c.id="tat_td"+(j);c.setAttribute("pos",j);if(_13.actb_mouse){c.style.cursor="pointer";c.onclick=_21;c.onmouseover=_22;}j++;}else{j++;}}if(j>_a){break;}}if(j-1<_7){r=a.insertRow(-1);r.style.backgroundColor=_13.actb_bgColor;c=r.insertCell(-1);c.style.color=_13.actb_textColor;c.style.fontFamily="arial narrow";c.style.fontSize=_13.actb_fSize;c.align="center";replaceHTML(c,"\\/");if(_13.actb_mouse){c.style.cursor="pointer";c.onclick=_23;}}};function _27(){if(!_5){return;}if(_6==1){return;}document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_bgColor;_6--;if(_6<_9){_28();}document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_hColor;if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}};function _29(){if(!_5){return;}if(_6==_7){return;}document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_bgColor;_6++;if(_6>_a){_2a();}document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_hColor;if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}};function _2a(){_9++;_a++;_24();};function _28(){_9--;_a--;_24();};function _23(){document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_bgColor;_6++;_2a();document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_hColor;_8.focus();_10=0;if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}};function _26(evt){if(!evt){evt=event;}if(evt.stopPropagation){evt.stopPropagation();}else{evt.cancelBubble=true;}document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_bgColor;_6--;_28();document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_hColor;_8.focus();_10=0;if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}};function _21(evt){if(!evt){evt=event;}if(!_5){return;}_10=0;_6=this.getAttribute("pos");_2b();};function _1f(){_10=1;};function _1e(){_10=0;if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}};function _22(){_10=1;document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_bgColor;_6=this.getAttribute("pos");while(_6<_9){_28();}while(_6>_a){_2a();}document.getElementById("tat_tr"+_6).style.backgroundColor=_13.actb_hColor;if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}};function _2c(a){if(_13.actb_delimiter.length>0){str="";l=0;for(i=0;i<_2.length;i++){if(_3==i){prespace=postspace="";gotbreak=false;for(j=0;j<_2[i].length;++j){if(_2[i].charAt(j)!=" "){gotbreak=true;break;}prespace+=" ";}for(j=_2[i].length-1;j>=0;--j){if(_2[i].charAt(j)!=" "){break;}postspace+=" ";}str+=prespace;str+=a;l=str.length;if(gotbreak){str+=postspace;}}else{str+=_2[i];}if(i!=_2.length-1){str+=_4[i];}}_8.value=str;setCaret(_8,l);}else{_8.value=a;}_10=0;_18();};function _2b(){if(!_5){return;}_5=false;var _2d="";var c=0;for(var i=0;i<=_13.actb_keywords.length;i++){if(_b[i]){c++;}if(c==_6){_2d=_13.actb_keywords[i];break;}}_2c(_2d);l=getCaretStart(_8);};function _18(){if(_10==0){_5=0;if(document.getElementById("tat_table")){document.body.removeChild(document.getElementById("tat_table"));}if(_d){clearTimeout(_d);}}};function _17(e){if(_12){stopEvent(e);}return !_12;};function _15(evt){if(!evt){evt=event;}a=evt.keyCode;caret_pos_start=getCaretStart(_8);_12=0;switch(a){case 38:_27();_12=1;return false;break;case 40:_29();_12=1;return false;break;case 13:case 9:if(_5){_12=1;_2b();return false;}else{return true;}break;default:setTimeout(function(){_2e(a);},50);break;}};function _2e(kc){if(kc==38||kc==40||kc==13){return;}var i;if(_5){var _2f=0;var c=0;for(var i=0;i<=_13.actb_keywords.length;i++){if(_b[i]){c++;}if(c==_6){_2f=i;break;}}_c=_2f;}else{_c=-1;}if(_8.value==""){_10=0;_18();return;}if(_13.actb_delimiter.length>0){caret_pos_start=getCaretStart(_8);caret_pos_end=getCaretEnd(_8);delim_split="";for(i=0;i<_13.actb_delimiter.length;i++){delim_split+=_13.actb_delimiter[i];}delim_split=delim_split.addslashes();delim_split_rx=new RegExp("(["+delim_split+"])");c=0;_2=new Array();_2[0]="";for(i=0,j=_8.value.length;i<_8.value.length;i++,j--){if(_8.value.substr(i,j).search(delim_split_rx)==0){ma=_8.value.substr(i,j).match(delim_split_rx);_4[c]=ma[1];c++;_2[c]="";}else{_2[c]+=_8.value.charAt(i);}}var l=0;_3=-1;for(i=0;i<_2.length;i++){if(caret_pos_end>=l&&caret_pos_end<=l+_2[i].length){_3=i;}l+=_2[i].length+1;}var ot=_2[_3].trim();var t=_2[_3].addslashes().trim();}else{var ot=_8.value;var t=_8.value.addslashes();}if(ot.length==0){_10=0;_18();}if(ot.length<_13.actb_startcheck){return this;}if(_13.actb_firstText){var re=new RegExp("^"+t,"i");}else{var re=new RegExp(t,"i");}_7=0;_e=false;_11=0;for(i=0;i<_13.actb_keywords.length;i++){_b[i]=false;if(re.test(_13.actb_keywords[i])){_7++;_b[i]=true;_11++;if(_c==i){_e=true;}}}if(_d){clearTimeout(_d);}if(_13.actb_timeOut>0){_d=setTimeout(function(){_10=0;_18();},_13.actb_timeOut);}_1c();};return this;};;
function addEvent(_1,_2,_3){if(_1.attachEvent){_1.attachEvent("on"+_2,_3);}else{if(_1.addEventListener){_1.addEventListener(_2,_3,true);}else{_1["on"+_2]=_3;}}};function removeEvent(_4,_5,_6){if(_4.detachEvent){_4.detachEvent("on"+_5,_6);}else{if(_4.removeEventListener){_4.removeEventListener(_5,_6,true);}else{_4["on"+_5]=null;}}};function stopEvent(_7){_7||window.event;if(_7.stopPropagation){_7.stopPropagation();_7.preventDefault();}else{if(typeof _7.cancelBubble!="undefined"){_7.cancelBubble=true;_7.returnValue=false;}}return false;};function getElement(_8){if(window.event){return window.event.srcElement;}else{return _8.currentTarget;}};function getTargetElement(_9){if(window.event){return window.event.srcElement;}else{return _9.target;}};function stopSelect(_a){if(typeof _a.onselectstart!="undefined"){addEvent(_a,"selectstart",function(){return false;});}};function getCaretEnd(_b){if(typeof _b.selectionEnd!="undefined"){return _b.selectionEnd;}else{if(document.selection&&document.selection.createRange){var M=document.selection.createRange();try{var Lp=M.duplicate();Lp.moveToElementText(_b);}catch(e){var Lp=_b.createTextRange();}Lp.setEndPoint("EndToEnd",M);var rb=Lp.text.length;if(rb>_b.value.length){return -1;}return rb;}}};function getCaretStart(_c){if(typeof _c.selectionStart!="undefined"){return _c.selectionStart;}else{if(document.selection&&document.selection.createRange){var M=document.selection.createRange();try{var Lp=M.duplicate();Lp.moveToElementText(_c);}catch(e){var Lp=_c.createTextRange();}Lp.setEndPoint("EndToStart",M);var rb=Lp.text.length;if(rb>_c.value.length){return -1;}return rb;}}};function setCaret(_d,l){_d.focus();if(_d.setSelectionRange){_d.setSelectionRange(l,l);}else{if(_d.createTextRange){m=_d.createTextRange();m.moveStart("character",l);m.collapse();m.select();}}};function setSelection(_e,s,e){_e.focus();if(_e.setSelectionRange){_e.setSelectionRange(s,e);}else{if(_e.createTextRange){m=_e.createTextRange();m.moveStart("character",s);m.moveEnd("character",e);m.select();}}};String.prototype.addslashes=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1");};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1");};function curTop(_f){toreturn=0;while(_f){toreturn+=_f.offsetTop;_f=_f.offsetParent;}return toreturn;};function curLeft(obj){toreturn=0;while(obj){toreturn+=obj.offsetLeft;obj=obj.offsetParent;}return toreturn;};function isNumber(a){return typeof a=="number"&&isFinite(a);};function replaceHTML(obj,_10){while(el=obj.childNodes[0]){obj.removeChild(el);}obj.appendChild(document.createTextNode(_10));};;
var turnOffYearSpan=false;var weekStartsOnSunday=false;var showWeekNumber=true;var languageCode="no";var calendar_display_time=true;var todayStringFormat="[todayString] [UCFdayString]. [day]. [monthString] [year]";var pathToImages="sites/all/standalone/abo/oo_form_pro/img/dpimgs/";var speedOfSelectBoxSliding=200;var intervalSelectBox_minutes=5;var calendar_offsetTop=0;var calendar_offsetLeft=0;var calendarDiv=false;var MSIE=false;var Opera=false;if(navigator.userAgent.indexOf("MSIE")>=0&&navigator.userAgent.indexOf("Opera")<0){MSIE=true;}if(navigator.userAgent.indexOf("Opera")>=0){Opera=true;}switch(languageCode){case "en":var monthArray=["January","February","March","April","May","June","July","August","September","October","November","December"];var monthArrayShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var dayArray=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];var weekString="Week";var todayString="";break;case "ge":var monthArray=["Januar","Februar","M?rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];var monthArrayShort=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"];var dayArray=["Mon","Die","Mit","Don","Fre","Sam","Son"];var weekString="Woche";var todayString="Heute";break;case "no":var monthArray=["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"];var monthArrayShort=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"];var dayArray=["Man","Tir","Ons","Tor","Fre","L&oslash;r","S&oslash;n"];var weekString="Uke";var todayString="";break;case "nl":var monthArray=["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"];var monthArrayShort=["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"];var dayArray=["Ma","Di","Wo","Do","Vr","Za","Zo"];var weekString="Week";var todayString="Vandaag";break;case "es":var monthArray=["Enero","Febrero","Marzo","April","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];var monthArrayShort=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"];var dayArray=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];var weekString="Semana";var todayString="Hoy es";break;case "pt-br":var monthArray=["Janeiro","Fevereiro","Mar&ccedil;o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"];var monthArrayShort=["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"];var dayArray=["Seg","Ter","Qua","Qui","Sex","S&aacute;b","Dom"];var weekString="Sem.";var todayString="Hoje &eacute;";break;case "fr":var monthArray=["Janvier","F?vrier","Mars","Avril","Mai","Juin","Juillet","Ao?t","Septembre","Octobre","Novembre","D?cembre"];var monthArrayShort=["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"];var dayArray=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"];var weekString="Sem";var todayString="Aujourd'hui";break;case "da":var monthArray=["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"];var monthArrayShort=["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"];var dayArray=["man","tirs","ons","tors","fre","l&oslash;r","s&oslash;n"];var weekString="Uge";var todayString="";break;case "hu":var monthArray=["Janu??r","Febru??r","M??rcius","??prilis","M??jus","J??nius","J??lius","Augusztus","Szeptember","Okt??ber","November","December"];var monthArrayShort=["Jan","Feb","M??rc","??pr","M??j","J??n","J??l","Aug","Szep","Okt","Nov","Dec"];var dayArray=["H??","Ke","Sze","Cs","P??","Szo","Vas"];var weekString="H??t";var todayString="Mai nap";break;case "it":var monthArray=["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"];var monthArrayShort=["Gen","Feb","Mar","Apr","Mag","Giu","Lugl","Ago","Set","Ott","Nov","Dic"];var dayArray=["Lun",";Mar","Mer","Gio","Ven","Sab","Dom"];var weekString="Settimana";var todayString="Oggi &egrave; il";break;case "sv":var monthArray=["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];var monthArrayShort=["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"];var dayArray=["M&aring;n","Tis","Ons","Tor","Fre","L&ouml;r","S&ouml;n"];var weekString="Vecka";var todayString="";break;}if(weekStartsOnSunday){var tempDayName=dayArray[6];for(var theIx=6;theIx>0;theIx--){dayArray[theIx]=dayArray[theIx-1];}dayArray[0]=tempDayName;}var daysInMonthArray=[31,28,31,30,31,30,31,31,30,31,30,31];var currentMonth;var currentYear;var currentHour;var currentMinute;var calendarContentDiv;var returnDateTo;var returnFormat;var activeSelectBoxMonth;var activeSelectBoxYear;var activeSelectBoxHour;var activeSelectBoxMinute;var iframeObj=false;var iframeObj2=false;function EIS_FIX_EI1(_1){if(!iframeObj2){return;}iframeObj2.style.display="block";iframeObj2.style.height=document.getElementById(_1).offsetHeight+1;iframeObj2.style.width=document.getElementById(_1).offsetWidth;iframeObj2.style.left=getleftPos(document.getElementById(_1))+1-calendar_offsetLeft;iframeObj2.style.top=getTopPos(document.getElementById(_1))-document.getElementById(_1).offsetHeight-calendar_offsetTop;};function EIS_Hide_Frame(){if(iframeObj2){iframeObj2.style.display="none";}};var returnDateToYear;var returnDateToMonth;var returnDateToDay;var returnDateToHour;var returnDateToMinute;var inputYear;var inputMonth;var inputDay;var inputHour;var inputMinute;var calendarDisplayTime=false;var selectBoxHighlightColor="#D60808";var selectBoxRolloverBgColor="#E2EBED";var selectBoxMovementInProgress=false;var activeSelectBox=false;function cancelCalendarEvent(){return false;};function isLeapYear(_2){if(_2%400==0||(_2%4==0&&_2%100!=0)){return true;}return false;};var activeSelectBoxMonth=false;var activeSelectBoxDirection=false;function highlightMonthYear(){if(activeSelectBoxMonth){activeSelectBoxMonth.className="";}activeSelectBox=this;if(this.className=="monthYearActive"){this.className="";}else{this.className="monthYearActive";activeSelectBoxMonth=this;}if(this.innerHTML.indexOf("-")>=0||this.innerHTML.indexOf("+")>=0){if(this.className=="monthYearActive"){selectBoxMovementInProgress=true;}else{selectBoxMovementInProgress=false;}if(this.innerHTML.indexOf("-")>=0){activeSelectBoxDirection=-1;}else{activeSelectBoxDirection=1;}}else{selectBoxMovementInProgress=false;}};function showMonthDropDown(){if(document.getElementById("monthDropDown").style.display=="block"){document.getElementById("monthDropDown").style.display="none";EIS_Hide_Frame();}else{document.getElementById("monthDropDown").style.display="block";document.getElementById("yearDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("monthDropDown");}}};function showYearDropDown(){if(document.getElementById("yearDropDown").style.display=="block"){document.getElementById("yearDropDown").style.display="none";EIS_Hide_Frame();}else{document.getElementById("yearDropDown").style.display="block";document.getElementById("monthDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("yearDropDown");}}};function showHourDropDown(){if(document.getElementById("hourDropDown").style.display=="block"){document.getElementById("hourDropDown").style.display="none";EIS_Hide_Frame();}else{document.getElementById("hourDropDown").style.display="block";document.getElementById("monthDropDown").style.display="none";document.getElementById("yearDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("hourDropDown");}}};function showMinuteDropDown(){if(document.getElementById("minuteDropDown").style.display=="block"){document.getElementById("minuteDropDown").style.display="none";EIS_Hide_Frame();}else{document.getElementById("minuteDropDown").style.display="block";document.getElementById("monthDropDown").style.display="none";document.getElementById("yearDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("minuteDropDown");}}};function selectMonth(){document.getElementById("calendar_month_txt").innerHTML=this.innerHTML;currentMonth=this.id.replace(/[^\d]/g,"");document.getElementById("monthDropDown").style.display="none";EIS_Hide_Frame();for(var no=0;no<monthArray.length;no++){document.getElementById("monthDiv_"+no).style.color="";}this.style.color=selectBoxHighlightColor;activeSelectBoxMonth=this;writeCalendarContent();};function selectHour(){document.getElementById("calendar_hour_txt").innerHTML=this.innerHTML;currentHour=this.innerHTML.replace(/[^\d]/g,"");document.getElementById("hourDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxHour){activeSelectBoxHour.style.color="";}activeSelectBoxHour=this;this.style.color=selectBoxHighlightColor;};function selectMinute(){document.getElementById("calendar_minute_txt").innerHTML=this.innerHTML;currentMinute=this.innerHTML.replace(/[^\d]/g,"");document.getElementById("minuteDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxMinute){activeSelectBoxMinute.style.color="";}activeSelectBoxMinute=this;this.style.color=selectBoxHighlightColor;};function selectYear(){document.getElementById("calendar_year_txt").innerHTML=this.innerHTML;currentYear=this.innerHTML.replace(/[^\d]/g,"");document.getElementById("yearDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxYear){activeSelectBoxYear.style.color="";}activeSelectBoxYear=this;this.style.color=selectBoxHighlightColor;writeCalendarContent();};function switchMonth(){if(this.src.indexOf("left")>=0){currentMonth=currentMonth-1;if(currentMonth<0){currentMonth=11;currentYear=currentYear-1;}}else{currentMonth=currentMonth+1;if(currentMonth>11){currentMonth=0;currentYear=currentYear/1+1;}}writeCalendarContent();};function createMonthDiv(){var _3=document.createElement("DIV");_3.className="monthYearPicker";_3.id="monthPicker";for(var no=0;no<monthArray.length;no++){var _4=document.createElement("DIV");_4.innerHTML=monthArray[no];_4.onmouseover=highlightMonthYear;_4.onmouseout=highlightMonthYear;_4.onclick=selectMonth;_4.id="monthDiv_"+no;_4.style.width="56px";_4.onselectstart=cancelCalendarEvent;_3.appendChild(_4);if(currentMonth&&currentMonth==no){_4.style.color=selectBoxHighlightColor;activeSelectBoxMonth=_4;}}return _3;};function changeSelectBoxYear(e,_5){if(!_5){_5=this;}var _6=_5.parentNode.getElementsByTagName("DIV");if(_5.innerHTML.indexOf("-")>=0){var _7=_6[1].innerHTML/1-1;if(activeSelectBoxYear){activeSelectBoxYear.style.color="";}}else{var _7=_6[1].innerHTML/1+1;if(activeSelectBoxYear){activeSelectBoxYear.style.color="";}}for(var no=1;no<_6.length-1;no++){_6[no].innerHTML=_7+no-1;_6[no].id="yearDiv"+(_7/1+no/1-1);}if(activeSelectBoxYear){activeSelectBoxYear.style.color="";if(document.getElementById("yearDiv"+currentYear)){activeSelectBoxYear=document.getElementById("yearDiv"+currentYear);activeSelectBoxYear.style.color=selectBoxHighlightColor;}}};function changeSelectBoxHour(e,_8){if(!_8){_8=this;}var _9=_8.parentNode.getElementsByTagName("DIV");if(_8.innerHTML.indexOf("-")>=0){var _a=_9[1].innerHTML/1-1;if(_a<0){_a=0;}if(activeSelectBoxHour){activeSelectBoxHour.style.color="";}}else{var _a=_9[1].innerHTML/1+1;if(_a>14){_a=14;}if(activeSelectBoxHour){activeSelectBoxHour.style.color="";}}var _b="";for(var no=1;no<_9.length-1;no++){if((_a/1+no/1)<11){_b="0";}else{_b="";}_9[no].innerHTML=_b+(_a+no-1);_9[no].id="hourDiv"+(_a/1+no/1-1);}if(activeSelectBoxHour){activeSelectBoxHour.style.color="";if(document.getElementById("hourDiv"+currentHour)){activeSelectBoxHour=document.getElementById("hourDiv"+currentHour);activeSelectBoxHour.style.color=selectBoxHighlightColor;}}};function updateYearDiv(){var _c=5;if(turnOffYearSpan){_c=0;}var _d=document.getElementById("yearDropDown");var _e=_d.getElementsByTagName("DIV");for(var no=1;no<_e.length-1;no++){_e[no].innerHTML=currentYear/1-_c+no;if(currentYear==(currentYear/1-_c+no)){_e[no].style.color=selectBoxHighlightColor;activeSelectBoxYear=_e[no];}else{_e[no].style.color="";}}};function updateMonthDiv(){for(no=0;no<12;no++){document.getElementById("monthDiv_"+no).style.color="";}document.getElementById("monthDiv_"+currentMonth).style.color=selectBoxHighlightColor;activeSelectBoxMonth=document.getElementById("monthDiv_"+currentMonth);};function updateHourDiv(){var _f=document.getElementById("hourDropDown");var _10=_f.getElementsByTagName("DIV");var _11=0;if((currentHour/1-6+1)<0){_11=(currentHour/1-6+1)*-1;}for(var no=1;no<_10.length-1;no++){var _12="";if((currentHour/1-6+no+_11)<10){_12="0";}_10[no].innerHTML=_12+(currentHour/1-6+no+_11);if(currentHour==(currentHour/1-6+no)){_10[no].style.color=selectBoxHighlightColor;activeSelectBoxHour=_10[no];}else{_10[no].style.color="";}}};function updateMinuteDiv(){for(no=0;no<60;no+=intervalSelectBox_minutes){var _13="";if(no<10){_13="0";}document.getElementById("minuteDiv_"+_13+no).style.color="";}if(document.getElementById("minuteDiv_"+currentMinute)){document.getElementById("minuteDiv_"+currentMinute).style.color=selectBoxHighlightColor;activeSelectBoxMinute=document.getElementById("minuteDiv_"+currentMinute);}};function createYearDiv(){if(!document.getElementById("yearDropDown")){var div=document.createElement("DIV");div.className="monthYearPicker";}else{var div=document.getElementById("yearDropDown");var _14=div.getElementsByTagName("DIV");for(var no=0;no<_14.length;no++){_14[no].parentNode.removeChild(_14[no]);}}var d=new Date();if(currentYear){d.setFullYear(currentYear);}var _15=d.getFullYear()/1-5;var _16=10;if(!turnOffYearSpan){var _17=document.createElement("DIV");_17.innerHTML="&nbsp;&nbsp;- ";_17.onclick=changeSelectBoxYear;_17.onmouseover=highlightMonthYear;_17.onmouseout=function(){selectBoxMovementInProgress=false;};_17.onselectstart=cancelCalendarEvent;div.appendChild(_17);}else{_15=d.getFullYear()/1-0;_16=2;}for(var no=_15;no<(_15+_16);no++){var _17=document.createElement("DIV");_17.innerHTML=no;_17.onmouseover=highlightMonthYear;_17.onmouseout=highlightMonthYear;_17.onclick=selectYear;_17.id="yearDiv"+no;_17.onselectstart=cancelCalendarEvent;div.appendChild(_17);if(currentYear&&currentYear==no){_17.style.color=selectBoxHighlightColor;activeSelectBoxYear=_17;}}if(!turnOffYearSpan){var _17=document.createElement("DIV");_17.innerHTML="&nbsp;&nbsp;+ ";_17.onclick=changeSelectBoxYear;_17.onmouseover=highlightMonthYear;_17.onmouseout=function(){selectBoxMovementInProgress=false;};_17.onselectstart=cancelCalendarEvent;div.appendChild(_17);}return div;};function slideCalendarSelectBox(){if(selectBoxMovementInProgress){if(activeSelectBox.parentNode.id=="hourDropDown"){changeSelectBoxHour(false,activeSelectBox);}if(activeSelectBox.parentNode.id=="yearDropDown"){changeSelectBoxYear(false,activeSelectBox);}}setTimeout("slideCalendarSelectBox()",speedOfSelectBoxSliding);};function createHourDiv(){if(!document.getElementById("hourDropDown")){var div=document.createElement("DIV");div.className="monthYearPicker";}else{var div=document.getElementById("hourDropDown");var _18=div.getElementsByTagName("DIV");for(var no=0;no<_18.length;no++){_18[no].parentNode.removeChild(_18[no]);}}if(!currentHour){currentHour=0;}var _19=currentHour/1;if(_19>14){_19=14;}var _1a=document.createElement("DIV");_1a.innerHTML="&nbsp;&nbsp;- ";_1a.onclick=changeSelectBoxHour;_1a.onmouseover=highlightMonthYear;_1a.onmouseout=function(){selectBoxMovementInProgress=false;};_1a.onselectstart=cancelCalendarEvent;div.appendChild(_1a);for(var no=_19;no<_19+10;no++){var _1b="";if(no/1<10){_1b="0";}var _1a=document.createElement("DIV");_1a.innerHTML=_1b+no;_1a.onmouseover=highlightMonthYear;_1a.onmouseout=highlightMonthYear;_1a.onclick=selectHour;_1a.id="hourDiv"+no;_1a.onselectstart=cancelCalendarEvent;div.appendChild(_1a);if(currentYear&&currentYear==no){_1a.style.color=selectBoxHighlightColor;activeSelectBoxYear=_1a;}}var _1a=document.createElement("DIV");_1a.innerHTML="&nbsp;&nbsp;+ ";_1a.onclick=changeSelectBoxHour;_1a.onmouseover=highlightMonthYear;_1a.onmouseout=function(){selectBoxMovementInProgress=false;};_1a.onselectstart=cancelCalendarEvent;div.appendChild(_1a);return div;};function createMinuteDiv(){if(!document.getElementById("minuteDropDown")){var div=document.createElement("DIV");div.className="monthYearPicker";}else{var div=document.getElementById("minuteDropDown");var _1c=div.getElementsByTagName("DIV");for(var no=0;no<_1c.length;no++){_1c[no].parentNode.removeChild(_1c[no]);}}var _1d=0;var _1e="";for(var no=_1d;no<60;no+=intervalSelectBox_minutes){if(no<10){_1e="0";}else{_1e="";}var _1f=document.createElement("DIV");_1f.innerHTML=_1e+no;_1f.onmouseover=highlightMonthYear;_1f.onmouseout=highlightMonthYear;_1f.onclick=selectMinute;_1f.id="minuteDiv_"+_1e+no;_1f.onselectstart=cancelCalendarEvent;div.appendChild(_1f);if(currentYear&&currentYear==no){_1f.style.color=selectBoxHighlightColor;activeSelectBoxYear=_1f;}}return div;};function highlightSelect(){if(this.className=="selectBoxTime"){this.className="selectBoxTimeOver";this.getElementsByTagName("IMG")[0].src=pathToImages+"down_time_over.gif";}else{if(this.className=="selectBoxTimeOver"){this.className="selectBoxTime";this.getElementsByTagName("IMG")[0].src=pathToImages+"down_time.gif";}}if(this.className=="selectBox"){this.className="selectBoxOver";this.getElementsByTagName("IMG")[0].src=pathToImages+"down_over.gif";}else{if(this.className=="selectBoxOver"){this.className="selectBox";this.getElementsByTagName("IMG")[0].src=pathToImages+"down.gif";}}};function highlightArrow(){if(this.src.indexOf("over")>=0){if(this.src.indexOf("left")>=0){this.src=pathToImages+"left.gif";}if(this.src.indexOf("right")>=0){this.src=pathToImages+"right.gif";}}else{if(this.src.indexOf("left")>=0){this.src=pathToImages+"left_over.gif";}if(this.src.indexOf("right")>=0){this.src=pathToImages+"right_over.gif";}}};function highlightClose(){if(this.src.indexOf("over")>=0){this.src=pathToImages+"close.gif";}else{this.src=pathToImages+"close_over.gif";}};function closeCalendar(){document.getElementById("yearDropDown").style.display="none";document.getElementById("monthDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";calendarDiv.style.display="none";if(iframeObj){iframeObj.style.display="none";EIS_Hide_Frame();}if(activeSelectBoxMonth){activeSelectBoxMonth.className="";}if(activeSelectBoxYear){activeSelectBoxYear.className="";}};function writeTopBar(){var _20=document.createElement("DIV");_20.className="topBar";_20.id="topBar";calendarDiv.appendChild(_20);var _21=document.createElement("DIV");_21.style.marginRight="1px";var img=document.createElement("IMG");img.src=pathToImages+"left.gif";img.onmouseover=highlightArrow;img.onclick=switchMonth;img.onmouseout=highlightArrow;_21.appendChild(img);_20.appendChild(_21);if(Opera){_21.style.width="16px";}var _22=document.createElement("DIV");_22.style.marginRight="1px";var img=document.createElement("IMG");img.src=pathToImages+"right.gif";img.onclick=switchMonth;img.onmouseover=highlightArrow;img.onmouseout=highlightArrow;_22.appendChild(img);if(Opera){_22.style.width="16px";}_20.appendChild(_22);var _23=document.createElement("DIV");_23.id="monthSelect";_23.onmouseover=highlightSelect;_23.onmouseout=highlightSelect;_23.onclick=showMonthDropDown;var _24=document.createElement("SPAN");_24.innerHTML=monthArray[currentMonth];_24.id="calendar_month_txt";_23.appendChild(_24);var img=document.createElement("IMG");img.src=pathToImages+"down.gif";img.style.position="absolute";img.style.right="0px";_23.appendChild(img);_23.className="selectBox";if(Opera){img.style.cssText="float:right;position:relative";img.style.position="relative";img.style.styleFloat="right";}_20.appendChild(_23);var _25=createMonthDiv();_25.style.left="37px";_25.style.top=_23.offsetTop+_23.offsetHeight+1+"px";_25.style.width="60px";_25.id="monthDropDown";calendarDiv.appendChild(_25);var _26=document.createElement("DIV");_26.onmouseover=highlightSelect;_26.onmouseout=highlightSelect;_26.onclick=showYearDropDown;var _24=document.createElement("SPAN");_24.innerHTML=currentYear;_24.id="calendar_year_txt";_26.appendChild(_24);_20.appendChild(_26);var img=document.createElement("IMG");img.src=pathToImages+"down.gif";_26.appendChild(img);_26.className="selectBox";if(Opera){_26.style.width="50px";img.style.cssText="float:right";img.style.position="relative";img.style.styleFloat="right";}var _27=createYearDiv();_27.style.left="113px";_27.style.top=_23.offsetTop+_23.offsetHeight+1+"px";_27.style.width="35px";_27.id="yearDropDown";calendarDiv.appendChild(_27);var img=document.createElement("IMG");img.src=pathToImages+"close.gif";img.style.styleFloat="right";img.onmouseover=highlightClose;img.onmouseout=highlightClose;img.onclick=closeCalendar;_20.appendChild(img);if(!document.all){img.style.position="absolute";img.style.right="2px";}};function writeCalendarContent(){var _28=true;if(!calendarContentDiv){calendarContentDiv=document.createElement("DIV");calendarDiv.appendChild(calendarContentDiv);_28=false;}currentMonth=currentMonth/1;var d=new Date();d.setFullYear(currentYear);d.setDate(1);d.setMonth(currentMonth);var _29=d.getDay();if(!weekStartsOnSunday){if(_29==0){_29=7;}_29--;}document.getElementById("calendar_year_txt").innerHTML=currentYear;document.getElementById("calendar_month_txt").innerHTML=monthArray[currentMonth];document.getElementById("calendar_hour_txt").innerHTML=currentHour;document.getElementById("calendar_minute_txt").innerHTML=currentMinute;var _2a=calendarContentDiv.getElementsByTagName("TABLE");if(_2a.length>0){calendarContentDiv.removeChild(_2a[0]);}var _2b=document.createElement("TABLE");_2b.width="100%";_2b.cellSpacing="0";calendarContentDiv.appendChild(_2b);var _2c=document.createElement("TBODY");_2b.appendChild(_2c);var row=_2c.insertRow(-1);row.className="calendar_week_row";if(showWeekNumber){var _2d=row.insertCell(-1);_2d.innerHTML=weekString;_2d.className="calendar_week_column";_2d.style.backgroundColor=selectBoxRolloverBgColor;}for(var no=0;no<dayArray.length;no++){var _2d=row.insertCell(-1);_2d.innerHTML=dayArray[no];}var row=_2c.insertRow(-1);if(showWeekNumber){var _2d=row.insertCell(-1);_2d.className="calendar_week_column";_2d.style.backgroundColor=selectBoxRolloverBgColor;var _2e=getWeek(currentYear,currentMonth,1);_2d.innerHTML=_2e;}for(var no=0;no<_29;no++){var _2d=row.insertCell(-1);_2d.innerHTML="&nbsp;";}var _2f=_29;var _30=daysInMonthArray[currentMonth];if(_30==28){if(isLeapYear(currentYear)){_30=29;}}for(var no=1;no<=_30;no++){d.setDate(no-1);if(_2f>0&&_2f%7==0){var row=_2c.insertRow(-1);if(showWeekNumber){var _2d=row.insertCell(-1);_2d.className="calendar_week_column";var _2e=getWeek(currentYear,currentMonth,no);_2d.innerHTML=_2e;_2d.style.backgroundColor=selectBoxRolloverBgColor;}}var _2d=row.insertCell(-1);if(currentYear==inputYear&&currentMonth==inputMonth&&no==inputDay){_2d.className="activeDay";}_2d.innerHTML=no;_2d.onclick=pickDate;_2f++;}if(!document.all){if(calendarContentDiv.offsetHeight){document.getElementById("topBar").style.top=calendarContentDiv.offsetHeight+document.getElementById("timeBar").offsetHeight+document.getElementById("topBar").offsetHeight-1+"px";}else{document.getElementById("topBar").style.top="";document.getElementById("topBar").style.bottom="0px";}}if(iframeObj){if(!_28){setTimeout("resizeIframe()",350);}else{setTimeout("resizeIframe()",10);}}};function resizeIframe(){iframeObj.style.width=calendarDiv.offsetWidth+"px";iframeObj.style.height=calendarDiv.offsetHeight+"px";};function pickTodaysDate(){var d=new Date();currentMonth=d.getMonth();currentYear=d.getFullYear();pickDate(false,d.getDate());};function pickDate(e,_31){var _32=currentMonth/1+1;if(_32<10){_32="0"+_32;}var day;if(!_31&&this){day=this.innerHTML;}else{day=_31;}if(day/1<10){day="0"+day;}if(returnFormat){returnFormat=returnFormat.replace("dd",day);returnFormat=returnFormat.replace("mm",_32);returnFormat=returnFormat.replace("yyyy",currentYear);returnFormat=returnFormat.replace("hh",currentHour);returnFormat=returnFormat.replace("ii",currentMinute);returnFormat=returnFormat.replace("d",day/1);returnFormat=returnFormat.replace("m",_32/1);returnDateTo.value=returnFormat;try{returnDateTo.onchange();}catch(e){}}else{for(var no=0;no<returnDateToYear.options.length;no++){if(returnDateToYear.options[no].value==currentYear){returnDateToYear.selectedIndex=no;break;}}for(var no=0;no<returnDateToMonth.options.length;no++){if(returnDateToMonth.options[no].value==parseInt(_32)){returnDateToMonth.selectedIndex=no;break;}}for(var no=0;no<returnDateToDay.options.length;no++){if(returnDateToDay.options[no].value==parseInt(day)){returnDateToDay.selectedIndex=no;break;}}if(calendarDisplayTime){for(var no=0;no<returnDateToHour.options.length;no++){if(returnDateToHour.options[no].value==parseInt(currentHour)){returnDateToHour.selectedIndex=no;break;}}for(var no=0;no<returnDateToMinute.options.length;no++){if(returnDateToMinute.options[no].value==parseInt(currentMinute)){returnDateToMinute.selectedIndex=no;break;}}}}closeCalendar();};function getWeek(_33,_34,day){if(!weekStartsOnSunday){day=(day/1);}else{day=(day/1)+1;}_33=_33/1;_34=_34/1+1;var a=Math.floor((14-(_34))/12);var y=_33+4800-a;var m=(_34)+(12*a)-3;var jd=day+Math.floor(((153*m)+2)/5)+(365*y)+Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400)-32045;var d4=(jd+31741-(jd%7))%146097%36524%1461;var L=Math.floor(d4/1460);var d1=((d4-L)%365)+L;NumberOfWeek=Math.floor(d1/7)+1;return NumberOfWeek;};function writeTimeBar(){var _35=document.createElement("DIV");_35.id="timeBar";_35.className="timeBar";var _36=document.createElement("DIV");_36.innerHTML="Time:";var _37=document.createElement("DIV");_37.onmouseover=highlightSelect;_37.onmouseout=highlightSelect;_37.onclick=showHourDropDown;_37.style.width="30px";var _38=document.createElement("SPAN");_38.innerHTML=currentHour;_38.id="calendar_hour_txt";_37.appendChild(_38);_35.appendChild(_37);var img=document.createElement("IMG");img.src=pathToImages+"down_time.gif";_37.appendChild(img);_37.className="selectBoxTime";if(Opera){_37.style.width="30px";img.style.cssText="float:right";img.style.position="relative";img.style.styleFloat="right";}var _39=createHourDiv();_39.style.left="130px";_39.style.width="35px";_39.id="hourDropDown";calendarDiv.appendChild(_39);var _3a=document.createElement("DIV");_3a.onmouseover=highlightSelect;_3a.onmouseout=highlightSelect;_3a.onclick=showMinuteDropDown;_3a.style.width="30px";var _38=document.createElement("SPAN");_38.innerHTML=currentMinute;_38.id="calendar_minute_txt";_3a.appendChild(_38);_35.appendChild(_3a);var img=document.createElement("IMG");img.src=pathToImages+"down_time.gif";_3a.appendChild(img);_3a.className="selectBoxTime";if(Opera){_3a.style.width="30px";img.style.cssText="float:right";img.style.position="relative";img.style.styleFloat="right";}var _3b=createMinuteDiv();_3b.style.left="167px";_3b.style.width="35px";_3b.id="minuteDropDown";calendarDiv.appendChild(_3b);return _35;};function writeBottomBar(){var d=new Date();var _3c=document.createElement("DIV");_3c.id="bottomBar";_3c.style.cursor="pointer";_3c.className="todaysDate";var _3d=document.createElement("DIV");_3d.onclick=pickTodaysDate;_3d.id="todaysDateString";_3d.style.width=(calendarDiv.offsetWidth-95)+"px";var day=d.getDay();if(!weekStartsOnSunday){if(day==0){day=7;}day--;}var _3e=todayStringFormat;_3e=_3e.replace("[monthString]",monthArrayShort[d.getMonth()]);_3e=_3e.replace("[day]",d.getDate());_3e=_3e.replace("[year]",d.getFullYear());_3e=_3e.replace("[dayString]",dayArray[day].toLowerCase());_3e=_3e.replace("[UCFdayString]",dayArray[day]);_3e=_3e.replace("[todayString]",todayString);_3d.innerHTML=todayString+": "+d.getDate()+". "+monthArrayShort[d.getMonth()]+", "+d.getFullYear();_3d.innerHTML=_3e;_3c.appendChild(_3d);var _3f=writeTimeBar();_3c.appendChild(_3f);calendarDiv.appendChild(_3c);};function getTopPos(_40){var _41=_40.offsetTop+_40.offsetHeight;while((_40=_40.offsetParent)!=null){_41+=_40.offsetTop;}return _41+calendar_offsetTop;};function getleftPos(_42){var _43=_42.offsetLeft;while((_42=_42.offsetParent)!=null){_43+=_42.offsetLeft;}return _43+calendar_offsetLeft;};function positionCalendar(_44){calendarDiv.style.left=getleftPos(_44)+"px";calendarDiv.style.top=getTopPos(_44)+"px";if(iframeObj){iframeObj.style.left=calendarDiv.style.left;iframeObj.style.top=calendarDiv.style.top;iframeObj2.style.left=calendarDiv.style.left;iframeObj2.style.top=calendarDiv.style.top;}};function initCalendar(){if(MSIE){iframeObj=document.createElement("IFRAME");iframeObj.style.filter="alpha(opacity=0)";iframeObj.style.position="absolute";iframeObj.border="0px";iframeObj.style.border="0px";iframeObj.style.backgroundColor="#FF0000";iframeObj2=document.createElement("IFRAME");iframeObj2.style.position="absolute";iframeObj2.border="0px";iframeObj2.style.border="0px";iframeObj2.style.height="1px";iframeObj2.style.width="1px";iframeObj2.src="blank.html";iframeObj.src="blank.html";document.body.appendChild(iframeObj2);document.body.appendChild(iframeObj);}calendarDiv=document.createElement("DIV");calendarDiv.id="calendarDiv";calendarDiv.style.zIndex=1000;slideCalendarSelectBox();document.body.appendChild(calendarDiv);writeBottomBar();writeTopBar();if(!currentYear){var d=new Date();currentMonth=d.getMonth();currentYear=d.getFullYear();}writeCalendarContent();};function setTimeProperties(){if(!calendarDisplayTime){document.getElementById("timeBar").style.display="none";document.getElementById("timeBar").style.visibility="hidden";document.getElementById("todaysDateString").style.width="100%";}else{document.getElementById("timeBar").style.display="block";document.getElementById("timeBar").style.visibility="visible";document.getElementById("hourDropDown").style.top=document.getElementById("calendar_minute_txt").parentNode.offsetHeight+calendarContentDiv.offsetHeight+document.getElementById("topBar").offsetHeight+"px";document.getElementById("minuteDropDown").style.top=document.getElementById("calendar_minute_txt").parentNode.offsetHeight+calendarContentDiv.offsetHeight+document.getElementById("topBar").offsetHeight+"px";document.getElementById("minuteDropDown").style.right="50px";document.getElementById("hourDropDown").style.right="50px";document.getElementById("todaysDateString").style.width="115px";}};function calendarSortItems(a,b){return a/1-b/1;};function displayCalendar(_45,_46,_47,_48,_49){if(_48){calendarDisplayTime=true;}else{calendarDisplayTime=false;}if(_45.value.length>0){if(!_46.match(/^[0-9]*?$/gi)){var _4a=_45.value.split(/[^0-9]/gi);var _4b=new Array();_4b["m"]=_46.indexOf("mm");if(_4b["m"]==-1){_4b["m"]=_46.indexOf("m");}_4b["d"]=_46.indexOf("dd");if(_4b["d"]==-1){_4b["d"]=_46.indexOf("d");}_4b["y"]=_46.indexOf("yyyy");_4b["h"]=_46.indexOf("hh");_4b["i"]=_46.indexOf("ii");var _4c=Array();_4c[0]=_4b["m"];_4c[1]=_4b["d"];_4c[2]=_4b["y"];_4c[3]=_4b["h"];_4c[4]=_4b["i"];_4c=_4c.sort(calendarSortItems);var _4d=-1;currentHour="00";currentMinute="00";for(var no=0;no<_4c.length;no++){if(_4c[no]==-1){continue;}_4d++;if(_4c[no]==_4b["m"]){currentMonth=_4a[_4d]-1;continue;}if(_4c[no]==_4b["y"]){currentYear=_4a[_4d];continue;}if(_4c[no]==_4b["d"]){tmpDay=_4a[_4d];continue;}if(_4c[no]==_4b["h"]){currentHour=_4a[_4d];continue;}if(_4c[no]==_4b["i"]){currentMinute=_4a[_4d];continue;}}currentMonth=currentMonth/1;tmpDay=tmpDay/1;}else{var _4e=_46.indexOf("mm");currentMonth=_45.value.substr(_4e,2)/1-1;var _4f=_46.indexOf("yyyy");currentYear=_45.value.substr(_4f,4);var _50=_46.indexOf("dd");tmpDay=_45.value.substr(_50,2);var _51=_46.indexOf("hh");if(_51>=0){tmpHour=_45.value.substr(_51,2);currentHour=tmpHour;}else{currentHour="00";}var _52=_46.indexOf("ii");if(_52>=0){tmpMinute=_45.value.substr(_52,2);currentMinute=tmpMinute;}else{currentMinute="00";}}}else{var d=new Date();currentMonth=d.getMonth();currentYear=d.getFullYear();currentHour="08";currentMinute="00";tmpDay=d.getDate();}inputYear=currentYear;inputMonth=currentMonth;inputDay=tmpDay/1;if(!calendarDiv){initCalendar();}else{if(calendarDiv.style.display=="block"){closeCalendar();return false;}writeCalendarContent();}returnFormat=_46;returnDateTo=_45;positionCalendar(_47);calendarDiv.style.visibility="visible";calendarDiv.style.display="block";if(iframeObj){iframeObj.style.display="";iframeObj.style.height="140px";iframeObj.style.width="195px";iframeObj2.style.display="";iframeObj2.style.height="140px";iframeObj2.style.width="195px";}setTimeProperties();updateYearDiv();updateMonthDiv();updateMinuteDiv();updateHourDiv();};function displayCalendarSelectBox(_53,_54,_55,_56,_57,_58){if(!_56){calendarDisplayTime=false;}else{calendarDisplayTime=true;}currentMonth=_54.options[_54.selectedIndex].value/1-1;currentYear=_53.options[_53.selectedIndex].value;if(_56){currentHour=_56.options[_56.selectedIndex].value;inputHour=currentHour/1;}if(_57){currentMinute=_57.options[_57.selectedIndex].value;inputMinute=currentMinute/1;}inputYear=_53.options[_53.selectedIndex].value;inputMonth=_54.options[_54.selectedIndex].value/1-1;inputDay=_55.options[_55.selectedIndex].value/1;if(!calendarDiv){initCalendar();}else{writeCalendarContent();}returnDateToYear=_53;returnDateToMonth=_54;returnDateToDay=_55;returnDateToHour=_56;returnDateToMinute=_57;returnFormat=false;returnDateTo=false;positionCalendar(_58);calendarDiv.style.visibility="visible";calendarDiv.style.display="block";if(iframeObj){iframeObj.style.display="";iframeObj.style.height=calendarDiv.offsetHeight+"px";iframeObj.style.width=calendarDiv.offsetWidth+"px";iframeObj2.style.display="";iframeObj2.style.height=calendarDiv.offsetHeight+"px";iframeObj2.style.width=calendarDiv.offsetWidth+"px";}setTimeProperties();updateYearDiv();updateMonthDiv();updateHourDiv();updateMinuteDiv();};;
function ajaxFunction(){var _1;try{_1=new XMLHttpRequest();}catch(e){try{_1=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{_1=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser does not support AJAX!");return false;}}}return _1;};function ajax_get_from_select(e,_2,_3,_4,_5){var _6;if(document.getElementById(_3)){displaydiv_ajax(_3);if(_5){alert("Elements found...");}id=e.value;if(_6=ajaxFunction()){if(_5){alert("xmlHttp OK!");}_6.onreadystatechange=function(){if(_6.readyState==4){if(_5){alert("xmlHttp.readyState == 4 OK!");}var _7=document.getElementById(_3);html=_6.responseText;displaydiv_ajax(_3,html);_7.innerHTML=html;}};_6.open("GET","ajax2.php?page="+_2+"&id="+id+"&lang="+_4,true);_6.send(null);}}else{if(_5){alert("Elements NOT found...\r\n\r\n"+e+"\r\n"+_3);}}};function displaydiv_ajax(m,_8){if(document.getElementById(m)){var _9=document.getElementById(m).style;if(_9.visibility=="hidden"&&_8){_9.padding="2px";_9.visibility="visible";}else{if(!_8){_9.margin=0;_9.padding=0;_9.visibility="hidden";}}}};function displaydiv_inform(id,_a){if(document.getElementById(id)){var _b=document.getElementById(id);_b.innerHTML=_a;displaydiv_ajax(id,_a);}};function ajax_alter_content(e,_c,id,_d,_e,_f){var _10;if(document.getElementById(_c)){if(_f){alert("Elements found...");}if(_10=ajaxFunction()){if(_f){alert("xmlHttp OK!");}_10.onreadystatechange=function(){if(_10.readyState==4){if(_f){alert("xmlHttp.readyState == 4 OK!");}var obj=document.getElementById(_c);html=_10.responseText;displaydiv_ajax(_c,html);obj.innerHTML=html;}};var lnk="sites/all/standalone/abo/ajax2.php?page="+_d+"&p="+id+"|&lang="+_e;_10.open("POST",lnk,true);var _11;try{_11=e.name+"="+encodeURI(document.getElementById(e.id).value);}catch(err){_11="";if(_f){alert("Failed finding element "+e.name);}}_10.setRequestHeader("Content-type","application/x-www-form-urlencoded");_10.setRequestHeader("Connection","close");_10.send(_11);}}else{if(_f){alert("Elements NOT found...\r\n\r\n"+_c);}}};function ajax_alter_content_v2(e,_12,p,_13,pre,_14,_15,_16){var _17;if(document.getElementById(_12)){if(_16){alert("Elements found...");}if(_17=ajaxFunction()){if(_16){alert("xmlHttp OK!");}_17.onreadystatechange=function(){if(_17.readyState==4){if(_16){alert("xmlHttp.readyState == 4 OK!");}var obj=document.getElementById(_12);preContent="";postContent="";newContent=_17.responseText;if(_14){preContent=obj.innerHTML;}if(pre){postContent=obj.innerHTML;}obj.innerHTML=preContent+newContent+postContent;return true;}};var lnk="sites/all/standalone/abo/ajax2.php?page="+_13+"&p="+p+"&lang="+_15;_17.open("POST",lnk,true);var _18;try{_18=e.name+"="+encodeURI(document.getElementById(e.id).value);if(_16){alert("Info\r\n\r\n"+_18);}}catch(err){_18="";if(_16){alert("Failed finding element "+e.name);}}_17.setRequestHeader("Content-type","application/x-www-form-urlencoded");_17.setRequestHeader("Connection","close");_17.send(_18);}}else{if(_16){alert("Elements NOT found...\r\n\r\n"+_12);}}};function clear_value(_19){if(document.getElementById(_19)){document.getElementById(_19).value="";}};function bring_to_front(id){if(document.getElementById(id)){e=document.getElementById(id);e.style.zIndex="99999999999999";}};;
function displaydiv(m){if(document.getElementById(m)){var _1=document.getElementById(m).style;if(m=="ncrabo_div_wait"){_1.top=document.body.scrollTop;}if(_1.visibility=="hidden"){_1.visibility="visible";}else{_1.visibility="hidden";}}};function updateDiv(id,_2,_3){if(document.getElementById(id)){obj=document.getElementById(id);if(_3){obj.innerHTML=obj.innerHTML+_2;}else{if(_3==false){obj.innerHTML=_2+obj.innerHTML;}else{obj.innerHTML=_2;}}}};function selectall(_4,_5){for(var i=0;i<_4.length;i++){if(_4[i].name.indexOf(_5)!=-1){_4[i].selected=_4[i].checked=true;}}};function unselectall(_6,_7){for(var i=0;i<_6.length;i++){if(_6[i].name.indexOf(_7)!=-1){_6[i].selected=_6[i].checked=false;}}};function setFormAction(_8,_9){if(document.getElementById(_8)){document.getElementById(_8).action=_9;}};function hideDiv(id){if(document.getElementById(id)){e=document.getElementById(id);e.style.visibility="hidden";}};function displaySearch(_a,e1,e2,e3){if(document.getElementById(_a)&&document.getElementById(e1)&&document.getElementById(e2)&&document.getElementById(e3)){var _b=document.getElementById(_a);var _c=document.getElementById(e1);var _d=document.getElementById(e2);var _e=document.getElementById(e3);if(_e.style.visibility=="hidden"){_e.style.height="auto";_d.style.paddingBottom="5px";_e.style.visibility="visible";_b.src="images/layout/hide.gif";}else{_e.style.visibility="hidden";_e.style.height="1px";_d.style.paddingBottom="0";_b.src="images/layout/show.gif";}}};function initSearch(_f,e1,e2,e3,on){if(document.getElementById(_f)&&document.getElementById(e1)&&document.getElementById(e2)&&document.getElementById(e3)){var _10=document.getElementById(_f);var _11=document.getElementById(e1);var _12=document.getElementById(e2);var _13=document.getElementById(e3);if(on){_13.style.height="auto";_12.style.paddingBottom="5px";_13.style.visibility="visible";_10.src="images/layout/hide.gif";}}};function resetFormFields(e,v){if(document.getElementById(e)){document.getElementById(e).value=v;}};function resetArrFormFields(_14,_15){for(var i=0;i<_14.length;i++){if(document.getElementById(_14[i])){document.getElementById(_14[i]).value=_15[i];}}};function updateEQName(){var _16=document.getElementById("utstyrsmodeller_id");var _17=document.getElementById("utstyrsgrupper_id");var _18="";var _19="";var _1a=_16.selectedIndex;if(_1a){_18=_16.options[_1a].text;}var _1b=_17.selectedIndex;if(_1b){_19=_17.options[_1b].text;}document.getElementById("sn").value="";if(_18!=""&&_19!=""){document.getElementById("sn").value=_18+" | "+_19;}};function displaydivinfo(img,m,h){if(document.getElementById(img)&&document.getElementById(m)){var obj=document.getElementById(m).style;var _1c=document.getElementById(img);if(obj.overflow=="hidden"){obj.overflow="visible";obj.height="auto";obj.padding="5px";_1c.src="images/layout/collapse.gif";}else{obj.overflow="hidden";obj.height=h;obj.padding="0px";_1c.src="images/layout/expand.gif";}}};function displaydivinfo2(img,m,h){if(document.getElementById(img)&&document.getElementById(m)){var obj=document.getElementById(m).style;var _1d=document.getElementById(img);if(obj.overflow=="hidden"){obj.overflow="visible";obj.height="auto";obj.padding="5px";_1d.src="images/layout/min.png";}else{obj.overflow="hidden";obj.height=h;obj.padding="0px";_1d.src="images/layout/max.png";}}};function setZindex(e){};function resetZindex(e){};function copy(_1e){alert(_1e);if(_1e.createTextRange){var _1f=_1e.createTextRange();if(_1f&&BodyLoaded==1){_1f.execCommand("Copy");}}else{var _20="flashcopier";if(!document.getElementById(_20)){var _21=document.createElement("div");_21.id=_20;document.body.appendChild(_21);}document.getElementById(_20).innerHTML="";var _22="<embed src=\"_clipboard.swf\" FlashVars=\"clipboard="+encodeURIComponent(_1e.value)+"\" width=\"0\" height=\"0\" type=\"application/x-shockwave-flash\"></embed>";document.getElementById(_20).innerHTML=_22;}};function selectAll(_23,_24){var str="";for(var i=0;i<_23.length;i++){str=_23[i].name;if(str.indexOf("expand")!=-1){_23[i].selected=_23[i].checked=_24;}}};function displaySystemMaintenance(s,e,st){txt="System maintenance will start at "+s+"\r\nIt will be finished within "+e+"\r\n\r\nServer time is "+st+"\r\n\r\nSystem will be unavailable during this period!\r\nPlease save your work and log out.";alert(txt);};function set_access(t1,t2,t3,t4,_25,_26,_27,_28,url,_29){if(confirm(t1+":\r\n\r\n"+t2+" "+_26+" "+t3+" "+_28+" "+t4+"?")){y=window.pageYOffset;displaydiv("div_wait");location.href=url+"&"+_29+"="+y;}};function js_alert(t){tt=t.replace(/<br>/gi,"\r\n");alert(tt);};function js_confirm(t,url){tt=t.replace(/<br>/gi,"\r\n");if(confirm(tt)){location.href=url;}};function checkenter(frm){};function js_update_bkg(_2a,_2b){var obj=document.getElementById(_2a);if(obj.style.backgroundColor=="rgb(0, 255, 0)"){if(_2b){obj.style.backgroundColor="#f0f0f0";}else{obj.style.backgroundColor="#ffffff";}}else{obj.style.backgroundColor="#00ff00";}};function js_update_bkg2(e){if(e.style.backgroundColor=="rgb(240, 240, 240)"){e.style.backgroundColor="";}else{e.style.backgroundColor="#f0f0f0";}};function getElements(n,s,b){var _2c=document.getElementsByName(n);var z="";if(typeof b=="undefined"){b=5;}j=0;for(i=0;i<_2c.length;i++){z=z+$(_2c[i]).html()+s;j++;if(j/b==1){z=z+"<br />";j=0;}}$ncrAbo.promptUser("info",z,window,{width:"800px"});};;
function checkInterconnectedDates(_1,_2,_3,_4,_5,_6,_7){var _8=document.getElementById(_1).value;var _9=document.getElementById(_2).value;var _a=_8.substring(0,_4).split(_3);var _b=_9.substring(0,_4).split(_3);var _c=_a[2];var _d=_a[1]-1;var _e=_a[0];var _f=_b[2];var _10=_b[1]-1;var _11=_b[0];var _8=new Date(_c,_d,_e);var _9=new Date(_f,_10,_11);if(_9<_8){alert(_5);if(_6){document.getElementById(_7).value="";}return false;}return true;};function checkInterconnectedIntegers(id1,id2,_12,_13,_14){var _15=document.getElementById(id1).value;var _16=document.getElementById(id2).value;if(_15!=null&&_16!=null){_15=parseInt(_15);_16=parseInt(_16);if(_16>_15){alert(_12);if(_13){document.getElementById(_14).value="";}return false;}}return true;};function overruleEnterKey(_17,t){if(t=="submit"){return true;}if(_17&&_17.which==13){_17.returnValue=false;_17.cancel=true;return false;}return true;};function OT_selectall(_18){var _19=new Array();_19=_18.split(",");for(var i=0;i<_19.length;i++){var _1a=document.getElementById(_19[i]);for(var j=0;j<_1a.options.length;j++){_1a.options[j].selected=true;}}};function disableelement(cb,e){if(document.getElementById(e)){if(cb.checked){document.getElementById(e).disabled=1;}else{document.getElementById(e).disabled=0;}}};function enableelement(cb,e){if(document.getElementById(e)){if(cb.checked){document.getElementById(e).disabled=0;}else{document.getElementById(e).disabled=1;}}};function hideelement(cb,e,h1,h2){if(document.getElementById(e)){if(cb.checked){document.getElementById(e).readOnly=0;document.getElementById(e).style.height=h2;}else{document.getElementById(e).readOnly=1;document.getElementById(e).style.height=h1;}}};;
(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 _1=function(n){return n&&n.constructor==Number?n+"px":n;},_2="<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')":_1(s.top))+";"+"left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":_1(s.left))+";"+"width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":_1(s.width))+";"+"height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":_1(s.height))+";"+"\"/>";return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(_2),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 _3={sensitivity:7,interval:100,timeout:0};_3=$.extend(_3,g?{over:f,out:g}:f);var cX,cY,pX,pY;var _4=function(ev){cX=ev.pageX;cY=ev.pageY;};var _5=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<_3.sensitivity){$(ob).unbind("mousemove",_4);ob.hoverIntent_s=1;return _3.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){_5(ev,ob);},_3.interval);}};var _6=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return _3.out.apply(ob,[ev]);};var _7=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",_4);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){_5(ev,ob);},_3.interval);}}else{$(ob).unbind("mousemove",_4);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){_6(ev,ob);},_3.timeout);}}};return this.mouseover(_7).mouseout(_7);};})(jQuery);(function($){$.fn.supposition=function(){var $w=$(window),_8=function(_9){return window[_9=="y"?"pageYOffset":"pageXOffset"]||document.documentElement&&document.documentElement[_9=="y"?"scrollTop":"scrollLeft"]||document.body[_9=="y"?"scrollTop":"scrollLeft"];},_a=function(){$topNav=$("li",this);var cZ=parseInt($topNav.css("z-index"))+$topNav.length;$topNav.each(function(){$(this).css({zIndex:--cZ});});},_b=function(){this.css({marginTop:"",marginLeft:""});},_c=function(){this.each(function(){var $u=$(this);$u.css("display","block");var _d=$u.width(),_e=$u.parents("ul").width(),_f=$w.width()+_8("x"),_10=$u.offset().left+_d;if(_10>_f){$u.css("margin-left",($u.parents("ul").length==1?_f-_10:-(_d+_e))+"px");}var _11=$w.height(),_12=$u.offset().top,_13=$u.height(),_14=_11+_8("y");var _15=(_12+_13>_14);if(_15){$u.css("margin-top",_14-(_13+_12));}$u.css("display","none");});};return this.each(function(){var o=$.fn.superfish.o[this.serial];var _16=o.onInit,_17=o.onBeforeShow,_18=o.onHide;$.extend($.fn.superfish.o[this.serial],{onInit:function(){_a.call(this);_16.call(this);},onBeforeShow:function(){_c.call(this);_17.call(this);},onHide:function(){_b.call(this);_18.call(this);}});});};})(jQuery);(function($){$.fn.supersubs=function(_19){var _1a=$.extend({},$.fn.supersubs.defaults,_19);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},_1a,$$.data()):_1a;var _1b=$("<li id=\"menu-fontsize\">&#8212;</li>").css({"padding":0,"position":"absolute","top":"-999em","width":"auto"}).appendTo($$).width();$("#menu-fontsize").remove();$ULs=$$.find("ul");$ULs.each(function(i){var _1c=$ULs.eq(i);var _1d=_1c.children();var _1e=_1d.children("a");var _1f=_1d.css("white-space","nowrap").css("float");var _20=_1c.add(_1d).add(_1e).css({"float":"none","width":"auto"}).end().end()[0].clientWidth/_1b;_20+=o.extraWidth;if(_20>o.maxWidth){_20=o.maxWidth;}else{if(_20<o.minWidth){_20=o.minWidth;}}_20+="em";_1c.css("width",_20);_1d.css({"float":_1f,"width":"100%","white-space":"normal"}).each(function(){var _21=$(">ul",this);var _22=_21.css("left")!==undefined?"left":"right";_21.css(_22,_20);});});});};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};})(jQuery);(function($){$.fn.supersubs=function(_23){var _24=$.extend({},$.fn.supersubs.defaults,_23);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},_24,$$.data()):_24;var _25=$("<li id=\"menu-fontsize\">&#8212;</li>").css({"padding":0,"position":"absolute","top":"-999em","width":"auto"}).appendTo($$).width();$("#menu-fontsize").remove();$ULs=$$.find("ul");$ULs.each(function(i){var _26=$ULs.eq(i);var _27=_26.children();var _28=_27.children("a");var _29=_27.css("white-space","nowrap").css("float");var _2a=_26.add(_27).add(_28).css({"float":"none","width":"auto"}).end().end()[0].clientWidth/_25;_2a+=o.extraWidth;if(_2a>o.maxWidth){_2a=o.maxWidth;}else{if(_2a<o.minWidth){_2a=o.minWidth;}}_2a+="em";_26.css("width",_2a);_27.css({"float":_29,"width":"100%","white-space":"normal"}).each(function(){var _2b=$(">ul",this);var _2c=_2b.css("left")!==undefined?"left":"right";_2b.css(_2c,_2a);});});});};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};})(jQuery);(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,_2d=$(["<span class=\"",c.arrowClass,"\"> &#187;</span>"].join("")),_2e=function(){var $$=$(this),_2f=_30($$);clearTimeout(_2f.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},_31=function(){var $$=$(this),_32=_30($$),o=sf.op;clearTimeout(_32.sfTimer);_32.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(["li.",o.hoverClass].join("")).length<1){_2e.call(o.$path);}},o.delay);},_30=function(_33){var _34=_33.parents(["ul.",c.menuClass,":first"].join(""))[0];sf.op=sf.o[_34.serial];return _34;},_35=function($a){$a.addClass(c.anchorClass).append(_2d.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$("li."+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(" ")).filter("li:has(ul)").removeClass(o.pathClass);});sf.o[s]=sf.op=o;$("li:has(ul)",this)[($.fn.hoverIntent&&!o.disableHI)?"hoverIntent":"hover"](_2e,_31).each(function(){if(o.autoArrows){_35($(">a:first-child",this));}}).not("."+c.bcClass).hideSuperfishUl();var $a=$("a",this);$a.each(function(i){var _36=$a.eq(i).parents("li");$a.eq(i).focus(function(){_2e.call(_36);}).blur(function(){_31.call(_36);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){menuClasses.push(c.shadowClass);}$(this).addClass(menuClasses.join(" "));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined){this.toggleClass(sf.c.shadowClass+"-off");}};sf.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};sf.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,_37=(o.retainPath===true)?o.$path:"";o.retainPath=false;var _38=$(["li.",o.hoverClass].join(""),this).add(this).not(_37).removeClass(o.hoverClass).find(">ul").hide().css("visibility","hidden");o.onHide.call(_38,"show");return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+"-off",_39=this.addClass(o.hoverClass).find(">ul:hidden").css("visibility","visible");sf.IE7fix.call(_39);o.onBeforeShow.call(_39);_39.animate(o.animation,o.speed,function(){sf.IE7fix.call(_39);o.onShow.call(_39,"show");});return this;}});})(jQuery);this.screenshotPreview=function(){var _3a=20;var _3b=0;$("span.preview-icon").hover(function(e){var _3c=this.id;var _3d=$(this).parent().text();$("body").append("<div id=\"screenshot\">"+"<div class=\"screenshot-preview "+_3c+"\" alt=\"preview\"></div>"+"<div class=\"screenshot-caption\">"+_3d+"</div>"+"</div>");$("#screenshot").hide();$("#screenshot").css("left",(e.pageX+_3a)+"px").css("top",(e.pageY+_3b)+"px");var _3e=new Image();_3e.onload=function(){var _3f=parseFloat($("#screenshot .screenshot-caption").css("height"));$("#screenshot").css("height",_3e.height+_3f);$("#screenshot").css("width",_3e.width);$("#screenshot ."+_3c).css("height",_3e.height);$("#screenshot ."+_3c).css("width",_3e.width);$("#screenshot .screenshot-caption").css("width",_3e.width-10);$("#screenshot").fadeIn("fast");};_3e.src=$("."+_3c).css("background-image").replace(/^url|[\(\)\"]/g,"");},function(){$("#screenshot").remove();});$("span.preview-icon").mousemove(function(e){$("#screenshot").css("left",(e.pageX+_3a)+"px").css("top",(e.pageY+_3b)+"px");});};$(document).ready(function(){if($("span.preview-icon").size()>0){screenshotPreview();}});Drupal.behaviors.fusionEqualheights=function(_40){if(jQuery().equalHeights){$("#header-top-wrapper div.equal-heights div.content").equalHeights();$("#header-group-wrapper div.equal-heights div.content").equalHeights();$("#preface-top-wrapper div.equal-heights div.content").equalHeights();$("#preface-bottom div.equal-heights div.content").equalHeights();$("#sidebar-first div.equal-heights div.content").equalHeights();$("#content-top div.equal-heights div.content").equalHeights();$("#content-region div.equal-heights div.content").equalHeights();$("#content-bottom div.equal-heights div.content").equalHeights();$("#node-top div.equal-heights div.content").equalHeights();$("#node-bottom div.equal-heights div.content").equalHeights();$("#sidebar-last div.equal-heights div.content").equalHeights();$("#postscript-top div.equal-heights div.content").equalHeights();$("#postscript-bottom-wrapper div.equal-heights div.content").equalHeights();$("#footer-wrapper div.equal-heights div.content").equalHeights();}};Drupal.behaviors.fusionIE6fixes=function(_41){if($.browser.msie&&($.browser.version<7)){$("form input.form-submit").hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});$("#primary-menu ul.sf-menu li.expanded").hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});$("#search input#search_header").hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});}};Drupal.behaviors.fusionOverlabel=function(_42){if(jQuery().overlabel){$("div.fusion-horiz-login label").overlabel();}};Drupal.behaviors.fusionSuperfish=function(_43){$("#primary-menu ul.sf-menu").superfish({hoverClass:"sfHover",delay:250,animation:{opacity:"show",height:"show"},speed:"fast",autoArrows:false,dropShadows:false,disableHI:true}).supposition();};Drupal.behaviors.fusionSuperfishBlocks=function(_44){$("div.block ul.sf-menu").superfish({hoverClass:"sfHover",delay:250,animation:{opacity:"show",height:"show"},speed:"fast",autoArrows:false,dropShadows:false,disableHI:true}).supposition();};Drupal.behaviors.fusionGridMask=function(_45){if($("body.grid-mask-enabled").size()>0){var _46=parseInt($("body").attr("class").indexOf("grid-width-"))+11;var _47=$("body").attr("class").substring(_46,_46+2);var _48="<div id=\"grid-mask-overlay\" class=\"full-width\"><div class=\"row\">";for(i=1;i<=_47;i++){_48+="<div class=\"block grid"+_47+"-1\"><div class=\"inner\"></div></div>";}_48+="</div></div>";$("body.grid-mask-enabled").prepend(_48);$("#grid-mask-overlay .row").addClass("grid"+_47+"-"+_47);$("#grid-mask-overlay .block .inner").height($("body").height());}};Drupal.behaviors.fusionGridMaskToggle=function(_49){if($("body.grid-mask-enabled").size()>0){$("body.grid-mask-enabled").prepend("<div id=\"grid-mask-toggle\">grid</div>");$("div#grid-mask-toggle").toggle(function(){$(this).toggleClass("grid-on");$("body").toggleClass("grid-mask");},function(){$(this).toggleClass("grid-on");$("body").toggleClass("grid-mask");});}};;
(function($){function _1(v){if(!(this instanceof _1)){return new _1(v);}this.reset();if(!v){this.start();}};var B=$.benchmark=_1,_2=/(\{error\}\:)/,_3={callback:" Callback didn't return a value!"},_4=true,_5=true,_6="",_7="jQuery.benchmark :: ",_8=function(m){if(!_4){return m;}m=(typeof m==="string")?_7+m:"";if(_2.test(m)){throw _7+((m.split(_2))[2]);}_6+=m+"<br>";if(_5){console.log(m);}else{alert(m);}return m;},_9="_start",_a="_end",DF="Default",_b=DF,_c=function(){return (new Date()).getTime();};B.prototype={_result:0,start:function(){this.mark("start");return this;},end:function(o){this.mark("end","start",(o==null?true:o));return this;},mark:function(_d,_e,o){this.marks[_d]=_c();if(_e){this.elapsedTime(_e,_d,o);}return this;},elapsedTime:function(m1,m2,o){var _f=this._result=this.marks[m2]-this.marks[m1];if(o){_8(typeof o==="function"?(o(_f,m1,m2)||"{error}:elapsedTime->>"+E.callback):"start("+m1+")->> end('"+m2+"') :: Runtime->> "+_f+" ms"+(typeof o==="string"?o:""));}return this;},result:function(){return this._result;},reset:function(){this.marks={};}};$.extend(B,{test:function(a){var o=typeof a==="object"?1:0,_10=o===1?a:[],d=B(),g=_10.length,i=_10[g]=0,c=arguments[0+o],l=arguments[1+o]||1000;for(;i<=l;_10[g]=++i){c.apply(window,_10);}return d.end(function(r){return " Function tester :: Runtime->> "+r+" ms Runned->> "+l+" times, Average->> "+(B.round((r/l)))+" ms";});},startTest:function(_11){_b=_11=_11||DF;_12[_11]=new _13(_11).start();return this;},endTest:function(_14){if(!_12[(_b=_14=_14||_b||DF)]){return this;}else{_12[_14].end().output().reset();}return this;},start:function(_15){if(!_15){this.startTest();}else{_12[_b].start(_15);}return this;},end:function(_16,_17){if(!_16){this.endTest();}else{_12[_b].end(_16);}if(_17){this.endTest();}return this;},result:function(n){return typeof _12[(n=n||_b||DF)]==="object"?_12[n].result():0;},enable:function(){_4=true;return this;},disable:function(){_4=false;return this;},output:function(_18){var v=_6;if(!_18){_6="";}return v;},useAlert:function(){_5=false;return this;},useConsole:function(){_5=true;return this;},round:function(num,dec){dec=dec||5;return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);}});function _13(_19){if(!(this instanceof _13)){return new _13(_19);}this.bench=new B();this.reset();this.name=_19;this._result=0;};_13.prototype={start:function(_1a,v){_1a=_1a||this.name;this._start(v);if(!this.marks[_1a]){this.times[_1a]=this.marks[_1a]=0;}this.bench.mark(_1a+_9);return this;},_start:function(v){if(!v&&typeof this.marks[this.name]!=="number"){this.start(this.name,true);}return this;},end:function(_1b){_1b=_1b||this.name;this.times[_1b]++;this.marks[_1b]+=this._result=this.bench.mark(_1b+_a,_1b+_9,false).result();return this;},output:function(){var _1c=(function(_1d){var i=0,n;for(n in _1d){i++;}return i;})(this.marks),_1e=_1c>2,i=0,_7,_1f;if(_1e){if(_5){_8();}_8("Report for test->> '"+this.name+"' :");}for(_7 in this.marks){if(_7!==this.name){_1f=this._outputTest(_7,"end",function(_20,_21){i+=_20;return _20>1?", Runned->> "+_20+" times, Average->> "+(B.round((_21/_20)))+" ms":" ";});}}this._result=(_1c!==2)?this._result=this._outputTest(this.name,(_1c>2?"endTest":"end"),function(){return _1e?", Total Tests->> "+i:" ";}):_1f;this.reset();return this;},result:function(){return this._result;},_outputTest:function(_22,fn,_23){var _24=this.times[_22],_25=this.marks[_22];_8(fn+"('"+_22+"') :: Runtime->> "+_25+" ms"+(_23(_24,_25)||"{error}:_outputTest('"+_22+"','"+fn+"')->> "+_3.callback));return _25;},reset:function(){this.bench.reset();this.marks={};this.times={};return this;}};B.tester=_13;var _12={};_12[DF]=new _13(DF);})(jQuery);;
(function($){$.extend({manageAjax:function(o){o=$.extend({manageType:"normal",maxReq:0,blockSameRequest:false,global:true},o);return new $.ajaxManager(o);},ajaxManager:function(o){this.opt=o;this.queue=[];}});$.extend($.ajaxManager.prototype,{add:function(o){var _1=this.queue.length,s=this.opt,q=this.queue,_2=this,i,j;o=$.extend({},s,o);var cD=(o.data&&typeof o.data!="string")?$.param(o.data):o.data;if(s.blockSameRequest){var _3=false;for(i=0;i<_1;i++){if(q[i]&&q[i].data===cD&&q[i].url===o.url&&q[i].type===o.type){_3=true;break;}}if(_3){return false;}}q[_1]={fnError:o.error,fnSuccess:o.success,fnComplete:o.complete,fnAbort:o.abort,error:[],success:[],complete:[],done:false,queued:false,data:cD,url:o.url,type:o.type,xhr:null};o.error=function(){if(q[_1]){q[_1].error=arguments;}};o.success=function(){if(q[_1]){q[_1].success=arguments;}};o.abort=function(){if(q[_1]){q[_1].abort=arguments;}};function _4(_5,_6){if(q[_5].fnError&&q[_5].error.length){q[_5].fnError.apply(_6||$,q[_5].error);}if(q[_5].fnSuccess){try{var _7=$.parseJSON(q[_5].success[0]);if(_7[0].fnCallback){var _8=eval("("+_7[0].fnCallback+")");if(typeof (_8)=="function"){_8();}return;}}catch(e){if(typeof (_7)==="string"){return;}}q[_5].fnSuccess.apply(_6||$,q[_5].success);}if(q[_5].fnComplete){q[_5].fnComplete.apply(_6||$,q[_5].complete);}_2.abort(_5,true);};o.complete=function(){if(!q[_1]){return;}q[_1].complete=arguments;q[_1].done=true;switch(s.manageType){case "sync":if(_1===0||!q[_1-1]){var _9=q.length;for(i=_1;i<_9;i++){if(q[i]){if(q[i].done){_4(i,this);}else{break;}}}}break;case "queue":if(_1===0||!q[_1-1]){var _9=q.length;for(i=0,j=0;i<_9;i++){if(q[i]&&q[i].queued){q[i].xhr=jQuery.ajax(q[i].xhr);q[i].queued=false;break;}}}_4(_1,this);break;case "abortOld":_4(_1,this);for(i=_1;i>=0;i--){if(q[i]){_2.abort(i);}}break;default:_4(_1,this);break;}};if(s.maxReq){if(s.manageType!="queue"){for(i=_1,j=0;i>=0;i--){if(j>=s.maxReq){this.abort(i);}if(q[i]){j++;}}}else{for(i=0,j=0;i<=_1&&!q[_1].queued;i++){if(q[i]&&!q[i].queued){j++;}if(j>s.maxReq){q[_1].queued=true;}}}}q[_1].xhr=(q[_1].queued)?o:jQuery.ajax(o);return _1;},cleanUp:function(){this.queue=[];},abort:function(_a,_b){var _c=this.queue.length,s=this.opt,q=this.queue,_d=this,i;function _e(_f){if(!q[_f]){return;}((!_b&&q[_f].fnAbort)&&q[_f].fnAbort.apply($,[_f]));if(!q[_f]){return;}if(q[_f].xhr){if(typeof q[_f].xhr.abort=="object"||typeof q[_f].xhr.abort=="function"){q[_f].xhr.abort();}if(typeof q[_f].xhr.close=="object"||typeof q[_f].xhr.close=="function"){q[_f].xhr.close();}q[_f].xhr=null;}if(s.global&&$.active&&!--$.active){$.event.trigger("ajaxStop");}q[_f]=null;};if(!_a&&_a!==0){for(i=0;i<_c;i++){_e(i);}this.cleanUp();}else{_e(_a);var _10=true;for(i=_c;i>=0;i--){if(q[i]){_10=false;break;}}if(_10){this.cleanUp();}}}});})(jQuery);;
(function($){$.fn.extend({autocomplete:function(_1,_2){var _3=typeof _1=="string";_2=$.extend({},$.Autocompleter.defaults,{url:_3?_1:null,data:_3?null:_1,delay:_3?$.Autocompleter.defaults.delay:10,max:_2&&!_2.scroll?10:150,defaultText:"",defaultTextStyle:{}},_2);_2.highlight=_2.highlight||function(_4){return _4;};_2.formatMatch=_2.formatMatch||_2.formatItem;return this.each(function(){new $.Autocompleter(this,_2);});},result:function(_5){return this.bind("result",_5);},search:function(_6){return this.trigger("search",[_6]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(_7){return this.trigger("setOptions",[_7]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(_8,_9){var _a={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var _b=$(_8).attr("autocomplete","off").addClass(_9.inputClass);var _c;var _d="";var _e=$.Autocompleter.Cache(_9);var _f=0;var _10;var _11={mouseDownOnSelect:false};var _12=$.Autocompleter.Select(_9,_8,_13,_11);var _14;$.browser.opera&&$(_8.form).bind("submit.autocomplete",function(){if(_14){_14=false;return false;}});_b.val(_9.defaultText);_b.css({"font-style":"italic","color":"#c0c0c0"});_b.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(_15){_f=1;_10=_15.keyCode;switch(_15.keyCode){case _a.UP:_15.preventDefault();if(_12.visible()){_12.prev();}else{_16(0,true);}break;case _a.DOWN:_15.preventDefault();if(_12.visible()){_12.next();}else{_16(0,true);}break;case _a.PAGEUP:_15.preventDefault();if(_12.visible()){_12.pageUp();}else{_16(0,true);}break;case _a.PAGEDOWN:_15.preventDefault();if(_12.visible()){_12.pageDown();}else{_16(0,true);}break;case _9.multiple&&$.trim(_9.multipleSeparator)==","&&_a.COMMA:case _a.TAB:case _a.RETURN:if(_13()){_15.preventDefault();_14=true;return false;}break;case _a.ESC:_12.hide();break;default:clearTimeout(_c);_c=setTimeout(_16,_9.delay);break;}}).focus(function(){_f++;$(this).val("").css({"font-style":"normal","color":"#000000"});}).blur(function(){_f=0;if(!_11.mouseDownOnSelect){_17();$(this).val(_9.defaultText).css({"font-style":"italic","color":"#c0c0c0"});}}).click(function(){if(_f++>1&&!_12.visible()){_16(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function _18(q,_19){var _1a;if(_19&&_19.length){for(var i=0;i<_19.length;i++){if(_19[i].result.toLowerCase()==q.toLowerCase()){_1a=_19[i];break;}}}if(typeof fn=="function"){fn(_1a);}else{_b.trigger("result",_1a&&[_1a.data,_1a.value]);}};$.each(_1f(_b.val()),function(i,_1b){_1c(_1b,_18,_18);});}).bind("flushCache",function(){_e.flush();}).bind("setOptions",function(){$.extend(_9,arguments[1]);if("data" in arguments[1]){_e.populate();}}).bind("unautocomplete",function(){_12.unbind();_b.unbind();$(_8.form).unbind(".autocomplete");});function _13(){var _1d=_12.selected();if(!_1d){return false;}var v=_1d.result;_d=v;if(_9.multiple){var _1e=_1f(_b.val());if(_1e.length>1){var _20=_9.multipleSeparator.length;var _21=$(_8).selection().start;var _22,_23=0;$.each(_1e,function(i,_24){_23+=_24.length;if(_21<=_23){_22=i;return false;}_23+=_20;});_1e[_22]=v;v=_1e.join(_9.multipleSeparator);}v+=_9.multipleSeparator;}_b.val(v);_25();_b.trigger("result",[_1d.data,_1d.value]);return true;};function _16(_26,_27){if(_10==_a.DEL){_12.hide();return;}var _28=_b.val();if(!_27&&_28==_d){return;}_d=_28;_28=_29(_28);if(_28.length>=_9.minChars){_b.addClass(_9.loadingClass);if(!_9.matchCase){_28=_28.toLowerCase();}_1c(_28,_2a,_25);}else{_2b();_12.hide();}};function _1f(_2c){if(!_2c){return [""];}if(!_9.multiple){return [$.trim(_2c)];}return $.map(_2c.split(_9.multipleSeparator),function(_2d){return $.trim(_2c).length?$.trim(_2d):null;});};function _29(_2e){if(!_9.multiple){return _2e;}var _2f=_1f(_2e);if(_2f.length==1){return _2f[0];}var _30=$(_8).selection().start;if(_30==_2e.length){_2f=_1f(_2e);}else{_2f=_1f(_2e.replace(_2e.substring(_30),""));}return _2f[_2f.length-1];};function _31(q,_32){if(_9.autoFill&&(_29(_b.val()).toLowerCase()==q.toLowerCase())&&_10!=_a.BACKSPACE){_b.val(_b.val()+_32.substring(_29(_d).length));$(_8).selection(_d.length,_d.length+_32.length);}};function _17(){clearTimeout(_c);_c=setTimeout(_25,200);};function _25(){var _33=_12.visible();_12.hide();clearTimeout(_c);_2b();if(_9.mustMatch){_b.search(function(_34){if(!_34){if(_9.multiple){var _35=_1f(_b.val()).slice(0,-1);_b.val(_35.join(_9.multipleSeparator)+(_35.length?_9.multipleSeparator:""));}else{_b.val("");_b.trigger("result",null);}}});}};function _2a(q,_36){if(_36&&_36.length&&_f){_2b();_12.display(_36,q);_31(q,_36[0].value);_12.show();}else{_25();}};function _1c(_37,_38,_39){if(!_9.matchCase){_37=_37.toLowerCase();}var _3a=_e.load(_37);if(_3a&&_3a.length){_38(_37,_3a);}else{if((typeof _9.url=="string")&&(_9.url.length>0)){var _3b={timestamp:+new Date()};$.each(_9.extraParams,function(key,_3c){_3b[key]=typeof _3c=="function"?_3c():_3c;});$.ajax({mode:"abort",port:"autocomplete"+_8.name,dataType:_9.dataType,url:_9.url,data:$.extend({q:_29(_37),limit:_9.max},_3b),success:function(_3d){var _3e=_9.parse&&_9.parse(_3d)||_3f(_3d);_e.add(_37,_3e);_38(_37,_3e);}});}else{_12.emptyList();_39(_37);}}};function _3f(_40){var _41=[];var _42=eval(_40);for(var i=0;i<_42.length;i++){_41[_41.length]={data:_42[i],value:_42[i].navn,result:_9.formatResult&&_9.formatResult(_42[i],_42[i].navn)};}return _41;};function _2b(){_b.removeClass(_9.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:485,multiple:false,multipleSeparator:", ",highlight:function(_43,_44){return _43.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+_44.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(_45){var _46={};var _47=0;function _48(s,sub){if(!_45.matchCase){s=s.toLowerCase();}var i=s.indexOf(sub);if(_45.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase());}if(i==-1){return false;}return i==0||_45.matchContains;};function add(q,_49){if(_47>_45.cacheLength){_4a();}if(!_46[q]){_47++;}_46[q]=_49;};function _4b(){if(!_45.data){return false;}var _4c={},_4d=0;if(!_45.url){_45.cacheLength=1;}_4c[""]=[];for(var i=0,ol=_45.data.length;i<ol;i++){var _4e=_45.data[i];_4e=(typeof _4e=="string")?[_4e]:_4e;var _4f=_45.formatMatch(_4e,i+1,_45.data.length);if(_4f===false){continue;}var _50=_4f.charAt(0).toLowerCase();if(!_4c[_50]){_4c[_50]=[];}var row={value:_4f,data:_4e,result:_45.formatResult&&_45.formatResult(_4e)||_4f};_4c[_50].push(row);if(_4d++<_45.max){_4c[""].push(row);}}$.each(_4c,function(i,_51){_45.cacheLength++;add(i,_51);});};setTimeout(_4b,25);function _4a(){_46={};_47=0;};return {flush:_4a,add:add,populate:_4b,load:function(q){if(!_45.cacheLength||!_47){return null;}if(!_45.url&&_45.matchContains){var _52=[];for(var k in _46){if(k.length>0){var c=_46[k];$.each(c,function(i,x){if(_48(x.value,q)){_52.push(x);}});}}return _52;}else{if(_46[q]){return _46[q];}else{if(_45.matchSubset){for(var i=q.length-1;i>=_45.minChars;i--){var c=_46[q.substr(0,i)];if(c){var _52=[];$.each(c,function(i,x){if(_48(x.value,q)){_52[_52.length]=x;}});return _52;}}}}}return null;}};};$.Autocompleter.Select=function(_53,_54,_55,_56){var _57={ACTIVE:"ac_over"};var _58,_59=-1,_5a,_5b="",_5c=true,_5d,_5e;function _5f(){if(!_5c){return;}_5d=$("<div/>").hide().addClass(_53.resultsClass).css("position","absolute").appendTo(document.body);_5e=$("<ul/>").appendTo(_5d).mouseover(function(_60){if(_62(_60).nodeName&&_62(_60).nodeName.toUpperCase()=="LI"){_59=$("li",_5e).removeClass(_57.ACTIVE).index(_62(_60));$(_62(_60)).addClass(_57.ACTIVE);}}).click(function(_61){$(_62(_61)).addClass(_57.ACTIVE);_55();_54.focus();return false;}).mousedown(function(){_56.mouseDownOnSelect=true;}).mouseup(function(){_56.mouseDownOnSelect=false;});if(_53.width>0){_5d.css("width",_53.width);}_5c=false;};function _62(_63){var _64=_63.target;while(_64&&_64.tagName!="LI"){_64=_64.parentNode;}if(!_64){return [];}return _64;};function _65(_66){_58.slice(_59,_59+1).removeClass(_57.ACTIVE);_67(_66);var _68=_58.slice(_59,_59+1).addClass(_57.ACTIVE);if(_53.scroll){var _69=0;_58.slice(0,_59).each(function(){_69+=this.offsetHeight;});if((_69+_68[0].offsetHeight-_5e.scrollTop())>_5e[0].clientHeight){_5e.scrollTop(_69+_68[0].offsetHeight-_5e.innerHeight());}else{if(_69<_5e.scrollTop()){_5e.scrollTop(_69);}}}};function _67(_6a){_59+=_6a;if(_59<0){_59=_58.size()-1;}else{if(_59>=_58.size()){_59=0;}}};function _6b(_6c){return _53.max&&_53.max<_6c?_53.max:_6c;};function _6d(){_5e.empty();var max=_6b(_5a.length);for(var i=0;i<max;i++){if(!_5a[i]){continue;}var _6e=_53.formatItem(_5a[i].data,i+1,max,_5a[i].value,_5b);if(_6e===false){continue;}var li=$("<li/>").html(_53.highlight(_6e,_5b)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(_5e)[0];$.data(li,"ac_data",_5a[i]);}_58=_5e.find("li");if(_53.selectFirst){_58.slice(0,1).addClass(_57.ACTIVE);_59=0;}if($.fn.bgiframe){_5e.bgiframe();}};return {display:function(d,q){_5f();_5a=d;_5b=q;_6d();},next:function(){_65(1);},prev:function(){_65(-1);},pageUp:function(){if(_59!=0&&_59-8<0){_65(-_59);}else{_65(-8);}},pageDown:function(){if(_59!=_58.size()-1&&_59+8>_58.size()){_65(_58.size()-1-_59);}else{_65(8);}},hide:function(){_5d&&_5d.hide();_58&&_58.removeClass(_57.ACTIVE);_59=-1;},visible:function(){return _5d&&_5d.is(":visible");},current:function(){return this.visible()&&(_58.filter("."+_57.ACTIVE)[0]||_53.selectFirst&&_58[0]);},show:function(){var _6f=$(_54).offset();_5d.css({width:typeof _53.width=="string"||_53.width>0?_53.width:$(_54).width(),top:_6f.top+_54.offsetHeight,left:_6f.left}).show();if(_53.scroll){_5e.scrollTop(0);_5e.css({maxHeight:_53.scrollHeight,overflow:"auto"});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var _70=0;_58.each(function(){_70+=this.offsetHeight;});var _71=_70>_53.scrollHeight;_5e.css("height",_71?_53.scrollHeight:_70);if(!_71){_58.width(_5e.width()-parseInt(_58.css("padding-left"))-parseInt(_58.css("padding-right")));}}}},selected:function(){var _72=_58&&_58.filter("."+_57.ACTIVE).removeClass(_57.ACTIVE);return _72&&_72.length&&$.data(_72[0],"ac_data");},emptyList:function(){_5e&&_5e.empty();},unbind:function(){_5d&&_5d.remove();}};};$.fn.selection=function(_73,end){if(_73!==undefined){return this.each(function(){if(this.createTextRange){var _74=this.createTextRange();if(end===undefined||_73==end){_74.move("character",_73);_74.select();}else{_74.collapse(true);_74.moveStart("character",_73);_74.moveEnd("character",end);_74.select();}}else{if(this.setSelectionRange){this.setSelectionRange(_73,end);}else{if(this.selectionStart){this.selectionStart=_73;this.selectionEnd=end;}}}});}var _75=this[0];if(_75.createTextRange){var _76=document.selection.createRange(),_77=_75.value,_78="<->",_79=_76.text.length;_76.text=_78;var _7a=_75.value.indexOf(_78);_75.value=_77;this.selection(_7a,_7a+_79);return {start:_7a,end:_7a+_79};}else{if(_75.selectionStart!==undefined){return {start:_75.selectionStart,end:_75.selectionEnd};}}};})(jQuery);;
(function($){$.fn.lazyload=function(_1){var _2={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(_1){$.extend(_2,_1);}var _3=this;if("scroll"==_2.event){$(_2.container).bind("scroll",function(_4){var _5=0;_3.each(function(){if($.abovethetop(this,_2)||$.leftofbegin(this,_2)){}else{if(!$.belowthefold(this,_2)&&!$.rightoffold(this,_2)){$(this).trigger("appear");}else{if(_5++>_2.failurelimit){return false;}}}});var _6=$.grep(_3,function(_7){return !_7.loaded;});_3=$(_6);});}this.each(function(){var _8=this;if(undefined==$(_8).attr("original")){$(_8).attr("original",$(_8).attr("src"));}if("scroll"!=_2.event||undefined==$(_8).attr("src")||_2.placeholder==$(_8).attr("src")||($.abovethetop(_8,_2)||$.leftofbegin(_8,_2)||$.belowthefold(_8,_2)||$.rightoffold(_8,_2))){if(_2.placeholder){$(_8).attr("src",_2.placeholder);}else{$(_8).removeAttr("src");}_8.loaded=false;}else{_8.loaded=true;}$(_8).one("appear",function(){if(!this.loaded){$("<img />").bind("load",function(){$(_8).hide().attr("src",$(_8).attr("original"))[_2.effect](_2.effectspeed);_8.loaded=true;}).attr("src",$(_8).attr("original"));}});if("scroll"!=_2.event){$(_8).bind(_2.event,function(_9){if(!_8.loaded){$(_8).trigger("appear");}});}});$(_2.container).trigger(_2.event);return this;};$.belowthefold=function(_a,_b){if(_b.container===undefined||_b.container===window){var _c=$(window).height()+$(window).scrollTop();}else{var _c=$(_b.container).offset().top+$(_b.container).height();}return _c<=$(_a).offset().top-_b.threshold;};$.rightoffold=function(_d,_e){if(_e.container===undefined||_e.container===window){var _f=$(window).width()+$(window).scrollLeft();}else{var _f=$(_e.container).offset().left+$(_e.container).width();}return _f<=$(_d).offset().left-_e.threshold;};$.abovethetop=function(_10,_11){if(_11.container===undefined||_11.container===window){var _12=$(window).scrollTop();}else{var _12=$(_11.container).offset().top;}return _12>=$(_10).offset().top+_11.threshold+$(_10).height();};$.leftofbegin=function(_13,_14){if(_14.container===undefined||_14.container===window){var _15=$(window).scrollLeft();}else{var _15=$(_14.container).offset().left;}return _15>=$(_13).offset().left+_14.threshold+$(_13).width();};$.extend($.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"});})(jQuery);;
(function($){$.extend({promptBoxManager:function($o){var _1={opacity:0.4,overlay:true,loadingImage:"sites/all/themes/dagligvareekspressen/images/promptBox/loading.gif",closeImage:"sites/all/themes/dagligvareekspressen/images/promptBox/cancel.png",confirmImage:"sites/all/themes/dagligvareekspressen/images/promptBox/accepted.png",warningImage:"sites/all/standalone/abo/images/layout/warning_16.png",infoImage:"sites/all/standalone/abo/images/layout/warning_16.png",imageTypes:["png","jpg","jpeg","gif"],confirm:true,close:true,icon:null,width:"auto",dialogTitle:"",headBgColor:"",headBorderColor:"",boxHtml:"\t\t\t    <div id=\"promptBox\" style=\"display:none;\"> \t\t\t      <div class=\"popup\"> \t\t\t        <table width=\"100%\"> \t\t\t          <tbody> \t\t\t            <tr> \t\t\t              <td class=\"tl\"/><td class=\"b\"/><td class=\"tr\"/> \t\t\t            </tr> \t\t\t            <tr> \t\t\t              <td class=\"b\"/> \t\t\t              <td class=\"body\"> \t\t\t\t\t\t  \t<h2 class=\"dialog_title\"><span class=\"dialog_title_content\"></span></h2>\t\t\t                <div class=\"content\"> \t\t\t                </div> \t\t\t                <div class=\"footer\"> \t\t\t\t\t\t\t  <a  class=\"ok\"> \t\t\t                    <img src=\"\" title=\"Ok\" class=\"ok_image\" width=\"24\" height=\"24\"/> \t\t\t                  </a> \t\t\t                  <a class=\"close\"> \t\t\t                    <img src=\"\" title=\"Avbryt\" class=\"close_image\" width=\"24\" height=\"24\"/> \t\t\t                  </a> \t\t\t                </div> \t\t\t              </td> \t\t\t              <td class=\"b\"/> \t\t\t            </tr> \t\t\t            <tr> \t\t\t              <td class=\"bl\"/><td class=\"b\"/><td class=\"br\"/> \t\t\t            </tr> \t\t\t          </tbody> \t\t\t        </table> \t\t\t      </div> \t\t\t    </div>"};$o=$.extend(_1,$o);return new $.promptBox($o);},promptBox:function($o){this.$options=$o;this.bindDocumentEvents();this.init();this.loading(true);if($o.type!="help"){this.reveal();}else{this.fillpromptBoxFromHref($o.fillImage,"");}}});$.extend($.promptBox.prototype,{loading:function(){var $o=this.$options,_2=this;if($("#promptBox .loading").length==1){return true;}_2.showOverlay();$("#promptBox .content").empty();$("#promptBox .body").children().hide().end().append("<div class=\"loading\"><img src=\""+$o.loadingImage+"\"/></div>");$("#promptBox").css({top:_2.getPageScroll()[1]+(_2.getPageHeight()/8),left:385.5}).show();$(document).bind("keydown.promptBox",function(e){if(e.keyCode==27){$.promptBox.close();}return true;});$(document).trigger("loading.promptBox");},reveal:function(_3){var $o=this.$options,_4=this;if(_3&&!$o.html){var _5=_3;}else{var _5=$o.html;}$(document).trigger("beforeReveal.promptBox");$("#promptBox").css({"width":$o.width});$("#promptBox .content").append(_5);$("#promptBox .loading").remove();$("#promptBox .body").children().fadeIn("normal");$("#promptBox").css("left",$(window).width()/2-($("#promptBox table").width()/2));switch($o.type){case "browserdetection":$("#promptBox .dialog_title").remove();$("#promptBox .footer").css({"float":"left","width":"100%"});$("#promptBox .content").css({"float":"left","width":"98%","padding":"0px"});$("#promptBox #main").css({"padding-top":"0px"});break;}$(document).trigger("reveal.promptBox").trigger("afterReveal.promptBox");},close:function($o){var _6=false;$(document).trigger("close.promptBox",[_6,$o.senderObj]);return _6;},ok:function($o){var _7=true;$(document).trigger("close.promptBox",[_7,$o.senderObj]);return _7;},init:function(){if(this.$options.inited){return true;}else{this.$options.inited=true;}var $o=this.$options,_8=this;$(document).trigger("init.promptBox");_8.loading();var _9=$o.imageTypes.join("|");$o.imageTypesRegexp=new RegExp("."+_9+"$","i");$("body").append($o.boxHtml);var _a=[new Image(),new Image(),new Image(),new Image(),new Image()];_a[0].src=$o.closeImage;_a[1].src=$o.confirmImage;_a[2].src=$o.warningImage;_a[3].src=$o.infoImage;$("#promptBox").find(".b:first, .bl, .br, .tl, .tr").each(function(){_a.push(new Image());_a.slice(-1).src=$(this).css("background-image").replace(/url\((.+)\)/,"$1");});$(".dialog_title_content").html($o.dialogTitle);$(".dialog_title").css({"background-color":$o.headBgColor,"border-bottom":"none"});if($o.confirm){$("#promptBox .ok").click(function(){return _8.ok($o);});$("#promptBox .ok").html("Ok");}else{$("#promptBox .ok").css({"display":"none"});}if(_8.close){var _b=$("#promptBox .close");_b.html("Lukk");var _c=_b.clone().css({"float":"right"});_c.click(function(){return _8.close($o);});_b.click(function(){return _8.close($o);});if($o.type=="productcatalog"||$o.type=="mealcatalog"){$("#promptBox .dialog_title_content").append(_c);}}else{$("#promptBox .close").css({"display":"none"});}},getPageScroll:function(){var _d,_e;if(self.pageYOffset){_e=self.pageYOffset;_d=self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){_e=document.documentElement.scrollTop;_d=document.documentElement.scrollLeft;}else{if(document.body){_e=document.body.scrollTop;_d=document.body.scrollLeft;}}}return new Array(_d,_e);},getPageHeight:function(){var _f;if(self.innerHeight){_f=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){_f=document.documentElement.clientHeight;}else{if(document.body){_f=document.body.clientHeight;}}}return _f;},fillpromptBoxFromHref:function(_10,_11){var $o=this.$options,_12=this;if(_10.match(/#/)){var url=window.location.href.split("#")[0],_13=_10.replace(url,"");_12.reveal($(_13).clone().show(),_11);}else{if(_10.match($o.imageTypesRegexp)){_12.fillpromptBoxFromImage(_10,_11);}else{_12.fillpromptBoxFromAjax(_10,_11);}}},fillpromptBoxFromImage:function(_14,_15){var $o=this.$options,_16=this;var _17=new Image();_17.onload=function(){_16.reveal("<div class=\"image\"><img src=\""+_17.src+"\" /></div>",_15);};_17.src=_14;},fillpromptBoxFromAjax:function(_18,_19){var $o=this.$options,_1a=this;$.get(_18,function(_1b){_1a.reveal(_1b,_19);});},skipOverlay:function(){var $o=this.$options,_1c=this;return $o.overlay==false||$o.opacity===null;},showOverlay:function(){var $o=this.$options,_1d=this;if(_1d.skipOverlay()){return;}if($("#promptBox_overlay").length==0){$("body").append("<div id=\"promptBox_overlay\" class=\"promptBox_hide\"></div>");}$("#promptBox_overlay").hide().addClass("promptBox_overlayBG").css("opacity",$o.opacity).click(function(){$(document).trigger("close.promptBox",[false,$o.senderObj]);}).fadeIn(200);return false;},hideOverlay:function(){var $o=this.$options,_1e=this;if(_1e.skipOverlay()){return;}$("#promptBox_overlay").fadeOut(200,function(){$("#promptBox_overlay").removeClass("promptBox_overlayBG");$("#promptBox_overlay").addClass("promptBox_hide");$("#promptBox_overlay").remove();});return false;},bindDocumentEvents:function(){var $o=this.$options,_1f=this;$(document).bind("close.promptBox",function(_20,_21,_22){$(document).trigger("validate.promptBox",[_21,_22]);$(document).unbind("keydown.promptBox");$("#promptBox").fadeOut(function(){$("#promptBox .content").removeClass().addClass("content");_1f.hideOverlay();$("#promptBox .loading").remove();});$("#promptBox").each(function(){$(this).remove();});$("#promptBox_overlay").each(function(){$(this).remove();});});}});})(jQuery);;
(function($){$.extend({tabs:{remoteCount:0}});$.fn.tabs=function(_1,_2){if(typeof _1=="object"){_2=_1;}_2=$.extend({initial:(_1&&typeof _1=="number"&&_1>0)?--_1:0,disabled:null,bookmarkable:$.ajaxHistory?true:false,remote:false,spinner:"Loading&#8230;",hashPrefix:"remote-tab-",fxFade:null,fxSlide:null,fxShow:null,fxHide:null,fxSpeed:"normal",fxShowSpeed:null,fxHideSpeed:null,fxAutoHeight:false,onClick:null,onHide:null,onShow:null,navClass:"tabs-nav",selectedClass:"tabs-selected",disabledClass:"tabs-disabled",containerClass:"tabs-container",hideClass:"tabs-hide",loadingClass:"tabs-loading",tabStruct:"div"},_2||{});$.browser.msie6=$.browser.msie&&($.browser.version&&$.browser.version<7||/MSIE 6.0/.test(navigator.userAgent));function _3(){scrollTo(0,0);};return this.each(function(){var _4=this;var _5=$("ul."+_2.navClass,_4);_5=_5.size()&&_5||$(">ul:eq(0)",_4);var _6=$("a",_5);if(_2.remote){_6.each(function(){var id=_2.hashPrefix+(++$.tabs.remoteCount),_7="#"+id,_8=this.href;this.href=_7;$("<div id=\""+id+"\" class=\""+_2.containerClass+"\"></div>").appendTo(_4);$(this).bind("loadRemoteTab",function(e,_9){var $$=$(this).addClass(_2.loadingClass),_a=$("span",this)[0],_b=_a.innerHTML;if(_2.spinner){_a.innerHTML="<em>"+_2.spinner+"</em>";}setTimeout(function(){$(_7).load(_8,function(){if(_2.spinner){_a.innerHTML=_b;}$$.removeClass(_2.loadingClass);_9&&_9();});},0);});});}var _c=$("div."+_2.containerClass,_4);_c=_c.size()&&_c||$(">"+_2.tabStruct,_4);_5.is("."+_2.navClass)||_5.addClass(_2.navClass);_c.each(function(){var $$=$(this);$$.is("."+_2.containerClass)||$$.addClass(_2.containerClass);});var _d=$("li",_5).index($("li."+_2.selectedClass,_5)[0]);if(_d>=0){_2.initial=_d;}if(location.hash){_6.each(function(i){if(this.hash==location.hash){_2.initial=i;if(($.browser.msie||$.browser.opera)&&!_2.remote){var _e=$(location.hash);var _f=_e.attr("id");_e.attr("id","");setTimeout(function(){_e.attr("id",_f);},500);}_3();return false;}});}if($.browser.msie){_3();}_c.filter(":eq("+_2.initial+")").show().end().not(":eq("+_2.initial+")").addClass(_2.hideClass);$("li",_5).removeClass(_2.selectedClass).eq(_2.initial).addClass(_2.selectedClass);_6.eq(_2.initial).trigger("loadRemoteTab").end();if(_2.fxAutoHeight){var _10=function(_11){var _12=$.map(_c.get(),function(el){var h,jq=$(el);if(_11){if($.browser.msie6){el.style.removeExpression("behaviour");el.style.height="";el.minHeight=null;}h=jq.css({"min-height":""}).height();}else{h=jq.height();}return h;}).sort(function(a,b){return b-a;});if($.browser.msie6){_c.each(function(){this.minHeight=_12[0]+"px";this.style.setExpression("behaviour","this.style.height = this.minHeight ? this.minHeight : \"1px\"");});}else{_c.css({"min-height":_12[0]+"px"});}};_10();var _13=_4.offsetWidth;var _14=_4.offsetHeight;var _15=$("#tabs-watch-font-size").get(0)||$("<span id=\"tabs-watch-font-size\">M</span>").css({display:"block",position:"absolute",visibility:"hidden"}).appendTo(document.body).get(0);var _16=_15.offsetHeight;setInterval(function(){var _17=_4.offsetWidth;var _18=_4.offsetHeight;var _19=_15.offsetHeight;if(_18>_14||_17!=_13||_19!=_16){_10((_17>_13||_19<_16));_13=_17;_14=_18;_16=_19;}},50);}var _1a={},_1b={},_1c=_2.fxShowSpeed||_2.fxSpeed,_1d=_2.fxHideSpeed||_2.fxSpeed;if(_2.fxSlide||_2.fxFade){if(_2.fxSlide){_1a["height"]="show";_1b["height"]="hide";}if(_2.fxFade){_1a["opacity"]="show";_1b["opacity"]="hide";}}else{if(_2.fxShow){_1a=_2.fxShow;}else{_1a["min-width"]=0;_1c=1;}if(_2.fxHide){_1b=_2.fxHide;}else{_1b["min-width"]=0;_1d=1;}}var _1e=_2.onClick,_1f=_2.onHide,_20=_2.onShow;_6.bind("triggerTab",function(){var li=$(this).parents("li:eq(0)");if(_4.locked||li.is("."+_2.selectedClass)||li.is("."+_2.disabledClass)){return false;}$(this).trigger("click");});_6.bind("disableTab",function(){var li=$(this).parents("li:eq(0)");if($.browser.safari){li.animate({opacity:0},1,function(){li.css({opacity:""});});}li.addClass(_2.disabledClass);});if(_2.disabled&&_2.disabled.length){for(var i=0,k=_2.disabled.length;i<k;i++){_6.eq(--_2.disabled[i]).trigger("disableTab").end();}}_6.bind("enableTab",function(){var li=$(this).parents("li:eq(0)");li.removeClass(_2.disabledClass);if($.browser.safari){li.animate({opacity:1},1,function(){li.css({opacity:""});});}});_6.bind("click",function(e){var _21=e.clientX;var _22=this,li=$(this).parents("li:eq(0)"),_23=$(this.hash),_24=_c.filter(":visible");if(_4["locked"]||li.is("."+_2.selectedClass)||li.is("."+_2.disabledClass)||typeof _1e=="function"&&_1e(this,_23[0],_24[0])===false){this.blur();return false;}_4["locked"]=true;if(_23.size()){if($.browser.msie&&_2.bookmarkable){var _25=this.hash.replace("#","");_23.attr("id","");setTimeout(function(){_23.attr("id",_25);},0);}var _26={display:"",overflow:"",height:""};if(!$.browser.msie){_26["opacity"]="";}function _27(){if(_2.bookmarkable&&_21){$.ajaxHistory.update(_22.hash);}_24.animate(_1b,_1d,function(){$(_22).parents("li:eq(0)").addClass(_2.selectedClass).siblings().removeClass(_2.selectedClass);_24.addClass(_2.hideClass).css(_26);if(typeof _1f=="function"){_1f(_22,_23[0],_24[0]);}if(!(_2.fxSlide||_2.fxFade||_2.fxShow)){_23.css("display","block");}_23.animate(_1a,_1c,function(){_23.removeClass(_2.hideClass).css(_26);if($.browser.msie){_24[0].style.filter="";_23[0].style.filter="";}if(typeof _20=="function"){_20(_22,_23[0],_24[0]);}_4["locked"]=null;});});};if(!_2.remote){_27();}else{$(_22).trigger("loadRemoteTab",[_27]);}}else{alert("There is no such container.");}var _28=window.pageXOffset||document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft||0;var _29=window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop||0;setTimeout(function(){window.scrollTo(_28,_29);},0);this.blur();return _2.bookmarkable&&!!_21;});if(_2.bookmarkable){$.ajaxHistory.initialize(function(){_6.eq(_2.initial).trigger("click").end();});}});};var _2a=["triggerTab","disableTab","enableTab"];for(var i=0;i<_2a.length;i++){$.fn[_2a[i]]=(function(_2b){return function(tab){return this.each(function(){var nav=$("ul.tabs-nav",this);nav=nav.size()&&nav||$(">ul:eq(0)",this);var a;if(!tab||typeof tab=="number"){a=$("li a",nav).eq((tab&&tab>0&&tab-1||0));}else{if(typeof tab=="string"){a=$("li a[@href$=\"#"+tab+"\"]",nav);}}a.trigger(_2b);});};})(_2a[i]);}$.fn.activeTab=function(){var _2c=[];this.each(function(){var nav=$("ul.tabs-nav",this);nav=nav.size()&&nav||$(">ul:eq(0)",this);var lis=$("li",nav);_2c.push(lis.index(lis.filter(".tabs-selected")[0])+1);});return _2c[0];};})(jQuery);;
(function($){$.fn.tooltip=function(o){o=$.extend({childClass:null,delay:2500,timeout:2000,xOffset:-20,yOffset:0,ttWidth:200,ttHeight:"auto",ttType:["prod","tip"],ttDType:"prod",ttaString:false,showFor:false},{});var _1=$(window),_2=function(_3){$("#product_preview"+_3.attr("id")).remove();clearTimeout(_1.delay_timer);},_4=function(_5,_6){switch(o.ttDType){case "tip":$body=_5;var _7=function(){var _8="",_9=o.ttaString;for(var _a in _9){_8+="<tr><td>"+_a+" "+_9[_a]+"</td></tr>";}return _8;};break;default:_5.imgUrl=_5.find("p.image a").attr("href");var c=_6.attr("rel").split("|");var _7=function(){var _b="";if(c[0]){_b+="<tr><td>Produkt: "+c[0]+"</td></tr>";}if(c[1]){_b+="<tr><td>Pris: "+c[1]+"</td></tr>";}if(!_5.hasClass("catalog")){_b+="<tr><td>Interval: "+c[3]+"</td></tr>";}if(!_5.hasClass("catalog")){if(typeof (c[4])!="undefined"){_b+="<tr><td>Neste levering: "+c[4]+"</td></tr>";}else{_b+="<tr><td>Neste levering: Ingen.</td></tr>";}}return _b;};}return _7;};return this.each(function(){var _c=$(this),_d=_c,_e=_c.find("p.text")||_c,_f=_c.offset(),_10=function(_11){_11.find("#arrow").css({"background":"url('http://static.ak.fbcdn.net/rsrc.php/zA4IG/hash/cny9pytx.png') no-repeat -480px -188px","height":"10px","width":"15px","position":"absolute","top":"-10px","left":"150px","border-bottom":"1px solid #fff","z-index":"15000"});if(o.ttDType=="tip"){_11.css({"top":(_f.top-o.xOffset)+"px","left":(_f.left+o.yOffset)+"px","width":o.ttWidth,"height":o.ttHeight,"color":"#000"}).fadeIn("fast");}else{_11.css({"width":o.ttWidth,"height":o.ttHeight,"color":"#000","position":"absolute","right":"0px"}).fadeIn("fast");}_11.find("img").css({"width":o.ttWidth/2,"height":(typeof (o.ttHeight)=="string"?"auto":o.ttHeight/2)});_11.bind("mouseenter",function(){_c.data("hasFocus",1);});_11.bind("mouseleave",function(){_c.data("hasFocus",0);});};_c.bind("mouseenter",function(){var _12=_4(_c,_e);var _13=$("<div id=\"product_preview"+_c.attr("id")+"\" class=\"product_preview_wrapper\">\t\t\t\t\t\t\t\t\t\t<div id=\"arrow\"></div><div class='product_preview'><table>"+_12()+"</table> </div></div>");if($("#product_preview"+_c.attr("id")).length==0){$(".product_preview_wrapper").remove();_d.append(_13);_10(_13);}});_c.bind("mouseleave",function(){if(_c.data("hasFocus")==0||!_c.data("hasFocus")){_2(_c);}});if(o.showFor&&$("#preview"+_c.attr("id")).length==0){var _14=_4(_c);var _15=$("<div id=\"preview"+_c.attr("id")+"\" class=\"product_preview_wrapper\">\t\t\t\t\t\t\t\t\t\t<div id=\"arrow\"></div><div class='product_preview'><table>"+_14()+"</table> </div></div>");_d.append(_15);_10(_15);_1.delay_timer=setTimeout(function(){_2(_c);},o.showFor);}});};})(jQuery);;
/**
 * jQuery Validation Plugin 1.8.0
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2011 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($) {

$.extend($.fn, {
	// http://docs.jquery.com/Plugins/Validation/validate
	validate: function( options ) {

		// if nothing is selected, return nothing; can't chain anyway
		if (!this.length) {
			options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
			return;
		}

		// check if a validator for this form was already created
		var validator = $.data(this[0], 'validator');
		if ( validator ) {
			return validator;
		}

		validator = new $.validator( options, this[0] );
		$.data(this[0], 'validator', validator);

		if ( validator.settings.onsubmit ) {

			// allow suppresing validation by adding a cancel class to the submit button
			this.find("input, button").filter(".cancel").click(function() {
				validator.cancelSubmit = true;
			});

			// when a submitHandler is used, capture the submitting button
			if (validator.settings.submitHandler) {
				this.find("input, button").filter(":submit").click(function() {
					validator.submitButton = this;
				});
			}

			// validate the form on submit
			this.submit( function( event ) {
				if ( validator.settings.debug )
					// prevent form submit to be able to see console output
					event.preventDefault();

				function handle() {
					if ( validator.settings.submitHandler ) {
						if (validator.submitButton) {
							// insert a hidden input as a replacement for the missing submit button
							var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
						}
						validator.settings.submitHandler.call( validator, validator.currentForm );
						if (validator.submitButton) {
							// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
							hidden.remove();
						}
						return false;
					}
					return true;
				}

				// prevent submit for invalid forms or custom submit handlers
				if ( validator.cancelSubmit ) {
					validator.cancelSubmit = false;
					return handle();
				}
				if ( validator.form() ) {
					if ( validator.pendingRequest ) {
						validator.formSubmitted = true;
						return false;
					}
					return handle();
				} else {
					validator.focusInvalid();
					return false;
				}
			});
		}

		return validator;
	},
	// http://docs.jquery.com/Plugins/Validation/valid
	valid: function() {
        if ( $(this[0]).is('form')) {
            return this.validate().form();
        } else {
            var valid = true;
            var validator = $(this[0].form).validate();
            this.each(function() {
				valid &= validator.element(this);
            });
            return valid;
        }
    },
	// attributes: space seperated list of attributes to retrieve and remove
	removeAttrs: function(attributes) {
		var result = {},
			$element = this;
		$.each(attributes.split(/\s/), function(index, value) {
			result[value] = $element.attr(value);
			$element.removeAttr(value);
		});
		return result;
	},
	// http://docs.jquery.com/Plugins/Validation/rules
	rules: function(command, argument) {
		var element = this[0];

		if (command) {
			var settings = $.data(element.form, 'validator').settings;
			var staticRules = settings.rules;
			var existingRules = $.validator.staticRules(element);
			switch(command) {
			case "add":
				$.extend(existingRules, $.validator.normalizeRule(argument));
				staticRules[element.name] = existingRules;
				if (argument.messages)
					settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
				break;
			case "remove":
				if (!argument) {
					delete staticRules[element.name];
					return existingRules;
				}
				var filtered = {};
				$.each(argument.split(/\s/), function(index, method) {
					filtered[method] = existingRules[method];
					delete existingRules[method];
				});
				return filtered;
			}
		}

		var data = $.validator.normalizeRules(
		$.extend(
			{},
			$.validator.metadataRules(element),
			$.validator.classRules(element),
			$.validator.attributeRules(element),
			$.validator.staticRules(element)
		), element);

		// make sure required is at front
		if (data.required) {
			var param = data.required;
			delete data.required;
			data = $.extend({required: param}, data);
		}

		return data;
	}
});

// Custom selectors
$.extend($.expr[":"], {
	// http://docs.jquery.com/Plugins/Validation/blank
	blank: function(a) {return !$.trim("" + a.value);},
	// http://docs.jquery.com/Plugins/Validation/filled
	filled: function(a) {return !!$.trim("" + a.value);},
	// http://docs.jquery.com/Plugins/Validation/unchecked
	unchecked: function(a) {return !a.checked;}
});

// constructor for validator
$.validator = function( options, form ) {
	this.settings = $.extend( true, {}, $.validator.defaults, options );
	this.currentForm = form;
	this.init();
};

$.validator.format = function(source, params) {
	if ( arguments.length == 1 )
		return function() {
			var args = $.makeArray(arguments);
			args.unshift(source);
			return $.validator.format.apply( this, args );
		};
	if ( arguments.length > 2 && params.constructor != Array  ) {
		params = $.makeArray(arguments).slice(1);
	}
	if ( params.constructor != Array ) {
		params = [ params ];
	}
	$.each(params, function(i, n) {
		source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
	});
	return source;
};

$.extend($.validator, {

	defaults: {
		messages: {},
		groups: {},
		rules: {},
		errorClass: "error",
		validClass: "valid",
		errorElement: "label",
		focusInvalid: true,
		errorContainer: $( [] ),
		errorLabelContainer: $( [] ),
		onsubmit: true,
		ignore: [],
		ignoreTitle: false,
		onfocusin: function(element) {
			this.lastActive = element;

			// hide error label and remove error class on focus if enabled
			if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
				this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
				this.addWrapper(this.errorsFor(element)).hide();
			}
		},
		onfocusout: function(element) {
			if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
				this.element(element);
			}
		},
		onkeyup: function(element) {
			if ( element.name in this.submitted || element == this.lastElement ) {
				this.element(element);
			}
		},
		onclick: function(element) {
			// click on selects, radiobuttons and checkboxes
			if ( element.name in this.submitted )
				this.element(element);
			// or option elements, check parent select in that case
			else if (element.parentNode.name in this.submitted)
				this.element(element.parentNode);
		},
		highlight: function( element, errorClass, validClass ) {
			$(element).addClass(errorClass).removeClass(validClass);
		},
		unhighlight: function( element, errorClass, validClass ) {
			$(element).removeClass(errorClass).addClass(validClass);
		}
	},

	// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
	setDefaults: function(settings) {
		$.extend( $.validator.defaults, settings );
	},

	messages: {
		required: "Dette felt er obligatorisk.",
		remote: "Vennligst se over dette felt.",
		email: "Vennligst skriv en gyldig e-post adresse.",
		url: "Vennligst skriv inn en gyldig URL.",
		date: "Vennligst skriv inn en gyldig dato.",
		dateISO: "Vennligst skriv inn en gyldig dato (ISO).",
		number: "Vennligst skriv inn gyldige tall.",
		digits: "Dette felt tar kun imot tall.",
		creditcard: "Please enter a valid credit card number.",
		equalTo: "Please enter the same value again.",
		accept: "Please enter a value with a valid extension.",
		maxlength: $.validator.format("Please enter no more than {0} characters."),
		minlength: $.validator.format("Please enter at least {0} characters."),
		rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
		range: $.validator.format("Please enter a value between {0} and {1}."),
		max: $.validator.format("Please enter a value less than or equal to {0}."),
		min: $.validator.format("Please enter a value greater than or equal to {0}.")
	},

	autoCreateRanges: false,

	prototype: {

		init: function() {
			this.labelContainer = $(this.settings.errorLabelContainer);
			this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
			this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
			this.submitted = {};
			this.valueCache = {};
			this.pendingRequest = 0;
			this.pending = {};
			this.invalid = {};
			this.reset();

			var groups = (this.groups = {});
			$.each(this.settings.groups, function(key, value) {
				$.each(value.split(/\s/), function(index, name) {
					groups[name] = key;
				});
			});
			var rules = this.settings.rules;
			$.each(rules, function(key, value) {
				rules[key] = $.validator.normalizeRule(value);
			});

			function delegate(event) {
				var validator = $.data(this[0].form, "validator"),
					eventType = "on" + event.type.replace(/^validate/, "");
				validator.settings[eventType] && validator.settings[eventType].call(validator, this[0] );
			}
			$(this.currentForm)
				.validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate)
				.validateDelegate(":radio, :checkbox, select, option", "click", delegate);

			if (this.settings.invalidHandler)
				$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/form
		form: function() {
			this.checkForm();
			$.extend(this.submitted, this.errorMap);
			this.invalid = $.extend({}, this.errorMap);
			if (!this.valid())
				$(this.currentForm).triggerHandler("invalid-form", [this]);
			this.showErrors();
			return this.valid();
		},

		checkForm: function() {
			this.prepareForm();
			for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
				this.check( elements[i] );
			}
			return this.valid();
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/element
		element: function( element ) {
			element = this.clean( element );
			this.lastElement = element;
			this.prepareElement( element );
			this.currentElements = $(element);
			var result = this.check( element );
			if ( result ) {
				delete this.invalid[element.name];
			} else {
				this.invalid[element.name] = true;
			}
			if ( !this.numberOfInvalids() ) {
				// Hide error containers on last error
				this.toHide = this.toHide.add( this.containers );
			}
			this.showErrors();
			return result;
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/showErrors
		showErrors: function(errors) {
			if(errors) {
				// add items to error list and map
				$.extend( this.errorMap, errors );
				this.errorList = [];
				for ( var name in errors ) {
					this.errorList.push({
						message: errors[name],
						element: this.findByName(name)[0]
					});
				}
				// remove items from success list
				this.successList = $.grep( this.successList, function(element) {
					return !(element.name in errors);
				});
			}
			this.settings.showErrors
				? this.settings.showErrors.call( this, this.errorMap, this.errorList )
				: this.defaultShowErrors();
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
		resetForm: function() {
			if ( $.fn.resetForm )
				$( this.currentForm ).resetForm();
			this.submitted = {};
			this.prepareForm();
			this.hideErrors();
			this.elements().removeClass( this.settings.errorClass );
		},

		numberOfInvalids: function() {
			return this.objectLength(this.invalid);
		},

		objectLength: function( obj ) {
			var count = 0;
			for ( var i in obj )
				count++;
			return count;
		},

		hideErrors: function() {
			this.addWrapper( this.toHide ).hide();
		},

		valid: function() {
			return this.size() == 0;
		},

		size: function() {
			return this.errorList.length;
		},

		focusInvalid: function() {
			if( this.settings.focusInvalid ) {
				try {
					$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
					.filter(":visible")
					.focus()
					// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
					.trigger("focusin");
				} catch(e) {
					// ignore IE throwing errors when focusing hidden elements
				}
			}
		},

		findLastActive: function() {
			var lastActive = this.lastActive;
			return lastActive && $.grep(this.errorList, function(n) {
				return n.element.name == lastActive.name;
			}).length == 1 && lastActive;
		},

		elements: function() {
			var validator = this,
				rulesCache = {};

			// select all valid inputs inside the form (no submit or reset buttons)
			// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
			return $([]).add(this.currentForm.elements)
			.filter(":input")
			.not(":submit, :reset, :image, [disabled]")
			.not( this.settings.ignore )
			.filter(function() {
				!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);

				// select only the first element for each name, and only those with rules specified
				if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
					return false;

				rulesCache[this.name] = true;
				return true;
			});
		},

		clean: function( selector ) {
			return $( selector )[0];
		},

		errors: function() {
			return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
		},

		reset: function() {
			this.successList = [];
			this.errorList = [];
			this.errorMap = {};
			this.toShow = $([]);
			this.toHide = $([]);
			this.currentElements = $([]);
		},

		prepareForm: function() {
			this.reset();
			this.toHide = this.errors().add( this.containers );
		},

		prepareElement: function( element ) {
			this.reset();
			this.toHide = this.errorsFor(element);
		},

		check: function( element ) {
			element = this.clean( element );

			// if radio/checkbox, validate first element in group instead
			if (this.checkable(element)) {
				element = this.findByName( element.name ).not(this.settings.ignore)[0];
			}

			var rules = $(element).rules();
			var dependencyMismatch = false;
			for (var method in rules ) {
				var rule = { method: method, parameters: rules[method] };
				try {
					var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );

					// if a method indicates that the field is optional and therefore valid,
					// don't mark it as valid when there are no other rules
					if ( result == "dependency-mismatch" ) {
						dependencyMismatch = true;
						continue;
					}
					dependencyMismatch = false;

					if ( result == "pending" ) {
						this.toHide = this.toHide.not( this.errorsFor(element) );
						return;
					}

					if( !result ) {
						this.formatAndAdd( element, rule );
						return false;
					}
				} catch(e) {
					this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
						 + ", check the '" + rule.method + "' method", e);
					throw e;
				}
			}
			if (dependencyMismatch)
				return;
			if ( this.objectLength(rules) )
				this.successList.push(element);
			return true;
		},

		// return the custom message for the given element and validation method
		// specified in the element's "messages" metadata
		customMetaMessage: function(element, method) {
			if (!$.metadata)
				return;

			var meta = this.settings.meta
				? $(element).metadata()[this.settings.meta]
				: $(element).metadata();

			return meta && meta.messages && meta.messages[method];
		},

		// return the custom message for the given element name and validation method
		customMessage: function( name, method ) {
			var m = this.settings.messages[name];
			return m && (m.constructor == String
				? m
				: m[method]);
		},

		// return the first defined argument, allowing empty strings
		findDefined: function() {
			for(var i = 0; i < arguments.length; i++) {
				if (arguments[i] !== undefined)
					return arguments[i];
			}
			return undefined;
		},

		defaultMessage: function( element, method) {
			return this.findDefined(
				this.customMessage( element.name, method ),
				this.customMetaMessage( element, method ),
				// title is never undefined, so handle empty string as undefined
				!this.settings.ignoreTitle && element.title || undefined,
				$.validator.messages[method],
				"<strong>Warning: No message defined for " + element.name + "</strong>"
			);
		},

		formatAndAdd: function( element, rule ) {
			var message = this.defaultMessage( element, rule.method ),
				theregex = /\$?\{(\d+)\}/g;
			if ( typeof message == "function" ) {
				message = message.call(this, rule.parameters, element);
			} else if (theregex.test(message)) {
				message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);
			}
			this.errorList.push({
				message: message,
				element: element
			});

			this.errorMap[element.name] = message;
			this.submitted[element.name] = message;
		},

		addWrapper: function(toToggle) {
			if ( this.settings.wrapper )
				toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
			return toToggle;
		},

		defaultShowErrors: function() {
			for ( var i = 0; this.errorList[i]; i++ ) {
				var error = this.errorList[i];
				this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
				this.showLabel( error.element, error.message );
			}
			if( this.errorList.length ) {
				this.toShow = this.toShow.add( this.containers );
			}
			if (this.settings.success) {
				for ( var i = 0; this.successList[i]; i++ ) {
					this.showLabel( this.successList[i] );
				}
			}
			if (this.settings.unhighlight) {
				for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
					this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
				}
			}
			this.toHide = this.toHide.not( this.toShow );
			this.hideErrors();
			this.addWrapper( this.toShow ).show();
		},

		validElements: function() {
			return this.currentElements.not(this.invalidElements());
		},

		invalidElements: function() {
			return $(this.errorList).map(function() {
				return this.element;
			});
		},

		showLabel: function(element, message) {
			var label = this.errorsFor( element );
			if ( label.length ) {
				// refresh error/success class
				label.removeClass().addClass( this.settings.errorClass );

				// check if we have a generated label, replace the message then
				label.attr("generated") && label.html(message);
			} else {
				// create label
				label = $("<" + this.settings.errorElement + "/>")
					.attr({"for":  this.idOrName(element), generated: true})
					.addClass(this.settings.errorClass)
					.html(message || "");
				if ( this.settings.wrapper ) {
					// make sure the element is visible, even in IE
					// actually showing the wrapped element is handled elsewhere
					label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
				}
				if ( !this.labelContainer.append(label).length )
					this.settings.errorPlacement
						? this.settings.errorPlacement(label, $(element) )
						: label.insertAfter(element);
			}
			if ( !message && this.settings.success ) {
				label.text("");
				typeof this.settings.success == "string"
					? label.addClass( this.settings.success )
					: this.settings.success( label );
			}
			this.toShow = this.toShow.add(label);
		},

		errorsFor: function(element) {
			var name = this.idOrName(element);
    		return this.errors().filter(function() {
				return $(this).attr('for') == name;
			});
		},

		idOrName: function(element) {
			return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
		},

		checkable: function( element ) {
			return /radio|checkbox/i.test(element.type);
		},

		findByName: function( name ) {
			// select by name and filter by form for performance over form.find("[name=...]")
			var form = this.currentForm;
			return $(document.getElementsByName(name)).map(function(index, element) {
				return element.form == form && element.name == name && element  || null;
			});
		},

		getLength: function(value, element) {
			switch( element.nodeName.toLowerCase() ) {
			case 'select':
				return $("option:selected", element).length;
			case 'input':
				if( this.checkable( element) )
					return this.findByName(element.name).filter(':checked').length;
			}
			return value.length;
		},

		depend: function(param, element) {
			return this.dependTypes[typeof param]
				? this.dependTypes[typeof param](param, element)
				: true;
		},

		dependTypes: {
			"boolean": function(param, element) {
				return param;
			},
			"string": function(param, element) {
				return !!$(param, element.form).length;
			},
			"function": function(param, element) {
				return param(element);
			}
		},

		optional: function(element) {
			return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
		},

		startRequest: function(element) {
			if (!this.pending[element.name]) {
				this.pendingRequest++;
				this.pending[element.name] = true;
			}
		},

		stopRequest: function(element, valid) {
			this.pendingRequest--;
			// sometimes synchronization fails, make sure pendingRequest is never < 0
			if (this.pendingRequest < 0)
				this.pendingRequest = 0;
			delete this.pending[element.name];
			if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
				$(this.currentForm).submit();
				this.formSubmitted = false;
			} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
				$(this.currentForm).triggerHandler("invalid-form", [this]);
				this.formSubmitted = false;
			}
		},

		previousValue: function(element) {
			return $.data(element, "previousValue") || $.data(element, "previousValue", {
				old: null,
				valid: true,
				message: this.defaultMessage( element, "remote" )
			});
		}

	},

	classRuleSettings: {
		required: {required: true},
		email: {email: true},
		url: {url: true},
		date: {date: true},
		dateISO: {dateISO: true},
		dateDE: {dateDE: true},
		number: {number: true},
		numberDE: {numberDE: true},
		digits: {digits: true},
		creditcard: {creditcard: true}
	},

	addClassRules: function(className, rules) {
		className.constructor == String ?
			this.classRuleSettings[className] = rules :
			$.extend(this.classRuleSettings, className);
	},

	classRules: function(element) {
		var rules = {};
		var classes = $(element).attr('class');
		classes && $.each(classes.split(' '), function() {
			if (this in $.validator.classRuleSettings) {
				$.extend(rules, $.validator.classRuleSettings[this]);
			}
		});
		return rules;
	},

	attributeRules: function(element) {
		var rules = {};
		var $element = $(element);

		for (var method in $.validator.methods) {
			var value = $element.attr(method);
			if (value) {
				rules[method] = value;
			}
		}

		// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
		if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
			delete rules.maxlength;
		}

		return rules;
	},

	metadataRules: function(element) {
		if (!$.metadata) return {};

		var meta = $.data(element.form, 'validator').settings.meta;
		return meta ?
			$(element).metadata()[meta] :
			$(element).metadata();
	},

	staticRules: function(element) {
		var rules = {};
		var validator = $.data(element.form, 'validator');
		if (validator.settings.rules) {
			rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
		}
		return rules;
	},

	normalizeRules: function(rules, element) {
		// handle dependency check
		$.each(rules, function(prop, val) {
			// ignore rule when param is explicitly false, eg. required:false
			if (val === false) {
				delete rules[prop];
				return;
			}
			if (val.param || val.depends) {
				var keepRule = true;
				switch (typeof val.depends) {
					case "string":
						keepRule = !!$(val.depends, element.form).length;
						break;
					case "function":
						keepRule = val.depends.call(element, element);
						break;
				}
				if (keepRule) {
					rules[prop] = val.param !== undefined ? val.param : true;
				} else {
					delete rules[prop];
				}
			}
		});

		// evaluate parameters
		$.each(rules, function(rule, parameter) {
			rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
		});

		// clean number parameters
		$.each(['minlength', 'maxlength', 'min', 'max'], function() {
			if (rules[this]) {
				rules[this] = Number(rules[this]);
			}
		});
		$.each(['rangelength', 'range'], function() {
			if (rules[this]) {
				rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
			}
		});

		if ($.validator.autoCreateRanges) {
			// auto-create ranges
			if (rules.min && rules.max) {
				rules.range = [rules.min, rules.max];
				delete rules.min;
				delete rules.max;
			}
			if (rules.minlength && rules.maxlength) {
				rules.rangelength = [rules.minlength, rules.maxlength];
				delete rules.minlength;
				delete rules.maxlength;
			}
		}

		// To support custom messages in metadata ignore rule methods titled "messages"
		if (rules.messages) {
			delete rules.messages;
		}

		return rules;
	},

	// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
	normalizeRule: function(data) {
		if( typeof data == "string" ) {
			var transformed = {};
			$.each(data.split(/\s/), function() {
				transformed[this] = true;
			});
			data = transformed;
		}
		return data;
	},

	// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
	addMethod: function(name, method, message) {
		$.validator.methods[name] = method;
		$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];
		if (method.length < 3) {
			$.validator.addClassRules(name, $.validator.normalizeRule(name));
		}
	},

	methods: {

		// http://docs.jquery.com/Plugins/Validation/Methods/required
		required: function(value, element, param) {
			// check if dependency is met
			if ( !this.depend(param, element) )
				return "dependency-mismatch";
			switch( element.nodeName.toLowerCase() ) {
			case 'select':
				// could be an array for select-multiple or a string, both are fine this way
				var val = $(element).val();
				return val && val.length > 0;
			case 'input':
				if ( this.checkable(element) )
					return this.getLength(value, element) > 0;
			default:
				return $.trim(value).length > 0;
			}
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/remote
		remote: function(value, element, param) {
			if ( this.optional(element) )
				return "dependency-mismatch";

			var previous = this.previousValue(element);
			if (!this.settings.messages[element.name] )
				this.settings.messages[element.name] = {};
			previous.originalMessage = this.settings.messages[element.name].remote;
			this.settings.messages[element.name].remote = previous.message;

			param = typeof param == "string" && {url:param} || param;

			if ( this.pending[element.name] ) {
				return "pending";
			}
			if ( previous.old === value ) {
				return previous.valid;
			}

			previous.old = value;
			var validator = this;
			this.startRequest(element);
			var data = {};
			data[element.name] = value;
			$.ajax($.extend(true, {
				url: param,
				mode: "abort",
				port: "validate" + element.name,
				dataType: "json",
				data: data,
				success: function(response) {
					validator.settings.messages[element.name].remote = previous.originalMessage;
					var valid = response === true;
					if ( valid ) {
						var submitted = validator.formSubmitted;
						validator.prepareElement(element);
						validator.formSubmitted = submitted;
						validator.successList.push(element);
						validator.showErrors();
					} else {
						var errors = {};
						var message = response || validator.defaultMessage( element, "remote" );
						errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
						validator.showErrors(errors);
					}
					previous.valid = valid;
					validator.stopRequest(element, valid);
				}
			}, param));
			return "pending";
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/minlength
		minlength: function(value, element, param) {
			return this.optional(element) || this.getLength($.trim(value), element) >= param;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
		maxlength: function(value, element, param) {
			return this.optional(element) || this.getLength($.trim(value), element) <= param;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
		rangelength: function(value, element, param) {
			var length = this.getLength($.trim(value), element);
			return this.optional(element) || ( length >= param[0] && length <= param[1] );
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/min
		min: function( value, element, param ) {
			return this.optional(element) || value >= param;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/max
		max: function( value, element, param ) {
			return this.optional(element) || value <= param;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/range
		range: function( value, element, param ) {
			return this.optional(element) || ( value >= param[0] && value <= param[1] );
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/email
		email: function(value, element) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
			return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/url
		url: function(value, element) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
			return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/date
		date: function(value, element) {
			return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
		dateISO: function(value, element) {
			return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/number
		number: function(value, element) {
			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/digits
		digits: function(value, element) {
			return this.optional(element) || /^\d+$/.test(value);
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
		// based on http://en.wikipedia.org/wiki/Luhn
		creditcard: function(value, element) {
			if ( this.optional(element) )
				return "dependency-mismatch";
			// accept only digits and dashes
			if (/[^0-9-]+/.test(value))
				return false;
			var nCheck = 0,
				nDigit = 0,
				bEven = false;

			value = value.replace(/\D/g, "");

			for (var n = value.length - 1; n >= 0; n--) {
				var cDigit = value.charAt(n);
				var nDigit = parseInt(cDigit, 10);
				if (bEven) {
					if ((nDigit *= 2) > 9)
						nDigit -= 9;
				}
				nCheck += nDigit;
				bEven = !bEven;
			}

			return (nCheck % 10) == 0;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/accept
		accept: function(value, element, param) {
			param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
			return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
		equalTo: function(value, element, param) {
			// bind to the blur event of the target in order to revalidate whenever the target field is updated
			// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
			var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
				$(element).valid();
			});
			return value == target.val();
		}

	}

});

// deprecated, use $.validator.format instead
$.format = $.validator.format;

})(jQuery);

// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
;(function($) {
	var pendingRequests = {};
	// Use a prefilter if available (1.5+)
	if ( $.ajaxPrefilter ) {
		$.ajaxPrefilter(function(settings, _, xhr) {
			var port = settings.port;
			if (settings.mode == "abort") {
				if ( pendingRequests[port] ) {
					pendingRequests[port].abort();
				}
				pendingRequests[port] = xhr;
			}
		});
	} else {
		// Proxy ajax
		var ajax = $.ajax;
		$.ajax = function(settings) {
			var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
				port = ( "port" in settings ? settings : $.ajaxSettings ).port;
			if (mode == "abort") {
				if ( pendingRequests[port] ) {
					pendingRequests[port].abort();
				}
				return (pendingRequests[port] = ajax.apply(this, arguments));
			}
			return ajax.apply(this, arguments);
		};
	}
})(jQuery);

// provides cross-browser focusin and focusout events
// IE has native support, in other browsers, use event caputuring (neither bubbles)

// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
;(function($) {
	// only implement if not provided by jQuery core (since 1.4)
	// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
	if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
		$.each({
			focus: 'focusin',
			blur: 'focusout'
		}, function( original, fix ){
			$.event.special[fix] = {
				setup:function() {
					this.addEventListener( original, handler, true );
				},
				teardown:function() {
					this.removeEventListener( original, handler, true );
				},
				handler: function(e) {
					arguments[0] = $.event.fix(e);
					arguments[0].type = fix;
					return $.event.handle.apply(this, arguments);
				}
			};
			function handler(e) {
				e = $.event.fix(e);
				e.type = fix;
				return $.event.handle.call(this, e);
			}
		});
	};
	$.extend($.fn, {
		validateDelegate: function(delegate, type, handler) {
			return this.bind(type, function(event) {
				var target = $(event.target);
				if (target.is(delegate)) {
					return handler.apply(target, arguments);
				}
			});
		}
	});
})(jQuery);

/**
 * jQuery Validation Plugin 1.8.0
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2011 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function() {
	
	function stripHtml(value) {
		console.log(value);
		// remove html tags and space chars
		return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
		// remove numbers and punctuation
		.replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
	}
	jQuery.validator.addMethod("maxWords", function(value, element, params) { 
	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params; 
	}, jQuery.validator.format("Please enter {0} words or less.")); 
	 
	jQuery.validator.addMethod("minWords", function(value, element, params) { 
	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params; 
	}, jQuery.validator.format("Please enter at least {0} words.")); 
	 
	jQuery.validator.addMethod("rangeWords", function(value, element, params) { 
	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1]; 
	}, jQuery.validator.format("Please enter between {0} and {1} words."));

})();

jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
	return this.optional(element) || /^[a-zA-ZæøåÆØÅ,\s]+$/i.test(value);
}, "Letters or punctuation only please");  

jQuery.validator.addMethod("alphanumeric", function(value, element) {
	return this.optional(element) || /^[a-zA-Z0-9æøåÆØÅ\s]+$/i.test(value);
}, "Dette felt aksepterer kun bokstaver & tall.");  

jQuery.validator.addMethod("lettersonly", function(value, element) {
	return this.optional(element) || /^[a-zA-ZæøåÆØÅ\s]+$/i.test(value);
}, "Dette felt aksepterer kun bokstaver."); 

jQuery.validator.addMethod("nowhitespace", function(value, element) {
	return this.optional(element) || /^\S+$/i.test(value);
}, "No white space please"); 

jQuery.validator.addMethod("ziprange", function(value, element) {
	return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");

jQuery.validator.addMethod("integer", function(value, element) {
	return this.optional(element) || /^-?\d+$/.test(value);
}, "Dette felt aksepterer kun tall.");

//TODO check if value starts with <, otherwise dont try stripping anything
jQuery.validator.addMethod("checkSelect", function(value, element) {
	return value == 0 ? false : true ;
}, "Vennligst velg fra listen.");

jQuery.validator.addMethod("password", function( value, element ) {
	var result = this.optional(element) || value.length >= 6 && /\d/.test(value) && /[a-z]/i.test(value);
	if (!result) {
	element.value = "";
	var validator = this;
	setTimeout(function() {
	validator.blockFocusCleanup = true;
	element.focus();
	validator.blockFocusCleanup = false;
	}, 1);
	}
	return result;
}, "Your password must be at least 6 characters long and contain at least one number and one character.");

/**
* Return true, if the value is a valid vehicle identification number (VIN).
*
* Works with all kind of text inputs.
*
* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
* @desc Declares a required input element whose value must be a valid vehicle identification number.
*
* @name jQuery.validator.methods.vinUS
* @type Boolean
* @cat Plugins/Validate/Methods
*/ 
jQuery.validator.addMethod(
	"vinUS",
	function(v){
		if (v.length != 17)
			return false;
		var i, n, d, f, cd, cdv;
		var LL    = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
		var VL    = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
		var FL    = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
		var rs    = 0;
		for(i = 0; i < 17; i++){
		    f = FL[i];
		    d = v.slice(i,i+1);
		    if(i == 8){
		        cdv = d;
		    }
		    if(!isNaN(d)){
		        d *= f;
		    }
		    else{
		        for(n = 0; n < LL.length; n++){
		            if(d.toUpperCase() === LL[n]){
		                d = VL[n];
		                d *= f;
		                if(isNaN(cdv) && n == 8){
		                    cdv = LL[n];
		                }
		                break;
		            }
		        }
		    }
		    rs += d;
		}
		cd = rs % 11;
		if(cd == 10){cd = "X";}
		if(cd == cdv){return true;}
		return false; 
	},
	"The specified vehicle identification number (VIN) is invalid."
);

/**
  * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
  *
  * @example jQuery.validator.methods.date("01/01/1900")
  * @result true
  *
  * @example jQuery.validator.methods.date("01/13/1990")
  * @result false
  *
  * @example jQuery.validator.methods.date("01.01.1900")
  * @result false
  *
  * @example <input name="pippo" class="{dateITA:true}" />
  * @desc Declares an optional input element whose value must be a valid date.
  *
  * @name jQuery.validator.methods.dateITA
  * @type Boolean
  * @cat Plugins/Validate/Methods
  */
jQuery.validator.addMethod(
	"dateITA",
	function(value, element) {
		var check = false;
		var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
		if( re.test(value)){
			var adata = value.split('/');
			var gg = parseInt(adata[0],10);
			var mm = parseInt(adata[1],10);
			var aaaa = parseInt(adata[2],10);
			var xdata = new Date(aaaa,mm-1,gg);
			if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
				check = true;
			else
				check = false;
		} else
			check = false;
		return this.optional(element) || check;
	}, 
	"Please enter a correct date"
);

jQuery.validator.addMethod("dateNL", function(value, element) {
		return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
	}, "Vul hier een geldige datum in."
);

jQuery.validator.addMethod("time", function(value, element) {
		return this.optional(element) || /^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(value);
	}, "Please enter a valid time, between 00:00 and 23:59"
);

/**
 * matches US phone number format 
 * 
 * where the area code may not start with 1 and the prefix may not start with 1 
 * allows '-' or ' ' as a separator and allows parens around area code 
 * some people may want to put a '1' in front of their number 
 * 
 * 1(212)-999-2345
 * or
 * 212 999 2344
 * or
 * 212-999-0983
 * 
 * but not
 * 111-123-5434
 * and not
 * 212 123 4567
 */
jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, ""); 
	return this.optional(element) || phone_number.length > 9 &&
		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");

jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
return this.optional(element) || phone_number.length > 9 &&
phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
}, 'Please specify a valid phone number');

jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
return this.optional(element) || phone_number.length > 9 &&
phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
}, 'Please specify a valid mobile number');

jQuery.validator.addMethod('phoneNO', function(phone_number, element) {
	return this.optional(element) || phone_number.length > 9 &&
	phone_number.match(/^((2|3|5|6|7){1}\d{7})$/);
	}, 'Vennligst oppgi et gyldig telefonnummer (fastnet).');

jQuery.validator.addMethod('mobileNO', function(phone_number, element) {
return this.optional(element) || phone_number.match(/^((4|9){1}\d{7})$/);
}, 'Vennligst oppgi et gyldig mobilnummer.');

// TODO check if value starts with <, otherwise don't try stripping anything
jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
	return jQuery(value).text().length >= param;
}, jQuery.validator.format("Please enter at least {0} characters"));

// same as email, but TLD is optional
jQuery.validator.addMethod("email2", function(value, element, param) {
	return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); 
}, jQuery.validator.messages.email);

// same as url, but TLD is optional
jQuery.validator.addMethod("url2", function(value, element, param) {
	return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); 
}, jQuery.validator.messages.url);

// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {

	if (/[^0-9-]+/.test(value)) 
		return false;
	
	value = value.replace(/\D/g, "");
	
	var validTypes = 0x0000;
	
	if (param.mastercard) 
		validTypes |= 0x0001;
	if (param.visa) 
		validTypes |= 0x0002;
	if (param.amex) 
		validTypes |= 0x0004;
	if (param.dinersclub) 
		validTypes |= 0x0008;
	if (param.enroute) 
		validTypes |= 0x0010;
	if (param.discover) 
		validTypes |= 0x0020;
	if (param.jcb) 
		validTypes |= 0x0040;
	if (param.unknown) 
		validTypes |= 0x0080;
	if (param.all) 
		validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
	
	if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
		return value.length == 16;
	}
	if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
		return value.length == 16;
	}
	if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
		return value.length == 15;
	}
	if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
		return value.length == 14;
	}
	if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
		return value.length == 15;
	}
	if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
		return value.length == 16;
	}
	if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
		return value.length == 16;
	}
	if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
		return value.length == 15;
	}
	if (validTypes & 0x0080) { //unknown
		return true;
	}
	return false;
}, "Please enter a valid credit card number.");

jQuery.validator.addMethod("ipv4", function(value, element, param) { 
    return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
}, "Please enter a valid IP v4 address.");

jQuery.validator.addMethod("ipv6", function(value, element, param) { 
    return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
}, "Please enter a valid IP v6 address.");;
(function($){var _1=($.browser.msie?"paste":"input")+".mask";var _2=(window.orientation!=undefined);$.mask={definitions:{"9":"[0-9]","a":"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn"};$.fn.extend({caret:function(_3,_4){if(this.length==0){return;}if(typeof _3=="number"){_4=(typeof _4=="number")?_4:_3;return this.each(function(){if(this.setSelectionRange){this.setSelectionRange(_3,_4);}else{if(this.createTextRange){var _5=this.createTextRange();_5.collapse(true);_5.moveEnd("character",_4);_5.moveStart("character",_3);_5.select();}}});}else{if(this[0].setSelectionRange){_3=this[0].selectionStart;_4=this[0].selectionEnd;}else{if(document.selection&&document.selection.createRange){var _6=document.selection.createRange();_3=0-_6.duplicate().moveStart("character",-100000);_4=_3+_6.text.length;}}return {begin:_3,end:_4};}},unmask:function(){return this.trigger("unmask");},mask:function(_7,_8){if(!_7&&this.length>0){var _9=$(this[0]);return _9.data($.mask.dataName)();}_8=$.extend({placeholder:"_",completed:null},_8);var _a=$.mask.definitions;var _b=[];var _c=_7.length;var _d=null;var _e=_7.length;$.each(_7.split(""),function(i,c){if(c=="?"){_e--;_c=i;}else{if(_a[c]){_b.push(new RegExp(_a[c]));if(_d==null){_d=_b.length-1;}}else{_b.push(null);}}});return this.trigger("unmask").each(function(){var _f=$(this);var _10=$.map(_7.split(""),function(c,i){if(c!="?"){return _a[c]?_8.placeholder:c;}});var _11=_f.val();function _12(pos){while(++pos<=_e&&!_b[pos]){}return pos;};function _13(pos){while(--pos>=0&&!_b[pos]){}return pos;};function _14(_15,end){if(_15<0){return;}for(var i=_15,j=_12(end);i<_e;i++){if(_b[i]){if(j<_e&&_b[i].test(_10[j])){_10[i]=_10[j];_10[j]=_8.placeholder;}else{break;}j=_12(j);}}_16();_f.caret(Math.max(_d,_15));};function _17(pos){for(var i=pos,c=_8.placeholder;i<_e;i++){if(_b[i]){var j=_12(i);var t=_10[i];_10[i]=c;if(j<_e&&_b[j].test(t)){c=t;}else{break;}}}};function _18(e){var k=e.which;if(k==8||k==46||(_2&&k==127)){var pos=_f.caret(),_19=pos.begin,end=pos.end;if(end-_19==0){_19=k!=46?_13(_19):(end=_12(_19-1));end=k==46?_12(end):end;}_1a(_19,end);_14(_19,end-1);return false;}else{if(k==27){_f.val(_11);_f.caret(0,_1b());return false;}}};function _1c(e){var k=e.which,pos=_f.caret();if(e.ctrlKey||e.altKey||e.metaKey||k<32){return true;}else{if(k){if(pos.end-pos.begin!=0){_1a(pos.begin,pos.end);_14(pos.begin,pos.end-1);}var p=_12(pos.begin-1);if(p<_e){var c=String.fromCharCode(k);if(_b[p].test(c)){_17(p);_10[p]=c;_16();var _1d=_12(p);_f.caret(_1d);if(_8.completed&&_1d>=_e){_8.completed.call(_f);}}}return false;}}};function _1a(_1e,end){for(var i=_1e;i<end&&i<_e;i++){if(_b[i]){_10[i]=_8.placeholder;}}};function _16(){return _f.val(_10.join("")).val();};function _1b(_1f){var _20=_f.val();var _21=-1;for(var i=0,pos=0;i<_e;i++){if(_b[i]){_10[i]=_8.placeholder;while(pos++<_20.length){var c=_20.charAt(pos-1);if(_b[i].test(c)){_10[i]=c;_21=i;break;}}if(pos>_20.length){break;}}else{if(_10[i]==_20.charAt(pos)&&i!=_c){pos++;_21=i;}}}if(!_1f&&_21+1<_c){_f.val("");_1a(0,_e);}else{if(_1f||_21+1>=_c){_16();if(!_1f){_f.val(_f.val().substring(0,_21+1));}}}return (_c?i:_d);};_f.data($.mask.dataName,function(){return $.map(_10,function(c,i){return _b[i]&&c!=_8.placeholder?c:null;}).join("");});if(!_f.attr("readonly")){_f.one("unmask",function(){_f.unbind(".mask").removeData($.mask.dataName);}).bind("focus.mask",function(){_11=_f.val();var pos=_1b();_16();var _22=function(){if(pos==_7.length){_f.caret(0,pos);}else{_f.caret(pos);}};($.browser.msie?_22:function(){setTimeout(_22,0);})();}).bind("blur.mask",function(){_1b();if(_f.val()!=_11){_f.change();}}).bind("keydown.mask",_18).bind("keypress.mask",_1c).bind(_1,function(){setTimeout(function(){_f.caret(_1b(true));},0);});}_1b();});}});})(jQuery);;
(function($){$.extend({ncrRegistry:function(){this._collection={};this.get=function(_1,_2){var _3=typeof _2=="object"?_2:this._collection;for(var i in _3){if(typeof _3[i]=="object"&&i!=_1){this.get(_1,_3[i]);}else{if(i==_1){return _3[i];}else{return false;}}}return false;};this.set=function(_4,_5){this._collection[_4]=_5;};this.remove=function(_6){var _7=this._collection;for(var i in _7){if(typeof _7[i]=="object"&&i==_6){return delete _7[i];}}};},ncrAboManager:function($o){var _8;if(typeof (Drupal)!="undefined"){_8=Drupal.settings.basePath;}else{_8="http://www.dagligvareekspressen.no/";}$o=$.extend({url:_8+"sites/all/standalone/abo/ajax2.php",page:"",lang:"nb",param:{prodnr:"",ts:"",pg_exists:""}},$o);return new $.ncrAbo($o);},ncrAbo:function($o){if(typeof (Drupal)!="undefined"){this.basePath=Drupal.settings.basePath;}else{this.basePath="http://www.dagligvareekspressen.no/";}this.$options=$o;this.registry=new $.ncrRegistry();this.$ajaxManager=$.manageAjax({manageType:"queue",maxReq:10,blockSameRequest:true});this.initErrorHandler=function(){$(window).error(function(_9,_a,_b){var _c=$ncrAbo,$o=_c.$options;try{_c.$ajaxManager.add({url:$o.url,data:{page:"ajax_log_error",lang:$o.lang,p:"1"}});}catch(e){}return true;});};this.$basket={getMealContainer:function(){return $("#ncrabo_maltider");},getMealSlots:function(_d){this._mealslots=this.getMealContainer().children();this._num_mealslots=this.getNumFreeMealSlots();if(typeof _d=="undefined"){return $(this._mealslots);}else{return $(this._mealslots).find("#"+_d);}},getNumFreeMealSlots:function(){if(typeof this._mealslots=="undefined"){this.getMealSlots();}this._num_mealslots=this._mealslots.find(".ncrabo_maltid_addnew").not(".slot_reserved").length;return this._num_mealslots;},getFreeMealSlot:function(){var _e=this.getMealSlots().find(".ncrabo_maltid_addnew").not(".slot_reserved").first();_e.addClass("slot_reserved");_e.parent().find(".ncrabo_working_maltid").css({"display":"block"});return _e.parent().parent();},updateMealSlots:function(_f){for(var $i=0;$i<this._num_mealslots;$i++){if($(this._mealslots[$i]).attr("id")==_f){return this.getNumFreeMealSlots();}}}};this.initLazyload=function(){$(".ncrabo_product_image .img","#ncrabo_lev_list_title").lazyload({threshold:500,effect:"fadeIn"});};this.initTooltip=function(){$("table tr td div.product_wrap","#ncrabo_lev_list_title").tooltip({ttWidth:"auto",ttHeight:"auto"});};this.displayPromptBox=true;this.sessionExpired=function(){this.displayPromptBox=false;};}});$.extend($.ncrAbo.prototype,{init:function(){this.initErrorHandler();this.initLazyload();this.bindTabs();this.initTooltip();this.initDeliveryList();},getBasket:function(){return this.$basket;},bindTabs:function(){$(".ncrabo_tabs_wrap","#ncrabo_lev_list_title").tabs({tabStruct:"div>div",bookmarkable:false,onShow:function(tab,_10,_11){var _12=$(_10).find(".product_wrap");if(_12.length===0){$(_10).find(".empty_pg").css({"display":"block"});}else{$(_10).find(".empty_pg").css({"display":"none"});}},onClick:function(tab,_13,_14){var _15=$(tab),_16=_15.attr("href").split("_");if(_16[1]=="catalog"){$ncrAbo.promptUser("productcatalog",false,$(".ncrabo_tabs_wrap"),{title:"Varekatalog",icon:"",rClass:"ajax_p_catalog",param:"1|18"});$(document).one("close.promptBox",function(_17,_18,_19){_19.triggerTab(0);});}}});},addProduct:function($o,_1a){var $s=this.$options,_1b=this,$o=$.extend({},$s,$o);_1b.$ajaxManager.add({url:$o.url,data:{page:"ajax_ap_add",lang:$o.lang,p:$o.param.prodnr+"|"+$o.param.pg_exists+"|"+$o.param.ts+"|"+$o.param.ap_id+"|"+$o.param.pg_id},success:function(_1c){_1a($o,_1c,_1b);}});},productExists:function(_1d,$o,_1e){var $s=this.$options,_1f=this,$o=$.extend({},$s,$o),_20=$("#pg_"+$o.param.pg_id).parent(),_21=_20.find(".prod-nr-"+$o.param.prodnr);if(typeof ($o.param.displayPrompt)=="undefined"){$o.param.displayPrompt=true;}if(_21.length===0){_1f.addProduct($o,_1e);_1f.checkEmptyProductGroup($o);}else{if($o.param.displayPrompt){$(document).one("validate.promptBox",function(_22,_23,_24){if(_23){_1f.addProduct($o,_1e);_1f.checkEmptyProductGroup($o);}});_1f.promptUser("confirm","<p class=\"contentWrap\"><span class=\"text\">Dette produktet ligger i listen fra f&oslash;r.</span> <br><br> <span class=\"text\">Vil du legge til produktet igjen?</span><p>",_1d,{});}else{var _1d=$o.param.elementScope,_25=_1d.find(".ncrabo_undergruppe");_25.html("<p style=\"color:red;margin-left:5px;font-size:12px;\">Produktet ligger allerede i din handleliste!</p>");_25.find("p").wait(10000).fadeOut(200,function(){$(this).remove();});_1d.find(".ncrabo_working").css({"display":"none"});}}},addProductException:function($o,_26){var $s=this.$options,_27=this,$o=$.extend({},$s,$o);_27.$ajaxManager.add({url:$o.url,data:{page:"ajax_ap_utsett",lang:$o.lang,p:$o.param.ap_id+"|"+$o.param.ts+"|"+$o.param.interval},success:function(_28){_26($o,_28,_27);}});},removeProduct:function($o,_29){var $s=this.$options,_2a=this,$o=$.extend({},$s,$o);_2a.$ajaxManager.add({url:$o.url,data:{page:"ajax_ap_delete",lang:$o.lang,p:$o.param.ap_id+"|"},success:function(_2b){_29($o,_2b,_2a);}});},changeProductQty:function($o,_2c){var $s=this.$options,_2d=this,$o=$.extend({},$s,$o);_2d.$ajaxManager.add({url:$o.url,data:{page:"ajax_ap_alter_antall",lang:$o.lang,p:$o.param.ap_id+"|"+$o.param.qty+"|"+$o.param.validated},success:function(_2e){_2c($o,_2e,_2d);}});},changeProductInterval:function($o,_2f){var $s=this.$options,_30=this,$o=$.extend({},$s,$o);_30.$ajaxManager.add({url:$o.url,data:{page:"ajax_ap_change_intervall",lang:$o.lang,p:$o.param.ap_id+"|"+$o.param.interval+"|"+$o.param.ts},success:function(_31){_2f($o,_31,_30);}});},bindNewProduct:function(_32,$o){var $s=this.$options,_33=this,$o=$.extend({},$s,$o),_34=_32.attr("id").split("_"),_35=$o.param.sender||null,$ts=$(".ncrabo_delivery_select").val(),_36=_32.find("div[rel=exception]"),_37=_32.find("select.product_qty"),_38=_32.find("select.product_interval"),_39=_32.find("div.ncrabo_product_image"),_3a={ts:$ts,ap_id:_34[4],pg_id:$o.param.pg_id,interval:_32.find(".product_interval").val(),isReverse:$o.param.isReverse,qty:_37.val()};if($o.param.sender){_35.val("").focus();_33.checkEmptyProductGroup($o);}if(_36.length>0){_33.bExceptionBtn(_32,_36,{param:_3a});}if(_37.length>0){_33.bQtyField(_32,_37,{param:_3a});}if(_38.length>0){_33.bIntervalSelect(_32,_38,{param:_3a});}if(_39.length>0){_33.bProdImageHover(_32,_39);}if(!$o.param.pg_exists){_33.bindTabs();_33.initTooltip();var _3b=$("tr.prod-cat-list."+$o.param.pg_id+" .prod_right .product_wrap","#ncrabo_lev_list_title");for(var i=0;i<_3b.length;i++){var _3c=$(_3b[i]),_3d=_3c.find(".text").attr("rel").split("|"),_34=_3c.attr("id").split("_"),_3e=_3c.find("div[rel=add]"),_3f=_3c.find("div[rel=delete]"),_3a={prodnr:_3d[2],ts:$ts,pg_id:$o.param.pg_id,pg_exists:"1",ap_id:_34[4],elementScope:_3c};_33.bAddBtn(_3c,_3e,{param:_3a});_33.bdeleteBtn(_3c,_3f,{param:_3a});}var _40=$("#ncrabo_search_"+$o.param.pg_id,"#ncrabo_lev_list_title");if(!_40.data("isBinded")){_33.bnACO($o);}}},bnACO:function($o){var $s=this.$options,_41=this,$o=$.extend({},$s,$o),_42=$("#ncrabo_search_"+$o.param.pg_id)||$($o.param.externalClass);_42.data("isBinded",true);_42.autocomplete($o.url,{extraParams:{page:"ajax_search_prod",lang:"nb",p:"search"},defaultText:_42.attr("alt"),matchContains:"word",minChars:2,autoFill:false,scrollHeight:"300px",max:21,cacheLength:0,delay:1000,formatItem:function(row,i,max){if(row.fnCallback){return;}if(row.pris){var _43="kr "+row.pris;}else{var _43="";}return "<p class='ncrabo_autocomplete_productimage'>"+row.produktbilde+"</p><p class='ncrabo_autocomplete_producttext'>"+row.navn+"<br />"+row.pg_navn+"<br />"+_43+"</p>";},formatMatch:function(row,i,max){return row.navn+" "+row.produktnummer;},formatResult:function(row,_44){if(row.fnCallback){var _45=eval("("+row.fnCallback+")");if(typeof (_45)=="function"){_45();}return;}if(row.type=="info"){return;}else{return _44;}}}).result(function(e,_46,_47){if(_46.type=="info"){$ncrAbo.promptUser("productcatalog",false,$(".ncrabo_tabs_wrap"),{title:"Varekatalog",icon:"",rClass:"ajax_p_catalog",param:"1|18"});return;}var _48=$(this),_49=_46,_4a=$("tr.prod-cat-list."+_49.produktgruppe),_4b=0;if(_4a.length>0){_4b=1;}var _4c=function($o,_4d,_4e){var _4f=$o.param.sender.parent().parent();_4d=_4d.split("[DELIMITER]");if($o.param.pg_exists){var _50=$("tr.prod-cat-list."+$o.param.pg_id+" .prod_left");$(_4d[1]).insertAfter(_4f);$(_4d[0]).insertAfter(_50.children(":nth-child(1)")).fadeIn(0,function(){var _51=_50.children(":nth-child(2)");_4e.bindNewProduct(_51,$o);});}else{var _50=$("table.prod_next_delivery > tbody"),_52=$("tr#noprod");if(_52.length>0){_52.remove();}_50.prepend(_4d[0]).fadeIn(200,function(){_50=$("tr.prod-cat-list."+$o.param.pg_id+" .prod_left");var _53=_50.children(":nth-child(2)");_4e.bindNewProduct(_53,$o);});$(_4d[1]).insertAfter(_4f).wait(7000).fadeOut(200,function(){_50.children(".response-message").remove();});}var _54=_4f.parent().find(".response-message");_54.click(function(){_4e.scrollTo(_50.children(":nth-child(2)"));$(this).remove();});_54.hover(function(){$(this).css("background-color","#FFF086");},function(){$(this).css("background-color","#FFFFFF");});};var _55=_48.attr("id").split("_");_41.productExists($(".prod_left .prod-nr-"+_49.produktnummer),{param:{prodnr:_49.produktnummer,ts:$o.param.ts,pg_exists:_4b,pg_id:_49.produktgruppe,ap_id:0,elementScope:$(".prod_left .prod-nr-"+_49.produktnummer),sender_pg:_49.undergruppe,sender:_48}},_4c);});},getUrlParam:function(_56){_56=_56.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var _57="[\\?&]"+_56+"=([^&#]*)";var _58=new RegExp(_57);var _59=_58.exec(window.location.href);if(_59==null){return "";}else{return _59[1];}},setUrlParam:function(_5a,_5b){_5a=_5a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var _5c="[\\?&]"+_5a+"=([^&#]*)",_5d=new RegExp(_5c),_5e=_5d.exec(window.location.href);if(_5e==null){return window.location.href+"&"+_5a+"="+_5b;}else{return window.location.href.replace(_5e[1],_5b);}},bExceptionBtn:function(_5f,_60,$o){var $s=this.$options,_61=this,$o=$.extend({},$s,$o);_60.click(function(){_5f.find(".ncrabo_working").css({"display":"block"});var _62=function($o,_63,_64){_63=_63.split("[DELIMITER]");var _65=$o.param.elementScope,_66=$("tr."+$o.param.pg_id);$rightcontainer=$("#other_purchased_prod_"+$o.param.pg_id);_65.html(_63[0]);_65.fadeOut(0,function(){$(this).remove();$rightcontainer.prepend(_63[1]);var _67=$rightcontainer.find("div:nth-child(1)");_67=$(_67[0]);var _68=_67.attr("id").split("_"),_69=_67.find("div[rel=delete]");_64.bdeleteBtn(_67,_69,{param:{ts:$o.param.ts,ap_id:_68[4],pg_id:$o.param.pg_id,elementScope:_67,prodnr:$o.param.prodnr}});var _6a=_67.find("div[rel=add]"),_6b=_67.find(".text").attr("rel").split("|");_64.bAddBtn(_67,_6a,{param:{ts:$o.param.ts,prodnr:_6b[2],pg_id:$o.param.pg_id,elementScope:_67,pg_exists:"1",ap_id:_68[4]}});$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});_64.initTooltip();});_64.checkEmptyProductGroup($o);};var _6c=_5f.find(".product_interval");_61.addProductException({param:{ts:$o.param.ts,ap_id:$o.param.ap_id,pg_id:$o.param.pg_id,interval:_6c.val(),elementScope:_5f}},_62);return false;});},bdeleteBtn:function(_6d,_6e,$o){var $s=this.$options,_6f=this,$o=$.extend({},$s,$o);_6e.click(function(){var _70=function($o,_71,_72){var _73=$o.param.elementScope,_74="#ncrabo_abonnenter_produkter_rowid_"+$o.param.ap_id,_75=$(_74,"#ncrabo_lev_list_title");for(var i=0;i<_75.length;i++){var _76=$(_75[i]);if(_76.parent().hasClass("prod_left")){_76.html(_71);}_76.fadeOut(0,function(){_76.remove();});}_73.fadeOut(0,function(){$(this).remove();});_72.checkEmptyProductGroup($o);};$(".product_preview_wrapper","#ncrabo_lev_list_title").remove();_6f.removeProduct({param:{prodnr:$o.param.prodnr,ap_id:$o.param.ap_id,pg_id:$o.param.pg_id,elementScope:_6d}},_70);return false;});},bAddBtn:function(_77,_78,$o){var $s=this.$options,_79=this,$o=$.extend({},$s,$o),_7a=function($o,_7b,_7c){var _7d=$o.param.elementScope,_7e=$("#pg_"+$o.param.pg_id).parent();_7b=_7b.split("[DELIMITER]");_7d.fadeOut(0,function(){$(this).remove();$(_7b[0]).insertAfter(_7e.children(":nth-child(1)")).fadeIn(1000);$(_7b[1]).insertAfter("#pg_"+$o.param.pg_id).wait(7000).fadeOut(200);_7c.checkEmptyProductGroup($o);var _7f=$("#ncrabo_abonnenter_produkter_rowid_"+$o.param.ap_id);_7c.bindNewProduct(_7f,{param:{ts:$o.param.ts,pg_id:$o.param.pg_id,isReverse:$o.param.isReverse}});});};_78.click(function(){_79.productExists(_77,$o,_7a);$(".product_preview_wrapper").remove();return false;});},bQtyField:function(_80,_81,$o){var $s=this.$options,_82=this,$o=$.extend({},$s,$o);_81.data("initialValue",_81.val());_81.change(function(){_80.find(".ncrabo_working").css({"display":"block"});var _83=function($o,_84,_85){var _86=$o.param.elementScope.find("select.product_qty");if($o.param.qty>=20&&typeof ($o.param.validated)==="undefined"){$(document).one("validate.promptBox",function(_87,_88,_89){if(_88===true){$o.param.validated=_88;var _8a=function($o,_8b,_8c){var _8d=$o.param.elementScope.find(".ncrabo_ap_sum");_8d.html(_8b);};_89.data("initialValue",_89.val());_85.changeProductQty($o,_8a);$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});}else{_89.val(_89.data("initialValue"));$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});}});_85.promptUser("confirm",_84,$o.param.sender,{});}else{_86.data("initialValue",_86.val());var _8e=$o.param.elementScope.find(".ncrabo_ap_sum");_8e.html(_84);$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});}};_82.changeProductQty({param:{qty:_81.val(),ap_id:$o.param.ap_id,elementScope:_80,sender:$(this)}},_83);});},bIntervalSelect:function(_8f,_90,$o){var $s=this.$options,_91=this,$o=$.extend({},$s,$o);_90.change(function(){_8f.find(".ncrabo_working").css({"display":"block"});var _92=function($o,_93,_94){$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});};_91.changeProductInterval({param:{interval:_90.val(),ap_id:$o.param.ap_id,ts:$(".ncrabo_delivery_select").val(),elementScope:_8f}},_92);});},bProdImageHover:function(_95,_96){var _97=this;var _98=function(){var _99=_97.registry.get("ncrImageHover");if(typeof (_99)=="object"&&_99.id!=_95.attr("id")){_99.er.data("State",false);_99.er.trigger("ncrImageHoverClose");}};_96.bind("ncrImageHoverOpen",function(){var _9a=$(this).find("img"),_9b=_9a.attr("src"),_9c=4;_9a.attr("src",_9a.attr("rel"));_9a.attr("rel",_9b);var _9d=parseInt(_9a.css("height").replace("px",""));var _9e=parseInt(_9a.css("width").replace("px",""));_9a.data("OrgWidth",_9e);_9a.data("OrgHeight",_9d);_9a.css({"border":"1px solid black","margin":"4px","width":(_9a.data("OrgWidth")*_9c)+"px","height":(_9a.data("OrgHeight")*_9c)+"px"});$(this).css({"z-index":"20000","position":"absolute","margin-top":"-25px",});_97.registry.set("ncrImageHover",{er:$(this),id:_95.attr("id")});});_96.bind("ncrImageHoverClose",function(){var _9f=$(this).find("img"),_a0=_9f.attr("src");_9f.attr("src",_9f.attr("rel"));_9f.attr("rel",_a0);var _a1=_9f.data("OrgHeight"),_a2=_9f.data("OrgWidth");$(this).css({"z-index":"auto","position":"relative","margin-top":"10px"});_9f.css({"width":_a2+"px","height":_a1+"px","border":"0px solid black","margin":"0px"});});_96.click(function(){if(!$(this).data("State")){_98();$(this).data("State",true);$(this).trigger("ncrImageHoverOpen");}else{$(this).data("State",false);$(this).trigger("ncrImageHoverClose");}});},promptUser:function(_a3,_a4,_a5,_a6){if(this.displayPromptBox===false){return false;}var $s=this.$options,_a7=this,$o=$.extend({},$s,_a6),_a8=_a4,_a9=function(_aa,_ab,_ac,_ad){switch(_aa){case "confirm":var _ae=new $.promptBoxManager({html:_ab,senderObj:_ac,headBgColor:"#C04B46",headBorderColor:"#A23B3B",dialogTitle:_ad.title||"",confirm:true,icon:_ad.icon||null,type:_aa});break;case "error":var _ae=new $.promptBoxManager({html:_ab,senderObj:_ac,headBgColor:"#C04B46",headBorderColor:"#A23B3B",dialogTitle:"Det oppstod en uventet feil!",confirm:false,icon:null,type:_aa});break;case "info":var _af=new $.promptBoxManager({html:_ab,senderObj:_ac,headBgColor:"#fff",headBorderColor:"#fff",dialogTitle:_ad.title||"",confirm:false,icon:_ad.icon||null,type:_aa});break;case "help":var _b0=new $.promptBoxManager({dialogTitle:_ad.title||"",confirm:false,icon:_ad.icon||null,type:_aa,fillImage:_ab});break;case "productcatalog":var _b1=new $.promptBoxManager({html:_ab,senderObj:_ac,headBgColor:"#fff",headBorderColor:"#fff",dialogTitle:_ad.title||"",confirm:false,icon:_ad.icon||null,type:_aa});_a7.bProductCatalogNavigation($("#promptBox .content"));break;case "mealcatalog":var _b2=new $.promptBoxManager({html:_ab,senderObj:_ac,headBgColor:"#fff",headBorderColor:"#fff",dialogTitle:_ad.title||"",confirm:false,icon:_ad.icon||null,type:_aa});_a7.bmealCatalogNavigation($("#promptBox .content"),$(_ac).attr("id"));break;case "browserdetection":var _b3=new $.promptBoxManager({html:_ab,senderObj:_ac,headBgColor:"#fff",headBorderColor:"#fff",dialogTitle:_ad.title||"",confirm:false,close:false,icon:_ad.icon||null,type:_aa,width:"960px"});break;}};if(!_a8&&$o.rClass&&_a3=="productcatalog"){_a7.$ajaxManager.add({url:$o.url,data:{page:$o.rClass,lang:$o.lang,p:$o.param},success:function(_b4){_a8=_b4;_a9(_a3,_a8,_a5,_a6);}});}else{if(!_a8&&$o.rClass&&_a3=="mealcatalog"){_a7.$ajaxManager.add({url:$o.url,data:{page:$o.rClass,lang:$o.lang,p:$o.param},success:function(_b5){_a8=_b5;_a9(_a3,_a8,_a5,$o);}});}else{_a9(_a3,_a8,_a5,_a6);}}return false;},bProductCatalogNavigation:function(_b6){var $s=this.$options,_b7=this,$o=$.extend({},$s,$o),_b8=_b6.children().children().find("td.prod_cat_menu li a"),_b9=_b6.children().children().find("td.prod_list .ncrabo_report_rows"),_ba=_b6.children().children().find("td.prod_list");$navContainer=_b6.children().children().find("td.prod_list_navigation");if(_b6.data("product_group")==null){_b6.data("product_group","18");}if(_b6.data("activeNav")==null){_b6.data("activeNav","page_1");}_b7.bCatalog_paging(_b6,"ajax_p_catalog");_b7.bProdCat_pgNav(_b6);_b7.bProdCat_product(_b6);},bProdCat_product:function(_bb){var $s=this.$options,_bc=this,$o=$.extend({},$s,$o),_bd=_bb.children().children().find("td.prod_list .ncrabo_report_rows");_bd.each(function(){var _be=$(this),_bf=_be.attr("id").split("_"),$ts=$("#sel_ts_deliveries").val(),_c0=_be.find("div[rel=add]"),_c1=$("#"+_be.attr("id")).attr("class").split(" "),_c2=_c1[1].split("-");_c0.click(function(){_be.find(".ncrabo_working").css({"display":"block"});var _c3=function($o,_c4,_c5){var _c6=$o.param.sender.parent().parent();_c4=_c4.split("[DELIMITER]");if($o.param.pg_exists){var _c7=$("tr.prod-cat-list."+$o.param.pg_id+" .prod_left");$(_c4[0]).insertAfter(_c7.children(":nth-child(1)")).fadeIn(0,function(){var _c8=_c7.children(":nth-child(2)");_c5.bindNewProduct(_c8,$o);});}else{var _c7=$("table.prod_next_delivery > tbody"),_c9=$("tr#noprod");if(_c9.length>0){_c9.remove();}_c7.prepend(_c4[0]).fadeIn(0,function(){_c7=$("tr.prod-cat-list."+$o.param.pg_id+" .prod_left");_c5.bindNewProduct(_c7.children(":nth-child(2)"),$o);});$(_c4[1]).insertAfter(_c6).wait(7000).fadeOut(200,function(){_c7.children(".response-message").remove();});}var _ca=$o.param.elementScope,_cb=_ca.find(".ncrabo_undergruppe");_ca.find(".ncrabo_working").css({"display":"none"});_cb.html("<p style=\"color:green;margin-left:5px;font-size:12px;\">Produktet ble lagt til i din handleliste!</p>");_cb.find("p").wait(10000).fadeOut(200,function(){$(this).remove();});};var _cc=$("tr.prod-cat-list."+_bb.data("product_group")),_cd=0;if(_cc.length>0){_cd=1;}_bc.productExists($(".prod_left .prod-nr-"+_c2[2]),{param:{prodnr:_c2[2],ts:$ts,pg_exists:_cd,pg_id:_bb.data("product_group"),ap_id:0,elementScope:_be,sender_pg:_bb.data("product_group"),sender:_bb,displayPrompt:false,identifikator:"prod-cat"}},_c3);});});},bCatalog_paging:function(_ce,_cf){var $s=this.$options,_d0=this,$o=$.extend({},$s,$o),_d1=_ce.children().children().find("td.prod_list_navigation"),_d2=_ce.children().children().find("td.prod_list");_d1.each(function(){$(this).find("a").each(function(){$(this).click(function(){$(".prod_cat_load_overlay").css({"display":"block"});$(".prod_cat_load_icon_wrap").css({"display":"block"});var _d3=$(this).attr("href").split("_");_d0.$ajaxManager.add({url:$o.url,data:{page:_cf,lang:$o.lang,p:_d3[1]+"|"+_d3[2]+"|1"},success:function(_d4){var _d5=_d4.split("[DELIMITER]");_d2.html(_d5[0]);_d1.each(function(){$(this).html(_d5[1]);});$(".prod_cat_load_overlay").css({"display":"none"});$(".prod_cat_load_icon_wrap").css({"display":"none"});_d0.bCatalog_paging(_ce,_cf);if(_cf=="ajax_p_catalog"){_d0.bProdCat_product(_ce);}else{_d0.bmealCat_meal(_ce);}}});});});});},bProdCat_pgNav:function(_d6){var $s=this.$options,_d7=this,$o=$.extend({},$s,$o),_d8=_d6.children().children().find("td.prod_cat_menu .prod_menu ul li a"),_d9=_d6.children().children().find("td.prod_cat_menu .prod_menu ul"),_da=_d6.children().children().find("td.prod_list .ncrabo_report_rows"),_db=_d6.children().children().find("td.prod_list");$navContainer=_d6.children().children().find("td.prod_list_navigation");$("td.prod_cat_menu .prod_menu_sub").hide();$("td.prod_cat_menu .prod_menu > li > a").click(function(){var _dc=$(this).attr("href").split("_");$("td.prod_cat_menu .prod_menu_sub").slideUp("normal",function(){var _dd=$("td.prod_cat_menu .ncrabo_bold");if(_dd.hasClass("ncrabo_bold")){_dd.removeClass("ncrabo_bold");}else{_dd.addClass("ncrabo_bold");}});$(this).next().slideToggle("normal",function(){var _de=$(this).parent().find("a").first();if(_de.hasClass("ncrabo_bold")){_de.removeClass("ncrabo_bold");}else{_de.addClass("ncrabo_bold");}});_d6.data("product_group",_dc[2]);});_d8.each(function(){var _df=$(this);_df.click(function(){_d8.removeClass("ncrabo_bold");_df.addClass("ncrabo_bold");var _e0=_df.attr("href").split("_");_d6.find(".prod_cat_load_overlay").css({"display":"block"});_d6.find(".prod_cat_load_icon_wrap").css({"display":"block"});_d7.$ajaxManager.add({url:$o.url,data:{page:"ajax_p_catalog",lang:$o.lang,p:"1|"+_e0[2]+"|1"},success:function(_e1){var _e2=_e1.split("[DELIMITER]");_db.html(_e2[0]);$navContainer.each(function(){$(this).html(_e2[1]);});_d7.bCatalog_paging(_d6,"ajax_p_catalog");_d7.bProdCat_product(_d6);_d6.find(".prod_cat_load_overlay").css({"display":"none"});_d6.find(".prod_cat_load_icon_wrap").css({"display":"none"});}});});});},checkEmptyProductGroup:function($o){var $s=this.$options,_e3=this,$o=$.extend({},$s,$o),_e4=$(".prod-cat-list."+$o.param.pg_id),_e5=_e4.find(".prod_right_inner"),_e6=_e4.find(".prod_left"),_e7=_e6.find(".empty_pg"),_e8=_e5.find(".empty_pg").not(".tabs-hide");if(_e6.find(".ncrabo_report_rows").length===0){_e7.css({"display":"block"});}else{_e7.css({"display":"none"});}if(_e5.children().not(".tabs-hide").find(".product_wrap").length===0){_e8.css({"display":"block"});}else{_e8.css({"display":"none"});}$("table tr td div.product_wrap").tooltip({ttWidth:"auto",ttHeight:100});},bmealCatalogNavigation:function(_e9,_ea){var $s=this.$options,_eb=this,$o=$.extend({},$s,$o),_ec=_e9.children().children().find("td.prod_cat_menu li a"),_ed=_e9.children().children().find("td.prod_list .ncrabo_report_rows"),_ee=_e9.children().children().find("td.prod_list"),_ef=_e9.children().children().find("td.prod_list_navigation");_e9.data("meal_target_id",_ea);if(_e9.data("meal_group")==null){_e9.data("meal_group","18");}if(_e9.data("activeNav")==null){_e9.data("activeNav","page_1");}_eb.bCatalog_paging(_e9,"ajax_m_catalog");_eb.bmealCat_meal(_e9);},bmealCat_meal:function(_f0){var $s=this.$options,_f1=this,$o=$.extend({},$s,$o),_f2=_f0.children().children().find("td.prod_list .ncrabo_report_rows");_f2.each(function(){var _f3=$(this),_f4=_f3.attr("id").split("_"),$ts=$("#sel_ts_deliveries").val(),_f5=_f3.find("div[rel=add]"),_f6=_f3.find("a.ncrabo_navn_details"),_f7=_f3.find("td.ncrabo_report_product_image"),_f8=_f3.find("a.meal_details_close"),_f9=$("#"+_f3.attr("id")).attr("class").split(" "),_fa=_f9[1].split("-"),_fb=_f3.find("table.meal_details");_f5.click(function(){var _fc=function($o,_fd,_fe){if($o.param.groupExists){var _ff=$(".prod-cat-list.maltid_akk .prod_left"),_100=_ff.find(".ncrabo_report_rows");if(_100.length>0){_100.each(function(){$(this).remove();});}else{$("tr.prod-cat-head.maltid_akk").css({"display":"block"});$("tr.prod-cat-list.maltid_akk").css({"display":"block"});}}else{var _ff=$("table.prod_next_delivery").children();}var _101=$o.param.elementScope,_102=_fd.split("[DELIMITER]"),_103=_101.data("am_id"),_104=$o.param.meal_cat_el,_105=_104.find(".ncrabo_undergruppe");_f5=$o.param.senderButton;_101.html(_102[0]);_ff.append(_102[1]);_f5.data("isWorking",false);_104.find(".ncrabo_working").css({"display":"none"});_105.html("<span style=\"color:green;margin-left:5px;font-size:12px;\">M&aring;ltidet ble lagt til i din handleliste!</span>");_105.find("span").wait(10000).fadeOut(200,function(){$(this).remove();});if(_101.find(".ncrabo_maltid_navigation").length>0){_fe.bindMealEvents("content",_101);}else{_fe.bindMealEvents("no-content",_101);_fe.promptUser("error","<p style=\"text-align:center;\">Vi kunne dessverre ikke hente ditt m&aring;ltid.<br><br>Fortsetter problemet vennligst kontakt support.</p>");}$(".prod-cat-list.maltid_akk .prod_left").find(".ncrabo_report_rows").each(function(){_fe.bindMealEvents("mealprod-akk",$(this));});};var _106=_f1.getBasket().getNumFreeMealSlots(),_107=$(".prod-cat-list.maltid_akk .prod_left"),_108=_107.length,_109=_f3.find(".ncrabo_undergruppe"),_10a=_f3.find(".product_qty");if(_106!=0){if(_f5.data("isWorking")!=true){_f3.find(".ncrabo_working").css({"display":"block"});_f5.data("isWorking",true);_f1.changeMeal({param:{nav:"new",index:0,am_id:_f4[3],groupExists:_108,elementScope:_f1.getBasket().getFreeMealSlot(),num_slots:_106,meal_cat_el:_f3,portions:_10a.val(),senderButton:_f5}},_fc);}else{_109.html("<span style=\"color:green;margin-left:5px;font-size:12px;\">Vennligst vent mens vi oppretter ditt m&aring;ltid!</span>");_109.find("span").wait(2000).fadeOut(200,function(){$(this).remove();});}}else{_109.html("<span style=\"color:red;margin-left:5px;font-size:12px;\">Du m&aring; slette et m&aring;ltid for &aring; kunne legge til flere!</span>");_109.find("span").wait(10000).fadeOut(200,function(){$(this).remove();});}});_f6.hover(function(){$(this).css({"text-decoration":"underline !important"});},function(){$(this).css({"text-decoration":"none !important"});});_f6.click(function(){_fb.slideToggle();});_f7.click(function(){_fb.slideToggle();});_f8.click(function(){_fb.slideToggle();});});},bmealsNavigation:function(_10b){var $s=this.$options,_10c=this,$o=$.extend({},$s,$o),_10d=_10b.find(".nav_remove");if(_10d.length){var _10e=_10b.find(".ncrabo_maltid_navigation").attr("id").split("_"),_10f=_10b.attr("id").split("_"),_110=$(".prod-cat-list.maltid_akk .prod_left"),_111=_110.length;_10b.data("am_id",_10e[1]);var _112=function($o,_113,_114){var _115=$o.param.elementScope,_116=_113.split("[DELIMITER]"),_10e=_115.data("am_id"),_110=$(".prod-cat-list.maltid_akk .prod_left"),_117=_110.find(".ncrabo_report_rows");_115.html(_116[0]);_110.html(_116[1]);if(_110.children().length===0){$(".maltid_akk").each(function(){$(this).css({"display":"none"});});}_115.find(".ncrabo_working_maltid").css({"display":"none"});if(_115.find(".ncrabo_maltid_navigation").length>0){_114.bindMealEvents("content",_115);}else{_114.bindMealEvents("no-content",_115);}};_10d.click(function(){_10b.find(".ncrabo_working_maltid").css({"display":"block"});_10c.removeMeal({param:{index:_10f[3],am_id:_10e[1],elementScope:_10b,groupExists:_111}},_112);});}else{_10c.promptUser("error","Det oppstod et problem med navigeringen for m&aring;ltider. Vennligst kontakt support dersom problemet vedvarer.",_10b);}},bmealsAdd:function(_118){var _119=this,_11a=_118.find(".ncrabo_maltid_addnew");_11a.click(function(){var _11b=_119.getBasket().getMealContainer().data("isLoading");if(_11b==null||_11b==false){_119.getBasket().getMealContainer().data("isLoading",true);}else{return;}_118.find(".ncrabo_working_maltid").css({"display":"block"});$(document).one("close.promptBox",function(_11c,_11d,_11e){if(_11e instanceof jQuery){_11e.find(".ncrabo_working_maltid").css({"display":"none"});}_119.getBasket().getMealContainer().data("isLoading",false);});_119.promptUser("mealcatalog",false,_118,{title:"M&aring;ltidskatalog",icon:"",rClass:"ajax_m_catalog",param:"1"});});},bmealsPortions:function(_11f){var $s=this.$options,_120=this,$o=$.extend({},$s,$o),_121=_11f.find(".meal_qty"),_122=_11f.find(".ncrabo_maltid_navigation").attr("id").split("_");_121.data("initialValue",_121.val());_121.change(function(){_11f.find(".ncrabo_working_maltid").css({"display":"block"});var _123=function($o,_124,_125){var _126=$o.param.elementScope.find("select.meal_qty");if($o.param.qty>=20&&typeof ($o.param.validated)==="undefined"){$(document).one("validate.promptBox",function(_127,_128,_129){if(_128===true){$o.param.validated=_128;var _12a=function($o,_12b,_12c){var _12d=$o.param.elementScope,_122=_12d.data("am_id"),_12e=$(".prod-cat-list.maltid_akk").find(".prod_left"),_12f=_12e.find(".ncrabo_report_rows");_126.data("initialValue",_126.val());if(_12f.length>0){_12f.each(function(){$(this).remove();});}_12e.prepend(_12b);$o.param.elementScope.find(".ncrabo_working_maltid").css({"display":"none"});};_129.data("initialValue",_129.val());_125.changeMealPortion($o,_12a);$o.param.elementScope.find(".ncrabo_working_maltid").css({"display":"none"});}else{_129.val(_129.data("initialValue"));$o.param.elementScope.find(".ncrabo_working_maltid").css({"display":"none"});}});_125.promptUser("confirm",_124,$o.param.sender,{});}else{var _130=$o.param.elementScope,_122=_130.data("am_id"),_131=$(".prod-cat-list.maltid_akk").find(".prod_left"),_132=_131.find(".ncrabo_report_rows");_126.data("initialValue",_126.val());if(_132.length>0){_132.each(function(){$(this).remove();});}_131.prepend(_124);$o.param.elementScope.find(".ncrabo_working_maltid").css({"display":"none"});}};_120.changeMealPortion({param:{qty:_121.val(),am_id:_122[1],elementScope:_11f,sender:$(this)}},_123);});},bmealsDetails:function(_133){var $s=this.$options,_134=this,$o=$.extend({},$s,$o),_135=_133.find(".ncrabo_maltid_details_desc img"),_136=_133.find(".ncrabo_maltid_img");if(_135.length>0){var _137=_135.attr("alt"),_138=_133.data("am_id"),_139=$("#ncrabo_maltider_details_wrapper"),_13a=_139.find(".ncrabo_closeContainer"),_13b=function(){var _13c=_133.attr("id"),_13d=_139.data("activeParent");_139.slideToggle(500,function(){var _13e=_139.css("display");if(_13e=="block"){var _13f=function($o,_140,_141){var _142=$o.param.elementScope;_142.find(".ncrabo_loading").css({"display":"none"});_142.append(_140);};_134.fetchMealDetails({param:{am_id:_138,m_id:_137,elementScope:_139}},_13f);}else{_139.find(".ncrabo_loading").css({"display":"block"});_139.find("table").remove();if(_13c!==_13d&&_13d!=null){_137=_135.attr("alt");_138=_133.data("am_id");_139.slideDown(500,function(){var _143=function($o,_144,_145){var _146=$o.param.elementScope;_146.find(".ncrabo_loading").css({"display":"none"});_146.append(_144);};_134.fetchMealDetails({param:{am_id:_138,m_id:_137,elementScope:_139}},_143);});return;}}});_139.data("activeParent",_13c);};_135.click(_13b);_136.click(_13b);_13a.click(function(){_139.slideUp(500,function(){_139.find(".ncrabo_loading").css({"display":"block"});_139.find("table").remove();_139.data("activeParent",_133.attr("id"));});});}else{_134.promptUser("error","Beklageligvis har det oppst&aring;tt problemer med visning av detaljer. Fors&oslash;k igjen senere.",_133);}},removeMeal:function($o,_147){var $s=this.$options,_148=this,$o=$.extend({},$s,$o),_149=$o.param.elementScope,_14a=$("#ncrabo_maltider_details_wrapper"),_14b=_14a.css("display");if(_14a.data("activeParent")==_149.attr("id")){if(_14b=="block"){_14a.slideUp(500,function(){_14a.find(".ncrabo_loading").css({"display":"block"});_14a.find("table").remove();});}}_148.$ajaxManager.add({url:$o.url,data:{page:"ajax_am_remove",lang:$o.lang,p:$o.param.am_id+"|"+$o.param.index},success:function(data){_147($o,data,_148);}});},changeMealPortion:function($o,_14c){var $s=this.$options,_14d=this,$o=$.extend({},$s,$o);_14d.$ajaxManager.add({url:$o.url,data:{page:"ajax_am_adjust_antall",lang:$o.lang,p:$o.param.am_id+"|"+$o.param.qty+"|"+$o.param.validated},success:function(data){_14c($o,data,_14d);}});},changeMeal:function($o,_14e){var $s=this.$options,_14f=this,$o=$.extend({},$s,$o),_150=$("#ncrabo_maltider_details_wrapper"),_151=_150.css("display");if(_151=="block"){_150.slideUp(500,function(){_150.find(".ncrabo_loading").css({"display":"block"});_150.find("table").remove();});}_14f.$ajaxManager.add({url:$o.url,data:{page:"ajax_am_add",lang:$o.lang,p:$o.param.am_id+"|"+$o.param.index+"|"+$o.param.nav+"|"+$o.param.groupExists+"|"+$o.param.portions},success:function(data){_14e($o,data,_14f);}});},fetchMealDetails:function($o,_152){var $s=this.$options,_153=this,$o=$.extend({},$s,$o);_153.$ajaxManager.add({url:$o.url,data:{page:"ajax_m_details",lang:$o.lang,p:$o.param.am_id+"|"+$o.param.m_id},success:function(data){_152($o,data,_153);}});},determineRenderType:function(_154){var _155=_154.find(".ncrabo_maltid_addnew");if(_155.length==0){return true;}else{return false;}},bindMealEvents:function(_156,_157){var $s=this.$options,_158=this,$o=$.extend({},$s,$o);switch(_156){case "content":_158.bmealsNavigation(_157);_158.bmealsDetails(_157);_158.bmealsPortions(_157);break;case "no-content":_158.bmealsAdd(_157);break;case "mealprod-akk":_158.bIntervalSelectAkk(_157,_157.find(".product_qty"),$o);_158.bdeleteBtnAkk(_157,_157.find("div[rel=delete]"),$o);break;default:_158.promptUser("error","<p>Vi beklager, men det har oppst&aring;tt en feil. <br> Fortsetter problemet vennligst kontakt support.</p>",_157);}},orderSummary:function($ts,_159){var $s=this.$options,_15a=this,$o=$.extend({},$s,$o);var _15b=function($o,_15c,_15d){_15d.promptUser("info",_15c,_159,{title:""});};_15a.$ajaxManager.add({url:$o.url,data:{page:"ajax_delivery_summary",lang:$o.lang,p:$ts+"|"},success:function(data){_15b($o,data,_15a);}});},scrollTo:function(_15e){var $s=this.$options,_15f=this,$o=$.extend({},$s,$o);if(_15e.length>0){var _160=$.browser.mozilla;if(_160){$(document).scrollTop(_15e.offset().top-200);}else{$("body").animate({scrollTop:_15e.offset().top-200},{duration:"slow",easing:"swing"});}}else{setTimeout(function(){_15f.promptUser("confirm","<p style=\"text-align:center;\">Det oppstod et uventet problem!<br /><br />&Oslash;nsker du &aring; sende oss en automatisk rapport?<br /><br /><i>NB: Dette kan ta litt tid, men det vil hjelpe oss med &aring; forbedre tjenesten.</i></p>");},2000);}},bIntervalSelectAkk:function(_161,_162,$o){var $s=this.$options,_163=this,$o=$.extend({},$s,$o),_164=_161.attr("id").split("_");if(_162.data("isBound")){return;}_162.data("initialValue",_162.val());_162.change(function(){_161.find(".ncrabo_working").css({"display":"block"});var _165=function($o,_166,_167){if($o.param.qty>=20&&typeof ($o.param.validated)==="undefined"){$(document).one("validate.promptBox",function(_168,_169,_16a){if(_169===true){$o.param.validated=_169;var _16b=function($o,_16c,_16d){var _16e=$o.param.elementScope.find(".ncrabo_ap_sum");_16e.html(_16c);$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});};_16a.data("initialValue",_16a.val());_167.$ajaxManager.add({url:$o.url,data:{page:"ajax_ama_alter_antall",lang:$o.lang,p:_164[5]+"|"+_162.val()+"|"+$o.param.validated},success:function(data){_16b($o,data,_167);}});}else{_16a.val(_16a.data("initialValue"));var _16f=$o.param.elementScope.find(".ncrabo_ap_sum");_16f.html(_166);$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});}});_167.promptUser("confirm",_166,$o.param.elementScope,{});}else{var _170=$o.param.elementScope.find(".ncrabo_ap_sum");_170.html(_166);$o.param.elementScope.find(".ncrabo_working").css({"display":"none"});}};$o.param.elementScope=_161;$o.param.qty=_162.val();_163.$ajaxManager.add({url:$o.url,data:{page:"ajax_ama_alter_antall",lang:$o.lang,p:_164[5]+"|"+_162.val()+"|"+$o.param.validated},success:function(data){_165($o,data,_163);}});});_162.data("isBound",true);},bdeleteBtnAkk:function(_171,_172,$o){var $s=this.$options,_173=this,$o=$.extend({},$s,$o),_174=_171.attr("id").split("_");if(_172.data("isBound")){return;}$o.param.elementScope=_171;_172.click(function(){var _175=function(_176,data,_177){_176.fadeOut(0,function(){$(this).remove();});};_173.$ajaxManager.add({url:$o.url,data:{page:"ajax_ama_delete",lang:$o.lang,p:_174[5]+"|"},success:function(data){_175(_171,data,_173);}});});_172.data("isBound",true);},initDeliveryList:function(){var $s=this.$options,_178=this,$o=$.extend({},$s,$o);var _179=$(".prod-cat-list","#ncrabo_lev_list_title").not(".maltid_akk");for(var $i=0;$i<_179.length;$i++){var _17a=$(_179[$i]);var _17b=_17a.find("div.prod_left div.prodgroup").attr("id").split("_"),$ts=$("#sel_ts_deliveries").val(),_17c={pg_id:_17b[1],ts:$ts};_178.bnACO({param:_17c});_178.initDeliveryList_left(_17a,_17c);_178.initDeliveryList_right(_17a,_17c);_178.checkEmptyProductGroup({param:_17c});}_178.initDeliveryList_meals();},initDeliveryList_left:function(_17d,$o){var _17e=this,_17f=_17d.find("div.prod_left div.ncrabo_report_rows").not(".prodgroup");for(var x=0;x<_17f.length;x++){var _180=$(_17f[x]),_181=_180.attr("id").split("_");_17e.bindNewProduct(_180,{param:{ts:$o.ts,ap_id:_181[4],pg_id:$o.pg_id,interval:_180.find(".product_interval").val(),elementScope:_180}});}},initDeliveryList_right:function(_182,$o){var _183=this,_184=_182.find("div.prod_right_inner .product_wrap");for(var y=0;y<_184.length;y++){var _185=$(_184[y]),_186=_185.find(".text").attr("rel").split("|"),_187=_185.attr("id").split("_"),_188=_185.find("div[rel=add]"),_189=_185.find("div[rel=delete]");_183.bAddBtn(_185,_188,{param:{prodnr:_186[2],ts:$o.ts,pg_id:$o.pg_id,pg_exists:"1",ap_id:_187[4],elementScope:_185}});_183.bdeleteBtn(_185,_189,{param:{prodnr:_186[2],ap_id:_187[4],pg_id:$o.pg_id,elementScope:_185}});}},initDeliveryList_meals:function(){var _18a=this;$(".img_delivery_summary","#ncrabo_lev_list_title").click(function(){_18a.orderSummary($("#sel_ts_deliveries").val(),$(this));return false;});var _18b=$(".ncrabo_maltid","#ncrabo_maltider");for(var j=0;j<_18b.length;j++){var _18c=$(_18b[j]);if(_18a.determineRenderType(_18c)){_18a.bindMealEvents("content",_18c);}else{_18a.bindMealEvents("no-content",_18c);}}var _18d=$(".prod-cat-list.maltid_akk .prod_left .ncrabo_report_rows","#ncrabo_lev_list_title");for(var f=0;f<_18d.length;f++){_18a.bindMealEvents("mealprod-akk",$(_18d[f]));}}});})(jQuery);jQuery.fn.wait=function(time){return this.each(function(){var i=$(this);i.queue(function(){setTimeout(function(){i.dequeue();},time);});});};;
$.extend($.ncrAbo.prototype,{detectBrowser:function(){var _1=this;var $o=this.$options;var _2=_1.detectBrowserVersion();var _3=0;var _4=0;var _5=true;var _6="";var _7="sites/all/themes/dagligvareekspressen2011/js/browsercheck/";var _8=this.basePath+_7;var _9="default_template.html";var _a="";var _b=function(){switch(_2.browserName){case "Chrome":_3=11;_4=0;if(_2.browserVersion.major<_3||_2.browserVersion.major==_3&&_2.browserVersion.minor<_4){_5=false;_c("chrome.html");}break;case "Opera":_3=10;_4=63;if(_2.browserVersion.major<_3||_2.browserVersion.major==_3&&_2.browserVersion.minor<_4){_5=false;_c("opera.html");}break;case "Firefox":_3=4;_4=0;if(_2.browserVersion.major<_3||_2.browserVersion.major==_3&&_2.browserVersion.minor<_4){_5=false;_c("mozilla.html");}break;case "Safari":_3=5;_4=0;if(_2.browserVersion.major<_3||_2.browserVersion.major==_3&&_2.browserVersion.minor<_4){_5=false;_c("mozilla.html");}break;case "msie":_3=9;_4=0;if(_2.browserVersion.major<_3||_2.browserVersion.major==_3&&_2.browserVersion.minor<_4){_5=false;_c("msie.html");$(document).one("close.promptBox",function(_d,_e,_f){setTimeout(function(){_1.detectBrowser();},1000);});}break;}};var _c=function(_10,_11){$.get(_8+_10,function(_12,_13){if(typeof (_11)=="undefined"){_12=_12.replace(/\[BROWSERNAME\]/g,_2.browserName);_12=_12.replace(/\[BROWSERVERSION\]/g,_2.browserVersion.full);_6=_12;}else{_a=_12;}}).complete(function(){if(typeof (_11)!="undefined"){_b();}else{if(!_5){_a=_a.replace(/\[CONTENT\]/g,_6);$ncrAbo.promptUser("browserdetection",_a,$(window),{});_1.$ajaxManager.add({url:$o.url,data:{page:"ajax_log_error",lang:$o.lang,p:"2"},success:function(_14){if(console){}}});}return _5;}});};_c(_9,true);},detectBrowserVersion:function(){var _15=navigator.userAgent.toLowerCase();var _16=0;var _17="";$.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());if($.browser.msie){_15=$.browser.version;_15=_15.substring(0,_15.indexOf("."));_15=_15.split(".");_16=_15;_17="msie";return {"browserName":_17,"browserVersion":{"major":_16[0],"minor":_16[1],"full":_16[0]+"."+(_16[1]?_16[1]:0)}};}if($.browser.chrome){_15=_15.substring(_15.indexOf("chrome/")+7);_15=_15.substring(0,_15.indexOf(" "));_15=_15.split(".");_16=_15;$.browser.safari=false;_17="Chrome";return {"browserName":_17,"browserVersion":{"major":_16[0],"minor":_16[1],"full":_16[0]+"."+(_16[1]?_16[1]:0)}};}if($.browser.safari){_15=_15.substring(_15.indexOf("version/")+7);_15=_15.substring(0,_15.indexOf(" "));_15=_15.substring(1,_15.indexOf("/")+5);_15=_15.split(".");_16=[_15[0],_15[1]];_17="Safari";return {"browserName":_17,"browserVersion":{"major":_16[0],"minor":_16[1],"full":_16[0]+"."+(_16[1]?_16[1]:0)}};}if($.browser.mozilla){if(navigator.userAgent.toLowerCase().indexOf("firefox")!=-1){_15=_15.substring(_15.indexOf("firefox/")+8);_15=_15.split(".");_16=[_15[0],_15[1]];}else{_16=[99,99];}_17="Firefox";return {"browserName":_17,"browserVersion":{"major":_16[0],"minor":_16[1],"full":_16[0]+"."+(_16[1]?_16[1]:0)}};}if($.browser.opera){_15=_15.substring(_15.indexOf("version/")+8);_15=_15.split(".");_16=_15;_17="Opera";return {"browserName":_17,"browserVersion":{"major":_16[0],"minor":_16[1],"full":_16[0]+"."+(_16[1]?_16[1]:0)}};}}});;
$(document).ready(function(){$ncrAbo=$.ncrAboManager();if(window.location.href.indexOf("&bc=1")>-1){$.benchmark.start();}var _1=$ncrAbo.detectBrowser();if(window.location.href.indexOf("node/26")>-1){if(!_1){var ua=$.browser;if(ua.msie&&parseInt(ua.version.slice(0,3))>=9||ua.chrome||ua.safari||ua.mozilla||ua.opera){$ncrAbo.init();}}else{$ncrAbo.init();}}if(window.location.href.indexOf("&bc=1")>-1){$.benchmark.end();}});;

