PageSourceSearch

https://feuerwehr-muehlacker.de/de-wGlobal/wGlobal/layout/scripts/merged/27c586e35120f9b2324e875ae554b9e3.js

js feuerwehr-muehlacker.de collected 2026-09-24 12:52:23 UTC 398,184 bytes, 5,313 lines download raw bytes

vendor: 4,514 bytes, lines 1-3
1/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
3!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n
vendor: 17,031 bytes, line 3
3.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[
vendor: 74,920 bytes, lines 3-5
31].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f
4}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)
5},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.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 contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
6
7wCssClassesToAddGlobal = {'body' : ['wglAddScrollTop'], '.no-weditor #blockTop' : [''], '#blockTopInner' : [''], '#blockBefore #navigationMain, #blockBeforeFull #navigationMain, #blockBeforeFullLeft #navigationMain, #blockBeforeFullRight #navigationMain' : ['wglNavigationOptimizeTouch'], '#blockTop #navigationMain' : ['wglNavigationOptimizeTouch'], '.searchTerm' : ['wglSearchSuggest'], '.clickable' : ['wglClickable'], '.elementContainerStandard_var1' : ['wglAdjustHeightMax'], '.elementSectionParallaxBackground_var10' : ['wglParallaxBackground'], '.elementSectionParallaxBackground_var20' : ['wglParallaxBackground'], '.elementSectionInnerHeight_var80' : ['section'], '.elementSectionIfVisible_var10' : ['wglAnimateIfVisible'], '.elementSectionIfVisible_var20' : ['wglAnimateIfVisible'], '.elementBoxPosition_var220' : ['wglKeepInsideTopOnScroll'], '.elementBoxParallaxBackground_var10' : ['wglParallaxBackground'], '.elementBoxParallaxBackground_var20' : ['wglParallaxBackground'], '.elementBoxParallaxContent_var10' : ['wglParallaxContent'], '.elementBoxParallaxContent_var20' : ['wglParallaxContent'], '.elementBoxIfVisible_var10' : ['wglAnimateIfVisible'], '.elementBoxIfVisible_var20' : ['wglAnimateIfVisible'], '.elementContainerLayout_var20' : ['wglKeepInsideTopOnScroll'], '.elementTabContainer_var4 .tabs' : ['wglAdjustWidthEqual'], '.listEntryClickable, .listEntryInnerClickable' : ['listEntryClickableJS'], '.listDefaultCols_var2' : ['wglAdjustHeightMax'], '.listDefaultCols_var3' : ['wglAdjustHeightMax'], '.listDefaultCols_var4' : ['wglAdjustHeightMax'], '.listDefault_var10000' : ['wglAdjustHeightMax'], '.listDefault_var10' : ['wglAdjustHeightMax'], '.listPictureGallery_var2 .listEntriesPreviewInner' : ['wglAdjustHeightMax'], '.listDefault_var11' : ['wglAdjustHeightMax']};
8wCssDataToAddGlobal = {'.searchTerm' : ['usecache=0'], '.elementSectionParallaxBackground_var10' : ['parallaxbackgrounddirection=bottom'], '.elementSectionParallaxBackground_var20' : ['parallaxbackgrounddirection=top'], '.elementSectionParallaxBackgroundSpeed_var10' : ['parallaxbackgroundspeed=2'], '.elementSectionParallaxBackgroundSpeed_var0' : ['parallaxbackgroundspeed=1'], '.elementSectionParallaxBackgroundSpeed_var50' : ['parallaxbackgroundspeed=0.5'], '.elementSectionParallaxBackgroundSpeed_var90' : ['parallaxbackgroundspeed=0.1'], '.elementBoxParallaxBackground_var10' : ['parallaxbackgrounddirection=bottom'], '.elementBoxParallaxBackground_var20' : ['parallaxbackgrounddirection=top'], '.elementBoxParallaxBackgroundSpeed_var10' : ['parallaxbackgroundspeed=2'], '.elementBoxParallaxBackgroundSpeed_var0' : ['parallaxbackgroundspeed=1'], '.elementBoxParallaxBackgroundSpeed_var50' : ['parallaxbackgroundspeed=0.5'], '.elementBoxParallaxBackgroundSpeed_var90' : ['parallaxbackgroundspeed=0.1'], '.elementBoxParallaxContent_var10' : ['parallaxcontentdirection=bottom'], '.elementBoxParallaxContent_var20' : ['parallaxcontentdirection=top'], '.elementBoxParallaxContentSpeed_var10' : ['parallaxcontentspeed=2'], '.elementBoxParallaxContentSpeed_var0' : ['parallaxcontentspeed=1'], '.elementBoxParallaxContentSpeed_var50' : ['parallaxcontentspeed=0.5'], '.elementBoxParallaxContentSpeed_var90' : ['parallaxcontentspeed=0.1'], '.elementNavigationSections_var0 a' : ['scrollsmoothtotargetduration=400']};
9wCssEventsToAddGlobal = {'a' : ['onclick=wScrollSmoothToTarget'], '.elementNavigationSections_var0 a' : ['onclick=wScrollSmoothToTarget'], '.elementNavigationSections_var30 a' : ['onclick=wScrollSmoothToTarget']};
10wCssDOM = {'.listDefaultDate_var20 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent()'}, '.listDefaultDate_var24 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent()'}, '.listDefaultDate_var30 .listEntryDate' : {'action' : 'insertafter', 'path' : 'parent()'}, '.listDefaultDate_var32 .listEntryDate' : {'action' : 'insertafter', 'path' : 'parent()'}, '.listDefaultDate_var70 .listEntryDate' : {'action' : 'insertafter', 'path' : 'parent()'}, '.listDefaultDate_var80 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent().parent()'}
10, '.listDefaultDate_var85 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent().parent()'}, '.listDefaultThumbnail_var30 .listEntryThumbnailOuter' : {'action' : 'prependto', 'path' : 'parent()'}, '.listDefaultThumbnail_var61 .listEntryThumbnailOuter' : {'action' : 'prependto', 'path' : 'parent()'}, '.listDefaultThumbnail_var73 .listEntryThumbnailOuter' : {'action' : 'prependto', 'path' : 'parent()'}, '.listDefault_var10000 .listEntryThumbnailOuter' : {'action' : 'prependto', 'path' : 'parent()'}, '.listDefault_var10 .listEntryThumbnailOuter' : {'action' : 'prependto', 'path' : 'parent()'}, '.listDefault_var11 .listEntryThumbnailOuter' : {'action' : 'prependto', 'path' : 'parent()'}};
11wCssJQuery = {'#blockTop #searchBox .searchTerm' : {'jQuery' : 'jQuery(this).focus(function(){jQuery(this).parent().addClass(\'focused\')}).on(\'blur\', function(){jQuery(this).parent().removeClass(\'focused\');jQuery(this).val(\'\');jQuery(\'#searchSuggestOuter\').remove()})', 'event' : 'document.ready'}, '.elementSectionBackgroundColor_var60 .elementText, .elementSectionBackgroundColor_var60 .elementLink' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementSectionBackgroundColor_var90 .elementText, .elementSectionBackgroundColor_var90 .elementLink' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementBoxBackgroundColor_var5 .elementText, .elementBoxBackgroundColor_var5 .elementLink' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementBoxBackgroundColor_var10 .elementText, .elementBoxBackgroundColor_var10 .elementLink' : {'jQuery' : 'jQuery(this).removeClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementBoxBackgroundColor_var30 .elementText, .elementBoxBackgroundColor_var30 .elementLink' : {'jQuery' : 'jQuery(this).removeClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementBoxBackgroundColor_var50 .elementText, .elementBoxBackgroundColor_var50 .elementLink' : {'jQuery' : 'jQuery(this).removeClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementBoxBackgroundColor_var60 .elementText, .elementBoxBackgroundColor_var60 .elementLink' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementBoxBackgroundColor_var90 .elementText, .elementBoxBackgroundColor_var90 .elementLink' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementLink_var10' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.elementLink_var51' : {'jQuery' : 'jQuery(this).addClass(\'iconsInvers\')', 'event' : 'document.ready'}, '.listDefaultDate_var40 .listEntryDate' : {'jQuery' : 'jQuery(this).prependTo(jQuery(this).parent().parent().find(\'.listEntryDescription\'))', 'event' : 'document.ready'}, '.listDefaultDate_var80 .listEntryDate' : {'jQuery' : 'jQuery(this).html(\'<span>\' + jQuery(this).html().replace(/ .*/, \'\') + \'</span><span>\' + jQuery(this).html().replace(/.* /, \'\').replace(/&.*/, \'\') + \'</span>\')', 'event' : 'document.ready'}, '.listDefaultDate_var85 .listEntryDate' : {'jQuery' : 'jQuery(this).html(\'<span>\' + jQuery(this).find(\'.daydate\').html().replace(/ .*/, \'\') + \'</span><span>\' + jQuery(this).find(\'.daydate\').html().replace(/.* /, \'\').replace((new RegExp(String.fromCharCode(38)+\'.*\')), \'\') + \'</span>\')', 'event' : 'document.ready'}, '.listDefaultThumbnail_var90 .listEntryThumbnail' : {'jQuery' : 'jQuery(this).parent().parent().css(\'background-image\', \'u\' + \'rl(\' + (jQuery(this).attr(\'data-src\') ? jQuery(this).attr(\'data-src\') : jQuery(this).attr(\'src\')) + \')\')', 'event' : 'document.ready'}, '.listDefaultLink_var10 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).appendTo(jQuery(this).parent().parent().find(\'.listEntryDescription\'))', 'event' : 'document.ready'}, '.listDefaultLink_var23 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}
11, '.listDefaultLink_var26 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).insertBefore(jQuery(this).parent().find(\'.listEntryTitle\')).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var27 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var37 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var39 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefault_var10000 .listEntryData-1' : {'jQuery' : 'jQuery(this).setWanted()', 'event' : 'document.ready'}, '.elementNavigationSections_var0 li' : {'jQuery' : 'jQuery(this).on(\'click\', function(){jQuery(this).parent().parent().prev().trigger(\'click\')})', 'event' : 'document.ready'}, '.elementNavigationSections_var0 .navigationSectionToggler' : {'jQuery' : 'jQuery(this).on(\'click\', function(){jQuery(this).toggleClass(\'open\').next().animate({\'height\' : \'toggle\'}, function(){if(jQuery(this).css(\'display\') == \'block\'){jQuery(this).addClass(\'open\').removeAttr(\'style\')}else{jQuery(this).removeClass(\'open\').removeAttr(\'style\')}})})', 'event' : 'document.ready'}};
12wMediaqueriesToAddGlobal = {'max1024' : {}, 'max979' : {}, 'max768' : {}, 'min769' : {}, 'max540' : {}, 'min541' : {}, 'max480' : {}, 'min481' : {}};
13/*
14////////////////////////////////////////////////////////////////
15//
16// UI JavaScript Funktionen
17//
18// Weblication CMS
19// erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de
20// erstellt mit Weblication Content Management System, www.weblication.de
21//
22////////////////////////////////////////////////////////////////
23//                                                            //
24//                   BITTE NICHT ANPASSEN!                    //
25//           JS-Anpassungen können in der design.js           //
26//                    durchgeführt werden.                    //
27//                                                            //
28////////////////////////////////////////////////////////////////
29*/
30
31/*
32////////////////////////////////////////////////////////////////
33//
34// UI JavaScript Funktionen
35//
36// Weblication CMS
37// erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de
38// erstellt mit Weblication Content Management System, www.weblication.de
39//
40////////////////////////////////////////////////////////////////
41//                                                            //
42//                   BITTE NICHT ANPASSEN!                    //
43//           JS-Anpassungen können in der design.js           //
44//                    durchgeführt werden.                    //
45//                                                            //
46////////////////////////////////////////////////////////////////
47*/
48
49wUiVersion     = '1.0.60';
50wAllowMinimize = false;
51wCssClassesToAddGlobal   = typeof(wCssClassesToAddGlobal) != 'undefined' ? wCssClassesToAddGlobal : {};
52wCssDataToAddGlobal      = typeof(wCssDataToAddGlobal) != 'undefined' ? wCssDataToAddGlobal : {};
53wCssEventsToAddGlobal    = typeof(wCssEventsToAddGlobal) != 'undefined' ? wCssEventsToAddGlobal : {};
54wCssJQuery               = typeof(wCssJQuery) != 'undefined' ? wCssJQuery : {};
55wCssDOM                  = typeof(wCssDOM) != 'undefined' ? wCssDOM : {};
56wMediaqueriesToAddGlobal = typeof(wMediaqueriesToAddGlobal) != 'undefined' ? wMediaqueriesToAddGlobal : {};
57
58if(typeof wUiTmp == 'undefined'){
59  wUiTmp = {};
60  if(typeof wUiTmp['wGlobalProjectPath'] == 'undefined'){
61    var scriptTags = document.getElementsByTagName('script');
62    try{
63      for(i = 0; i < scriptTags.length; i++){
64        if(scriptTags[i].getAttribute('src') && scriptTags[i].getAttribute('src').indexOf('/wGlobal/layout/scripts/') != -1){
65          wUiTmp['wGlobalProjectPath'] = scriptTags[i].getAttribute('src').replace(/^(\/[^\/]*)[^\?]*/, '$1').replace(/\?[\s\S]*$/, '');    
66        }  
67      }
68    }
69    catch(e){}
70  }  
71}
72
73devicePixelRatio = window.devicePixelRatio || 1;
74hdLimitDpr       = 2;
75
76if(document.documentElement){
77  document.documentElement.className = document.documentElement.className + (!/
77MSIE (6|7|8)/.test(navigator.appVersion) ? ' pagestatus-uiloaded' : '');
78}
79
80jQuery(document).ready(function(){
81  //console.log('ready');
82  
83  if(wUiTmp['hasFiredReady']){
84    return;
85  }
86  
87  wUiTmp['hasFiredReady'] = true;
88  
89  wCssClassesToAddGlobal   = typeof(wCssClassesToAddGlobal) != 'undefined' ? wCssClassesToAddGlobal : {};
90  wCssDataToAddGlobal      = typeof(wCssDataToAddGlobal) != 'undefined' ? wCssDataToAddGlobal : {};
91  wCssEventsToAddGlobal    = typeof(wCssEventsToAddGlobal) != 'undefined' ? wCssEventsToAddGlobal : {};
92  wCssJQuery               = typeof(wCssJQuery) != 'undefined' ? wCssJQuery : {};
93  wCssDOM                  = typeof(wCssDOM) != 'undefined' ? wCssDOM : {};
94  wMediaqueriesToAddGlobal = typeof(wMediaqueriesToAddGlobal) != 'undefined' ? wMediaqueriesToAddGlobal : {};
95
96  var htmlAdditionalClasses = '';
97
98  if(navigator.appVersion.match(/MSIE (\d+\..)/)){
99    htmlAdditionalClasses += ' ie' + String(navigator.appVersion.match(/MSIE (\d+\..)/)[1]).replace(/\..*/, '');
100  }
101
102  if(parent != self){
103    if(location.href.indexOf('viewmode=blank') != -1){
104      htmlAdditionalClasses += ' lightbox';
105    }
106  }
107
108  if(/mobile/i.test(navigator.userAgent)) htmlAdditionalClasses += ' mobile';
109  if(/iPad/i.test(navigator.userAgent)) htmlAdditionalClasses += ' ipad';
110  if(/iPhone/i.test(navigator.userAgent)) htmlAdditionalClasses += ' iphone';
111  if(/iPod/i.test(navigator.userAgent)) htmlAdditionalClasses += ' ipod';
112  if(/(iPod|iPhone|iPad)/i.test(navigator.userAgent)){
113    htmlAdditionalClasses += ' ios';
114    wUiTmp['isIOS'] = true;
115    if(/CriOs/i.test(navigator.userAgent)){
116      htmlAdditionalClasses += ' crios';
117    }
118    else if(/Safari/i.test(navigator.userAgent)){
119      wUiTmp['isSafari'] = true;
120      htmlAdditionalClasses += ' saios';
121    }
122  }
123
124  htmlAdditionalClasses += ' viewmode-' + (/viewmode=([^&]+)/.test(location.href) ? RegExp.$1 : 'default');
125  htmlAdditionalClasses += (/targetPreview=embed/.test(location.href) ? ' wpreview' : '');
126
127  htmlAdditionalClasses += (('ontouchstart' in window)|| navigator.msMaxTouchPoints  || window.DocumentTouch && document instanceof DocumentTouch ? ' touch' : ' no-touch');
128
129  htmlAdditionalClasses += jQuery(window).scrollTop() == 0 && document.documentElement.className.indexOf(' scrolled-top') == -1 ? ' scrolled-top' : '';
130
131  if(document.documentElement){
132    if(document.documentElement.getAttribute('lang')){
133      htmlAdditionalClasses += ' lang-' + document.documentElement.getAttribute('lang');
134    }
135
136    var documentElementClassName = document.documentElement.className;
137
138    if(jQuery(window).scrollTop() != 0){
139      documentElementClassName = documentElementClassName.replace(' scrolled-top', '');
140    }
141    documentElementClassName = (documentElementClassName.replace('no-js', '') + ' js' + htmlAdditionalClasses).replace(/^\s+/, '');
142    if(typeof(wEditor) == 'undefined'){
143      documentElementClassName = documentElementClassName.replace('weditor', '') + ' no-weditor';
144    }
145    else{
146      documentElementClassName = documentElementClassName.replace('no-weditor', '') + ' weditor';
147    }
148    documentElementClassName = documentElementClassName + (!/MSIE (6|7|8)/.test(navigator.appVersion) ? ' pagestatus-ready' : '');
149    if(/MSIE (6|7|8)/.test(navigator.appVersion)){
150      documentElementClassName = documentElementClassName.replace(/pagestatus-\w+/g, '');
151    }
152    document.documentElement.className = documentElementClassName;
153  }
154
155  if(document.cookie.indexOf('websitezoom=l') != -1){
156    document.body.className = document.body.className + ' zoom-l';
157  }
158
159  for(var addClassSelector in wCssClassesToAddGlobal){
160	jQuery(addClassSelector).each(function(index){
161	  var classesToAdd = wCssClassesToAddGlobal[addClassSelector];
162      for(var i = 0, arrayLength = classesToAdd.length; i < arrayLength; i++){
163        var classData = classesToAdd[i].split('=');
164        if(classData.length == 2){
165          var selector = jQuery.trim(classData[0]);
166          if(selector == '.'){
167            jQuery(this).addClass(jQuery.trim(classData[1]));
168          }
169          else if(selector == 'parent'){
170            jQuery(this).parent().addClass(jQuery.trim(classData[1]));
171          }
172          else{
173            jQuery(this).find(selector).addClass(jQuery.trim(classData[1]));
174          }
175        }
176        else{
177          jQuery(this).addClass(jQuery.trim(classData[0]));
178        }
179      }
180    });
181  }
182
183  for(var addDataSelector in wCssDataToAddGlobal){
184    jQuery(addDataSelector).each(function(index){
185      var dataToAdd = wCssDataToAddGlobal[addDataSelector];
186      for(var i = 0, arrayLength = dataToAdd.length; i < arrayLength; i++){
187        var data = dataToAdd[i].split('=');
188        jQuery(this).attr('data-' + jQuery.trim(data[0]), jQuery.trim(data[1]));
189      }
190    });
191  }
192
193  jQuery('*[data-w-addclasses]').each(function(index){
194
195    var classesToAdd = jQuery(this).data('w-addclasses').split(',');
196    jQuery(this).removeAttr('data-w-addclasses');
197    for(var i = 0, arrayLength = classesToAdd.length; i < arrayLength; i++){
198      var classData = classesToAdd[i].split('=');
199      var selector = jQuery.trim(classData[0]);
200      if(selector == '.'){
201        jQuery(this).addClass(jQuery.trim(classData[1]));
202      }
203      else{
204        jQuery(this).find(selector).addClass(jQuery.trim(classData[1]));
205      }
206    }
207  });
208
209  for(var addEventSelector in wCssEventsToAddGlobal){
210    jQuery(addEventSelector).each(function(index){
211      var eventsToAdd = wCssEventsToAddGlobal[addEventSelector];
212      for(var i = 0, arrayLength = eventsToAdd.length; i < arrayLength; i++){
213        var eventData = eventsToAdd[i].split('=');
214        if(eventData.length == 2){
215          var eventType     = jQuery.trim(eventData[0]).replace(/^on/, '');
216          var eventFunction = jQuery.trim(eventData[1]);
217          jQuery(this).on(eventType, (new Function('event', eventFunction + '(this, event.originalEvent);')));
218        }
219      }
220    });
221  }
222
223  for(var wCssJQueryEntry in wCssJQuery){
224    jQuery(wCssJQueryEntry).each(function(index){
225      if(!wCssJQuery[wCssJQueryEntry]['event'] || wCssJQuery[wCssJQueryEntry]['event'] == 'document.ready'){
226        eval(wCssJQuery[wCssJQueryEntry]['jQuery']);
227      }
228    });
229  }
230
231  for(var wCssDOMEntry in wCssDOM){
232    jQuery(wCssDOMEntry).each(function(index){
233      domActions = {'prependto' : 'prependTo', 'appendto' : 'appendTo', 'insertbefore' : 'insertBefore', 'insertafter' : 'insertAfter'};
234      if(/^(\w+)\(/.test(wCssDOM[wCssDOMEntry]['path'])){
235        eval('jQuery(this).' + domActions[wCssDOM[wCssDOMEntry]['action'].toLowerCase()] + '(jQuery(this).' + wCssDOM[wCssDOMEntry]['path'].replace(/\*\/$/, '') + ');');
236      }
237      else{
238        if(wCssDOM[wCssDOMEntry]['action'] == 'prependto'){
239          jQuery(this).prependTo(wCssDOM[wCssDOMEntry]['path']);
240        }
241        else if(wCssDOM[wCssDOMEntry]['action'] == 'appendto'){
242          jQuery(this).appendTo(wCssDOM[wCssDOMEntry]['path']);
243        }
244        else if(wCssDOM[wCssDOMEntry]['action'] == 'insertbefore'){
245          jQuery(this).insertBefore(wCssDOM[wCssDOMEntry]['path']);
246        }
247        else if(wCssDOM[wCssDOMEntry]['action'] == 'insertafter'){
248          jQuery(this).insertAfter(wCssDOM[wCssDOMEntry]['path']);
249        }
250      }
251    });
252  }
253
254  var mediaQueriesTmpToAdd = '<div id="wMediaqueriesTmp">';
255
256  for(var wMediaqueryToAddGlobal in wMediaqueriesToAddGlobal){
257    mediaQueriesTmpToAdd += '<div id="wMediaqueryTmp_' + wMediaqueryToAddGlobal + '"></div>';
258  }
259  mediaQueriesTmpToAdd += '</div>';
260  
261  wCookieNoticeVar = typeof(wCookieNoticeVar) != 'undefined' ? wCookieNoticeVar : '';
262  if(typeof(wEditor) != 'undefined' || document.cookie.indexOf('hideCookieNotice' + wCookieNoticeVar + '=1') != -1 || /bot|search|slurp|spider|crawler|mediapartners/i.test(navigator.userAgent)){
263    if(typeof closeCookieNotice == 'function'){    
264      closeCookieNotice();
265    }
266    else{
267      jQuery('#cookieNotice').hide();
268    } 
269  }
270  else{
271    if(typeof showCookieNotice == 'function'){    
272      showCookieNotice();
273    }
274    else{    
275      jQuery('#cookieNotice').show();
276    }  
277  }
278
279  jQuery('body').append(mediaQueriesTmpToAdd);
280
281  jQuery('.wglBannerSlider').wBannerSlider();
282  jQuery('.wglPictureGallery').wPictureGallery();
283  jQuery('.wglTabcontainer').wTabcontainer();
284  jQuery('.wglAccordion').wAccordion();
285  jQuery('.wglSearchSuggest').wSearchSuggest();
286
287  jQuery('label').each(function(index){
288    var nameFor     = jQuery(this).attr('for');
289    if(nameFor && nameFor != ''){
290      var currentForm = jQuery(this).closest('form').get(0);
291      if(currentForm){
292        var elementFor  = currentForm.elements[nameFor];
293        if(elementFor && elementFor.length){
294          elementFor = elementFor[0];
295        }
296
297        if(!elementFor){
298          elementFor = jQuery(this).closest('form').find('#' + nameFor).get(0);
299        }
300
301        if(elementFor && typeof(elementFor.getAttribute('placeholder')) == 'string' && (elementFor.className.indexOf('wglIsInvalid') == -1 || elementFor.value == '')){
302          if(elementFor.getAttribute('data-showlabelifhasplaceholder') != '1' && typeof(elementFor.placeholder) != 'undefined'){
303            jQuery(this).css({'display' : 'none'});
304          }
305        }
306      }
307    }
308  });
309
310  wPrepareHTML();
311
312  if(window.matchMedia){
313    window.matchMedia('print').addListener(function(){
314      wUiTmp['isMediaPrint'] = true;
315      jQuery(window).trigger('resize');
316    });
317  }
318  else{
319    window.onbeforeprint = function(event){
320      wUiTmp['isMediaPrint'] = true;
321      jQuery(window).trigger('resize');
322    };
323  }
324
325  if(/viewmode=print/.test(location.search)){
326    wUiTmp['isViewmodePrint'] = true;
327  }
328
329  
330  window.setTimeout(function(event){
331    wAdaptParallax(event);
332  }, 320);
333  
334  wAdaptConditionalFormData();
335  
336  jQuery('.wglAddScrollProgress').each(function(index){
337
338    var currentElement = jQuery(this);
339    currentElement.append('<progress id="scrollProgress" max="1000" value="
3390"><div></div></progress');
340    
341    wUiTmp['elementScrollProgress'] = jQuery('#scrollProgress');
342    
343    jQuery(window).on('resize scroll', function(){
344      var winScrollTop   = jQuery(window).scrollTop();
345      var winHeight      = jQuery(window).height();       
346      var documentHeight = jQuery(document).height();      
347      var scrollPercentage = Math.round(1000 * winScrollTop / (documentHeight - winHeight));
348      wUiTmp['elementScrollProgress'].attr('value', scrollPercentage)
349    });
350  });
351
352  jQuery('.wglAddScrollTop').each(function(index){
353
354    var currentElement = jQuery(this);
355    if(currentElement.get(0).nodeName.toLowerCase() == 'body'){
356      currentElement.append('<div id="scrollTopOuter"><div id="scrollTop"><div class="scrollTopInner"></div></div></div');
357    }
358    else{
359      currentElement.after('<div id="scrollTopOuter"><div id="scrollTop"><div class="scrollTopInner"></div></div></div');
360    }
361    
362    jQuery('#scrollTop').on('mousedown touchstart', function (event){
363      event.preventDefault();
364	  jQuery('body, html').animate({scrollTop:0});
365	});
366    
367    jQuery(window).scroll(function(){
368      var scrollTop  = jQuery(this).scrollTop();
369      if(scrollTop > 200){
370        jQuery('#scrollTop').fadeIn();
371      }
372      else{
373        jQuery('#scrollTop').fadeOut();
374      }
375    });
376  });
377
378  jQuery('.wglAddFontResizer').each(function(index){
379
380    var currentElement = jQuery(this);
381    var char = 'A';
382    if(currentElement.attr('data-fontResizerVal') == 0) char = '';
383    currentElement.prepend('<div id="fontResizer"><span class="fontResizerLabel"></span><span class="fontResizerShrink">'+char+'</span><span class="fontResizerEnlarge">'+char+'</span></div');
384
385    jQuery('.fontResizerShrink').on('click', function (event){
386      document.cookie = 'websitezoom=;path=/';
387      location.reload();
388		});
389    jQuery('.fontResizerEnlarge').on('click', function (event){
390      document.cookie = 'websitezoom=l;path=/';
391      location.reload();
392	});
393  });
394
395  jQuery('.wglShrinkToMinWidthWithoutBreak').each(function(index){
396
397    var currentElement = jQuery(this);
398    var widthOuter = currentElement.width();
399    var widthInner = currentElement.children('*').outerWidth();
400    var textAlignBefore = currentElement.css('text-align');
401    currentElement.css({'text-align' : 'left'});
402    var lastElementInner = currentElement.children('*:last');
403    var offsetRightLastElementInner = Math.ceil(lastElementInner.get(0).offsetLeft + lastElementInner.outerWidth() + parseInt(lastElementInner.css('margin-right')));
404    currentElement.css({'text-align' : textAlignBefore});
405    currentElement.css({'width' : String(offsetRightLastElementInner) + 'px'});
406  });
407
408  jQuery('.wglAdjustWidthEqual').each(function(index){
409
410    var currentElement = jQuery(this);
411    var numberEntries  = 0;
412    currentElement.children('*').each(function(index){
413      if(jQuery(this).css('display') != 'none'){
414        numberEntries++;
415      }
416    });
417    var widthPerEntry  = String(100 / numberEntries) + '%';
418    currentElement.children('*').each(function(index){
419      if(jQuery(this).css('display') != 'none'){
420        jQuery(this).css({'width' : widthPerEntry});
421      }
422    });
423  });
424
425  jQuery('.wglRemoveOnClick').each(function(index){
426    jQuery(this).attr('onclick', '').off('click');
427  });
428  
429  jQuery('.wglCaptcha').each(function(index){
430    if(jQuery(this).find('iframe[data-h="1"]').length == 1){
431      jQuery(this).closest('.formElementCaptcha').hide();
432      jQuery(this).closest('form').find('button[type="submit"]').on('click', function(event){
433        var iFr = jQuery(this).closest('form').find('iframe[class="wglIFrameSc"]');
434        jQuery(this).closest('form').find('input[id="captchaInput"]').val(iFr.get(0).contentWindow.gv(event.originalEvent, iFr.data('k')).substr(5, 4));
435      });
436    }
437  });
438
439  if(typeof(wEditor) == 'undefined'){
440    jQuery('.wglFancybox').each(function(index){
441      var currentElement = jQuery(this);
442      if(currentElement.get(0).nodeName == 'IMG'){
443        var wrapElement = currentElement.parent().attr('class') == 'listEntryThumbnailOuter' ? currentElement.parent() : currentElement;
444        var srcFancy    = currentElement.attr('src');
445        if(currentElement.attr('data-src') && currentElement.attr('data-src') != ''){
446          srcFancy = currentElement.attr('data-src');
447        }
448        else{
449          if(/\-/.test(srcFancy.replace(/[\s\S]+\//, ''))){
450            srcFancy = srcFancy.replace(/\/weblication\/wThumbnails/, '').replace(/-[^-]+(\.\w+)$/, '$1');
451          }
452          else if(currentElement.attr('data-src2x') && currentElement.attr('data-src2x') != ''){
453            srcFancy = currentElement.attr('data-src2x');
454          }
455        }
456
457        var closestList = currentElement.closest('.elementList');
458        var relId       = '';
459        if(closestList.length == 1){
460          relId = closestList.attr('id');
461        }
462        wrapElement.wrap('<a rel="' + relId + '" onclick="event && event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true;" title="' + currentElement.get(0).alt + '" class="boxPictureOnly" href="' + srcFancy + '"/>');
463      }
464    });
465    
466    if(('ontouchstart' in window) || navigator.msMaxTouchPoints || window.DocumentTouch && document instanceof DocumentTouch){
467      jQuery('.wglNavigationOptimizeTouch li li:not(:has(ul))').each(function(index){
468        //jQuery(this).css({'border' : 'solid 4px blue'});
469        jQuery(this).on('click touchstart', function(event){
470          event.stopPropagation();
471        });
472      });
473      jQuery('.wglNavigationOptimizeTouch li.navLevel1Open > a, .wglNavigationOptimizeTouch li.navLevel1OpenSelected > a, .wglNavigationOptimizeTouch li.navLevel1OpenDescendantSelected > a, .wglNavigationOptimizeTouch li.navLevel1:has(a[data-previewlink]) > a').each(function(index){
474        //jQuery(this).css({'border' : 'solid 4px green'});
475        jQuery(this).on(navigator.userAgent.indexOf('Trident') != -1 && navigator.userAgent.indexOf('Touch') != -1 ? 'pointerdown' : 'click', function(event){
476          var timeClicked = new Date().getTime();
477          if(event.pointerType && event.pointerType == 'mouse'){
478          }
479          else if(event.target.getAttribute('data-on-touch-expire') && event.target.getAttribute('data-on-touch-expire') == 1 && parseInt(event.target.getAttribute('data-has-already-touched')) > timeClicked - 700){
480          }
481          else if(!(event.target.getAttribute('data-on-touch-expire') && event.target.getAttribute('data-on-touch-expire') == 1) && event.target.getAttribute('data-has-already-touched')){
482          }
483          else{
484            event.preventDefault();
485            event.target.setAttribute('data-has-already-touched', timeClicked);
486          }
487        });
488      });
489    }
490    
491    jQuery('form[data-inlinevalidation!="onblur"] input[data-validators="email"]').each(function(){
492      jQuery(this).on('blur', function(){
493        jQuery(this).val(jQuery(this).val().trim());
494      });
495    });    
496  
497    jQuery('form[data-inlinevalidation="onblur"]').each(function(){
498      wUiTmp['formPos'] = wUiTmp['formPos'] ? wUiTmp['formPos'] + 1 : 1;
499      jQuery(this).attr('data-formpos', wUiTmp['formPos']);
500      if(jQuery(this).attr('action').indexOf('/weblication/grid5/tmpHTTP/wForm-') != -1){
501        jQuery(this).find('input, textarea, select').each(function(){
502          if(jQuery(this).attr('name') == 'captchaInput'){
503            return true;
504          }
505          if(location.search.indexOf('wFormStatus=failed') != -1){
506            wglValidateElementInline(jQuery(this).get(0), {'onInit' : true});
507          }
508          var eventsToValidate = 'blur';
509          if(jQuery(this).attr('type') == 'radio'){
510            eventsToValidate = 'click';
511          }
512          else if(jQuery(this).attr('type') == 'file'){
513            eventsToValidate = 'change';
514          }
515          else if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).prop("tagName") == 'SELECT'){
516            eventsToValidate = 'change';
517          }
518          else if(jQuery(this).hasClass('hasDatepicker')){
519            eventsToValidate = 'change';
520          }
521
522          jQuery(this).on(eventsToValidate, function(){
523            wglValidateElementInline(jQuery(this).get(0), {});
524          });
525        });
526      }
527    });
528  }
529
530  jQuery('.wglClickable').css({'cursor': 'pointer'});
531
532  //if(/Android/i.test(navigator.userAgent) || navigator.userAgent.match(/Trident\/7/)){
533  if(/Android/i.test(navigator.userAgent)){
534    jQuery('a').each(function(){
535      var cE = jQuery(this);
536      var hrefCurrent = cE.attr('href');
537      if(/\.pdf$/.test(hrefCurrent) && !/accessDocument\.php/.test(hrefCurrent) && !/^https?\:\/\//.test(hrefCurrent)){
538        if(cE.attr('data-pathPrepend')){
539          hrefCurrent = cE.attr('data-pathPrepend') + hrefCurrent; 
540        }
541        cE.attr('href', wUiTmp['wGlobalProjectPath'] + '/wGlobal/scripts/accessDocument.php?forceDownload=' + (cE.hasClass('download') ? '1' : '0') + '&document=' + encodeURIComponent(hrefCurrent));
542      }
543    });
544  }
545  
546  jQuery(window).trigger('resize');
547  //console.log('ready END');
548});
549
550
551jQuery(window).on('load', function(){
552	//console.log('onload');
553	
554  for(var wCssJQueryEntry in wCssJQuery){
555  		
556    jQuery(wCssJQueryEntry).each(function(index){
557  	if(wCssJQuery[wCssJQueryEntry]['event'] && wCssJQuery[wCssJQueryEntry]['event'] == 'window.load'){
558        eval(wCssJQuery[wCssJQueryEntry]['jQuery']);
559      }
560    });
561  }
562
563  if(document.documentElement && !/MSIE (6|7|8)/.test(navigator.appVersion)){
564      window.setTimeout(function(){
565      document.documentElement.className = document.documentElement.className + ' pagestatus-loaded';
566    }, 1000);
567  }
568  
569  jQuery("img[data-srchover]").each(function(){
570    var thisElement         = jQuery(this);
571    var hoverTriggerElement = thisElement;
572    var hoverTriggerPath    = thisElement.data('hovertrigger');
573    if(hoverTriggerPath){
574      eval('hoverTriggerElement = hoverTriggerElement.' + hoverTriggerPath);
575    }
576    hoverTriggerElement.on('mouseover', function (event){
577      thisElement.data('srcbeforehover', thisElement.attr('src'));
578      if(thisElement.data('ishd') == '1'){
579        thisElement.attr('src', thisElement.data('srchover2x'));
580      }
581      else{
582        thisElement.attr('src', thisElement.data('srchover'));
583      }
584    });
585    hoverTriggerElement.on('mouseout', function (event){
586      thisElement.attr('src', thisElement.data('srcbeforehover'));
587    });
588  });
589
590  window.setTimeout(function(){
591    var jQueryHashId = location.hash;
592    if(jQueryHashId != '' && (jQueryHashId.indexOf('#anchor') == 0 || jQueryHashId.indexOf('#tab') == 0)){
593      var anchor = jQuery(jQueryHashId.replace(/\./g, '\\.').replace(/\:/g, '\\:'));
594      if(anchor.length > 0){
595        var offsetTopAnchor = (anchor.offset())['top'];
596        offsetTopAnchor = offsetTopAnchor - wGetScrollTopHeight(); 
597        jQuery('body, html').animate({scrollTop: offsetTopAnchor});
598      }  
599    }
600  }, 120);
601
602  jQuery('.wglMagnifier').wMagnifier();
603
604  jQuery('.wglOverflowXTouch').each(function(index){
605
606    var currentElement = jQuery(this);
607    var widthOuter = currentElement.width();
608    var widthInner = currentElement.children('*').outerWidth();
609    if(!currentElement.is(":visible")){
610      return false;
611    }
612    else if(widthInner <= widthOuter){
613      return false;
614    }
615    else{
616      var lastElementInner = currentElement.children('*').children('*:last');
617      var offsetRightLastElementInner = lastElementInner.get(0).offsetLeft + lastElementInner.outerWidth() + parseInt(lastElementInner.css('margin-right'));
618      currentElement.children('*').children('*').each(function(index){
619        jQuery(this).css('width', jQuery(this).width());
620      });
621      lastElementInner.parent().css({'width' : String(offsetRightLastElementInner) + 'px'})
622    }
623
624    jQuery(this).find('img').attr('unselectable', 'on');
625
626    jQuery('body').on('touchstart mousedown', function(event){
627      if(jQuery(event.target).closest(currentElement).length != 0){
628        event.preventDefault();
629      }
630    });
631
632    jQuery('body').on("touchmove mousemove", function(event){
633      if(jQuery('body').data('wtouchelement')){
634
635        var mouseXDiff   = (event.originalEvent.touches ? event.originalEvent.touches[0].pageX : event.pageX) - jQuery('body').data('wtouchmousex');
636        var mouseYDiff   = (event.originalEvent.touches ? event.originalEvent.touches[0].pageY : event.pageY) - jQuery('body').data('wtouchmousey');
637
638        jQuery('body').data('wtouchmousex', event.originalEvent.touches ? event.originalEvent.touches[0].pageX : event.pageX);
639        jQuery('body').data('wtouchmousey', event.originalEvent.touches ? event.originalEvent.touches[0].pageY : event.pageY);
640        jQuery('body').data('wtouchlastdiffx', mouseXDiff);
641        jQuery('body').data('wtouchlastdiffy', mouseYDiff);
642
643        var milliseconds = (new Date()).getTime();
644        var timeDiff     = milliseconds - jQuery('body').data('timestamplast');
645        jQuery('body').data('timestampbefore', jQuery('body').data('timestamplast'));
646        jQuery('body').data('timestamplast', milliseconds);
647
648        var speedX = Math.round(100 * (mouseXDiff > 0 ? mouseXDiff : -mouseXDiff) / timeDiff) + 1;
649
650        jQuery('body').data('wtouchspeedX', speedX);
651
652        var touchDiffX = jQuery('body').data('wtouchmousex') - jQuery('body').data('wtouchstartmousex');
653        jQuery('body').data('wtouchdiffx', touchDiffX);
654
655        var widthOuter = parseInt(jQuery('body').data('wtouchelement').width());
656        var left       = parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left'));
657        left           = isNaN(left) ? 0 : left;
658        var right      = parseInt(jQuery('body').data('wtouchelement').width()) - parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left')) - jQuery('body').data('wtouchelement').children('*').width();
659        right = isNaN(right) ? 0 : right;
660
661        if(left > 32){
662          jQuery('body').data('wtouchelement').children('*').animate({'margin-left' : 0});
663          jQuery('body').removeData('wtouchelement');
664          return false;
665        }
666        else if(right > 32){
667          jQuery('body').data('wtouchelement').children('*').animate({'margin-left' : String(parseInt(jQuery('body').data('wtouchelement').width()) - parseInt(jQuery('body').data('wtouchelement').children('*').width())) + 'px'});
668          jQuery('body').removeData('wtouchelement');
669          return false;
670        }
671        if(jQuery('body').data('wtouchelement').data('wtouchstartmarginleft') + touchDiffX < 0){
672          jQuery('body').data('wtouchelement').children('*').css({'margin-left' : String(jQuery('body').data('wtouchelement').data('wtouchstartmarginleft') + touchDiffX) + 'px'});
673        }
674        else{
675          jQuery('body').data('wtouchelement').children('*').css({'margin-left' : String(jQuery('body').data('wtouchelement').data('wtouchstartmarginleft') + touchDiffX) + 'px'});
676        }
677      }
678    });
679
680    jQuery(this).on('touchstart mousedown', function(event){
681      jQuery(this).children('*').stop();
682      jQuery('body').data('wtouchelement', jQuery(this));
683      jQuery(this).data('wtouchstartmarginleft', parseInt(jQuery(this).children('*').css('margin-left')));
684      jQuery(this).data('wtouchstartmargintop', parseInt(jQuery(this).children('*').css('margin-top')));
685      jQuery('body').data('wtouchstartmousex', event.originalEvent.touches ? event.originalEvent.touches[0].pageX : event.pageX);
686      jQuery('body').data('wtouchstartmousey', event.originalEvent.touches ? event.originalEvent.touches[0].pageY : event.pageY);
687    });
688
689    jQuery('body').on("touchend mouseup", function(event){
690
691      if(jQuery('body').data('wtouchelement')){
692
693        var milliseconds = (new Date()).getTime();
694        var timeDiff     = milliseconds - jQuery('body').data('timestamplast');
695        var touchDiffX   = jQuery('body').data('wtouchdiffx');
696        var lastDiffX    = jQuery('body').data('wtouchlastdiffx');
697        var lastDiffXn   = lastDiffX >= 0 ? lastDiffX : -lastDiffX;
698
699        if(lastDiffXn > 1){
700          var speedX = (Math.round((lastDiffXn > 0 ? lastDiffXn : -lastDiffXn) / timeDiff) + 1) * 5;
701          if(speedX > 200){
702            speedX = 200;
703          }
704          var movingWidth = Math.round(touchDiffX * 2 * (1 + speedX / 100));
705          if(jQuery('body').data('wtouchdiffx') < 0){
706            var right      = parseInt(jQuery('body').data('wtouchelement').width()) - parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left')) - jQuery('body').data('wtouchelement').children('*').width();
707            if(movingWidth < right){
708              movingWidth = right;
709            }
710            var duration    = (movingWidth > 0 ? movingWidth : -movingWidth) * 1.5 + Math.round(100 / speedX);
711            jQuery('body').data('wtouchelement').children('*').animate({'margin-left' : '+=' + String(movingWidth)}, {'duration' : duration, 'easing' : 'wEaseOutScroll'});
712          }
713          else{
714            var left       = parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left'));
715            if(-movingWidth < left){
716              movingWidth = -left;
717            }
718            var duration    = (movingWidth > 0 ? movingWidth : -movingWidth) * 1.5 + Math.round(100 / speedX);
719            jQuery('body').data('wtouchelement').children('*').animate({'margin-left' : '+=' + String(movingWidth)}, {'duration' : duration, 'easing' : 'wEaseOutScroll'});
720          }
721        }
722        jQuery('body').removeData('wtouchelement');
723      }
724    });
725  });
726
727  if(typeof(wHightlightBlockRootCustom) != 'undefined'){
728    wHighlightBlockRoot = wHightlightBlockRootCustom;
729  }
730  else if(typeof(wHighlightBlockRoot) == 'undefined'){
731    wHighlightBlockRoot = 'blockContentInner';
732  }  
733
734  if(wHighlightBlockRoot != 'none' && /highlight=([^&]+)/.test(decodeURIComponent(location.search.replace('+', ' ')))){
735    highlightTexts = RegExp.$1;
736    window.setTimeout(function(){
737      var highlightTextsArray = highlightTexts.split(/\s+/);
738      var elementRoot = jQuery('#' + wHighlightBlockRoot);
739      for(var j = 0; j < highlightTextsArray.length; j++){
740        var highlightText = highlightTextsArray[j];
741        var regExpWord  = new RegExp('^(?:[\\w\\W]*\\W+|)(' + highlightText.replace('+', '\\+').replace(/(\w) /, '$1\\w* +') + '\\w*)([\\w\\W]*|)$', 'gim');
742        elementRoot.find('div, p, h1, h2, h3, h4, h5, h6, li').each(function(){
743          var nodeCurrent      = jQuery(this).get(0);
744          if(nodeCurrent.tagName != 'DIV' && !/<\w+/.test(nodeCurrent.innerHTML)){
745            nodeCurrent.innerHTML = nodeCurrent.innerHTML.replace(/[\n\r\s\t]+/g, ' ');
746          }
747          for(var j = 0; j < 6; j++){
748            var childNodes       = nodeCurrent.childNodes;
749            var childNodesLength = childNodes.length;
750            for(var i = childNodesLength - 1; i >= 0; i--){
751              if(childNodes[i].nodeType == 3 && childNodes[i].nodeValue.trim() != ''){
752                if(regExpWord.test(childNodes[i].nodeValue)){  
753                  var splitedNode = childNodes[i].splitText(childNodes[i].nodeValue.length - RegExp.$1.length - RegExp.$2.length);
754                  splitedNode.nodeValue = splitedNode.nodeValue.substr(RegExp.$1.length);
755                  var highlightNode = document.createElement('span');
756                  highlightNode.className = 'wglHighlightWord';
757                  highlightNode.appendChild(document.createTextNode(RegExp.$1));
758                  splitedNode.parentNode.insertBefore(highlightNode, splitedNode);
759                }
760              }
761            }
762          }    
763        });
764        elementRoot.find('span, strong, td, a').each(function(){
765          var nodeCurrent      = jQuery(this).get(0);
766          if(nodeCurrent.className != 'wglHighlightWord'){
767            if(!/<\w+/.test(nodeCurrent.innerHTML)){
768              nodeCurrent.innerHTML = nodeCurrent.innerHTML.replace(/[\n\r\s\t]+/g, ' ');
769            }
770            for(var j = 0; j < 6; j++){
771              var childNodes       = nodeCurrent.childNodes;
772              var childNodesLength = childNodes.length;
773              for(var i = childNodesLength - 1; i >= 0; i--){
774                if(childNodes[i].nodeType == 3 && childNodes[i].nodeValue.trim() != ''){
775                  if(regExpWord.test(childNodes[i].nodeValue)){  
776                    var splitedNode = childNodes[i].splitText(childNodes[i].nodeValue.length - RegExp.$1.length - RegExp.$2.length);
777                    splitedNode.nodeValue = splitedNode.nodeValue.substr(RegExp.$1.length);
778                    var highlightNode = document.createElement('span');
779                    highlightNode.className = 'wglHighlightWord';
780                    highlightNode.appendChild(document.createTextNode(RegExp.$1));
781                    splitedNode.parentNode.insertBefore(highlightNode, splitedNode);
782                  }
783                }
784              }
785            }  
786          }    
787        });        
788      }
789    }, 160);   
790  }
791});
792
793jQuery(window).on('load resize', function(){
794	    //console.log('onload resize');
795	    wOptimizePictureSizes();
796
797	    var hasChangedMediaQuery = false;
798
799	    jQuery('#wMediaqueriesTmp > div').each(function(index){
800	      if(window.getComputedStyle){
801	        try{
802	          var computedStyle  = window.getComputedStyle(jQuery(this).get(0));
803	          var fontFamily     = computedStyle.fontFamily.replace(/"/g, '');
804	          var lastMediaQuery = jQuery(this).data('lastmediaquery') || '';
805	          if(fontFamily != lastMediaQuery){
806	            if(fontFamily.indexOf('mediaquery_') == 0){
807	              eval('if(typeof(' + fontFamily + '_onactivate) == \'function\'){' + fontFamily + '_onactivate();}');
808	            }
809	            else if(lastMediaQuery.indexOf('mediaquery_') == 0){
810	              eval('if(typeof(' + lastMediaQuery + '_ondeactivate) == \'function\'){' + lastMediaQuery + '_ondeactivate();}');
811	            }
812	            jQuery(this).data('lastmediaquery', fontFamily);
813	            hasChangedMediaQuery = true;
814	          }
815	        }
816	        catch(e){};
817	      }
818	    });
819
820	    if(hasChangedMediaQuery){
821	      jQuery("img[data-srcmin]").each(function(){
822	        var currentImg    = jQuery(this);
823	        var widthOrig     = parseInt(typeof(currentImg.attr('widthorig')) != 'undefined' ? currentImg.attr('data-widthorig') : currentImg.attr('width'));
824	        var srcMin        = currentImg.data('srcmin') ? currentImg.data('srcmin') : '';
825	        var widthCurrent  = parseInt(currentImg.width());
826	        var attrWidthCur = parseInt(typeof(currentImg.attr('width')) != 'undefined' ? currentImg.attr('width') : 0);
827	        var widthMin      = parseInt(srcMin.replace(/.*@min/, '').replace(/\..*/, ''));
828	        //var widthOuter    = parseInt(currentImg.closest('.elementStandard').width());
829	        var widthOuter    = parseInt(currentImg.parent().width());
830
831	        var diffWidthFrame = 0;
832	        if(currentImg.parent().parent().parent().parent().hasClass('picture')){
833	          diffWidthFrame = currentImg.parent().parent().parent().parent().outerWidth() - widthCurrent;
834	        }
835	        else if(currentImg.parent().parent().hasClass('picture')){
836	          diffWidthFrame = currentImg.parent().parent().outerWidth() - widthCurrent;
837	        }
838
839	        if(widthCurrent > widthOrig && widthOuter > widthOrig + diffWidthFrame + 1 && widthMin > widthOrig){
840	          currentImg.attr('src', srcMin);
841	          if(typeof(currentImg.attr('width')) != 'undefined' && currentImg.attr('width') != ''){
842	            currentImg.attr('data-widthorig', currentImg.attr('width'));
843	            currentImg.removeAttr('width');
844	            currentImg.attr('height', 'auto');
845	          }
846	        }
847	      });
848	    }
849
850	    jQuery('.wglExpandToHeighestChild').each(function(index){
851
852	      var currentElement = jQuery(this);
853	      var maxHeight      = 0;
854	      currentElement.children('*').each(function(index){
855	        if(jQuery(this).attr('data-adjusttoheighestchild') != 'no' && jQuery(this).outerHeight(true) > maxHeight){
856	          maxHeight = jQuery(this).outerHeight(true);
857	        }
858	      });
859	      if(maxHeight > 0){
860	        currentElement.css('height', String(maxHeight) + 'px');
861	      }
862	    });
863
864	    jQuery('.wglCheckWidthParent').each(function(index){
865
866	      var currentElement = jQuery(this);
867	      var widthSelf      = currentElement.attr('data-width-init') || currentElement.outerWidth();
868	      var widthParent    = currentElement.parent().width();
869	      
870	      if(currentElement.parent().hasClass('isToSmall') && !currentElement.parent().is(":visible")){
871	        currentElement.parent().removeClass('isToSmall');
872	        widthParent    = currentElement.parent().width();
873	        currentElement.parent().addClass('isToSmall');
874	      }
875	      
876	      if(!currentElement.attr('data-width-init')){
877	        currentElement.attr('data-width-init', widthSelf);
878	      }
879	      else if(currentElement.attr('data-width-init') == 0 && currentElement.parent().is(":visible")){
880	        widthSelf = currentElement.outerWidth();
881	      }
882	      
883	      if(widthParent > widthSelf){
884	        currentElement.parent().removeClass('isToSmall');
885	      }
886	      else{
887	        currentElement.parent().addClass('isToSmall');
888	      }
889	    });
890
891	    jQuery('.wglExpandToParent').each(function(index){
892
893	      var currentElement = jQuery(this);
894	      var height         = currentElement.parent().height();
895	      currentElement.css('height', String(height) + 'px');
896	    });
897	    
898	    wProcessWglAdjustHeightMax();
899	  });
900  
901
902jQuery(window).on('load resize scroll', function(event){
903
904	    var winScrollTop = jQuery(window).scrollTop();
905
906	    if(wUiTmp['lastScrollTop']){
907	      if(winScrollTop <= 0){
908	        if(wUiTmp['lastScrollStatus'] != 'top'){
909	          document.documentElement.className = document.documentElement.className.replace(' scrolled-top', '').replace(' scrolldirection-down', '').replace(' scrolldirection-up', '') + ' scrolled-top';
910	        }
911	        wUiTmp['lastScrollStatus'] = 'top';
912	      }
913	      else if(winScrollTop < wUiTmp['lastScrollTop']){
914	        if(wUiTmp['lastScrollStatus'] != 'scrollup'){
915	          document.documentElement.className = document.documentElement.className.replace(' scrolled-top', '').replace(' scrolldirection-down', '') + ' scrolldirection-up';
916	        }
917	        wUiTmp['lastScrollStatus'] = 'scrollup';
918	      }
919	      else if(winScrollTop > wUiTmp['lastScrollTop']){
920	        if(wUiTmp['lastScrollStatus'] != 'scrolldown'){
921	          document.documentElement.className = document.documentElement.className.replace('scrolled-top', '').replace(' scrolldirection-up', '') + ' scrolldirection-down';
922	        }
923	        wUiTmp['lastScrollStatus'] = 'scrolldown';
924	      }
925	    }
926
927	    wUiTmp['lastScrollTop'] = winScrollTop;
928
929	    var winHeight    = jQuery(window).height();
930	    jQuery('img.wglLazyLoadInit').each(function(index){
931
932	      var currentImg   = jQuery(this);
933	      var offsetTop    = parseInt(currentImg.offset().top);
934	      var srcMin       = currentImg.data('srcmin') ? currentImg.data('srcmin') : '';
935	      var widthCurrent = parseInt(currentImg.width());
936	      var attrWidthCur = parseInt(typeof(currentImg.attr('width')) != 'undefined' ? currentImg.attr('width') : 0);
937	      var widthMin     = parseInt(srcMin.replace(/.*@min/, '').replace(/\..*/, ''));
938
939	      var isVisibleComponent = true;
940
941	      if(currentImg.attr('data-maxwidthifinvisible') && currentImg.attr('data-maxwidthifinvisible') > widthCurrent){
942	        widthCurrent = currentImg.attr('data-maxwidthifinvisible');
943	      }
944
945	      //console.log(widthCurrent);
946	      //console.log(srcMin)
947	      //console.log(currentImg.get(0));
948
949	      //if(currentImg.hasClass('listEntryImage')){
950	        if(!currentImg.is(':visible')){
951	          isVisibleComponent = false;
952	          closestElement = currentImg.closest('.elementList');
953	          if(closestElement.length > 0 && closestElement.is(':visible')){
954	            if(closestElement.offset().top < winScrollTop + winHeight){
955	              isVisibleComponent = true;
956	            }
957	          }
958	        }
959	      //}
960
961	      if(isVisibleComponent || wUiTmp['isMediaPrint'] || wUiTmp['isViewmodePrint']){
962	        if((offsetTop < winScrollTop + winHeight ) || wUiTmp['isMediaPrint'] || wUiTmp['isViewmodePrint']){
963	          if(devicePixelRatio >= hdLimitDpr && typeof(currentImg.attr('data-src2x')) != 'undefined' && currentImg.attr('data-src2x') != '' && attrWidthCur < widthCurrent * 2 && currentImg.attr('data-ishd') != '1'){
964	            currentImg.attr('src', currentImg.data('src2x'));
965	            currentImg.attr('data-ishd', '1');
966	          }
967	          else if(typeof(currentImg.attr('data-srcmin')) != 'undefined' && currentImg.attr('data-srcmin') != '' && widthCurrent < widthMin && widthMin < attrWidthCur && currentImg.attr('data-ismin') != '1' && currentImg.attr('data-ishd') != '1' && currentImg.attr('data-isld') != '1'){
968	            currentImg.attr('src', currentImg.data('srcmin'));
969	            currentImg.attr('data-ismin', '1');
970	          }
971	          else if(typeof(currentImg.attr('data-src')) != 'undefined' && currentImg.attr('data-src') != '' && currentImg.attr('data-ishd') != '1' && currentImg.attr('data-isld') != '1'){
972	            if(currentImg.data('src').indexOf('@px') != -1){
973	              try{
974	                if(currentImg.get(0).getBoundingClientRect()['width'] - widthCurrent == -0.5){
975	                  currentImg.get(0).style.width    = 'calc(100% + 0.5px)';
976	                  currentImg.get(0).style.maxWidth = 'calc(100% + 0.5px)';
977	                }
978	              }
979	              catch(e){console.log(e)}
980	              currentImg.attr('src', currentImg.data('src').replace('@px', '@' + (devicePixelRatio >= hdLimitDpr ? widthCurrent * 2 : widthCurrent) + 'px'));
981	            }
982	            else{
983	              currentImg.attr('src', currentImg.data('src'));
984	              currentImg.attr('data-isld', '1');
985	            }
986	          }
987	          if(currentImg.parent().prop('tagName') == 'PICTURE'){
988	            currentImg.parent().children('source').each(function(){
989	              jQuery(this).attr('media', jQuery(this).attr('media').replace('wlazyload and ', ''));
990	            });
991	          }
992	          currentImg.removeClass('wglLazyLoadInit');
993	        }
994	      }
995	    });
996
997  jQuery('.wglReader[data-init!="1"]').each(function(index){
998    
999    if(window.speechSynthesis){
1000      var currentElement = jQuery(this);      
1001      var textToRead     = currentElement.get(0).innerText;
1002
1003      if(textToRead != ''){
1004        if(currentElement.data('readertarget') == 'prepend'){
1005          var readerHTML = '<div class="wReaderPanelEmbed"><div class="wButtonStartReading" onclick="wStartReadingText(this.parentNode.parentNode, this.parentNode)"></div><div class="wButtonPauseReading" onclick="wPauseReadingText(this.parentNode.parentNode, this.parentNode)"></div><div class="wButtonStopReading" onclick="wStopReadingText(this.parentNode.parentNode, this.parentNode)"></div></div>';
1006          currentElement.prepend(readerHTML);        
1007        }
1008        else{
1009          var readerHTML = '<div class="wReaderPanelEmbed"><div class="wButtonStartReading" onclick="wStartReadingText(this.parentNode.nextSibling, this.parentNode)"></div><div class="wButtonPauseReading" onclick="wPauseReadingText(this.parentNode.nextSibling, this.parentNode)"></div><div class="wButtonStopReading" onclick="wStopReadingText(this.parentNode.nextSibling, this.parentNode)"></div></div>';
1010          currentElement.before(readerHTML);
1011        }
1012      }
1013
1014      currentElement.attr('data-init', '1');
1015    }  
1016  });
1017	    
1018  jQuery('.wglCountUp[data-init!="1"]').each(function(index){
1019
1020    var currentElement = jQuery(this);
1021    var nodeName = currentElement.get(0).nodeName;
1022
1023    if(typeof(wEditor) != 'undefined'){
1024      currentElement.attr('data-init', '1');
1025      return false;
1026    }
1027
1028    var offsetTop = parseInt(currentElement.offset().top);
1029    if(offsetTop > winScrollTop + winHeight){
1030      return false;
1031    }
1032
1033    currentElement.attr('data-init', '1');
1034    var currentDataOrig = currentElement.data();
1035    var currentData     = {};
1036
1037    for(key in currentDataOrig){
1038      currentData[key.toLowerCase()] = currentDataOrig[key];
1039    }
1040
1041    currentData['countupFrom']      = currentData['countupfrom'] || 0;
1042    currentData['countupTo']        = currentData['countupto'] || currentElement.html();
1043    currentData['countupDecimals']  = currentData['countupdecimals'] || 0;  
1044    currentData['countupDuration']  = currentData['countupduration'] || 2;
1045    currentData['countupInitdelay'] = currentData['countupinitdelay'] || 1000;
1046    currentData['countupPrefix']    = currentData['countupprefix'] || '';
1047    currentData['countupSuffix']    = currentData['countupsuffix'] || '';
1048   
1049    if(/^([^\d\,\.]*)([\d\,\.]+)([^\d\,\.]*)$/.test(currentData['countupTo'])){
1050      currentData['countupPrefix'] = RegExp.$1;
1051      currentData['countupTo']     = RegExp.$2;
1052      currentData['countupSuffix'] = RegExp.$3;
1053    }
1054    
1055    currentData['countupSeperator'] = '';
1056    
1057    if(/^\d+\.\d\d\d/.test(currentData['countupFrom']) || /^\d+\.\d\d\d/.test(currentData['countupTo'])){
1058      currentData['countupSeperator'] = true;      
1059    }
1060    
1061    if(currentData['countupSeperator'] != ''){
1062      currentData['countupFrom'] = String(currentData['countupFrom']).replace(/^(\d+)\.(\d\d\d)/, '$1$2').replace(/^(\d+)\.(\d\d\d)/, '$1$2').replace(/^(\d+)\.(\d\d\d)/, '$1$2');      
1063      currentData['countupTo']   = String(currentData['countupTo']).replace(/^(\d+)\.(\d\d\d)/, '$1$2').replace(/^(\d+)\.(\d\d\d)/, '$1$2').replace(/^(\d+)\.(\d\d\d)/, '$1$2');            
1064    }    
1065 
1066    valueToSet = String(currentData['countupFrom']);  
1067        
1068    currentData['countupTo'] = currentData['countupTo'].replace(',', '.');
1069    if(currentData['countupTo']){
1070      if(/^\d+\.(\d+)$/.test(currentData['countupTo'])){
1071        currentData['countupDecimals'] = RegExp.$1.length;
1072      }
1073      else if(/^([\d\,\.]+)$/.test(currentData['countupTo'])){
1074        
1075      }
1076      else{
1077        return false;
1078      }
1079    }
1080    else{
1081      return false;
1082    }
1083    
1084    if(currentData['countupDecimals'] > 0){
1085      valueToSet = parseFloat(valueToSet).toFixed(currentData['countupDecimals']).replace('.', ',');
1086    }
1087    else{ 
1088      valueToSet = String(Math.ceil(valueToSet));      
1089      if(currentData['countupSeperator'] != ''){
1090        valueToSet = valueToSet.replace(/(\d)(\d{3})$/, '$1.$2');
1091        valueToSet = valueToSet.replace(/(\d)(\d{3})\./, '$1.$2.');            
1092        valueToSet = valueToSet.replace(/(\d)(\d{3})\./, '$1.$2.');             
1093      }                 
1094    }    
1095
1096    if(nodeName == 'text'){
1097      currentElement.get(0).textContent = currentData['countupPrefix'] + valueToSet + currentData['countupSuffix'];
1098    }  
1099    else{
1100      currentElement.html(currentData['countupPrefix'] + valueToSet + currentData['countupSuffix']);
1101    }  
1102    
1103    var timeoutInit = 25;
1104    var timeout     = timeoutInit;
1105    window.setTimeout(function(){
1106            
1107      //console.log(currentData);
1108      
1109      var intervalCountup = window.setInterval(function(){
1110        if(timeout < 0.5){
1111          timeout -= 0.02;
1112        }
1113        else if(timeout < 2){
1114          timeout -= 0.05;
1115        }
1116        else if(timeout < 3){
1117          timeout -= 0.14;
1118        }
1119        else if(timeout < 4){
1120          timeout -= 0.4;
1121        }
1122        else{
1123          timeout--;
1124        }
1125
1126        var valueToSet = (currentData['countupTo'] - currentData['countupFrom']) / timeoutInit * (timeoutInit - timeout) + parseFloat(currentData['countupFrom']);      
1127
1128        if(timeout <= 0.1){
1129          window.clearInterval(intervalCountup);
1130          valueToSet = currentData['countupTo'];
1131        }
1132
1133        if(currentData['countupDecimals'] > 0){
1134          valueToSet = String(parseFloat(valueToSet).toFixed(currentData['countupDecimals']).replace('.', ','));
1135          if(currentData['countupSeperator'] != ''){
1136            if(/(\d+)\,(\d+)/.test(valueToSet)){
1137              var valueToSetBefore = RegExp.$1;
1138              var valueToSetAfter  = RegExp.$2;   
1139              valueToSetBefore = valueToSetBefore.replace(/(\d)(\d{3})$/, '$1.$2');
1140              valueToSetBefore = valueToSetBefore.replace(/(\d)(\d{3})\./, '$1.$2.');            
1141              valueToSetBefore = valueToSetBefore.replace(/(\d)(\d{3})\./, '$1.$2.');                 
1142              valueToSet = valueToSetBefore + ',' + valueToSetAfter;
1143            }                        
1144          }                  
1145        }
1146        else{
1147          valueToSet = String(Math.ceil(valueToSet));
1148        
1149          if(currentData['countupSeperator'] != ''){
1150            valueToSet = valueToSet.replace(/(\d)(\d{3})$/, '$1.$2');
1151            valueToSet = valueToSet.replace(/(\d)(\d{3})\./, '$1.$2.');            
1152            valueToSet = valueToSet.replace(/(\d)(\d{3})\./, '$1.$2.');             
1153          }            
1154        }
1155        
1156        if(nodeName == 'text'){        
1157          currentElement.get(0).textContent = currentData['countupPrefix'] + valueToSet + currentData['countupSuffix'];
1158        }
1159        else{
1160          currentElement.html(currentData['countupPrefix'] + valueToSet + currentData['countupSuffix']);          
1161        }
1162        //console.log(valueToSet);
1163      }, parseInt(currentData['countupDuration'] * 500 / timeoutInit));
1164    }, currentData['countupInitdelay']);
1165  });
1166
1167	    jQuery('.wglAnimateIfVisibleOnce').each(function(index){
1168	      var currentElement = jQuery(this);
1169	      var offsetTop      = parseInt(currentElement.offset().top);
1170	      if(offsetTop < winScrollTop + winHeight || location.href.indexOf('viewmode=print') != -1){
1171	        currentElement.addClass('wglAnimateIfVisibleOnceVisible');
1172	        currentElement.removeClass('wglAnimateIfVisibleOnce');
1173	      }
1174	    });
1175
1176	    jQuery('.wglAnimateIfVisible').each(function(index){
1177	      var currentElement = jQuery(this);
1178	      var offsetTop      = parseInt(currentElement.offset().top);
1179	      var offsetHeight   = parseInt(currentElement.outerHeight());
1180	      if((offsetTop < winScrollTop + winHeight && offsetTop + offsetHeight > winScrollTop) || location.href.indexOf('viewmode=print') != -1){
1181	        currentElement.addClass('isVisibleOnce');
1182	        currentElement.addClass('isVisible');
1183	        currentElement.removeClass('isInvisible');
1184	      }
1185	      else{
1186	        currentElement.addClass('isInvisible');
1187	        currentElement.removeClass('isVisible');
1188	      }
1189	    });
1190	    
1191	    jQuery('.wglKeepInsideTopOnScroll').each(function(index){
1192	      var currentElement = jQuery(this);
1193	      var elementMoved   = null;
1194	      var offsetTop      = parseInt(currentElement.offset().top);
1195	      var diffTop        = offsetTop - winScrollTop;
1196	      var moveID         = '';
1197
1198	      if(diffTop < 0){
1199	        if(currentElement.attr('data-hasmoved') != '1'){
1200	          if(!jQuery('.wglContainerInsideTopOnScroll').length){
1201	            jQuery('body').prepend('<div class="wglContainerInsideTopOnScroll"></div>');
1202	          }
1203	          currentElement.attr('data-hasmoved', '1');
1204	          moveID = String(parseInt(Math.random() * 1000000));
1205
1206	          if(typeof(currentElement.attr('data-moveidsource')) == 'undefined'){
1207	            currentElement.attr('data-moveidsource', moveID);
1208	          }
1209	          else{
1210	            moveID = currentElement.attr('data-moveidsource');
1211	          }
1212
1213	          currentElement.before('<div id="moveidsource-' + moveID + '" class="wglKeepInsideTopOnScroll" data-hasmoved="1" data-moveidsource="' + moveID + '"></div>');
1214	          currentElement.removeAttr('data-moveidsource').attr('data-moveidtarget', moveID).attr('data-moveidtarget', moveID).appendTo('.wglContainerInsideTopOnScroll').addClass('moved-init').removeClass('wglKeepInsideTopOnScroll').removeClass('restored-init').removeClass('restored-ready');
1215	          window.setTimeout(function(){
1216	            currentElement.removeClass('moved-init').addClass('moved-ready');
1217	          }, 10);
1218	          height = currentElement.height();
1219	          jQuery('#' + 'moveidsource-' + moveID).css('height', String(height) + 'px');
1220	        }
1221	        else{
1222	          height = jQuery(".wglContainerInsideTopOnScroll *[data-moveidtarget='" + currentElement.attr('data-moveidsource') + "']").height();
1223	          currentElement.css('height', String(height) + 'px');
1224	        }
1225	      }
1226	      else if(currentElement.attr('data-hasmoved') == '1'){
1227	        if(currentElement.parent().attr('id') == 'blockMainInner') currentElement.css('display', 'none');
1228	        moveID = currentElement.attr('data-moveidsource');
1229	        elementMoved = jQuery(".wglContainerInsideTopOnScroll *[data-moveidtarget='" + moveID + "']");
1230	        currentElement.before(elementMoved.addClass('wglKeepInsideTopOnScroll').removeClass('moved-init').removeClass('moved-ready').addClass('restored-init').removeAttr('data-hasmoved'));
1231	        window.setTimeout(function(){
1232	          if(currentElement.html() == ''){
1233	            currentElement.remove();
1234	          }            
1235	          elementMoved.removeClass('restored-init').addClass('restored-ready');
1236	        }, 10);
1237	      }
1238	    });
1239
1240	    var idTopSection = '', titleSection = '', currentElement, nearestPositionTop = 100000, elementPositionTop = 0;
1241
1242	    var offsetTopFixed = jQuery('.wglContainerInsideTopOnScroll').outerHeight();
1243
1244	    jQuery('.elementSection').each(function(index){
1245	      currentElement = jQuery(this);
1246	      elementPositionTop  = parseInt(currentElement.offset().top) - winScrollTop - offsetTopFixed;
1247	      if(elementPositionTop < winHeight - 128 && (elementPositionTop >= 0 && elementPositionTop < nearestPositionTop || elementPositionTop < 0 && elementPositionTop * -1 < nearestPositionTop)){
1248	        nearestPositionTop = (elementPositionTop > 0 ? elementPositionTop : - elementPositionTop);
1249	        titleSection       = currentElement.attr('id');
1250	      }
1251	    });
1252
1253	    if(titleSection != '' && titleSection != wUiTmp['lastSectionSelected']){
1254	      jQuery(".elementNavigationSections li").removeClass('selected');
1255	      jQuery(".elementNavigationSections li > a[href='#" + titleSection + "']").parent().addClass('selected');
1256	      wUiTmp['lastSectionSelected'] = titleSection;
1257	    }
1258    	
1259        wUiTmp['hasToAdaptParallax'] = true;
1260  		if(!wUiTmp['adaptParallax']){
1261    		window.requestAnimationFrame(wAdaptParallax);
1262        	wUiTmp['adaptParallax'] = true;
1263 		}
1264	    
1265  });
1266  
1267jQuery('body').on("touchmove", function(event){
1268  wAdaptParallax(event);
1269});
1270
1271jQuery(window).on("touchend", function(event){
1272  wAdaptParallax(event);
1273});
1274	  
1275jQuery(window).on('mousewheel DOMMouseScroll', function (event){
1276  jQuery('body, html').stop(true, true);
1277});  
1278
1279wglValidateElementInline = function(currentInputElement, options){
1280
1281    var currentInput = jQuery(currentInputElement);
1282
1283    var formPos      = currentInput.closest('form').attr('data-formpos');
1284    var formAction   = currentInput.closest('form').attr('action');
1285
1286    var elementName = currentInput.attr('name');
1287    elementName = elementName.replace('[]', '');
1288
1289    var elementValue = currentInput.val();
1290    if(currentInput.attr('type') == 'checkbox'){
1291      elementValue = '';
1292      currentInput.parent().parent().find('input').each(function(){
1293        elementValue += (jQuery(this).get(0).checked ? jQuery(this).val() : '');
1294      });
1295    }
1296    else if(currentInput.attr('type') == 'radio'){
1297      elementValue = '';
1298      currentInput.parent().parent().find('input').each(function(){
1299        elementValue += (jQuery(this).get(0).checked ? jQuery(this).val() : '');
1300      });
1301    }
1302    else if(currentInput.prop("tagName") == 'SELECT' && currentInput.attr('multiple') == 'multiple'){
1303      elementValue = '';
1304      currentInput.children().each(function(){
1305        elementValue += (jQuery(this).get(0).selected ? jQuery(this).val() : '');
1306      });
1307    }
1308
1309    if(elementValue == null){
1310      elementValue = '';
1311    }
1312  
1313    if(typeof(wTrimInputsBeforeValidateOnBlur) != 'undefined' && wTrimInputsBeforeValidateOnBlur && event && event.type == 'blur'){
1314      if(currentInput.prop("nodeName") == 'TEXTAREA' || currentInput.attr("type") == 'text'){
1315        currentInput.val(currentInput.val().trim());
1316        elementValue = currentInput.val();
1317      }
1318    }
1319
1320    var urlValidation = formAction + '?action=ve&en=' + elementName + '&ev=' + encodeURIComponent(elementValue);
1321
1322    jQuery.ajax({type: "GET", async: true, dataType: "json", url: urlValidation,
1323      success: function(result){
1324
1325        elementsWithValidationClass = currentInput;
1326
1327        var validationID = formPos + (elementsWithValidationClass.attr('id') ? elementsWithValidationClass.attr('id') : '');                
1328        
1329        if(currentInput.attr('type') == 'checkbox' || currentInput.attr('type') == 'radio'){
1330          validationID                = formPos + (elementsWithValidationClass.attr('name').replace('[]', '') ? elementsWithValidationClass.attr('name').replace('[]', '') : '');  
1331          elementsWithValidationClass = elementsWithValidationClass.parent().parent().children();
1332        }
1333
1334        var elementToAddError = elementsWithValidationClass.parent();
1335
1336        if(elementsWithValidationClass.parent().prev('dt').length != 0){
1337          elementToAddError = elementsWithValidationClass.parent().prev('dt');
1338        }
1339        else if(elementsWithValidationClass.parent().prev('div').length != 0){
1340          elementToAddError = elementsWithValidationClass.parent().prev('div');
1341        }
1342        
1343        var elementToAddOK = elementsWithValidationClass.parent();
1344
1345        if(elementsWithValidationClass.attr('name') && elementsWithValidationClass.closest('form').find('label[for="' + elementsWithValidationClass.attr('name').replace('[]', '') + '"]')){
1346          elementToAddOK = elementsWithValidationClass.closest('form').find('label[for="' + elementsWithValidationClass.attr('name').replace('[]', '') + '"]');
1347        }
1348        else if(elementsWithValidationClass.parent().prev('dt').length != 0 && elementsWithValidationClass.parent().prev('dt').find('label')){       
1349          elementToAddOK = elementsWithValidationClass.parent().prev('dt').find('label');
1350        }
1351        else if(elementsWithValidationClass.parent().prev('div').length != 0 && elementsWithValidationClass.parent().prev('div').find('label')){          
1352          elementToAddOK = elementsWithValidationClass.parent().prev('div').find('label');
1353        }        
1354
1355        if(!result['isValid']){
1356          elementsWithValidationClass.addClass('wglIsInvalid');
1357          elementsWithValidationClass.removeClass('wglIsValid');
1358
1359          jQuery('#validationStatus_' + validationID).remove();
1360
1361          if(result['errorMessage'] != ''){
1362            if(jQuery('#errorMessage_' + validationID).length == 0){
1363              elementToAddError.addClass('wglContainsErrorMessageInline').append('<div class="wglErrorMessageInline" id="errorMessage_' + validationID + '"><div>' + result['errorMessage'] + '</div></div>');
1364              if(elementToAddError.addClass('wglContainsErrorMessageInline').find('label').length == 2){
1365                if(currentInput.attr('id') == elementToAddError.addClass('wglContainsErrorMessageInline').find('label').attr('for')){
1366                  jQuery('#errorMessage_' + validationID).css({'right' : String(Math.round(elementToAddError.addClass('wglContainsErrorMessageInline').width() - elementToAddError.addClass('wglContainsErrorMessageInline').find('label').width())) + 'px'});
1367                }
1368              }              
1369              (function(validationID){
1370                window.setTimeout(function(){
1371                  jQuery('#errorMessage_' + validationID).addClass("loaded");
1372                }, 32);
1373              })(validationID);
1374            }
1375          }
1376        }
1377        else{
1378          elementsWithValidationClass.removeClass('wglIsInvalid');
1379          elementsWithValidationClass.addClass('wglIsValid');
1380
1381          jQuery('#errorMessage_' + validationID).remove();
1382          if(elementToAddError.find('.wglErrorMessageInline').length == 0){
1383            elementToAddError.removeClass('wglContainsErrorMessageInline');
1384            elementToAddError.find('.wglErrorMessageInline').remove();
1385          }
1386
1387          if(jQuery('#validationStatus_' + validationID).length == 0){
1388            elementToAddOK.addClass('wglContainsValidationStatusInline').append('<div class="wglValidationStatusOK" id="validationStatus_' + validationID + '"><div></div></div>');
1389            (function(validationID){
1390              window.setTimeout(function(){
1391                jQuery('#validationStatus_' + validationID).addClass("loaded");
1392              }, 32);
1393            })(validationID);
1394          }
1395        }
1396      }
1397    });
1398  };
1399
1400wPrepareHTML = function(root){
1401
1402  if(!root){
1403    root = jQuery('body');
1404  }
1405
1406  jQuery("a[data-ajaxurl]").each(function(){
1407    var thisElement = jQuery(this);
1408    var ajaxURL     = thisElement.data('ajaxurl');
1409    thisElement.on('click', function (event){
1410      jQuery.ajax({type: "GET", url: ajaxURL, success: function(result){
1411        var elementTarget = thisElement.parent().parent();
1412        elementTarget.fadeTo(0, 0);
1413        elementTarget.html(result);
1414        history.pushState({page: thisElement.attr('href')}, '', thisElement.attr('href'));
1415        wPrepareHTML(elementTarget.get(0));
1416        elementTarget.fadeTo(600, 1);
1417        wScrollSmoothToElement(elementTarget.get(0), {'targetPos' : 'top'});
1418
1419        for(var addClassSelector in wCssClassesToAddGlobal){
1420          jQuery(addClassSelector).each(function(index){
1421            var classesToAdd = wCssClassesToAddGlobal[addClassSelector];
1422            for(var i = 0, arrayLength = classesToAdd.length; i < arrayLength; i++){
1423              var classData = classesToAdd[i].split('=');
1424              if(classData.length == 2){
1425                var selector = jQuery.trim(classData[0]);
1426                if(selector == '.'){
1427                  jQuery(this).addClass(jQuery.trim(classData[1]));
1428                }
1429                else if(selector == 'parent'){
1430                  jQuery(this).parent().addClass(jQuery.trim(classData[1]));
1431                }
1432                else{
1433                  jQuery(this).find(selector).addClass(jQuery.trim(classData[1]));
1434                }
1435              }
1436              else{
1437                jQuery(this).addClass(jQuery.trim(classData[0]));
1438              }
1439            }
1440          });
1441        }
1442
1443        if(typeof(wOnAfterReloadElementByAjaxUrl) == 'function'){     
1444          wOnAfterReloadElementByAjaxUrl(elementTarget);
1445        }            
1446
1447        window.setTimeout(function(){
1448          jQuery(window).trigger('resize');
1449        }, 100);
1450      }});
1451      return false;
1452    });
1453  });
1454};
1455
1456wScrollSmoothToElement = function(elementTarget, options){
1457
1458  var id, offsetTopFixed, scrollTop;
1459
1460  options = options || {};
1461
1462  elementTarget = jQuery(elementTarget);
1463
1464  var currentTimestamp = new Date().getTime();
1465  if(elementTarget.length > 0 && !elementTarget.attr('data-lct') || elementTarget.attr('data-lct') < currentTimestamp - 320){
1466    elementTarget.attr('data-lct', currentTimestamp);
1467
1468    try{
1469      jQuery('body, html').stop(true, true);
1470      scrollDuration = parseInt(elementTarget.attr('data-scrollsmoothtotargetduration') ? elementTarget.attr('data-scrollsmoothtotargetduration') : 400);
1471
1472      offsetTopFixed    = jQuery('#blockTop').height() + jQuery('#blockHeader').height();
1473
1474      var visibleMin    = document.body.scrollTop + offsetTopFixed;
1475      var visibleMax    = visibleMin + jQuery(window).height();
1476      var posTopElement = elementTarget.offset().top;
1477
1478      //console.log(visibleMin + ' < ' + posTopElement + ' < ' + visibleMax);
1479
1480      if(posTopElement > visibleMin && posTopElement < visibleMax){
1481        return true;
1482      }
1483
1484      //console.log(posTopVisible);
1485      //console.log(winHeight);
1486
1487      wUiTmp['scrollingAuto'] = true;
1488
1489      jQuery('body, html').animate({scrollTop: elementTarget.offset().top - offsetTopFixed}, {duration: scrollDuration, complete: function(){
1490        offsetTopFixed = jQuery('.wglContainerInsideTopOnScroll').height() + jQuery('#blockHeader').height();
1491        if(offsetTopFixed > 0){
1492          jQuery('body, html').animate({scrollTop: elementTarget.offset().top - offsetTopFixed}, {duration: scrollDuration, complete: function(){
1493            wUiTmp['scrollingAuto'] = false;
1494            jQuery(window).trigger('resize');
1495          }});
1496        }
1497        else{
1498          wUiTmp['scrollingAuto'] = false;
1499          jQuery(window).trigger('resize');
1500        }
1501      }});
1502      return false;
1503    }
1504    catch(e){console.log(e)}
1505  }
1506};
1507
1508jQuery.extend(jQuery.easing, {
1509  wEaseOutScroll: function(x, t, b, c, d){
1510    return (t == d) ? b + c : b + c * (-Math.pow(1.5, -20 * t / d) + 1);
1511  }
1512});
1513
1514////////////////////////////////////////////////////////////////
1515//
1516// @method void addAnalytics()
1517//
1518// @desc Überwacht Links mit Google Analytics
1519//
1520// @return void
1521//
1522////////////////////////////////////////////////////////////////
1523
1524jQuery.fn.wAddAnalytics = function(viewmode){
1525
1526  jQuery.each($(this), function(){
1527    jQuery(this).click(function(){ga('send', {'hitType': 'pageview', 'page': jQuery(this).attr('href'), 'title': jQuery(this).attr('title')})});
1528  });
1529};
1530
1531////////////////////////////////////////////////////////////////
1532//
1533// @method void setViewmode(viewmode)
1534//
1535// @desc Setzt den Ansichtsmodus eines Links
1536//
1537// @param viewmode Ansichtmodus
1538//
1539// @return void
1540//
1541////////////////////////////////////////////////////////////////
1542
1543jQuery.fn.wSetViewmode = function(viewmode){
1544
1545  jQuery.each(jQuery(this), function(){
1546
1547    var hrefNew = this.getAttribute('href') || '';
1548    var anchor  = '';
1549    if(/#[^#]+$/.test(hrefNew)){
1550      anchor  = hrefNew.replace(/.*#/, '');
1551      hrefNew = hrefNew.replace(/#.*/, '');
1552    }
1553
1554    hrefNew = hrefNew.indexOf('?') != -1 ? hrefNew + '&viewmode=' + viewmode: hrefNew + '?viewmode=' + viewmode;
1555
1556    if(anchor != ''){
1557      hrefNew += '#' + anchor;
1558    }
1559    if(this.className.indexOf('boxOnly') == -1 && this.innerHTML.indexOf('<img ') != -1){
1560      this.style.background  = 'none';
1561      this.style.paddingLeft = 'none';
1562    }
1563    this.setAttribute('href', hrefNew);
1564  });
1565};
1566
1567////////////////////////////////////////////////////////////////
1568//
1569// @method void wOpenPrintPreview(url)
1570//
1571// @desc Öffnet die aktuelle Seite in der Druckvorschau
1572//
1573// @return void
1574//
1575////////////////////////////////////////////////////////////////
1576
1577wOpenPrintPreview = function(width, height, name){
1578
1579  var name = name || 'printpreview';
1580
1581  var url = location.href.indexOf('?') == -1 ? location.href.replace(/#.*/, '') + '?viewmode=print' : location.href.replace(/#.*/, '') + '&viewmode=print';
1582
1583  options = ',location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=no';
1584
1585  wOpenPopupURL(url, width, height, name, options);
1586};
1587
1588////////////////////////////////////////////////////////////////
1589//
1590// @method void wOpenURL(url)
1591//
1592// @desc Öffnet eine Seite
1593//
1594// @return void
1595//
1596////////////////////////////////////////////////////////////////
1597
1598wOpenURL = function(url, target, event){
1599
1600  if(location.pathname.indexOf('/weblication/grid5/') != 0){
1601    if(target == '_blank'){
1602      var windowOpen;
1603      windowOpen = window.open(url);
1604      windowOpen.opener = null;
1605      windowOpen.location = url;
1606    }
1607    else if(target == '_top'){
1608      top.location.href = url;
1609    }
1610    else if(target == 'box'){
1611      var widthFancybox = '80%';
1612      var heightFancybox = '80%';
1613
1614      if(jQuery(window).width() <= 480){
1615        widthFancybox = '100%';
1616      }
1617
1618      if(typeof(lightboxType) != 'undefined' && lightboxType == 'wLightbox' && !/MSIE\s*(7|8)/.test(navigator.appVersion)){
1619        wLightbox({"type": "iframe", "href" : url, "class": "default", "width": widthFancybox, "height": heightFancybox});
1620      }
1621      else if(jQuery.fancybox && jQuery.fancybox.version && parseInt(String(jQuery.fancybox.version).replace(/(\d+\.\d+)\.\d+/, '$1')) >= 2){
1622        if(/box\w*\-(\d+)\-(\d+)/.test(target)){
1623          widthFancybox  = RegExp.$1 + 'px';
1624          heightFancybox = RegExp.$2 + 'px';
1625          jQuery.fancybox({"type": "iframe", "href" : url, "width": widthFancybox, "maxHeight": heightFancybox, "titlePosition": "inside", helpers : {title : {type : 'inside'}, overlay : {css : {'background' : 'rgba(0, 0, 0, 0.2)'}}}});
1626        }
1627        else{
1628          jQuery.fancybox({"type": "iframe", "href" : url, "width": widthFancybox, "minHeight": '80%', "titlePosition": "inside", helpers : {title : {type : 'inside'}, overlay : {css : {'background' : 'rgba(0, 0, 0, 0.2)'}}}});
1629        }
1630      }
1631      else{
1632        jQuery.fancybox({"type": "iframe", "href" : url, "width": widthFancybox, "height": '80%', "titlePosition": "inside", "transitionIn" : "none", "transitionOut" : "none", "hideOnContentClick": true, "zoomOpacity": true, "zoomSpeedChange": 200, "zoomSpeedIn": 400, "zoomSpeedOut": 400, "overlayShow": false, "overlayOpacity": 1});
1633      }
1634    }
1635    else{
1636      if(url.indexOf('#') == 0){
1637        wScrollSmoothToElement(url);
1638      }
1639      else {
1640        location.href = url;
1641      }
1642    }
1643  }
1644};
1645
1646////////////////////////////////////////////////////////////////
1647//
1648// @method void wOpenPopupURL(url, width, height, name, options)
1649//
1650// @desc Öffnet eine Seite in einem Popup
1651//
1652// @return void
1653//
1654////////////////////////////////////////////////////////////////
1655
1656wOpenPopupURL = function(url, width, height, name, options){
1657
1658  var name = name || '';
1659
1660  if(width == '' || width == ' ' || typeof(width) == 'undefined'){
1661    width = 786;
1662  }
1663  if(height == '' || height == ' ' || typeof(height) == 'undefined'){
1664    height = 677;
1665  }
1666
1667  url = url.replace(/&amp;/g, '&');
1668  options = options || ',location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=no';
1669
1670  width   = parseInt(width);
1671  height  = parseInt(height);
1672
1673  var posLeft = (screen.width / 2)  - (width  / 2);
1674  var posTop  = (screen.height / 2) - (height / 2);
1675  var windowOpen;
1676  windowOpen = window.open(url, name, 'top='+posTop+',left='+posLeft+',width='+width+',height='+height+',' + options);
1677  if(!/^\/\w+/.test(url)){
1678      windowOpen.opener = null;
1679      windowOpen.location = url;
1680  }
1681};
1682
1683////////////////////////////////////////////////////////////////
1684//
1685// @method void wSetParameterAndReload(name, value)
1686//
1687// @desc Setzt einen Parameter und lädt die Seite neu
1688//
1689// @return void
1690//
1691////////////////////////////////////////////////////////////////
1692
1693wSetParameterAndReload = function(name, value){
1694  
1695  var url = location.href;
1696  var paramReg = new RegExp('([\?|\&])' + name + '=([^\&]+)');
1697  if(paramReg.test(location.search)){
1698    url = url.replace(paramReg, RegExp.$1 + name + '=' + value);
1699  }
1700  else if(url.indexOf('?') != -1){
1701    url += '&' + name + '=' + value;
1702  }
1703  else{
1704    url += '?' + name + '=' + value;
1705  }
1706  location.href = url;
1707};
1708
1709////////////////////////////////////////////////////////////////
1710//
1711// @method void wDisableAnalytics()
1712//
1713// @desc Deaktiviert Google Analytics per Cookie
1714//
1715// @return void
1716//
1717////////////////////////////////////////////////////////////////
1718
1719wDisableAnalytics = function(){
1720
1721  document.cookie = 'disableGoogleAnalytics=1; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
1722  if(window['gaId']){
1723    window['ga-disable-' + window['gaId']] = true;
1724  }
1725  else if(typeof(gaOptout) != 'undefined'){
1726    gaOptout();    
1727  }
1728};
1729
1730////////////////////////////////////////////////////////////////
1731//
1732// @method void wSendMailNospam(data)
1733//
1734// @desc Öffnet eine E-Mail zum Versenden
1735//
1736// @return void
1737//
1738////////////////////////////////////////////////////////////////
1739
1740wSendMailNospam = function(data){
1741
1742  top.location.href = 'mailto:' + data.replace('|', '@');
1743};
1744
1745wAdaptConditionalFormData = function(){
1746
1747  jQuery("*[data-conditionalformdata]").each(function(){
1748    var cE = jQuery(this);
1749
1750    var conditionalformdata = cE.data('conditionalformdata');
1751
1752    var type               = 'showIf';
1753    var dyndisplayOperator = 'and';
1754
1755    if(/type:(showIf|hideIf)/.test(conditionalformdata)){
1756      type = RegExp.$1;
1757    }
1758
1759    if(/operator:(and|or)/.test(conditionalformdata)){
1760      dyndisplayOperator = RegExp.$1;
1761    }
1762
1763    if(/conditions:(.*)/.test(conditionalformdata)){
1764      conditionalformdata = RegExp.$1;
1765    }
1766
1767    conditionalformdata = conditionalformdata.replace(/,(\w+(==|\!=|\>=|\>|\<=|\<|)')/g, '_WCMA_$1');
1768
1769    var conditionalFormDatas = conditionalformdata.split('_WCMA_');
1770    var isActive             = dyndisplayOperator == 'or' ? false : true;
1771    var isActiveCurrent      = false;
1772
1773    for(var i = 0; i < conditionalFormDatas.length; i++){
1774
1775      conditionalFormDatas[i] = conditionalFormDatas[i].replace("\\'", 'WBSAP');
1776
1777      /^([\w\-]+)(\=\=|\!\=|<\=|<|>|>\=|pregMatch|\!pregMatch|contains|\!contains|pregiMatch|\!pregiMatch|containsi|\!containsi)\'([^\']*)\'/.test(conditionalFormDatas[i]);
1778
1779      var elementToObserveName = RegExp.$1;
1780      var operator             = RegExp.$2;
1781      var condition            = RegExp.$3.replace('WBSAP', "'");
1782
1783      if(condition.substr(0, 1) == '$'){
1784        var elementWidthConditionName = condition.substr(1);
1785        var elementWithConditionValue = null;
1786        var elementWithCondition      = cE.closest('form').find("*[name='" + elementWidthConditionName + "']");
1787        if(elementWithCondition.length != 0){
1788          condition = elementWithCondition.val();
1789
1790          if(elementWithCondition.attr('type') == 'radio'){
1791            elementWithConditionValue = cE.closest('form').find("input[name='" + elementWidthConditionName + "']:checked, input[name='" + elementWidthConditionName + "[]:checked']");
1792            if(elementWithConditionValue.length != 0){
1793              condition = elementWithConditionValue.val();
1794            }
1795            else{
1796              condition = '';
1797            }
1798          }
1799          else if(elementWithCondition.attr('type') == 'checkbox'){
1800            condition = new Array();
1801            elementToObserve.each(function(){
1802              if(jQuery(this).is(':checked')){
1803                condition.push(jQuery(this).val());
1804              }
1805            });
1806          }
1807        }
1808      }
1809
1810      var elementToObserve      = cE.closest('form').find("*[name='" + elementToObserveName + "'], *[name='" + elementToObserveName + "[]']");
1811      var elementToObserveValue = elementToObserve;
1812      var value                 = elementToObserveValue.val();
1813
1814      if(elementToObserve.attr('type') == 'radio'){
1815        elementToObserveValue = cE.closest('form').find("input[name='" + elementToObserveName + "']:checked, input[name='" + elementToObserveName + "[]:checked']");
1816        if(elementToObserveValue.length != 0){
1817          value = elementToObserveValue.val();
1818        }
1819        else{
1820          value = '';
1821        }
1822      }
1823      else if(elementToObserve.attr('type') == 'checkbox'){
1824        value = new Array();
1825        elementToObserve.each(function(){
1826          if(jQuery(this).is(':checked')){
1827            value.push(jQuery(this).val());
1828          }
1829        });
1830      }
1831
1832      if(!elementToObserve.data('hasaddedobserver')){
1833        elementToObserve.data('hasaddedobserver', true);
1834        elementToObserve.on('change keyup', function(){wAdaptConditionalFormData();});
1835      }
1836
1837      isActiveCurrent = false;
1838
1839      if(operator == '<' || operator == '<=' || operator == '>=' || operator == '>'){
1840        value = isNaN(parseFloat(value)) ? 0 : parseFloat(value);
1841      }
1842
1843      //console.log(elementToObserveName + '(' + value + ') ' + operator + ' ' + condition);
1844
1845      var regExpOperator = null;
1846      if(operator == 'pregMatch' || operator == '!pregMatch'){
1847        regExpOperator = new RegExp(condition);
1848      }
1849      else if(operator == 'pregiMatch' || operator == '!pregiMatch'){
1850        regExpOperator = new RegExp(condition, 'i');
1851      }
1852
1853      if(Array.isArray(value) && condition == ''){
1854        if(operator == '!=' && value.length != 0 || operator == '==' && value.length == 0){
1855          if(dyndisplayOperator == 'or'){
1856            isActive = true;
1857            break;
1858          }
1859        }
1860        else{
1861          if(dyndisplayOperator == 'and'){
1862            isActive = false;
1863            break;
1864          }
1865        }
1866      }
1867      else if(Array.isArray(value) && condition.indexOf('|') == -1){
1868        if(operator == '!=' && value.indexOf(condition) == -1 || operator == '==' && value.indexOf(condition) != -1){
1869          if(dyndisplayOperator == 'or'){
1870            isActive = true;
1871            break;
1872          }
1873        }
1874        else{
1875          if(dyndisplayOperator == 'and'){
1876            isActive = false;
1877            break;
1878          }
1879        }
1880      }
1881      else if(Array.isArray(value)){
1882        var conditions = condition.split('|');
1883        isActiveCurrent = false;
1884        for(var j = 0; j < conditions.length; j++){
1885          if(operator == '!=' && value.indexOf(conditions[j]) == -1 || operator == '==' && value.indexOf(conditions[j]) != -1){
1886            isActiveCurrent = true;
1887            break;
1888          }
1889        }
1890        if(isActiveCurrent){
1891          if(dyndisplayOperator == 'or'){
1892            isActive = true;
1893            break;
1894          }
1895        }
1896        else{
1897          if(dyndisplayOperator == 'and'){
1898            isActive = false;
1899            break;
1900          }
1901        }
1902      }
1903      else if(operator == 'pregMatch' && regExpOperator.test(value) || operator == '!pregMatch' && !regExpOperator.test(value) || operator == 'pregiMatch' && regExpOperator.test(value) || operator == '!pregiMatch' && !regExpOperator.test(value)){
1904        if(dyndisplayOperator == 'or'){
1905          isActive = true;
1906          break;
1907        }
1908      }
1909      else if(operator == 'contains' && value.indexOf(condition) != -1 || operator == '!contains' && value.indexOf(condition) == -1 || operator == 'containsi' && value.toLowerCase().indexOf(condition.toLowerCase()) != -1 || operator == '!containsi' && value.toLowerCase().indexOf(condition.toLowerCase()) == -1){
1910        if(dyndisplayOperator == 'or'){
1911          isActive = true;
1912          break;
1913        }
1914      }
1915      else if(operator == '!=' && value != condition || operator == '==' && value == condition || operator == '<' && value < condition || operator == '<=' && value <= condition || operator == '>=' && value >= condition || operator == '>' && value > condition){
1916        if(dyndisplayOperator == 'or'){
1917          isActive = true;
1918          break;
1919        }
1920      }
1921      else{
1922        if(dyndisplayOperator == 'and'){
1923          isActive = false;
1924          break;
1925        }
1926      }
1927    }
1928
1929    if(type == 'showIf' && !isActive || type == 'hideIf' && isActive){
1930      cE.addClass('wglConditionalFormdata');
1931      cE.addClass('wglHideConditionalFormdata');
1932      cE.removeClass('wglShowConditionalFormdata');
1933      cE.find('input, textarea, select').each(function(index){
1934        if(jQuery(this).attr('tabindex') && jQuery(this).attr('tabindex') != -1){
1935          jQuery(this).attr('data-tabindex', jQuery(this).attr('tabindex'));
1936        }
1937        if(typeof(wResetConditionalFormdataOnHide) != 'undefined' && wResetConditionalFormdataOnHide){
1938          if(typeof(jQuery(this).data('valueinit')) == 'undefined'){
1939            if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio'){
1940              jQuery(this).data('valueinit', jQuery(this).prop('checked') ? 'checked' : 'unchecked');
1941            }
1942            else{
1943              jQuery(this).data('valueinit', jQuery(this).val());
1944            }
1945            if(jQuery(this).attr('type') == 'hidden' && jQuery(this).attr('id').indexOf('inputUploader-') == -1){
1946              jQuery(this).val('');
1947            }
1948          }
1949          else{
1950            if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio'){
1951              jQuery(this).prop('checked', jQuery(this).data('valueinit') == 'checked' ? true : false);
1952            }
1953            else{
1954              jQuery(this).val(jQuery(this).data('valueinit'));
1955            }
1956          }
1957        }
1958
1959        if(jQuery(this).attr('type') == 'hidden' && jQuery(this).attr('id').indexOf('inputUploader-') == -1){
1960          jQuery(this).val('');
1961        }
1962
1963        jQuery(this).attr('tabindex', -1);
1964      });
1965    }
1966    else{
1967      cE.addClass('wglConditionalFormdata');
1968      cE.removeClass('wglHideConditionalFormdata');
1969      cE.addClass('wglShowConditionalFormdata');
1970      cE.find('input').each(function(index){
1971        if(jQuery(this).attr('data-tabindex')){
1972          jQuery(this).attr('tabindex', jQuery(this).attr('data-tabindex'));
1973        }
1974        else{
1975          jQuery(this).removeAttr('tabindex');
1976        }
1977        if(jQuery(this).attr('type') == 'hidden' && jQuery(this).attr('id').indexOf('inputUploader-') == -1 && typeof(jQuery(this).data('valueinit')) != 'undefined'){
1978          jQuery(this).val(jQuery(this).data('valueinit'));
1979        }
1980      });
1981    }
1982  });
1983};
1984
1985wGetScrollTopHeight = function(options){
1986
1987  var scrollTop = 0;
1988
1989  if(jQuery('.wglContainerInsideTopOnScroll').length > 0 && jQuery('.wglContainerInsideTopOnScroll > *').height() > 0){
1990    scrollTop = jQuery('.wglContainerInsideTopOnScroll').height();
1991  }
1992  else if(jQuery('.wglKeepInsideTopOnScroll').length > 0){
1993    scrollTop = jQuery('.wglKeepInsideTopOnScroll').height();
1994  }
1995  else if(jQuery('#blockTop').length > 0 && jQuery('#blockTop').css('position') == 'fixed'){
1996    scrollTop = jQuery('#blockTop').height();
1997  }
1998  return scrollTop;
1999};
2000
2001wAdaptParallax = function(event){
2002 
2003  var winScrollTop = jQuery(window).scrollTop();
2004  var winHeight    = jQuery(window).height();
2005
2006  wUiTmp['lastEventType'] = event ? event.type : '';
2007
2008  if(winScrollTop == window['lastScrollTop']){
2009    return;
2010  }
2011  else if(!window['lastScrollTop']){
2012    wUiTmp['scrollDirection'] = winScrollTop > window['lastScrollTop'] ? 'down' : 'up';
2013    wUiTmp['lastScrollTop']   = winScrollTop;
2014  }
2015
2016  wUiTmp['lastScrollTop'] = winScrollTop;
2017
2018  if(typeof(wEditor) == 'undefined'){
2019    jQuery('.wglParallaxBackground').each(function(index){
2020
2021      var currentElement  = jQuery(this);
2022
2023      if(wUiTmp['lastEventType'] != 'resize' && currentElement.data('disableParallax') == '1'){
2024        return false;
2025      }
2026
2027      var offsetTop       = parseInt(currentElement.offset().top);
2028      var offsetTopInit   = 0;
2029      var offsetHeight    = parseInt(currentElement.outerHeight());
2030      var offsetWidth     = parseInt(currentElement.outerWidth());
2031      var posInsideTop    = winScrollTop + winHeight - offsetTop;
2032      var posInsideBottom = offsetTop + offsetHeight - winScrollTop;
2033      var useEdgeOnInit   = currentElement.data('useedgeoninit') == '1' ? true : false;
2034      var moveMax         = offsetHeight + winHeight;
2035
2036      if(posInsideTop > 0 && posInsideBottom > 0){
2037        var posTopPercentage = posInsideTop / moveMax;
2038        var backgroundPositionTop       = 0;
2039        var backgroundPositionLeft      = 0;
2040        var backgroundPositionTopOrigin = 0;
2041
2042        var direction         = (currentElement.data('parallaxbackgrounddirection') ? currentElement.data('parallaxbackgrounddirection').toLowerCase() : 'bottom');
2043        var parallaxElement   = (currentElement.data('parallaxbackgroundelement') ? document.getElementById(currentElement.data('parallaxbackgroundelement')) : null);
2044
2045        var speed     = 1;
2046
2047        try{
2048          speed       = (currentElement.data('parallaxbackgroundspeed') ? currentElement.data('parallaxbackgroundspeed') : 1);
2049        }
2050        catch(e){
2051          speed = 1;
2052        }
2053
2054        if(speed == 'no' || speed == 'image'){
2055          return false;
2056        }
2057        else if(speed == 'screen'){
2058          speed = 1;
2059          currentElement.data('parallaxbackgroundspeed', speed);
2060        }
2061
2062        if(!currentElement.data('backgroundHeight') && direction.indexOf('top') != -1 && direction.indexOf('bottom') != -1){          
2063          image = new Image();
2064          image.src = currentElement.get(0).style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/i, '$2');
2065          image.onload = (function(currentElement){
2066            if(image.height == 0){
2067              return false;
2068            }
2069            if(currentElement.data('disableParallax') != '1'){
2070              if(speed == 'image'){
2071                currentElement.data('backgroundHeight', image.height);
2072                speed = (image.height - offsetHeight) / offsetHeight;
2073                if(speed < 0){
2074                  speed = 'no';
2075                  currentElement.data('parallaxbackgroundspeed', speed);
2076                  return;
2077                }
2078                currentElement.data('parallaxbackgroundspeed', speed);
2079              }
2080              else{
2081                backgroundSize = currentElement.css('background-size');
2082
2083                var heightScaled    = parseInt(offsetWidth / image.width * image.height);
2084                var disableParallax = false;
2085
2086                if(/auto$/i.test(backgroundSize) || backgroundSize == ''){
2087                  heightScaled = image.height;
2088                }
2089
2090                currentElement.data('backgroundHeight', heightScaled);
2091                //console.log(image.height + ' < ' + offsetHeight);
2092                //console.log(backgroundSize + ' :: ' + heightScaled + ' + ' + parseInt(currentElement.css('background-position').split(' ')[1]) + '  <' + offsetHeight);
2093
2094                if(heightScaled + parseInt(currentElement.css('background-position').split(' ')[1]) < offsetHeight){
2095                  currentElement.css({'background-size' : 'cover', 'background-position' : '0 0'});
2096                  currentElement.data('disableParallax', '1');
2097                }
2098                else{
2099                  currentElement.css({'outline' : 'none'});
2100                  currentElement.data('disableParallax', '0');
2101                }
2102              }
2103            }
2104          })(currentElement);
2105        }
2106
2107        speed = parseFloat(speed);
2108
2109        //console.log(direction);
2110
2111        if(currentElement.data('disableParallax') == '1'){
2112          return false;
2113        }
2114
2115        if(direction.indexOf('right') != -1){
2116          backgroundPositionLeft = '-' + String(Math.round(offsetHeight - posTopPercentage * offsetHeight) * speed);
2117        }
2118        else if(direction.indexOf('left') != -1){
2119          backgroundPositionLeft = '-' + String(Math.round(posTopPercentage * offsetHeight) * speed);
2120        }
2121        if(direction.indexOf('top') != -1){
2122          backgroundPositionTop = '-' + String(Math.round(posTopPercentage * offsetHeight) * speed);
2123          backgroundPositionTopOrigin = backgroundPositionTop;
2124          if(useEdgeOnInit == true){
2125            offsetTopInit = currentElement.data('offsettopinit');
2126            if(!wUiTmp['hasInitParallax'] && !offsetTopInit){
2127              offsetTopInit = backgroundPositionTop;
2128              currentElement.data('offsettopinit', offsetTopInit);
2129            }
2130            else if(!offsetTopInit){
2131              offsetTopInit = 0;
2132            }
2133            backgroundPositionTop -= offsetTopInit;
2134            if(backgroundPositionTop > 0 ){
2135              backgroundPositionTop = 0;
2136            }
2137          }
2138          //console.log(offsetHeight + ' - ' + backgroundPositionTop + ' > ' + currentElement.data('backgroundHeight'));
2139          if(currentElement.data('backgroundHeight') && (offsetHeight - backgroundPositionTop) > currentElement.data('backgroundHeight')){
2140            backgroundPositionTop = offsetHeight - currentElement.data('backgroundHeight')
2141          }
2142        }
2143        else if(direction.indexOf('bottom') != -1 || direction == ''){
2144          backgroundPositionTop = '-' + String(Math.round(offsetHeight - posTopPercentage * offsetHeight) * speed);
2145          backgroundPositionTopOrigin = backgroundPositionTop;
2146          if(useEdgeOnInit == true){
2147            offsetTopInit = currentElement.data('offsettopinit');
2148            if(!wUiTmp['hasInitParallax'] && !offsetTopInit){
2149              offsetTopInit = backgroundPositionTop - offsetHeight;
2150              currentElement.data('offsettopinit', offsetTopInit);
2151            }
2152            else if(!offsetTopInit){
2153              offsetTopInit = 0;
2154            }
2155            backgroundPositionTop -= offsetTopInit;
2156            if(backgroundPositionTop < offsetHeight && backgroundPositionTop > 0){
2157              backgroundPositionTop = offsetHeight;
2158            }
2159          }
2160          if(currentElement.data('backgroundHeight') && (offsetHeight - backgroundPositionTop) > currentElement.data('backgroundHeight')){
2161            backgroundPositionTop = offsetHeight - currentElement.data('backgroundHeight')
2162          }
2163        }
2164
2165        backgroundPositionLeft = String(backgroundPositionLeft) + 'px';
2166        backgroundPositionTop  = String(backgroundPositionTop) + 'px';
2167
2168        wUiTmp['lastEventTypeBefore'] = wUiTmp['lastEventType'];
2169        if(parallaxElement){
2170          parallaxElement.style.marginTop = backgroundPositionTop;
2171        }
2172        else{
2173          if(wUiTmp['isIOS']){
2174            if(wUiTmp['lastEventType'] == 'touchmove'){
2175              currentElement.css({'transform' : 'translate3d(0, 0, 0)', 'transition' : '', 'background-position' : backgroundPositionLeft + ' ' + backgroundPositionTop});
2176            }
2177            else if(wUiTmp['lastEventType'] == 'touchend'){
2178            }
2179            else if(wUiTmp['lastEventType'] == 'scroll'){
2180              currentElement.css({'transform' : 'translate3d(0, 0, 0)', 'transition' : 'background-position ease 0.6s', 'background-position' : backgroundPositionLeft + ' ' + backgroundPositionTop});
2181            }
2182          }
2183          else{
2184            currentElement.css({'background-position' : backgroundPositionLeft + ' ' + backgroundPositionTop});
2185          }
2186        }
2187      }
2188    });
2189
2190    jQuery('.wglParallaxContent').each(function(index){
2191      var currentElement    = jQuery(this).children().first();
2192      var offsetTop         = parseInt(currentElement.offset().top);
2193      var offsetHeight      = parseInt(currentElement.height());
2194      var posInsideTop    = winScrollTop + winHeight - offsetTop;
2195      var posInsideBottom = offsetTop + offsetHeight - winScrollTop;
2196      if(posInsideTop > 0 && posInsideBottom > 0){
2197        var posTopPercentage = posInsideTop / (offsetHeight + winHeight);
2198        var positionTop  = 0;
2199        var positionLeft = 0;
2200        var direction = (currentElement.parent().data('parallaxcontentdirection') ? currentElement.parent().data('parallaxcontentdirection').toLowerCase() : 'left');
2201
2202        if(direction.indexOf('right') != -1){
2203          var offsetWidth = parseInt(currentElement.width());
2204          var left = - (1 - posTopPercentage * 2) * offsetWidth;
2205          if(left > 0) left = 0;
2206          positionLeft = String(parseInt(left)) + 'px';
2207        }
2208        else if(direction.indexOf('left') != -1){
2209          var parentOffsetWidth = parseInt(currentElement.parent().width());
2210          var left = (1 - posTopPercentage * 2) * parentOffsetWidth;
2211          if(left < 0) left = 0;
2212          positionLeft = String(parseInt(left)) + 'px';
2213        }
2214        if(direction.indexOf('top') != -1){
2215          positionTop = String(1 - posTopPercentage * offsetHeight + offsetHeight) + 'px';
2216        }
2217        else if(direction.indexOf('bottom') != -1 || direction == ''){
2218          positionTop = String(posTopPercentage * offsetHeight) + 'px';
2219        }
2220        currentElement.css({'transform' : 'translate3d(0, 0, 0)', 'margin-left' : positionLeft, 'margin-top' : positionTop});
2221      }
2222    });
2223  }
2224  wUiTmp['hasInitParallax'] = true;
2225  wUiTmp['adaptParallax']   = false;
2226};
2227
2228wScrollSmoothToTarget = function(element, event){
2229 
2230  var id, href = element.getAttribute('href'), offsetTopFixed, targetName, elementTarget, scrollTop;
2231  
2232
2233   //stopt einen Klick auf einen externen Link
2234  if(element.getAttribute('target') != null && element.getAttribute('target') != '') return true;
2235  if(element.href.replace(/#[\S\s]*$/, '') != location.href.replace(/#[\S\s]*$/, '')){
2236    return true;
2237  }
2238  else if(/(#.*)/.test(href)){
2239    
2240    targetName = RegExp.$1;
2241    targetSelector = targetName.replace(/\./, '\\.');
2242    elementTarget = jQuery(targetSelector);
2243    var currentTimestamp = new Date().getTime();
2244    if(elementTarget.length > 0 && !element.getAttribute('data-lct') || element.getAttribute('data-lct') < currentTimestamp - 320){
2245      element.setAttribute('data-lct', currentTimestamp);
2246      if(!(/_Tab-|#tab_|_Accordion-/.test(href))) {
2247        event.preventDefault();  
2248      }
2249      jQuery(element).parent().parent().find('li').removeClass('selected');
2250      jQuery(element).parent().addClass('selected');
2251
2252      try{
2253        jQuery('body, html').stop(true, true);
2254        scrollDuration = parseInt(element.getAttribute('data-scrollsmoothtotargetduration') ? element.getAttribute('data-scrollsmoothtotargetduration') : 400);
2255        offsetTopFixed = wGetScrollTopHeight();
2256        jQuery('body, html').animate({scrollTop: elementTarget.offset().top - offsetTopFixed}, {duration: scrollDuration, complete: function(){
2257          var offsetTopFixed = wGetScrollTopHeight();
2258          if(offsetTopFixed > 0){
2259            jQuery('body, html').animate({scrollTop: elementTarget.offset().top - offsetTopFixed}, scrollDuration);
2260          }
2261          
2262          if(history.pushState){
2263            history.pushState(null, null, targetName);
2264          }
2265        
2266        }});
2267
2268        return false;
2269      }
2270      catch(e){}
2271    }
2272  }
2273};
2274
2275wOptimizePictureSizes = function(){
2276
2277  jQuery("img[data-src2x]:not(.wglLazyLoadInit), img.wglLazyLoad:not(.wglLazyLoadInit)").each(function(){
2278    var currentImg   = jQuery(this);
2279    var offsetTop    = parseInt(currentImg.offset().top);
2280    var srcMin       = currentImg.data('srcmin') ? currentImg.data('srcmin') : '';
2281    var widthCurrent = parseInt(currentImg.width());
2282    var attrWidthCur = parseInt(typeof(currentImg.attr('width')) != 'undefined' ? currentImg.attr('width') : 0);
2283    var widthMin     = parseInt(srcMin.replace(/.*@min/, '').replace(/\..*/, ''));
2284
2285    if(currentImg.attr('data-maxwidthifinvisible') && currentImg.attr('data-maxwidthifinvisible') > widthCurrent){
2286      widthCurrent = currentImg.attr('data-maxwidthifinvisible');
2287    }
2288
2289    //console.log(widthCurrent + ' < ' + widthMin);
2290
2291    if(devicePixelRatio >= hdLimitDpr && typeof(currentImg.attr('data-src2x')) != 'undefined' && currentImg.attr('data-src2x') != '' && attrWidthCur < widthCurrent * 2 && currentImg.attr('data-ishd') != '1'){
2292      currentImg.attr('src', currentImg.data('src2x'));
2293      currentImg.attr('data-ishd', '1');
2294    }
2295    else if(typeof(currentImg.attr('data-src2x')) != 'undefined' && currentImg.attr('data-src2x') != '' && attrWidthCur < widthCurrent && currentImg.attr('data-ishd') != '1'){
2296      currentImg.attr('src', currentImg.data('src2x'));
2297      currentImg.attr('data-ishd', '1');
2298    }
2299    else if(typeof(currentImg.attr('data-srcmin')) != 'undefined' && currentImg.attr('data-srcmin') != '' && widthCurrent < widthMin && widthMin < attrWidthCur && currentImg.attr('data-ishd') != '1' && currentImg.attr('data-isld') != '1'){
2300      if(typeof(currentImg.attr('src')) != 'undefined' && currentImg.attr('src').indexOf('data:image') == 0 && currentImg.attr('data-ismin') != '1'){
2301        currentImg.attr('src', currentImg.data('srcmin'));
2302        currentImg.attr('data-ismin', '1');
2303      }
2304    }
2305    else if(typeof(currentImg.attr('data-src')) != 'undefined' && currentImg.attr('data-src') != '' && currentImg.attr('data-ishd') != '1' && currentImg.attr('data-isld') != '1'){
2306      currentImg.attr('src', currentImg.data('src'));
2307      currentImg.attr('data-isld', '1');
2308    }
2309  });
2310};
2311
2312wProcessWglAdjustHeightMax = function(){
2313  
2314  jQuery('.wglAdjustHeightMax').each(function(index){
2315    var currentElement = jQuery(this);
2316    var offsetLeft     = 0;
2317    var offsetLeftLast = 0;
2318    var maxHeight      = 0;
2319    var adjust         = true;
2320    var positionCol    = 0;
2321    var childsToAdapt  = new Array();
2322    var numberChilds   = 0;
2323    var subElement     = null;
2324    var elementHeight  = 0;
2325
2326    currentElement.children('*:visible').each(function(index){
2327      var className = jQuery(this).attr('class') || '';
2328      if(className.toLowerCase().indexOf('clear') == -1 && className.toLowerCase().indexOf('editor') == -1){
2329        numberChilds++;
2330      }
2331    });
2332    currentElement.children('*:visible').each(function(index){
2333      subElement    = jQuery(this);
2334      var className = jQuery(this).attr('class') || '';
2335      if(className.toLowerCase().indexOf('clear') == -1 && className.toLowerCase().indexOf('editor') == -1){
2336        if(jQuery(this).data('wHasSetHeightToAjustHeightMax') == '1'){
2337          jQuery(this).css({'height' : ''});
2338        }
2339        offsetLeft = jQuery(this).get(0).offsetLeft - (jQuery(this).parent().css('position') == 'relative' ? 0 : jQuery(this).get(0).parentNode.offsetLeft);
2340
2341        if(index > 0 && (offsetLeft == 0 || offsetLeft <= offsetLeftLast) && jQuery(this).css('position') != 'absolute'){
2342          if(positionCol == 1){
2343            childsToAdapt = new Array();
2344            maxHeight = 0;
2345          }
2346          positionCol = 0;
2347          if(offsetLeft <= offsetLeftLast){
2348            offsetLeft = 0;
2349          }
2350        }
2351
2352        positionCol++;
2353
2354        elementHeight          = subElement.css('box-sizing') == 'border-box' ? subElement.outerHeight() : subElement.height();
2355
2356        if(index + 1 == numberChilds && positionCol > 1){
2357          maxHeight = elementHeight > maxHeight ? elementHeight : maxHeight;
2358          childsToAdapt.push(jQuery(this));
2359        }
2360
2361        if(childsToAdapt.length > 1 && (index > 0 && positionCol == 1 || index + 1 == numberChilds)){
2362          for(i = 0; i < childsToAdapt.length; i++){
2363            childToAdapt = childsToAdapt[i];
2364            var className = childToAdapt.attr('class') || '';
2365            if(className.toLowerCase().indexOf('clear') == -1 && className.toLowerCase().indexOf('editor') == -1){
2366              childToAdapt.css({'height' : maxHeight});
2367              childToAdapt.data('wHasSetHeightToAjustHeightMax', '1');
2368            }
2369          }
2370          childsToAdapt = new Array();
2371          maxHeight = 0;
2372        }
2373
2374        offsetLeftLast = offsetLeft;
2375        maxHeight = elementHeight > maxHeight ? elementHeight : maxHeight;
2376        childsToAdapt.push(jQuery(this));
2377      }
2378    });
2379    if(typeof(wOnAfterAdjustHeight) == 'function'){     
2380      wOnAfterAdjustHeight(currentElement);
2381    } 
2382  });
2383};
2384
2385jQuery.fn.wBannerSlider = function(){
2386
2387  jQuery.each(jQuery(this), function(){
2388
2389    var bannerSliderCurrent   = jQuery(this);
2390    var bannerSliderCurrentId = bannerSliderCurrent.attr('id').replace(/bannerSlider_/, '');
2391
2392    var options = {};
2393
2394    options['initOn']         = options['initon']  || jQuery(this).data('initon');
2395    options['initOpen']       = options['initopen']  || jQuery(this).data('initopen');
2396    options['initDelay']      = options['initDelay'] || jQuery(this).data('initdelay');
2397    if(options['initDelay'] == ''){
2398      options['initDelay'] = 0;
2399    }
2400    else{
2401      options['initDelay'] *= 1000;
2402    }
2403
2404    eval('selectEntry_' + bannerSliderCurrentId + ' = function (position){selectListEntryBannerSlider(bannerSliderCurrentId, position);}');
2405
2406    var bannerSliderInit = function(){
2407
2408      if(options['initOpen'] != ''){
2409        window.bannerSliderObjects[bannerSliderCurrentId] = {};
2410        selectListEntryBannerSlider(bannerSliderCurrentId, parseInt(options['initOpen']), {'animation' : 'none'});
2411      }
2412
2413      window.setTimeout(function(){
2414        initBannerSlider(bannerSliderCurrentId);
2415      }, options['initDelay']);
2416    };
2417
2418    if(options['initOn'] == 'load'){
2419      jQuery(window).on('load', bannerSliderInit);
2420    }
2421    else{
2422      bannerSliderInit();
2423    }
2424  });
2425};
2426
2427jQuery.fn.wSearchSuggest = function(){
2428  
2429  jQuery.each(jQuery(this), function(index){
2430    var cE = jQuery(this);
2431    cE.attr('autocomplete', 'off');
2432
2433    cE.on('keydown', function(event){
2434      if(event.keyCode == 27){
2435        jQuery('#searchSuggestOuter').remove();
2436      }
2437      else if(event.keyCode == 40 || event.keyCode == 38){
2438        event.preventDefault();
2439
2440        if(event.target.value == ''){
2441          return false;
2442        }
2443
2444        var positionSuggestSelected = 0;
2445        if(event.target.getAttribute('data-positionsuggestedselected')){
2446          positionSuggestSelected = positionSuggestSelected + parseInt(event.target.getAttribute('data-positionsuggestedselected'));
2447        }
2448
2449        positionSuggestSelected = event.keyCode == 40 ? positionSuggestSelected + 1 : positionSuggestSelected - 1;
2450        if(positionSuggestSelected > jQuery('#searchSuggestOuter .searchSuggestEntry').length){
2451          positionSuggestSelected = jQuery('#searchSuggestOuter .searchSuggestEntry').length;
2452        }
2453        else if(positionSuggestSelected < 1){
2454          positionSuggestSelected = 1;
2455        }
2456        
2457        if(jQuery('#searchSuggestOuter .searchSuggestEntry:nth-child(' + positionSuggestSelected + ')').data('word')){
2458          event.target.value = jQuery('#searchSuggestOuter .searchSuggestEntry:nth-child(' + positionSuggestSelected + ')').data('word');  
2459          event.target.setAttribute('data-positionsuggestedselected', positionSuggestSelected);
2460        }
2461
2462        jQuery('#searchSuggestOuter .searchSuggestEntry').removeClass('selected');
2463        jQuery('#searchSuggestOuter .searchSuggestEntry:nth-child(' + positionSuggestSelected + ')').addClass('selected');
2464      }
2465    });
2466
2467    cE.on('keyup', function(event){
2468      event.preventDefault();
2469      var searchTerm = jQuery(this).val();
2470
2471      if(typeof(wUiTmp['searchTermNumberResults']) == 'undefined'){
2472        wUiTmp['searchTermNumberResults'] = {};
2473      }
2474
2475      if(searchTerm != '' && searchTerm != wUiTmp['lastSearchTerm']){
2476        if(event.keyCode == 40 || event.keyCode == 38){
2477          event.preventDefault();
2478          return;
2479        }
2480
2481        if(wUiTmp['lastSearchTerm'] && searchTerm.indexOf(wUiTmp['lastSearchTerm']) == 0 && wUiTmp['lastSearchTermNumberResults'] == 0){
2482          return;
2483        }
2484
2485        if(wUiTmp['searchTermNumberResults'][searchTerm] && wUiTmp['searchTermNumberResults'][searchTerm] == 0){
2486          return;
2487        }
2488        var project       = location.pathname.replace(/[^\/]*$/, '').replace(/^(\/[^\/]*)[^\?]*/, '$1');
2489        if(cE.data('project-search')){
2490          projectSearch = cE.data('project-search');
2491          if(project == '/'){
2492            project = projectSearch;
2493          }
2494          else if(projectSearch.indexOf('!important') != -1){
2495            project = projectSearch.replace(/\s*\!important/, '');
2496          }
2497        }
2498        var projectGlobal = wUiTmp['wGlobalProjectPath'];
2499        var search        = 'default';
2500        if(cE.data('id-search')){
2501          search = cE.data('id-search');
2502        }
2503        var url = projectGlobal + '/wGlobal/scripts/php/wSearchSuggest.php?searchTerm=' + encodeURIComponent(searchTerm) + '&project=' + project + '&search=' + search;
2504        if(cE.data('usecache') == '1'){
2505          url = project + '/weblication/wSearchSuggest/searchTerm=' + encodeURIComponent(searchTerm).replace(/~/g, '_WT-IL_').replace(/%/g, '~').toLowerCase() + '.html';
2506        }
2507        jQuery.ajax({type: "GET", url: url, dataType: 'json', success: function(resultData){
2508          var numberResults = 0;
2509          var innerHTMLSuggest = '<div id="searchSuggestOuter"><div id="searchSuggestInner">';
2510          for(word in resultData){
2511            innerHTMLSuggest += '<div class="searchSuggestEntry" data-word="' + word + '">' + word + '</div>';
2512            numberResults++;
2513          }
2514          wUiTmp['lastSearchTermNumberResults'] = numberResults;
2515          wUiTmp['searchTermNumberResults'][searchTerm] = numberResults;
2516
2517          innerHTMLSuggest += '</div></div>';
2518          jQuery('#searchSuggestOuter').remove();
2519          if(numberResults > 0){
2520            cE.after(innerHTMLSuggest);
2521            jQuery('.searchSuggestEntry').on('mousedown', function(){
2522              jQuery(this).closest('#searchSuggestOuter').prev('input').val(jQuery(this).data('word'));
2523              jQuery(this).closest('form').submit();
2524              jQuery('#searchSuggestOuter').remove();
2525            });
2526          }
2527        }});
2528      }
2529      else if(searchTerm != wUiTmp['lastSearchTerm']){
2530        jQuery('#searchSuggestOuter').remove();
2531      }
2532      wUiTmp['lastSearchTerm'] = searchTerm;
2533    });
2534  }); 
2535};
2536
2537jQuery.fn.wPictureGallery = function(){
2538
2539  jQuery.each(jQuery(this), function(){
2540
2541    var options = {};
2542    var pictureGalleryCurrent   = jQuery(this);
2543    var pictureGalleryCurrentId = pictureGalleryCurrent.attr('id').replace(/pictureGallery_/, '');
2544
2545    eval('selectEntry_' + pictureGalleryCurrentId + ' = function (position){selectListEntryGallery(pictureGalleryCurrentId, position);}');
2546
2547    initGallery(pictureGalleryCurrentId);
2548  });
2549};
2550
2551jQuery.fn.wTabcontainer = function(){
2552
2553  var maxHeightContent = 0;
2554
2555  jQuery.each(jQuery(this), function(){
2556
2557    var tabcontainerCurrent     = jQuery(this);
2558    var tabcontainerID          = tabcontainerCurrent.get(0).id.replace(/tabContainer_/, '');
2559    
2560    var options = {};
2561
2562    options['initOpen']         = options['initOpen']         || jQuery(this).data('initopen');
2563    options['rememberSelected'] = options['rememberSelected'] || jQuery(this).data('rememberselected');
2564    options['pushstateonselect'] = options['pushstateonselect'] || jQuery(this).data('pushstateonselect');
2565
2566    var activeContent = options['initOpen'] || 0;
2567
2568    if(/^\d+$/.test(activeContent)){
2569      activeContent = parseInt(activeContent) - 1;
2570    }
2571
2572    if(options['rememberSelected'] == '1' || typeof(wEditor) != 'undefined'){
2573      var checkCookieRegExp = new RegExp('registerTab_' + tabcontainerID + '=(\\d+)');
2574      if(checkCookieRegExp.test(document.cookie)){
2575        activeContent = RegExp.$1 - 1;
2576      }
2577    }
2578
2579    var jQueryHashId = location.hash.replace(/\:/g, '\\:').replace(/\./g, '\\.').replace('open_', 'anchor_');
2580    
2581    if(jQueryHashId != '' && jQuery(this).find(jQueryHashId).length > 0){
2582      if(/_(\d+)$/.test(jQuery(jQueryHashId).attr('id'))){
2583        activeContent = RegExp.$1 - 1;
2584      }
2585      else if(/_Tab-(\d+)-/.test(jQuery(jQueryHashId).attr('id'))){
2586        activeContent = RegExp.$1 - 1;
2587      }
2588      else{
2589        var containerIndex = jQuery(jQueryHashId).parents('.container, .containerInvisible').index();
2590        if(containerIndex >= 0){
2591          activeContent = containerIndex;
2592        }
2593      }
2594    }
2595
2596    if(!activeContent || activeContent == '' || activeContent < 0){
2597      activeContent = 0;
2598    }
2599    
2600    tabcontainerCurrent.find('> .tabs > .tabSelected').removeClass('tabSelected').addClass('tab');
2601    tabcontainerCurrent.find('> .tabs > .tab:nth-child(' + (activeContent + 1) + ')').removeClass('tab').addClass('tabSelected');
2602    tabcontainerCurrent.find('> .containers > .container,> div > div > .containers > .container').addClass('containerInvisible');
2603    tabcontainerCurrent.find('> .containers > .container:nth-child(' + (activeContent + 1) + '),> div > div > .containers > .container:nth-child(' + (activeContent + 1) + ')').removeClass('containerInvisible').addClass('containerSelected').addClass('containerSelectedAfterInit');
2604  
2605    jQuery(this).find('> .tabsSmall, > .tabsSelectbox, > .tabs, > div > div > .tabs').children('.tab, .tabSelected').on('click', function(event){
2606      event.preventDefault();
2607      var headerSelected  = jQuery(this);
2608
2609      var tabcontainerSelected = headerSelected.get(0).id.replace(/.*_/, '');
2610      
2611      if(options['pushstateonselect'] != '0' &&  history.pushState && headerSelected.attr('id')){
2612        history.pushState({page: '#' + headerSelected.attr('id')}, '', '#' + headerSelected.attr('id'));
2613      }
2614
2615      jQuery(this).parent().parent().find('> .containers, > div > div > .containers').children('.container, .containerSelected, .containerInvisible').each(function(){
2616        currentContainer = this;
2617        (function(currentContainer){
2618          if(currentContainer.id == 'container_' + tabcontainerID + '_' + tabcontainerSelected){
2619            currentContainer.className = 'container containerSelected';
2620            window.setTimeout(function(){jQuery(currentContainer).addClass('containerSelectedAfterInit')}, 32);
2621          }
2622          else{
2623            currentContainer.className = 'container containerInvisible';
2624            window.setTimeout(function(){jQuery(currentContainer).addClass('containerInvisibleAfterInit')}, 32);
2625          }
2626        })(currentContainer);
2627      });
2628
2629      jQuery(this).parent().parent().find('> .tabsSmall, > .tabsSelectbox, > .tabs, > div > div > .tabs').children('.tab, .tabSelected').each(function(){
2630       if(this.id == 'tab_' + tabcontainerID + '_' + tabcontainerSelected){
2631      		jQuery(this).removeClass('tab');
2632      		jQuery(this).addClass('tabSelected');
2633        }
2634        else{
2635      		jQuery(this).removeClass('tabSelected');
2636      		jQuery(this).addClass('tab');
2637        }
2638      });
2639
2640      if(typeof(wEditor) != 'undefined' || options['rememberSelected'] != '0'){
2641        document.cookie = 'registerTab_' + tabcontainerID + '=' + tabcontainerSelected;
2642      }
2643      jQuery(window).trigger('resize');
2644    });
2645
2646    if(typeof(wEditor) == 'undefined'){
2647      jQuery(this).find('.container, .containerSelected, .containerInvisible').each(function(index){
2648        if(jQuery(this).html() == ''){
2649          tabcontainerCurrent.find('> .tabs > div:nth-child(' + (index + 1) + ')').remove();
2650        }
2651      });
2652    }
2653  });
2654};
2655
2656jQuery.fn.wAccordion = function(){
2657
2658  var maxHeightContent = 0;
2659
2660  jQuery.each(jQuery(this), function(){
2661    
2662    var options = {};
2663
2664    options['initOpen']         = options['initOpen']         || jQuery(this).data('initopen');
2665    options['multiple']         = options['multiple']         || jQuery(this).data('multiple');
2666    options['expandAll']        = options['expandAll']        || jQuery(this).data('expandall');
2667    options['collapsible']      = options['collapsible']      || jQuery(this).data('collapsible');
2668    options['rememberSelected'] = options['rememberSelected'] || jQuery(this).data('rememberselected');
2669    options['pushstateonselect'] = options['pushstateonselect'] || jQuery(this).parent().data('pushstateonselect');
2670   
2671    var accordionID   = jQuery(this).get(0).id.replace(/accordion_/, '');
2672
2673    var activeContent = options['initOpen'];
2674
2675    if(/^\d+$/.test(activeContent)){
2676      activeContent = parseInt(activeContent) - 1;
2677    }
2678
2679    if(options['rememberSelected'] == '1'){
2680      var checkCookieRegExp = new RegExp('accordionTab_' + accordionID + '=Accordion-(\\d+)');
2681      if(checkCookieRegExp.test(document.cookie)){
2682        activeContent = RegExp.$1 - 1;
2683      }
2684      else{
2685        var checkCookieRegExp = new RegExp('accordionTab_' + accordionID + '=(\\d+)');
2686        if(checkCookieRegExp.test(document.cookie)){
2687          activeContent = RegExp.$1 - 1;
2688        }
2689      }
2690    }
2691
2692    var jQueryHashTmp = location.hash.replace('open_', 'anchor_'); 
2693    var jQueryHashId = jQueryHashTmp.replace(/\./g, '\\.').replace(/\:/g, '\\:');
2694
2695    options['active'] = options['active'] || activeContent;
2696
2697    jQuery(this).children('.accordionContent').each(function(index){
2698      var heightContent = jQuery(this).height();
2699      if(heightContent > maxHeightContent){
2700        maxHeightContent = heightContent;
2701      }
2702    });
2703
2704    var lastOpenedEntry = null;
2705
2706    jQuery(this).children('h1, h2, h3, h4').each(function(index){
2707
2708      var openCurrent = false;
2709
2710      if(jQueryHashId != '' &&  '#' + jQuery(this).attr('id') == jQueryHashTmp || jQuery(this).next('.accordionContent').find(jQueryHashId).length > 0){
2711        if(/_Accordion-/.test(jQuery(jQueryHashId).attr('id'))){
2712          options['active'] = index;
2713          if(!options['multiple'] && lastOpenedEntry){
2714            lastOpenedEntry.addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');
2715            lastOpenedEntry.next('.accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').hide();
2716            lastOpenedEntry = null;
2717          }
2718          openCurrent = true;
2719        }
2720        else if(jQuery(jQueryHashId).parents('.accordionContent').length > 0){
2721          options['active'] = index;
2722        }
2723      }
2724      else{
2725        jQueryHashIdAlt = jQueryHashId.replace(/_Accordion-\d+/, '_Accordion');
2726
2727        if(jQueryHashIdAlt != '' &&  '#' + jQuery(this).attr('id') == jQueryHashIdAlt || jQuery(this).next('.accordionContent').find(jQueryHashIdAlt).length > 0){
2728          if(/_Accordion-/.test(jQuery(jQueryHashIdAlt).attr('id'))){
2729            options['active'] = index;
2730            if(!options['multiple'] && lastOpenedEntry){
2731              lastOpenedEntry.addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');
2732              lastOpenedEntry.next('.accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').hide();
2733              lastOpenedEntry = null;
2734            }
2735            openCurrent = true;
2736          }
2737          else if(jQuery(jQueryHashIdAlt).parents('.accordionContent').length > 0){
2738            options['active'] = index;
2739          }
2740        }
2741      }
2742
2743      if(options['collapsible']){
2744        jQuery(this).addClass('accordionHeaderCollapsible').removeClass('accordionHeaderNoneCollapsible');
2745      }
2746      else{
2747        jQuery(this).addClass('accordionHeaderNoneCollapsible').removeClass('accordionHeaderCollapsible');
2748      }
2749
2750      if(options['expandAll'] || typeof(options['active']) == 'number' && options['active'] == index){
2751        lastOpenedEntry = jQuery(this);
2752        jQuery(this).addClass('accordionHeaderVisible').removeClass('accordionHeaderHidden');
2753        jQuery(this).next('.accordionContent').addClass('accordionContentVisible').removeClass('accordionContentHidden').show();
2754      }
2755      else{
2756        jQuery(this).addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');
2757        jQuery(this).next('.accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').hide();
2758      }
2759
2760      if(options['heightStyle'] == 'auto'){
2761        jQuery(this).next('.accordionContent').css({'height' : maxHeightContent});
2762      }
2763
2764      jQuery(this).on('click', function(event, forceOpen){
2765        event.preventDefault();
2766        
2767        var headerSelected  = jQuery(this);
2768
2769        forceOpen = typeof(forceOpen) != 'undefined' ? forceOpen : false;
2770        
2771        if(options['pushstateonselect'] != '0' && history.pushState && headerSelected.attr('id')){
2772          history.pushState({page: '#' + headerSelected.attr('id')}, '', '#' + headerSelected.attr('id'));
2773        }
2774        
2775        if(typeof(wOnBeforeClickAccordeon) == 'function'){
2776          var rtcEvent = wOnBeforeClickAccordeon(headerSelected);
2777          if(rtcEvent === false){
2778            return false;
2779          }
2780        }
2781        
2782        var contentSelected = jQuery(this).next('.accordionContent');
2783        var hasEntryVisible = false, hasEntryInvisible = false;
2784        
2785        jQuery(this).parent().children('.accordionContent').each(function(index){
2786          if(jQuery(this).get(0) == contentSelected.get(0)){
2787            if(jQuery(this).hasClass('accordionContentVisible')){
2788              hasEntryInvisible = true;
2789            }
2790            else{
2791              hasEntryVisible = true;
2792            }
2793            if(jQuery(this).hasClass('accordionContentVisible') && ! forceOpen){
2794              if(options['collapsible']){
2795                jQuery(this).parent().trigger('accordionbeforeactivate', {'newHeader' : contentSelected});
2796                jQuery(this).prev('.accordionHeader').addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');
2797                jQuery(this).addClass('accordionContentHidden').removeClass('accordionContentVisible').slideUp('normal', function(){
2798                  jQuery(this).parent().trigger('accordionchange', {'newHeader' : headerSelected});
2799                });
2800              }
2801            }
2802            else{
2803              jQuery(this).prev('.accordionHeader').addClass('accordionHeaderVisible').removeClass('accordionHeaderHidden');
2804              if(options['collapsible']){
2805                jQuery(this).prev('.accordionHeader').addClass('accordionHeaderCollapsible').removeClass('accordionHeaderNoneCollapsible');
2806              }
2807              else{
2808                jQuery(this).prev('.accordionHeader').addClass('accordionHeaderNoneCollapsible').removeClass('accordionHeaderCollapsible');
2809              }
2810              jQuery(this).addClass('accordionContentVisible').removeClass('accordionContentHidden').slideDown('normal', function(){
2811                jQuery(this).parent().trigger('accordionchange', {'newHeader' : headerSelected});
2812                jQuery(this).parent().trigger('accordionactivate', {'newHeader' : headerSelected});
2813              });
2814            }
2815          }
2816          else{ 
2817            if(options['multiple'] == true){}
2818          	else{
2819              jQuery(this).prev('.accordionHeader').addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');
2820			  jQuery(this).addClass('accordionContentHidden').removeClass('accordionContentVisible').slideUp('normal');
2821          	}
2822            if(jQuery(this).hasClass('accordionContentVisible')){
2823              hasEntryVisible = true;
2824            }
2825            else{
2826              hasEntryInvisible = true;
2827            } 
2828        }
2829          
2830        });
2831        if(hasEntryInvisible){
2832          jQuery('#accordionOpener' + accordionID).show();
2833          jQuery('#accordionCloser' + accordionID).hide();
2834        }
2835        else{
2836          jQuery('#accordionOpener' + accordionID).hide();
2837          jQuery('#accordionCloser' + accordionID).show();
2838        }
2839        
2840        jQuery(window).trigger('resize');
2841
2842      });
2843    });
2844
2845    jQuery(this).on('accordionactivate', function(event, ui){
2846      try{
2847        var currentHeader          = ui.newHeader;
2848        var offsetTopCurrentHeader = (currentHeader.offset())['top'];
2849        var windowScrollTop        = jQuery(window).scrollTop();
2850        if(parseInt(offsetTopCurrentHeader) < windowScrollTop){
2851          offsetTopCurrentHeader = offsetTopCurrentHeader - wGetScrollTopHeight();
2852          jQuery('body, html').animate({scrollTop: offsetTopCurrentHeader});
2853          
2854        }
2855        else{
2856          var offsetBottomCurrentContent = (jQuery(currentHeader).next('.accordionContent').offset())['top'] + jQuery(currentHeader).next('.accordionContent').outerHeight();
2857          var windowBottom               = windowScrollTop + jQuery(window).height();
2858          if(offsetBottomCurrentContent > windowBottom){
2859            var scrollDiff =  offsetBottomCurrentContent - windowBottom;
2860            if(scrollDiff > offsetTopCurrentHeader - windowScrollTop){
2861              scrollDiff = offsetTopCurrentHeader - windowScrollTop;
2862            }
2863            scrollDiff = scrollDiff - wGetScrollTopHeight();
2864            jQuery('body, html').animate({scrollTop: windowScrollTop + scrollDiff});
2865          }
2866        }
2867      }
2868      catch(e){}
2869    });
2870
2871    jQuery(this).on('accordionchange', function(event, ui){
2872      var eventTarget = event.target || event.srcElement;
2873      var id          = eventTarget.id.replace(/accordion_/, '');
2874      if(options['rememberSelected']){
2875        if(ui.newHeader[0]){
2876          if(ui.newHeader[0].className.indexOf('accordionHeaderHidden') != -1){
2877            document.cookie = 'accordionTab_' + id + '=';
2878          }
2879          else{
2880            document.cookie = 'accordionTab_' + id + '=' + ui.newHeader[0].id.replace(/.*_/, '');
2881          }
2882        }
2883      }
2884      jQuery(window).trigger('resize');
2885    });
2886  });
2887};
2888
2889jQuery(window).on('hashchange', function(e){
2890  var jQueryHashId = location.hash.replace(/!/g, '\\!').replace(/\//g, '\\/').replace(/\./g, '\\.').replace(/\:/g, '\\:').replace('open_', 'anchor_');
2891  if(jQueryHashId != '' && jQuery(jQueryHashId).length > 0){
2892
2893    if(/#anchor/.test(jQueryHashId) && jQuery(jQueryHashId).length != 0 && jQuery(jQueryHashId).parent().attr('id') && jQuery(jQueryHashId).parent().attr('id').indexOf('tab_') == 0){
2894      document.location.hash = jQuery(jQueryHashId).parent().attr('id');
2895      jQueryHashId = '#' + jQuery(jQueryHashId).parent().attr('id');
2896    }
2897
2898    if(/_Tab-|#tab_/.test(jQueryHashId)){
2899      if(/_Tab-|tab_/.test(jQuery(jQueryHashId).attr('id'))){
2900        jQuery(jQueryHashId).trigger('click', [true]);
2901        try{
2902          offsetTopFixed = wGetScrollTopHeight();
2903          if(offsetTopFixed > 0){
2904            jQuery('body, html').animate({scrollTop: jQuery(jQueryHashId).parent().offset().top - offsetTopFixed}, 0);
2905          }
2906        }
2907        catch(e){}
2908      }
2909      else{
2910        var containerIndex = jQuery(jQueryHashId).parents('.containerInvisible').index();
2911        if(containerIndex >= 0){
2912          jQuery(jQueryHashId).parents('.containerInvisible').parent().parent().find('> .tabs > .tab:nth-child(' + (containerIndex + 1) + ')').trigger('click', [true]);
2913        }
2914      }
2915    }
2916    else if(/_Accordion-/.test(jQuery(jQueryHashId).attr('id'))){
2917      jQuery(jQueryHashId).trigger('click', [true]);
2918      var containerIndex = jQuery(jQueryHashId).parents('.containerInvisible, .accordionContentHidden').index();
2919
2920      if(containerIndex >= 0){
2921        jQuery(jQueryHashId).parents('.containerInvisible').parent().parent().find('> .tabs > .tab:nth-child(' + (containerIndex + 1) + ')').trigger('click', [true]);
2922        jQuery(jQueryHashId).parents('.accordionContent').prev('.accordionHeader').trigger('click', [true, true]);
2923      }
2924    }
2925    else{
2926      var containerIndex = jQuery(jQueryHashId).parents('.containerInvisible').index();
2927      if(containerIndex >= 0){
2928        jQuery(jQueryHashId).parents('.containerInvisible').parent().parent().find('> .tabs > .tab:nth-child(' + (containerIndex + 1) + ')').trigger('click', [true]);
2929      }
2930      jQuery(jQueryHashId).parents('.accordionContent').prev('.accordionHeader').trigger('click', [true]);
2931      wScrollSmoothToElement(jQuery(jQueryHashId));
2932    }
2933  }
2934});
2935
2936wOpenAllAccordions = function(id){
2937  
2938  jQuery('#accordion_' + id + ' .accordionContent').addClass('accordionContentVisible').removeClass('accordionContentHidden').slideDown('normal', function(){
2939    var headerSelected = jQuery(this).prev();
2940    jQuery(this).addClass('accordionContentVisible');
2941    jQuery(this).parent().trigger('accordionchange', {'newHeader' : headerSelected});
2942    jQuery(this).parent().trigger('accordionactivate', {'newHeader' : headerSelected});
2943    jQuery(window).trigger('resize');
2944  });
2945  jQuery('#accordion_' + id + ' .accordionHeader').addClass('ui-state-active').addClass('ui-accordion-header-active').addClass('accordionHeaderVisible').removeClass('accordionHeaderHidden');
2946  jQuery('#accordion_' + id + ' .accordionHeader span').addClass('ui-icon-triangle-1-s').removeClass('ui-icon-triangle-1-e');
2947  jQuery('#accordionOpener' + id).hide();
2948  jQuery('#accordionCloser' + id).show();
2949  jQuery(window).trigger('resize');
2950};
2951
2952wCloseAllAccordions = function(id){
2953  jQuery('#accordion_' + id + ' .accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').slideUp('normal', function(){
2954	jQuery(this).addClass('accordionContentHidden');
2955    jQuery(window).trigger('resize');
2956  });
2957  jQuery('#accordion_' + id + ' .accordionHeader').removeClass('ui-state-active').removeClass('ui-accordion-header-active').removeClass('accordionHeaderVisible').addClass('accordionHeaderHidden');
2958  jQuery('#accordion_' + id + ' .accordionHeader span').addClass('ui-icon-triangle-1-e').removeClass('ui-icon-triangle-1-s');
2959  jQuery('#accordionCloser' + id).hide();
2960  jQuery('#accordionOpener' + id).show();
2961};
2962
2963wsmn = function(ml){
2964  var mln = '';for(var i=0;i<ml.length/3;i++){mln = ml.substr(i*3+1,1)+mln;}
2965  var pms = '';
2966  if(/(\?.*)/.test(mln)){
2967    pms = RegExp.$1;
2968    mln = mln.replace(/(\?.*)/, '');
2969  }
2970  mln = 'm'+'a'+'ilt'+'o'+':'+mln.replace(/a/g, '@').replace(/e/g, '.').replace(/\*/g, 'a').replace(/;/g, 'e').replace(/:/g, 'o').replace(/,/g, 'u').replace(/\!/g, 'i');
2971  mln += pms;
2972  top.location.href = mln;
2973};
2974
2975var wMagnifierElement      = null;
2976var wMagnifierImageElement = null;
2977
2978jQuery.fn.wMagnifier = function(options){
2979
2980  jQuery.each(jQuery(this), function(){
2981    if(jQuery(this).attr('data-src2x')){
2982      jQuery(this).on('mouseover', function(event){
2983        jQuery('.wMagnifier').remove();
2984        jQuery('.wMagnifierMovingArea').remove();
2985
2986        var objectCurrent     = jQuery(this);
2987        objectCurrent.parent().css({'position' : 'relative', 'display' : jQuery(this).css('display') == 'inline-block' ? 'inline-block' : 'block'});
2988        objectCurrent.parent().append('<div id="wMagnifierMovingArea" class="wMagnifierMovingArea" style="z-index:1000;cursor:none;position:absolute;top:0;left:0;width:100%;height:100%"></div>');
2989        objectCurrent.parent().append('<div id="wMagnifier" class="wMagnifier"></div>');
2990        wMagnifierElement = jQuery('#wMagnifier');
2991        wMagnifierMovingAreaElement = jQuery('#wMagnifierMovingArea');
2992        wMagnifierImageElement = objectCurrent;
2993
2994        var offset = objectCurrent.offset();
2995        objectCurrent.data('offsetLeft', parseInt(offset.left));
2996        objectCurrent.data('offsetTop', parseInt(offset.top));
2997        objectCurrent.data('zoomerWidth', wMagnifierElement.width());
2998        objectCurrent.data('zoomerHeight', wMagnifierElement.height());
2999        objectCurrent.data('imageWidth',  objectCurrent.width());
3000        objectCurrent.data('imageHeight', objectCurrent.height());
3001        objectCurrent.data('borderLeftWidth', parseInt(wMagnifierElement.css('border-left-width')));
3002        objectCurrent.data('borderTopWidth', parseInt(wMagnifierElement.css('border-top-width')));
3003
3004        var scale = objectCurrent.width() / (typeof(objectCurrent.attr('width')) != 'undefined' ? objectCurrent.attr('width') : objectCurrent.attr('data-widthorig'));
3005        var ratio = 2 / scale;
3006
3007        var posX = parseInt(typeof(event.pageX !== 'undefined') ? event.pageX : (event.clientX + document.documentElement.scrollLeft)) - wMagnifierImageElement.data('offsetLeft');
3008        var posY = parseInt(typeof(event.pageY !== 'undefined') ? event.pageY : (event.clientY + document.documentElement.scrollTop)) - wMagnifierImageElement.data('offsetTop');
3009        wMagnifierElement.css({'left' : posX - wMagnifierImageElement.data('borderLeftWidth') - wMagnifierImageElement.data('zoomerWidth') / 2, 'top' : posY - wMagnifierImageElement.data('borderTopWidth') - wMagnifierImageElement.data('zoomerHeight') / 2, 'background-position' : String(-posX * ratio + wMagnifierImageElement.data('zoomerWidth') / 2) + 'px ' +  String(-posY * ratio + wMagnifierImageElement.data('zoomerHeight') / 2) + 'px'});
3010        wMagnifierElement.css({'background-image' : 'url(' + wMagnifierImageElement.attr('data-src2x') + ')', 'background-repeat' : 'no-repeat'});
3011
3012        wMagnifierMovingAreaElement.on('mousemove', function(event){
3013          var posX = parseInt(typeof(event.pageX !== 'undefined') ? event.pageX : (event.clientX + document.documentElement.scrollLeft)) - wMagnifierImageElement.data('offsetLeft');
3014          var posY = parseInt(typeof(event.pageY !== 'undefined') ? event.pageY : (event.clientY + document.documentElement.scrollTop)) - wMagnifierImageElement.data('offsetTop');
3015          wMagnifierElement.css({'left' : posX - wMagnifierImageElement.data('borderLeftWidth') - wMagnifierImageElement.data('zoomerWidth') / 2, 'top' : posY - wMagnifierImageElement.data('borderTopWidth') - wMagnifierImageElement.data('zoomerHeight') / 2, 'background-position' : String(-posX * ratio + wMagnifierImageElement.data('zoomerWidth') / 2) + 'px ' +  String(-posY * ratio + wMagnifierImageElement.data('zoomerHeight') / 2) + 'px'});
3016        });
3017        wMagnifierMovingAreaElement.on('mouseout click', function(event){
3018          jQuery('.wMagnifier').remove();
3019          jQuery('.wMagnifierMovingArea').remove();
3020        });
3021      });
3022     }
3023  });
3024};
3025
3026jQuery.fn.wLightbox = function(options){
3027  jQuery.each(jQuery(this), function(){
3028    jQuery(this).click(function(){
3029      var objectCurrent     = jQuery(this);
3030      return wLightbox(objectCurrent, options);
3031    });
3032  });
3033};
3034
3035
3036wLightbox = function(objectCurrent, options){
3037
3038  
3039  if(objectCurrent.length > 0){
3040    if(objectCurrent.attr('data-widthbox') != null){
3041  	  options["width"] = objectCurrent.attr('data-widthbox');
3042    }
3043    if(objectCurrent.attr('data-heightbox') != null){
3044  	  options["height"] = objectCurrent.attr('data-heightbox');
3045    }
3046  }
3047
3048  var elementCurrent, src, rel;
3049
3050  if(typeof(objectCurrent.jquery) == 'undefined'){
3051    options = objectCurrent;
3052    src = options['href'];
3053    rel = '';
3054    objectCurrent  = null;
3055  }
3056  else{
3057    elementCurrent    = objectCurrent.get(0);    
3058    src = objectCurrent.attr('href');
3059    if(!src){
3060      src = objectCurrent.find('img').attr('src');
3061    }
3062    rel = objectCurrent.attr('rel');
3063  }
3064
3065  var lightboxClassName = 'wLightbox-' + (options['class'] ? options['class'] : 'default');
3066
3067  var contentWidth       = 0;
3068  var contentHeight      = 0;
3069
3070  var elementsRel = jQuery("*[rel = '" + rel + "']");
3071  var numberRel   = elementsRel.length;
3072  var positionRel = 1;
3073  for(i = 0; i < numberRel; i++){
3074    if(elementCurrent && elementsRel[i] == elementCurrent){
3075      positionRel = i + 1;
3076      break;
3077    }
3078  }
3079
3080  var classPrev = 'wLightboxPrev' + (numberRel > 1 && positionRel > 1 ? ' wLightboxPrevAvailable' : '');
3081  var classNext = 'wLightboxNext' + (numberRel > 1 && positionRel < numberRel ? ' wLightboxNextAvailable' : '');
3082
3083  if(options['type'] == 'inline' || options['type'] == 'ajax'){
3084
3085    options['content'] = options['content'] || '';
3086
3087    if(options['type'] == 'ajax'){
3088      if(!options['width']){
3089        options['width'] = 'content';
3090      }
3091      if(!options['height']){
3092        options['height'] = 'content';
3093      }
3094    }
3095
3096    var boxWasOpened = true;
3097
3098    if(jQuery('.wLightbox').length == 0){
3099      jQuery('<div id="wLightbox" class="wLightbox wLightbox-' + options['type'] + ' ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner" touchstart="event.preventDefault();" mousedown="event.preventDefault();"><div class="wLightboxCloser"></div>' + options['content'] + '<div class="wLightboxTitle"></div></div></div></div>').appendTo('body');
3100      //jQuery('.wLightboxCloser, .wLightboxBackground').on('mousedown touchstart', function(){wLightboxClose()});
3101
3102      jQuery(document).on('keydown', function(e){
3103        if(e.keyCode == 27){
3104          wLightboxClose();
3105        }
3106        else if(e.keyCode == 37){
3107          jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');
3108        }
3109        else if(e.keyCode == 39){
3110          jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');
3111        }
3112      });
3113      boxWasOpened = false;
3114    }
3115
3116    var heightTitle = 0;
3117
3118    if(elementCurrent && elementCurrent.getAttribute('title') && elementCurrent.getAttribute('title') != ''){
3119      jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));
3120    }
3121    else{
3122      jQuery('.wLightboxTitle').hide();
3123    }
3124
3125    heightTitle = jQuery('.wLightboxTitle').outerHeight();
3126
3127    var maxWidthBox  = (window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.offsetWidth : document.body.clientWidth))    - (parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;
3128    var maxHeightBox = (window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.offsetHeight : document.body.clientHeight)) - (parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2 - heightTitle;
3129
3130    if(/^(\d+)px$/.test(options['width'])){
3131      maxWidthBox = parseInt(RegExp.$1);
3132    }
3133    else if(/^(\d+)%$/.test(options['width'])){
3134      maxWidthBox = parseInt(jQuery(window).width()) * RegExp.$1 / 100;
3135    }
3136
3137    if(/^(\d+)px$/.test(options['height'])){
3138      maxHeightBox = parseInt(RegExp.$1);
3139    }
3140    else if(/^(\d+)%$/.test(options['height'])){
3141      maxHeightBox = parseInt(jQuery(window).height()) * RegExp.$1 / 100;
3142    }
3143
3144    if(options && options['width'] && /^\d+(.\d+)?$/.test(options['width'])){
3145      contentWidth = options['width'];
3146    }
3147    else{
3148      contentWidth = maxWidthBox;
3149    }
3150
3151    if(options && options['height'] && /^\d+(.\d+)?$/.test(options['height'])){
3152      contentHeight = options['height'];
3153    }
3154    else{
3155      contentHeight = maxHeightBox;
3156    }
3157
3158    var pageRatio    = maxWidthBox / maxHeightBox;
3159    var contentRatio = contentWidth / contentHeight;
3160
3161    var lightboxWidth  = contentWidth;
3162    var lightboxHeight = contentHeight + heightTitle;
3163
3164    if(contentWidth > maxWidthBox || contentHeight > maxHeightBox){
3165      if(contentRatio > pageRatio){
3166        lightboxWidth  = maxWidthBox;
3167        lightboxHeight = Math.round(maxWidthBox / contentRatio) + heightTitle;
3168      }
3169      else{
3170        lightboxWidth  = Math.round(maxHeightBox * contentRatio);
3171        lightboxHeight = maxHeightBox + heightTitle;
3172      }
3173    }
3174
3175    widthAttrib  = String(lightboxWidth) + 'px';
3176    heightAttrib = String(lightboxHeight) + 'px';
3177
3178    if(options['height'] == 'content'){
3179      jQuery('.wLightboxOuter').css({'max-height' : '100%'});
3180    }
3181    else{
3182      jQuery('.wLightboxOuter').css({'height' : heightAttrib});
3183    }
3184
3185    if(options['width'] == 'content'){
3186      jQuery('.wLightboxInner').css({'max-width' : '100%'});
3187    }
3188    else{
3189      jQuery('.wLightboxInner').css({'width' : widthAttrib});
3190    }
3191
3192    jQuery('.wLightboxPrev').data('entry', positionRel - 2);
3193    jQuery('.wLightboxNext').data('entry', positionRel);
3194
3195    if(boxWasOpened){
3196      jQuery('.wLightboxPrev').attr('class', classPrev);
3197      jQuery('.wLightboxNext').attr('class', classNext);
3198      jQuery('.wLightboxImage').attr('src', src);
3199      jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3200    }
3201    else{
3202      jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3203      jQuery('.wLightboxOuter, .wLightboxBackground').on('click', function(){
3204        wLightboxClose()
3205      });
3206      jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(){
3207        jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');
3208        jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');
3209        event.stopPropagation();
3210      });
3211    }
3212    if(options['type'] == 'ajax'){
3213      jQuery.ajax({type: "GET", url: src, success: function(result){
3214        jQuery('.wLightboxCloser').after('<div class="wLightboxContent">' + result + '</div>');
3215        if(options['height'] == 'content'){
3216          jQuery('.wLightboxContent').css({'max-height' : String(lightboxHeight) + 'px'});
3217        }
3218      }});
3219    }
3220    if(typeof(wOnAfterInitLightbox) == 'function'){
3221      wOnAfterInitLightbox();
3222    }
3223  }
3224  else if(/\.(jpg|jpeg|gif|png)$/i.test(src) || options['type'] == 'image' || objectCurrent && objectCurrent.attr('data-lightboxtype') == 'image'){
3225    var image = new Image();
3226    jQuery('.wLightbox').removeClass('wLightboxStatusLoaded').addClass('wLightboxStatusLoading');
3227    image.onload = function(){
3228
3229      var imageRatio     = image.width / image.height;
3230      var lightboxWidth  = image.width;
3231      var lightboxHeight = image.height;
3232
3233      var boxWasOpened   = true;
3234      var titleInnerHTML = '';
3235
3236      if(jQuery('.wLightbox').length == 0){
3237        jQuery('<div id="wLightbox" class="wLightbox wLightbox-image ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner"><div class="wLightboxCloser"></div><div class="' + classPrev + '"></div><div class="' + classNext + '"></div><div class="wLightboxImageOuter"><img class="wLightboxImage" src="' + src + '"/></div><div class="wLightboxFooter"><div class="wLightboxTitle">' + titleInnerHTML + '</div><div class="wLightboxDescription">' + titleInnerHTML + '</div></div></div></div></div>').appendTo('body');
3238
3239        jQuery(document).on('keydown', function(e){
3240          if(e.keyCode == 27){
3241            wLightboxClose();
3242          }
3243          else if(e.keyCode == 37){
3244            jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');
3245          }
3246          else if(e.keyCode == 39){
3247            jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');
3248          }
3249        });
3250
3251        boxWasOpened = false;
3252      }
3253
3254      var maxWidthBox  = (window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.offsetWidth : document.body.clientWidth)) - (parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;
3255
3256      if(elementCurrent && elementCurrent.getAttribute('title') && elementCurrent.getAttribute('title') != ''){
3257        jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));
3258      }
3259      else{
3260        jQuery('.wLightboxTitle').hide();
3261      }
3262
3263      if(elementCurrent && elementCurrent.getAttribute('data-description') != ''){
3264        jQuery('.wLightboxDescription').show();
3265        var diffWidthDescription = parseInt(jQuery('.wLightboxInner').width() - jQuery('.wLightboxDescription').width());
3266        jQuery('.wLightboxDescription').css({'width' : maxWidthBox - diffWidthDescription, 'visibility' : 'hidden'}).show().html(elementCurrent.getAttribute('data-description'));
3267      }
3268      else{
3269        jQuery('.wLightboxDescription').hide();
3270      }
3271
3272      if(objectCurrent && objectCurrent.attr('data-lightboxdownloadable') == '1'){
3273        jQuery('.wLightboxDownload').remove();
3274        var srcDownload = src;
3275        if(objectCurrent.attr('data-srcdownload')){
3276          srcDownload = objectCurrent.attr('data-srcdownload');
3277        }
3278        jQuery('.wLightboxFooter').addClass('wLightboxFooterHasDownload').append('<div class="wLightboxDownload" data-src="' + srcDownload + '" title="Download"></div>');
3279        jQuery('.wLightboxDownload').on('click', function (event){
3280          window.open(jQuery(this).data('src'));
3281        });
3282      }
3283      else{
3284        jQuery('.wLightboxFooter').removeClass('wLightboxFooterHasDownload');
3285      }
3286
3287      heightFooter = jQuery('.wLightboxFooter').outerHeight();
3288      jQuery('.wLightboxDescription').css({'width' : '', 'visibility' : ''})
3289
3290      var maxHeightBox = (window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.offsetHeight : document.body.clientHeight)) - (parseInt(j
3290Query('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2 - heightFooter;
3291
3292      if(/^(\d+)px$/.test(options['width'])){
3293        maxWidthBox = parseInt(RegExp.$1);
3294      }
3295      else if(/^(\d+)%$/.test(options['width'])){
3296        maxWidthBox = parseInt(jQuery(window).width()) * RegExp.$1 / 100;
3297      }
3298
3299      var pageRatio    = maxWidthBox / maxHeightBox;
3300
3301      if(image.width > maxWidthBox || image.height > maxHeightBox){
3302        if(options['scrollIfToHeight']){
3303          if(imageRatio > pageRatio){
3304            lightboxWidth  = maxWidthBox;
3305            lightboxHeight = Math.round(maxWidthBox / imageRatio) + heightFooter;
3306          }
3307          else{
3308            lightboxWidth  = Math.round(image.width > maxWidthBox ? maxWidthBox : image.width);
3309            lightboxHeight = maxHeightBox;
3310            jQuery('.wLightboxImageOuter').css({'max-height' : String(lightboxHeight - heightFooter) + 'px', 'overflow' : 'auto'});
3311            jQuery('.wLightboxImage').css({'max-height' : ''});
3312          }
3313        }
3314        else{
3315          if(imageRatio > pageRatio){
3316            lightboxWidth  = maxWidthBox;
3317            lightboxHeight = Math.round(maxWidthBox / imageRatio) + heightFooter;
3318          }
3319          else{
3320            lightboxWidth  = Math.round(maxHeightBox * imageRatio);
3321            lightboxHeight = maxHeightBox + heightFooter;
3322          }
3323        }
3324      }
3325      else{
3326        lightboxHeight = image.height + heightFooter;
3327      }
3328
3329      widthAttrib  = String(Math.round(lightboxWidth))  + 'px';
3330      heightAttrib = String(lightboxHeight) + 'px';
3331
3332      jQuery('.wLightboxOuter').css({'height' : heightAttrib});
3333      jQuery('.wLightboxInner').css({'width' : widthAttrib});
3334
3335      jQuery('.wLightboxPrev').data('entry', positionRel - 2);
3336      jQuery('.wLightboxNext').data('entry', positionRel);
3337
3338      jQuery('.wLightboxOuter').on('transitionend', function(event){
3339        if(jQuery('.wLightboxOuter').data('transisionended') != '1'){
3340          jQuery('.wLightboxOuter').data('transisionended', '1');
3341
3342
3343          heightFooter = jQuery('.wLightboxFooter').outerHeight();
3344
3345          var maxWidthBox  = (window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.offsetWidth : document.body.clientWidth))    - (parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;
3346          var maxHeightBox = (window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.offsetHeight : document.body.clientHeight)) - (parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2 - heightFooter;
3347
3348          if(/^(\d+)px$/.test(options['width'])){
3349            maxWidthBox = parseInt(RegExp.$1);
3350          }
3351          else if(/^(\d+)%$/.test(options['width'])){
3352            maxWidthBox = parseInt(jQuery(window).width()) * RegExp.$1 / 100;
3353          }
3354
3355          var pageRatio    = maxWidthBox / maxHeightBox;
3356
3357          if(image.width > maxWidthBox || image.height > maxHeightBox){
3358            if(options['scrollIfToHeight']){
3359               if(imageRatio > pageRatio){
3360                 lightboxWidth  = maxWidthBox;
3361                 lightboxHeight = Math.round(maxWidthBox / imageRatio) + heightFooter;
3362               }
3363               else{
3364                 lightboxWidth  = Math.round(image.width > maxWidthBox ? maxWidthBox : image.width);
3365                 lightboxHeight = maxHeightBox;
3366                 jQuery('.wLightboxImageOuter').css({'max-height' : String(lightboxHeight - heightFooter) + 'px', 'overflow' : 'auto'});
3367                 jQuery('.wLightboxImage').css({'max-height' : ''});
3368               }
3369             }
3370             else{
3371              if(imageRatio > pageRatio){
3372                lightboxWidth  = maxWidthBox;
3373                lightboxHeight = Math.round(maxWidthBox / imageRatio) + heightFooter;
3374              }
3375              else{
3376                lightboxWidth  = Math.round(maxHeightBox * imageRatio);
3377                lightboxHeight = maxHeightBox + heightFooter;
3378              }
3379            }
3380          }
3381          else{
3382            lightboxHeight = image.height + heightFooter;
3383          }
3384          heightAttrib = String(lightboxHeight) + 'px';
3385          jQuery('.wLightboxOuter').css({'height' : heightAttrib});
3386        }
3387      });
3388
3389      if(boxWasOpened){
3390        jQuery('.wLightboxPrev').attr('class', classPrev);
3391        jQuery('.wLightboxNext').attr('class', classNext);
3392        jQuery('.wLightboxImage').attr('src', src);
3393        jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3394      }
3395      else{
3396        jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3397        jQuery('.wLightboxOuter, .wLightboxBackground').on('click', function(event){
3398          wLightboxClose()
3399        });
3400        jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(event){
3401          jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');
3402          jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');
3403          event.stopPropagation();
3404        });
3405      }
3406      if(typeof(wOnAfterInitLightbox) == 'function'){
3407        wOnAfterInitLightbox();
3408      }
3409    };
3410    image.src = src;
3411  }
3412  else if(/\.(mpeg|mp4|m4v)(\?[^\/]*)*$/i.test(src) || options['type'] == 'video' ||objectCurrent && objectCurrent.attr('data-lightboxtype') == 'video'){
3413
3414    var boxWasOpened = true;
3415
3416    var videoWidth = 0, videoHeight = 0, videoRatio = 0;
3417
3418    if(jQuery('.wLightbox').length == 0){
3419      var titleInnerHTML = '';
3420      var mimeTypeVideo  = 'video/mp4';
3421      jQuery('<div id="wLightbox" class="wLightbox wLightbox-image ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner" ontouchstart="event.preventDefault();" onmousedown="event.preventDefault();"><div class="wLightboxCloser"></div><video controls="" autoplay="autoplay" style="max-width:100%;width:auto;height:auto;"><source src="' + src + '" type="' + mimeTypeVideo + '" /></video><div class="wLightboxFooter"><div class="wLightboxTitle">' + titleInnerHTML + '</div></div></div></div></div>').appendTo('body');
3422      jQuery(document).on('keydown', function(e){
3423        if(e.keyCode == 27){
3424          wLightboxClose();
3425        }
3426        else if(e.keyCode == 37){
3427          jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');
3428        }
3429        else if(e.keyCode == 39){
3430          jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');
3431        }
3432      });
3433
3434      boxWasOpened = false;
3435    }
3436    else{
3437      jQuery('.wLightbox').removeClass('wLightboxStatusLoaded').addClass('wLightboxStatusLoading');
3438    }
3439
3440    if(elementCurrent && elementCurrent.getAttribute('title') && elementCurrent.getAttribute('title') != ''){
3441      jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));
3442    }
3443    else{
3444      jQuery('.wLightboxTitle').hide();
3445    }
3446
3447    if(objectCurrent && objectCurrent.attr('data-lightboxdownloadable') == '1'){
3448      jQuery('.wLightboxDownload').remove();
3449      jQuery('.wLightboxFooter').addClass('wLightboxFooterHasDownload').append('<div class="wLightboxDownload" data-src="' + src + '" title="Download"></div>');
3450      jQuery('.wLightboxDownload').on('click', function (event){
3451        window.open(jQuery(this).data('src'));
3452      });
3453    }
3454    else{
3455      jQuery('.wLightboxFooter').removeClass('wLightboxFooterHasDownload');
3456    }
3457
3458    var heightFooter = jQuery('.wLightboxFooter').outerHeight();
3459
3460    var maxWidthBox  = (window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.offsetWidth : document.body.clientWidth))    - (parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;
3461    var maxHeightBox = (window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.offsetHeight : document.body.clientHeight)) - (parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2 - heightFooter;
3462
3463    if(/^(\d+)px$/.test(options['width'])){
3464      maxWidthBox = parseInt(RegExp.$1);
3465    }
3466    else if(/^(\d+)%$/.test(options['width'])){
3467      maxWidthBox = parseInt(jQuery(window).width()) * RegExp.$1 / 100;
3468    }
3469
3470
3471    var pageRatio    = maxWidthBox / maxHeightBox;
3472
3473    jQuery('.wLightbox video').on('loadedmetadata', function(event){
3474      videoWidth     = jQuery(this).get(0).videoWidth;
3475      videoHeight    = jQuery(this).get(0).videoHeight;
3476
3477      videoRatio     = videoWidth / videoHeight;
3478      lightboxWidth  = videoWidth;
3479      lightboxHeight = videoHeight;
3480
3481      if(videoWidth > maxWidthBox || videoHeight > maxHeightBox){
3482        if(videoRatio > pageRatio){
3483          lightboxWidth  = maxWidthBox;
3484          lightboxHeight = Math.round(maxWidthBox / videoRatio) + heightFooter;
3485        }
3486        else{
3487          lightboxWidth  = Math.round(maxHeightBox * videoRatio);
3488          lightboxHeight = maxHeightBox + heightFooter;
3489        }
3490      }
3491      else{
3492        lightboxHeight = lightboxHeight + heightFooter;
3493      }
3494
3495      widthAttrib  = String(lightboxWidth)  + 'px';
3496      heightAttrib = String(lightboxHeight) + 'px';
3497
3498      jQuery('.wLightboxOuter').css({'height' : heightAttrib});
3499      jQuery('.wLightboxInner').css({'width' : widthAttrib});
3500
3501      jQuery('.wLightboxPrev').data('entry', positionRel - 2);
3502      jQuery('.wLightboxNext').data('entry', positionRel);
3503
3504      if(boxWasOpened){
3505        jQuery('.wLightboxPrev').attr('class', classPrev);
3506        jQuery('.wLightboxNext').attr('class', classNext);
3507        jQuery('.wLightboxImage').attr('src', src);
3508        jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3509      }
3510      else{
3511        jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3512        jQuery('.wLightboxCloser, .wLightboxBackground').on('click', function(event){
3513          wLightboxClose()
3514        });
3515        jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(event){
3516          jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');
3517          jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');
3518          event.stopPropagation();
3519        });
3520      }
3521    });
3522    if(typeof(wOnAfterInitLightbox) == 'function'){
3523      wOnAfterInitLightbox();
3524    }
3525  }
3526  else{
3527
3528    var boxWasOpened = true;
3529
3530    if(jQuery('.wLightbox').length == 0){
3531      jQuery('<div id="wLightbox" class="wLightbox wLightbox-iframe ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner"><div class="wLightboxCloser"></div><iframe id="wLightboxIframe" class="wLightboxIframe" allowfullscreen="true" src="' + src + '"></iframe><div class="wLightboxTitle"></div></div></div></div>').appendTo('body');
3532      jQuery('.wLightboxCloser, .wLightboxBackground').on('mousedown touchstart', function(){wLightboxClose()});
3533
3534      jQuery(document).on('keydown', function(e){
3535        if(e.keyCode == 27){
3536          wLightboxClose();
3537        }
3538        else if(e.keyCode == 37){
3539          jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');
3540        }
3541        else if(e.keyCode == 39){
3542          jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');
3543        }
3544      });
3545
3546      boxWasOpened = false;
3547    }
3548
3549    var heightTitle = 0;
3550
3551    if(elementCurrent && elementCurrent.getAttribute('title') != ''){
3552      jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));
3553    }
3554    else{
3555      jQuery('.wLightboxTitle').hide();
3556    }
3557
3558    heightTitle = jQuery('.wLightboxTitle').outerHeight();
3559
3560    var maxWidthBox  = (window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.offsetWidth : document.body.clientWidth))    - (parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;
3561    var maxHeightBox = (window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.offsetHeight : document.body.clientHeight)) - (parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2 - heightTitle;
3562
3563    if(/^(\d+)px$/.test(options['width'])){
3564      maxWidthBox = parseInt(RegExp.$1);
3565    }
3566    else if(/^(\d+)%$/.test(options['width'])){
3567      maxWidthBox = parseInt(jQuery(window).width()) * RegExp.$1 / 100;
3568    }
3569
3570    if(/^(\d+)px$/.test(options['height'])){
3571      maxHeightBox = parseInt(RegExp.$1);
3572    }
3573    else if(/^(\d+)%$/.test(options['height'])){
3574      maxHeightBox = parseInt(jQuery(window).height()) * RegExp.$1 / 100;
3575    }
3576
3577    if(options && options['width'] && /^\d+(.\d+)?$/.test(options['width'])){
3578      contentWidth = options['width'];
3579    }
3580    else{
3581      contentWidth = maxWidthBox;
3582    }
3583
3584    if(options && options['height'] && /^\d+(.\d+)?$/.test(options['height'])){
3585      contentHeight = options['height'];
3586    }
3587    else{
3588      contentHeight = maxHeightBox;
3589    }
3590
3591    var pageRatio    = maxWidthBox / maxHeightBox;
3592    var contentRatio = contentWidth / contentHeight;
3593
3594    var lightboxWidth  = contentWidth;
3595    var lightboxHeight = contentHeight + heightTitle;
3596
3597    if(contentWidth > maxWidthBox || contentHeight > maxHeightBox){
3598      if(contentRatio > pageRatio){
3599        lightboxWidth  = maxWidthBox;
3600        lightboxHeight = Math.round(maxWidthBox / contentRatio) + heightTitle;
3601      }
3602      else{
3603        lightboxWidth  = Math.round(maxHeightBox * contentRatio);
3604        lightboxHeight = maxHeightBox + heightTitle;
3605      }
3606    }
3607
3608    widthAttrib  = String(lightboxWidth) + 'px';
3609    heightAttrib = String(lightboxHeight) + 'px';
3610
3611    jQuery('.wLightboxOuter').css({'height' : heightAttrib});
3612    jQuery('.wLightboxInner').css({'width' : widthAttrib});
3613
3614    jQuery('.wLightboxPrev').data('entry', positionRel - 2);
3615    jQuery('.wLightboxNext').data('entry', positionRel);
3616
3617    if(boxWasOpened){
3618      jQuery('.wLightboxPrev').attr('class', classPrev);
3619      jQuery('.wLightboxNext').attr('class', classNext);
3620      jQuery('.wLightboxImage').attr('src', src);
3621      jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3622    }
3623    else{
3624      jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
3625      jQuery('.wLightboxOuter, .wLightboxBackground').on('click', function(){
3626        wLightboxClose()
3627      });
3628      jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(){
3629        jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');
3630        jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');
3631        event.stopPropagation();
3632      });
3633    }
3634    if(typeof(wOnAfterInitLightbox) == 'function'){
3635      wOnAfterInitLightbox();
3636    }
3637  }
3638  jQuery('body').addClass('wglBox');
3639  return false;
3640};
3641
3642wLightboxClose = function(){
3643  jQuery('.wLightbox').remove();
3644  jQuery('body').removeClass('wglBox');
3645  jQuery(document).off('keydown');
3646};
3647
3648wStartReadingText = function(element, readerPanelEmbed){
3649  
3650  if(readerPanelEmbed && readerPanelEmbed.className.indexOf('wReaderPanelEmbed') != -1){
3651    readerPanelEmbed.className = 'wReaderPanelEmbed isReading';
3652  }  
3653 
3654  var elementToRead = element;  
3655  var textToRead    = (elementToRead.getAttribute('data-readertextpre') ? elementToRead.getAttribute('data-readertextpre') : '') + elementToRead.innerText;
3656
3657  if(window.speechSynthesis){
3658    if(!window.speechSynthesis.speaking){  
3659    
3660      var textToSpeak = new SpeechSynthesisUtterance(textToRead);
3661      window.speechSynthesis.speak(textToSpeak);
3662    }  
3663    else if(window.speechSynthesis.paused){      
3664      window.speechSynthesis.resume();
3665    }  
3666  } 
3667};
3668
3669wPauseReadingText = function(element, readerPanelEmbed){
3670  
3671  if(readerPanelEmbed && readerPanelEmbed.className.indexOf('wReaderPanelEmbed') != -1){
3672    readerPanelEmbed.className = 'wReaderPanelEmbed';
3673  }  
3674  
3675  window.speechSynthesis.pause();
3676
3677};
3678
3679wStopReadingText = function(element, readerPanelEmbed){
3680  
3681  if(readerPanelEmbed && readerPanelEmbed.className.indexOf('wReaderPanelEmbed') != -1){
3682    readerPanelEmbed.className = 'wReaderPanelEmbed';
3683  }  
3684  
3685  if(window.speechSynthesis.speaking){    
3686    window.speechSynthesis.cancel();
3687  }
3688};
3689/*
3690////////////////////////////////////////////////////////////////
3691//
3692// Allgemeine JavaScript Funktionen
3693//
3694// Weblication CMS Strukturdesign Version 5.1.0.0
3695// erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de
3696// erstellt mit Weblication Content Management Server, www.weblication.de
3697//
3698////////////////////////////////////////////////////////////////
3699*/
3700
3701/*
3702////////////////////////////////////////////////////////////////
3703//
3704// Allgemeine JavaScript Funktionen
3705//
3706// Weblication CMS Strukturdesign Version 5.1.0.0
3707// erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de
3708// erstellt mit Weblication Content Management Server, www.weblication.de
3709//
3710////////////////////////////////////////////////////////////////
3711*/
3712
3713wAllowMinimize = true;
3714
3715
3716////////////////////////////////////////////////////////////////
3717//
3718// @method void wEmbedNavpoint(id, url, mode)
3719//
3720// @desc Öffnet einen eingebetteten Navigationspunkt als Dropdown bzw. Mega-Menü
3721//
3722// @return void
3723//
3724////////////////////////////////////////////////////////////////
3725
3726function wEmbedNavpoint(id, url, mode){
3727
3728  if(typeof wEditor == 'object'){
3729    return false;
3730  }
3731
3732  if(document.all){
3733    var versionIE = (navigator.appVersion.match(/MSIE (\d+\..)/)[1]).replace(/\..*/, '');
3734    if(versionIE < 8){
3735      return false;
3736    }
3737  }
3738
3739  var clientWidth = document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
3740  if(clientWidth < 768){
3741    return false;
3742  }
3743
3744  if(mode == 'embed'){
3745    if(jQuery('#navpoint_' + id).data('hasLoaded') == '1'){
3746    }
3747    else{
3748      url += (url.indexOf('?') == -1 ? '?' : '&') + 'viewmode=embed';
3749      if(typeof(wNavidStandard) != 'undefined' && wNavidStandard != ''){
3750        url += '&navid=' + wNavidStandard;
3751      }
3752      url = url.replace('[URL]', location.pathname + location.search);
3753      jQuery.ajax({
3754        type: "GET",
3755        url: url,
3756        async: true,
3757        success: function(result){
3758          result = result.replace(/\n/g, '_wNL-');
3759          result = result.replace(/\s+id="[^"]+"/gim, '');
3760          result = result.replace(/^.*<!--\s*CONTENT:START\s*-->/im, '');
3761          result = result.replace(/<!--\s*CONTENT:STOP\s*-->.*$/im, '');
3762          result = result.replace(/_wNL-/g, "\n");
3763          jQuery('#navpoint_' + id).data('hasLoaded', '1');
3764          jQuery('#navEmbed_' + id).html(result);
3765
3766          var navpointLeft = jQuery('#navpoint_' + id).offset().left;
3767
3768          jQuery('#navEmbed_' + id).fadeIn({'duration' : 200, 'queue' : false});
3769
3770          var layerLeft = jQuery('#navEmbed_' + id).offset().left;
3771
3772          var blockMainRight = jQuery('#blockBeforeLeftContentRightInner').offset().left + jQuery('#blockBeforeLeftContentRightInner').width();
3773
3774          if(layerLeft < navpointLeft){
3775            jQuery('#navEmbed_' + id).css('left', String(navpointLeft - layerLeft - 6) + 'px');
3776          }
3777
3778          var layerRight = jQuery('#navEmbed_' + id).offset().left + jQuery('#navEmbed_' + id).width();
3779
3780          if(layerRight > blockMainRight){
3781            jQuery('#navEmbed_' + id).css('left', String(parseInt(jQuery('#navEmbed_' + id).css('left')) - (layerRight - blockMainRight)) + 'px');
3782          }
3783
3784          var diffWidthNavEmbed = parseInt(jQuery('#navEmbed_' + id).css('padding-left')) + parseInt(jQuery('#navEmbed_' + id).css('padding-right')) + parseInt(jQuery('#navEmbed_' + id).css('border-left-width')) + parseInt(jQuery('#navEmbed_' + id).css('border-right-width'));
3785
3786          jQuery('#navEmbed_' + id).css({'left': 0, 'width' : parseInt(jQuery('#navigationMain').parent().width() - diffWidthNavEmbed)});
3787          /* Abfrage Dropdown-Navigation Start - ueber CSS-Variable $navigationPreviewLink aktivierbar */
3788          if(jQuery('#navEmbed_' + id).parent().children("a").attr("data-clickable")){
3789            jQuery('#navEmbed_' + id).parent().children("a").click(function(event){
3790              if((document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth) < 768){
3791                return false;
3792              }
3793              if(jQuery('#navEmbed_' + id).css('display') == 'none') jQuery('#navEmbed_' + id).css({'opacity':'1'}).fadeIn({'duration' : 0, 'queue' : false});
3794              else jQuery('#navEmbed_' + id).hide({'duration' : 0, 'queue' : false}).css({'opacity':'1'});
3795            });
3796          }
3797          else {
3798            jQuery('#navEmbed_' + id).parent().mouseenter(function(event){
3799              if((document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth) < 768){
3800                return false;
3801              }
3802              jQuery('#navEmbed_' + id).css({'opacity':'1'}).fadeIn({'duration' : 400, 'queue' : false});
3803            });
3804           
3805            jQuery('#navpoint_' + id).parent().mouseleave(function(event){
3806               jQuery('#navEmbed_' + id).hide({'duration' : 0, 'queue' : false}).css({'opacity':'1'});
3807            });
3808          }
3809          /* Abfrage Dropdown-Navigation Ende */   
3810        }
3811      });
3812    }
3813  }
3814  else{
3815    if(jQuery('#navpoint_' + id).data('hasLoaded') == '1'){
3816      jQuery('#navEmbed_' + id).show();
3817    }
3818    else{
3819      url = url.indexOf('?') == -1 ? url + '?parentIframeId=navEmbedIframe_'+id : url + '&parentIframeId=navEmbedIframe_'+id;
3820      url = url.indexOf('dropdown') == -1 ? url + '&viewmode=blank' : url;
3821      url = url.replace('[URL]', location.pathname + location.search);
3822
3823      jQuery('#navpoint_' + id).data('hasLoaded', '1');
3824
3825      var iframeEmbed    = document.createElement('iframe');
3826
3827      iframeEmbed.id          = 'navEmbedIframe_' + id;
3828      iframeEmbed.className   = 'navLevel1Embed';
3829      iframeEmbed.frameBorder = '0';
3830      iframeEmbed.scrolling   = 'no';
3831      iframeEmbed.src         = url;
3832
3833      var embedContainer = document.getElementById('navEmbed_' + id);
3834      embedContainer.appendChild(iframeEmbed);
3835
3836      var navpointLeft = jQuery('#navpoint_' + id).offset().left;
3837
3838      jQuery('#navEmbed_' + id).show();
3839
3840      var layerLeft = jQuery('#navEmbed_' + id).offset().left;
3841
3842      var blockMainRight = jQuery('#blockBeforeLeftContentRightInner').offset().left + jQuery('#blockBeforeLeftContentRightInner').width() - 2;
3843
3844      if(layerLeft < navpointLeft){
3845        jQuery('#navEmbed_' + id).css('left', String(navpointLeft - layerLeft - 6) + 'px');
3846      }
3847
3848      var layerRight = jQuery('#navEmbed_' + id).offset().left + jQuery('#navEmbed_' + id).width();
3849
3850      if(layerRight > blockMainRight){
3851        jQuery('#navEmbed_' + id).css('left', String(parseInt(jQuery('#navEmbed_' + id).css('left')) - (layerRight - blockMainRight)) + 'px');
3852      }
3853
3854      jQuery('#navEmbed_' + id).mouseover(function(){
3855        jQuery('#navEmbed_' + id).css({'opacity':'1'}).show();
3856      });
3857
3858      jQuery('#navpoint_' + id + ', #navEmbed_' + id).mouseout(function(){
3859        jQuery('#navEmbed_' + id).hide().css({'opacity':'1'});
3860      });
3861
3862      //jQuery('.blockContentEmbed').attr('id', 'blockContent');
3863      //jQuery('.blockContentEmbedInner').attr('id', 'blockContentInner');
3864    }
3865  }
3866}
3867
3868////////////////////////////////////////////////////////////////
3869//
3870// Initialisieren der Seite
3871//
3872////////////////////////////////////////////////////////////////
3873
3874jQuery(document).ready(function(){
3875
3876  if(navigator.appVersion.match(/iPhone/i)){
3877    window.scrollTo(0, 1);
3878  }
3879
3880  if(typeof(document.addEventListener) == 'function'){
3881    document.addEventListener('touchstart', function(){}, false);
3882  }
3883
3884  if(document.all){
3885    var versionIE = (navigator.appVersion.match(/MSIE (\d+\..)/)[1]).replace(/\..*/, '');
3886    jQuery('body').addClass('IE' + versionIE);
3887    if(versionIE <= 7){
3888      jQuery('img').css('max-width', 'none');
3889      jQuery('div.elementPicture').css('float', 'none');
3890      jQuery('div.picture, div.pictureLeft, div.pictureRight').each(function(){
3891        jQuery(this).css('width', String(jQuery(this).find('img').width()) + 'px');
3892      });
3893    }
3894    else if(versionIE <= 8){
3895      jQuery('img').css('max-width', 'none');
3896    }
3897  }
3898
3899  if(jQuery('#navigationMain').css('msTouchAction')){
3900    jQuery('#navigationMain').css('msTouchAction', 'none');
3901    jQuery('#navigationMain ul ul a').each(function(){
3902      jQuery(this).on('mouseup', function(){
3903        wOpenURL(jQuery(this).attr('href'), jQuery(this).attr('target'));
3904      });
3905    });
3906  }
3907
3908  if(typeof wInitBrowseEdit == 'function'){
3909    wInitBrowseEdit();
3910  }
3911
3912  if(typeof wEditor == 'undefined'){
3913
3914    var widthFancybox  = '80%';
3915    var heightFancybox = '80%';
3916
3917    if(jQuery(window).width() <= 480){
3918      widthFancybox = '100%';
3919    }
3920    
3921    if(typeof(lightboxType) != 'undefined' && lightboxType == 'wLightbox' && !/MSIE\s*(7|8)/.test(navigator.appVersion)){
3922      //jQuery("a.box, a.boxOnly, a[target*='fancy']").wLightbox({"type": "ajax", "class": "default"});
3923      jQuery("a.box, a.boxOnly, a[target='fancy']").wLightbox({"type": "iframe", "class": "default", "width": widthFancybox, "height": heightFancybox});
3924      jQuery("a[target*='boxVideo'], a[target*='boxVideoOnly']").wLightbox({"type": "video", "class": "default", "width": widthFancybox, "height": heightFancybox});
3925      jQuery("a.boxPicture, a.boxPictureOnly, a[target='fancyPicture']").wLightbox({"type": "image", "class": "default", 'scrollIfToHeight' : false, "width": widthFancybox, "height": heightFancybox});
3926      jQuery("a.box, a.boxOnly, a[target='fancy'], a[target='boxVideo'], a[target='boxVideoOnly']").filter(function(i){return !/^http/.test(jQuery(this).attr('href'))}).wSetViewmode('blank');
3927    }
3928    else if(jQuery.fancybox && jQuery.fancybox.version && parseInt(String(jQuery.fancybox.version).replace(/(\d+\.\d+)\.\d+/, '$1')) >= 2){
3929      jQuery("a.box, a.boxOnly, a[target*='fancy'], a[target*='boxVideo'], a[target*='boxVideoOnly']").each(function(){
3930        if(/box\w*\-(\d+)\-(\d+)/.test(jQuery(this).attr('target'))){
3931          widthFancybox  = RegExp.$1 + 'px';
3932          heightFancybox = RegExp.$2 + 'px';
3933          jQuery(this).fancybox({"type": "iframe", "width": widthFancybox, "maxHeight": heightFancybox, "titlePosition": "inside", helpers : {title : {type : 'inside'}, overlay : {css : {'background' : 'rgba(0, 0, 0, 0.2)'}}}});
3934        }
3935        else{
3936          jQuery(this).fancybox({"type": "iframe", "width": widthFancybox, "minHeight": '80%', "titlePosition": "inside", helpers : {title : {type : 'inside'}, overlay : {css : {'background' : 'rgba(0, 0, 0, 0.2)'}}}});
3937        }
3938      });
3939      jQuery("a.box, a.boxOnly, a[target='fancy'], a[target='boxVideo'], a[target='boxVideoOnly']").wSetViewmode('blank');
3940
3941      if(jQuery(window).width() <= 480){
3942        jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type": "image", "margin" : 15, "padding" : 5, "titlePosition": "inside", helpers : {title : {type : 'inside'}, overlay : {css : {'background' : 'rgba(0, 0, 0, 0.2)'}}}});
3943      }
3944      else{
3945        jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type": "image", "titlePosition": "inside", helpers : {title : {type : 'inside'}, overlay : {css : {'background' : 'rgba(0, 0, 0, 0.2)'}}}});
3946      }
3947    }
3948    else{
3949      jQuery("a.box, a.boxOnly, a[target*='boxVideo'], a[target*='boxVideoOnly']").each(function(){
3950        if(/box\w*\-(\d+)\-(\d+)/.test(jQuery(this).attr('target'))){
3951          widthFancybox  = RegExp.$1 + 'px';
3952          heightFancybox = RegExp.$2 + 'px';
3953          jQuery(this).fancybox({"type": "iframe", "width": widthFancybox, "height": heightFancybox, "titlePosition": "inside", "transitionIn" : "none", "transitionOut" : "none", "hideOnContentClick": true, "zoomOpacity": true, "zoomSpeedChange": 200, "zoomSpeedIn": 400, "zoomSpeedOut": 400, "overlayShow": false, "overlayOpacity": 0.7});
3954        }
3955        else{
3956         jQuery(this).fancybox({"type": "iframe", "width": widthFancybox, "height": '80%', "titlePosition": "inside", "transitionIn" : "none", "transitionOut" : "none", "hideOnContentClick": true, "zoomOpacity": true, "zoomSpeedChange": 200, "zoomSpeedIn": 400, "zoomSpeedOut": 400, "overlayShow": false, "overlayOpacity": 0.7});
3957        }
3958      });
3959
3960      jQuery("a.box, a.boxOnly, a[target='boxVideo'], a[target='boxVideoOnly']").wSetViewmode('blank');
3961
3962      if(jQuery(window).width() <= 480){
3963        jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type": "image", "margin" : 15, "padding" : 5, "titlePosition": "inside", "transitionIn" : "none", "transitionOut" : "none", "hideOnContentClick": true, "zoomOpacity": true, "zoomSpeedChange": 200, "zoomSpeedIn": 400, "zoomSpeedOut": 400, "overlayShow": false, "overlayOpacity": 0.7});
3964      }
3965      else{
3966        jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type": "image", "titlePosition": "inside", "transitionIn" : "none", "transitionOut" : "none", "hideOnContentClick": true, "zoomOpacity": true, "zoomSpeedChange": 200, "zoomSpeedIn": 400, "zoomSpeedOut": 400, "overlayShow": false, "overlayOpacity": 0.7});
3967      }
3968    }
3969
3970    if(document.cookie.indexOf('hideCookieNotice=1') != -1){
3971      jQuery('#cookieNotice').hide();
3972    }
3973    else{
3974      jQuery('#cookieNotice').prependTo('body');
3975      jQuery('#cookieNoticeCloser').show();
3976    }    
3977
3978    if(typeof(ga) != 'undefined'){
3979      jQuery("a.pdf, a.download").wAddAnalytics();
3980    }
3981
3982    /* Abfrage Dropdown-Navigation Start - ueber CSS-Variable $navigationPreviewLink aktivierbar */
3983    jQuery('a[data-previewlink]').each(function(){
3984      var id = jQuery(this).attr('id').replace(/navpoint_/, '');
3985      jQuery(this).parent().append('<div class="navLevel1Embed navLevelEmbed" id="navEmbed_' + id + '">&#160;</div>');
3986      if(jQuery(this).attr('data-clickable')){
3987	      jQuery(this).on('click touchstart', function(event){
3988	        var embedMode = jQuery(this).closest('ul[data-embedmode]').attr('data-embedmode');
3989	        wEmbedNavpoint(id, jQuery(this).attr('data-previewlink'), embedMode);
3990	        event.preventDefault();
3991	        if(jQuery(this).attr('data-clicked') != '1' && jQuery('a[data-clicked="1"]')){
3992	          jQuery('a[data-clicked="1"]').click();
3993	          jQuery(this).attr('data-clicked', '1');
3994	        }
3995	        else if (jQuery(this).attr('data-clicked') == '1'){
3996	          jQuery(this).attr('data-clicked', '');  
3997	        }
3998	        else{
3999	          jQuery(this).attr('data-clicked', '1');
4000	        }
4001		    });
4002      }
4003      else{
4004	      jQuery(this).on('mouseover', function(){
4005	        var embedMode = jQuery(this).closest('ul[data-embedmode]').attr('data-embedmode');
4006	        wEmbedNavpoint(id, jQuery(this).attr('data-previewlink'), embedMode);
4007	      });
4008      }
4009      jQuery(this).parent().find('> ul').remove();
4010    });
4011    /* Abfrage Dropdown-Navigation Ende */
4012
4013    jQuery('ul.navLevel1Container').before(function(){if(typeof jQuery(this).data('togglertext') != 'undefined') return '<div id="navigationMainToggler" class="closed">' + jQuery(this).data('togglertext') + '</div>'});
4014    jQuery('#navigationMainToggler').click(function(){
4015      jQuery(this).toggleClass('open').toggleClass('closed');
4016      if(jQuery('#navigationResponsiveAll') && jQuery('#navigationSidebar').length > 0){               
4017        
4018        if(jQuery('#navigationMainToggler').data('hasAddTogglerClick') != 1){
4019          jQuery('#navigationResponsiveAll a.navLevel').each(function(){
4020            jQuery(this).click(function(){
4021              jQuery('#navigationMainToggler').trigger('click');
4022            });
4023          });   
4024        }
4025        jQuery('#navigationMainToggler').data('hasAddTogglerClick', 1);        
4026        
4027        if(jQuery('#blockMainOuter').hasClass('moveWithSidebar')){
4028          if(jQuery('#navigationSidebar').width() < 64){
4029            jQuery("#navigationSidebar").removeClass('navigationSidebarClosed');
4030            jQuery('#navigationSidebar').prepend(jQuery("#navigationMainToggler").clone(true).addClass('open').removeClass('closed').data('innerhtml', jQuery("#navigationMainToggler").html()).html(''));
4031            jQuery('#navigationResponsiveAll').data('widthbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').css('width'))          ;
4032            jQuery('#blockMainOuter').data('marginleftbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').css('margin-left'))
4033            jQuery('#blockMainOuter').data('maxwidthbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').css('max-width'))
4034            jQuery('#blockMainOuter').data('widthbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').width());
4035            jQuery('#blockMainOuter').css({'width' : jQuery('#blockMainOuter').width(), 'max-width' : ''});
4036            jQuery('#navigationResponsiveAll').css({'width' : '200px'});
4037            jQuery('#navigationResponsiveAll').animate({'width' : 'toggle'});
4038
4039            if(jQuery('#navigationSidebar').css('left').replace(/(px|em|pt|%)$/, '') == '0'){
4040              jQuery('#blockMainOuter').animate({'margin-left' : '240px'}, function(){
4041                jQuery("#navigationSidebar").addClass('navigationSidebarOpen').removeClass('navigationSidebarClosed');
4042              });
4043            }
4044            else{
4045              jQuery('#blockMainOuter').animate({'margin-left' : '-240px'}, function(){
4046                jQuery("#navigationSidebar").addClass('navigationSidebarOpen').removeClass('navigationSidebarClosed');
4047              });
4048            }
4049          }
4050          else{
4051            jQuery("#navigationSidebar").removeClass('navigationSidebarOpen');
4052            jQuery("#navigationMainToggler").remove();
4053            jQuery("#navigationMainToggler").addClass('closed').removeClass('open');
4054            jQuery('#navigationResponsiveAll').animate({'width' : 'toggle'});
4055            jQuery('#blockMainOuter').css({'width' : jQuery('#blockMainOuter').data('widthbeforeexpandnavigationsidebar'), 'max-width' : ''});
4056            jQuery('#blockMainOuter').animate({'margin-left' : jQuery('#blockMainOuter').data('marginleftbeforeexpandnavigationsidebar')}, function(){
4057              jQuery('#blockMainOuter').css({'width' : '', 'margin-left' : ''});
4058              jQuery("#navigationSidebar").addClass('navigationSidebarClosed');
4059            });
4060          }
4061        }
4062        else{
4063          jQuery('#navigationResponsiveAll').animate({'width' : 'toggle'});
4064        }
4065      }
4066      else if(jQuery('#navigationResponsiveAll')){
4067        jQuery('#navigationResponsiveAll').animate({'height' : 'toggle'});
4068      }
4069      else{
4070        jQuery(this).next('ul').animate({'height' : 'toggle'});
4071      }
4072    });
4073
4074    var limitNavigationArea = jQuery(window).width();
4075
4076    if(jQuery('#blockTopInner #navigationMain').length > 0){
4077      limitNavigationArea = jQuery('#navigationMain').offset().left + jQuery('#navigationMain').outerWidth();
4078
4079      jQuery('#navigationMain li.navLevel1').mouseover(function(){
4080        var diffLeft = jQuery(this).offset().left + jQuery(this).find('ul.navLevel2Container').outerWidth() - limitNavigationArea;
4081        if(diffLeft > 0){
4082          jQuery(this).addClass('alignNavContainerSubLeft');
4083          jQuery(this).data('alignNavContainerSub', 'left');
4084          jQuery(this).find('ul.navLevel2Container').css({'margin-left' : '-' + String(diffLeft) + 'px'});
4085        }
4086        else{
4087          jQuery(this).data('alignNavContainerSub', '');
4088        }
4089      });
4090
4091      jQuery('#navigationMain li.navLevel2').mouseover(function(){
4092        if(jQuery(this).find('ul.navLevel3Container').length > 0){
4093          var diffLeft = jQuery(this).find('ul.navLevel3Container').offset().left + jQuery(this).find('ul.navLevel3Container').outerWidth() - limitNavigationArea;
4094          if(diffLeft > 0 || jQuery(this).data('alignNavContainerSub') == 'left'){
4095            jQuery(this).data('alignNavContainerSub', 'left');
4096            jQuery(this).addClass('alignNavContainerSubLeft');
4097            jQuery(this).find('ul.navLevel3Container').css({'margin-left' : '-' + String(jQuery(this).find('ul.navLevel3Container').outerWidth()) + 'px'});
4098          }
4099          else{
4100            jQuery(this).data('alignNavContainerSub', '');
4101          }
4102        }
4103      });
4104
4105      jQuery('#navigationMain li.navLevel3').mouseover(function(){
4106        if(jQuery(this).find('ul.navLevel4Container').length > 0){
4107          var diffLeft = jQuery(this).find('ul.navLevel4Container').offset().left + jQuery(this).find('ul.navLevel4Container').outerWidth() - limitNavigationArea;
4108          if(diffLeft > 0 || jQuery(this).data('alignNavContainerSub') == 'left'){
4109            jQuery(this).addClass('alignNavContainerSubLeft');
4110            jQuery(this).data('alignNavContainerSub', 'left');
4111            jQuery(this).find('ul.navLevel4Container').css({'margin-left' : '-' + String(jQuery(this).find('ul.navLevel4Container').outerWidth()) + 'px'});
4112          }
4113          else{
4114            jQuery(this).data('alignNavContainerSub', '');
4115          }
4116        }
4117      });
4118    }
4119  }
4120});
4121
4122wOnAfterAdjustHeight = function(elem){
4123  if(elem.parent().data('onafteradjustheight') == 1){
4124    elem.parent().css('max-height', elem.css('height'));
4125    elem.parent().data('onafteradjustheight', 0);
4126  }
4127}
4128
4129////////////////////////////////////////////////////////////////
4130//
4131// Nach dem vollständigen Laden der Seite und der Bilder etc.
4132//
4133////////////////////////////////////////////////////////////////
4134
4135jQuery(window).on('load', function(){
4136  //jQuery("img:not([data-src2x])").removeAttr('height');
4137});
4138
4139////////////////////////////////////////////////////////////////
4140//
4141// Beim Ändern der Fenstergröße
4142//
4143////////////////////////////////////////////////////////////////
4144
4145jQuery(window).on('resize', function(){
4146  //var windowWidth  = jQuery(this).width();
4147  //var windowHeight = jQuery(this).height();
4148  //console.log(windowWidth + ' / ' + windowHeight);
4149});
4150
4151////////////////////////////////////////////////////////////////
4152//
4153// Beim Scrollen
4154//
4155////////////////////////////////////////////////////////////////
4156
4157jQuery(window).on('scroll', function(){
4158  //var scrollTop  = jQuery(this).scrollTop();
4159  //var scrollLeft = jQuery(this).scrollLeft();
4160  //console.log(scrollLeft + ' / ' + scrollTop);
4161  //if(scrollTop > 96){
4162  //  jQuery('#blockMainOuter').css({'margin-top' : '0'})
4163  //  jQuery('#navigationMain').css({'position' : 'fixed', 'z-index' : '100', 'top' : '0'});
4164  //}
4165  //else{
4166  //  jQuery('#navigationMain').css({'position' : 'static'})
4167  //}
4168});
4169
4170////////////////////////////////////////////////////////////////
4171//
4172// Beim Aktivieren bzw. Deaktivieren von Media Queries
4173//
4174////////////////////////////////////////////////////////////////
4175
4176mediaquery_max979_onactivate = function(){
4177  //console.log('mediaquery_max768_onactivate');
4178  //jQuery('#blockTop').removeClass('wglKeepInsideTopOnScroll');
4179  
4180  if(jQuery('#navigationSidebar').length > 0 && jQuery('#navigationSidebar #navigationMainToggler').length == 0){
4181    //jQuery('#navigationSidebar').prepend(jQuery("#navigationMainToggler").html(''));
4182  }
4183
4184  if(jQuery('#navigationResponsiveAll').length > 0 || window['hasLoadNavigationResponsiveAll']){
4185    //jQuery('#navigationResponsiveAll').show();
4186  }
4187  else{
4188    window['hasLoadNavigationResponsiveAll'] = true;
4189    jQuery.ajax({
4190      type: "GET",
4191      async: true,
4192      url: '/de-wGlobal/wGlobal/scripts/php/navigationResponsiveAll.php?project=' + wProjectPath + '&navid=' + (typeof(wNavidStandard) != 'undefined' ? wNavidStandard : ''),
4193      success: function(result){
4194        if(jQuery('#navigationSidebar').length > 0){
4195          jQuery('#navigationSidebar').append(result);
4196        }
4197        else{
4198          jQuery('#navigationMain').after(result);
4199        }
4200        jQuery('.navLevelOpener, .navLevelCloser').on('click', function(){
4201          if(jQuery(this).next().css('display') != 'none' || jQuery(this).next().data('isopen') == 1){
4202            jQuery(this).addClass('navLevelOpener').removeClass('navLevelCloser');
4203            jQuery(this).next().slideUp('fast', function(){
4204              jQuery(this).data('isopen', 0);
4205            });
4206          }
4207          else{
4208            jQuery(this).addClass('navLevelCloser').removeClass('navLevelOpener');
4209            console.log(jQuery(this).next().get(0));
4210            jQuery(this).next().slideDown('fast', function(){
4211              jQuery(this).data('isopen', 1);
4212            });
4213          }
4214        });
4215      }
4216    });
4217  }  
4218  
4219  //jQuery('#blockTopInner #navigationMeta').addClass('navigationMetaInitSourceTop').insertBefore("#blockBottomInner");  
4220    //jQuery('#navigationMeta').insertBefore("#blockTopInner #logo");  
4221
4222};
4223
4224mediaquery_max979_ondeactivate = function(){
4225  //console.log('mediaquery_max768_ondeactivate');
4226
4227  jQuery('ul.navLevel1Container').css({'display' : ''});
4228  jQuery('#navigationResponsiveAll').hide();
4229  
4230  jQuery('.navigationMetaInitSourceTop').insertBefore("#blockTopInner #navigationMain");  
4231};
4232
4233mediaquery_max540_onactivate = function(){
4234  //console.log('mediaquery_max540_onactivate');
4235  //jQuery('#navigationSub').insertBefore("#blockBottomInner");
4236};
4237
4238mediaquery_max540_ondeactivate = function(){
4239  //console.log('mediaquery_max540_ondeactivate');
4240  //jQuery('#navigationSub').prependTo("#blockLeftInner");
4241};
4242
4243mediaquery_max480_onactivate = function(){
4244  //console.log('mediaquery_max480_onactivate');
4245  //jQuery('#blockTop').removeClass('wglKeepInsideTopOnScroll');
4246};
4247
4248mediaquery_max480_ondeactivate = function(){
4249  //console.log('mediaquery_max480_ondeactivate');
4250
4251  //jQuery('#blockTop').addClass('wglKeepInsideTopOnScroll');
4252
4253  //Falls die Sidebar-Navigation davor geöffnet war
4254  jQuery('#blockMainOuter').css({'width' : '', 'margin-left' : ''});
4255};
4256
4257
4258var adaptBlockHeight = function(){
4259  var windowWidth     = jQuery(this).width();
4260  if(windowWidth > 979){
4261    var blockLeft         = jQuery('#blockLeft');
4262    var blockLeftInner    = jQuery('#blockLeftInner');
4263    var blockContent      = jQuery('.blockContent');
4264    var blockContentInner = jQuery('.blockContentInner');
4265    var blockBefore       = jQuery('.blockBefore');
4266    
4267    var blockLeftHeight     = blockLeft.height();
4268    var blockContentHeight  = blockContent.height();
4269    
4270    var maxHeight     = 0;
4271    var targetHeight  = 0;
4272    
4273    blockContent.removeAttr('style');
4274    
4275    if(blockLeftHeight > blockContentHeight){
4276      targetHeight  = blockLeftHeight - 102;
4277      blockContentInner.css('min-height',targetHeight);
4278    } else {
4279      targetHeight  = blockContentHeight;
4280      blockLeftInner.css('min-height',targetHeight);
4281    }
4282
4283  }
4284};
4285
4286jQuery(window).load(function(){
4287
4288  adaptBlockHeight();  
4289
4290  var selectFilterAdressesMain          = jQuery('select[id="filterElement-c"]');
4291  var selectFilterAdressesMainSelected  = selectFilterAdressesMain.find('option:selected');
4292
4293  if(selectFilterAdressesMainSelected.length > 0){
4294    var selectFilterAdressesMainSelectedValue = selectFilterAdressesMainSelected.val();
4295    if(selectFilterAdressesMainSelectedValue != ''){
4296      var selectFilterAdressesSub               = jQuery('select[id="filterElement-s"]');
4297      var selectFilterAdressesSubOptions        = selectFilterAdressesSub.find('option[data-parent != "'+selectFilterAdressesMainSelectedValue+'"]');
4298      selectFilterAdressesSubOptions.remove(); 
4299      
4300      var allOptions    = selectFilterAdressesSub.find('option').length;
4301
4302      if(allOptions == 0){
4303        selectFilterAdressesSub.hide();
4304      }  
4305    }
4306    
4307  }
4308  
4309
4310});
4311
4312
4313
4314jQuery(document).ready(function(){
4315  
4316  var listObject			= jQuery('.listDefault');
4317  var listEntries			= listObject.find('.listEntry');
4318  var categoryDisplayHTML	= '<div class="categoryValue"></div>';
4319  
4320  listEntries.each(function(){
4321    
4322    var curEntry 			= jQuery(this);
4323    var curEntryInner 		= curEntry.find('.listEntryInner');
4324    var categoryValueArea 	= jQuery('.listEntryData-0',curEntry);
4325  	var categoryValue		= categoryValueArea.html();
4326    categoryValueArea.remove();
4327    
4328    if(categoryValue !== ''){
4329      jQuery.ajax({
4330          method: "POST",
4331          url: 	"/de-wGlobal/wGlobal/scripts/php/getCategoryTextValue.php",
4332          data: { action: 'getCategoryTextValue', categoryID: categoryValue }
4333      })
4334      .done(function( val ) {
4335          curEntryInner.prepend(categoryDisplayHTML);
4336          curEntryInner.find('.categoryValue').html(val);
4337      });
4338    }
4339    
4340  });
4341  
4342    jQuery('#socialLink').insertBefore("#blockTopInner #searchBox");
4343
4344  
4345  
4346  
4347  
4348});
4349
4350(function( jQuery ){
4351	jQuery.fn.setWanted = function() {
4352
4353      if(this.text() === 'wanted'){
4354        this.parents('.listEntry').addClass('wanted');
4355      }
4356      
4357	}
4358})( jQuery );
4359/*! Video.js v4.5.1 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */ 
4360/*! Video.js v4.5.1 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */ 
4361(function() {var b=void 0,f=!0,h=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function q(a){return function(){return a}}var t;document.createElement("video");document.createElement("audio");document.createElement("track");function u(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(u.va[a])return u.va[a];a=u.u(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new u.Player(a,c,d)}
4362var videojs=u;window.Wd=window.Xd=u;u.Rb="4.5";u.Fc="https:"==document.location.protocol?"https://":"http://";u.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}},notSupportedMessage:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'};
4363"GENERATED_CDN_VSN"!==u.Rb&&(videojs.options.flash.swf=u.Fc+"vjs.zencdn.net/"+u.Rb+"/video-js.swf");u.va={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);u.ka=u.CoreObject=m();
4364u.ka.extend=function(a){var c,d;a=a||{};c=a.init||a.j||this.prototype.init||this.prototype.j||m();d=function(){c.apply(this,arguments)};d.prototype=u.l.create(this.prototype);d.prototype.constructor=d;d.extend=u.ka.extend;d.create=u.ka.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};u.ka.create=function(){var a=u.l.create(this.prototype);this.apply(a,arguments);return a};
4365u.d=function(a,c,d){var e=u.getData(a);e.z||(e.z={});e.z[c]||(e.z[c]=[]);d.s||(d.s=u.s++);e.z[c].push(d);e.V||(e.disabled=l,e.V=function(c){if(!e.disabled){c=u.ic(c);var d=e.z[c.type];if(d)for(var d=d.slice(0),k=0,r=d.length;k<r&&!c.pc();k++)d[k].call(a,c)}});1==e.z[c].length&&(document.addEventListener?a.addEventListener(c,e.V,l):document.attachEvent&&a.attachEvent("on"+c,e.V))};
4366u.o=function(a,c,d){if(u.mc(a)){var e=u.getData(a);if(e.z)if(c){var g=e.z[c];if(g){if(d){if(d.s)for(e=0;e<g.length;e++)g[e].s===d.s&&g.splice(e--,1)}else e.z[c]=[];u.ec(a,c)}}else for(g in e.z)c=g,e.z[c]=[],u.ec(a,c)}};u.ec=function(a,c){var d=u.getData(a);0===d.z[c].length&&(delete d.z[c],document.removeEventListener?a.removeEventListener(c,d.V,l):document.detachEvent&&a.detachEvent("on"+c,d.V));u.zb(d.z)&&(delete d.z,delete d.V,delete d.disabled);u.zb(d)&&u.uc(a)};
4367u.ic=function(a){function c(){return f}function d(){return l}if(!a||!a.Ab){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyboardEvent.keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.fd=c;a.defaultPrevented=f};a.fd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
4368e.stopPropagation();a.cancelBubble=f;a.Ab=c};a.Ab=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.pc=c;a.stopPropagation()};a.pc=d;if(a.clientX!=h){g=document.documentElement;var j=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||j&&j.scrollLeft||0)-(g&&g.clientLeft||j&&j.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||j&&j.scrollTop||0)-(g&&g.clientTop||j&&j.clientTop||0)}
4368a.which=a.charCode||a.keyCode;a.button!=h&&(a.button=a.button&1?0:a.button&
43694?1:a.button&2?2:0)}return a};u.k=function(a,c){var d=u.mc(a)?u.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=u.ic(c);d.V&&d.V.call(a,c);if(e&&!c.Ab()&&c.bubbles!==l)u.k(e,c);else if(!e&&!c.defaultPrevented&&(d=u.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
4370u.U=function(a,c,d){function e(){u.o(a,c,e);d.apply(this,arguments)}e.s=d.s=d.s||u.s++;u.d(a,c,e)};var v=Object.prototype.hasOwnProperty;u.e=function(a,c){var d,e;d=document.createElement(a||"div");for(e in c)v.call(c,e)&&(-1!==e.indexOf("aria-")||"role"==e?d.setAttribute(e,c[e]):d[e]=c[e]);return d};u.Z=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};u.l={};u.l.create=Object.create||function(a){function c(){}c.prototype=a;return new c};
4371u.l.ra=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};u.l.B=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};u.l.Wc=function(a,c){var d,e,g;a=u.l.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=u.l.Na(e)&&u.l.Na(g)?u.l.Wc(e,g):c[d]);return a};u.l.copy=function(a){return u.l.B({},a)};u.l.Na=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};
4372u.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.s||(c.s=u.s++);e.s=d?d+"_"+c.s:c.s;return e};u.pa={};u.s=1;u.expando="vdata"+(new Date).getTime();u.getData=function(a){var c=a[u.expando];c||(c=a[u.expando]=u.s++,u.pa[c]={});return u.pa[c]};u.mc=function(a){a=a[u.expando];return!(!a||u.zb(u.pa[a]))};u.uc=function(a){var c=a[u.expando];if(c){delete u.pa[c];try{delete a[u.expando]}catch(d){a.removeAttribute?a.removeAttribute(u.expando):a[u.expando]=h}}};
4373u.zb=function(a){for(var c in a)if(a[c]!==h)return l;return f};u.n=function(a,c){-1==(" "+a.className+" ").indexOf(" "+c+" ")&&(a.className=""===a.className?c:a.className+" "+c)};u.t=function(a,c){var d,e;if(-1!=a.className.indexOf(c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};u.F=u.e("video");u.J=navigator.userAgent;u.Kc=/iPhone/i.test(u.J);u.Jc=/iPad/i.test(u.J);u.Lc=/iPod/i.test(u.J);u.Ic=u.Kc||u.Jc||u.Lc;var aa=u,w;var x=u.J.match(/OS (\d+)_/i);
4374w=x&&x[1]?x[1]:b;aa.Kd=w;u.Hc=/Android/i.test(u.J);var ba=u,y;var z=u.J.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),A,B;z?(A=z[1]&&parseFloat(z[1]),B=z[2]&&parseFloat(z[2]),y=A&&B?parseFloat(z[1]+"."+z[2]):A?A:h):y=h;ba.Qb=y;u.Mc=u.Hc&&/webkit/i.test(u.J)&&2.3>u.Qb;u.Ub=/Firefox/i.test(u.J);u.Ld=/Chrome/i.test(u.J);u.$b=!!("ontouchstart"in window||window.Gc&&document instanceof window.Gc);
4375u.wb=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var j=d.length-1;0<=j;j--){e=d[j].name;g=d[j].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==h?f:l;c[e]=g}}return c};
4376u.Pd=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};u.yb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};u.Nb={};u.u=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
4377u.ta=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),j=Math.floor(c/60%60),k=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<k?g+":":"";return g+(((g||10<=j)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};u.Sc=function(){document.body.focus();document.onselectstart=q(l)};u.Ed=function(){document.onselectstart=q(f)};u.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};u.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
4378u.sb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
4379u.get=function(a,c,d){var e,g;"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});g=new XMLHttpRequest;try{g.open("GET",a)}catch(j){d(j)}e=0===a.indexOf("file:")||0===window.location.href.indexOf("file:")&&-1===a.indexOf("http");
4380g.onreadystatechange=function(){4===g.readyState&&(200===g.status||e&&0===g.status?c(g.responseText):d&&d())};try{g.send()}catch(k){d&&d(k)}};u.wd=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?u.log("LocalStorage Full (VideoJS)",d):18==d.code?u.log("LocalStorage not allowed (VideoJS)",d):u.log("LocalStorage Error (VideoJS)",d)}};u.kc=function(a){a.match(/^https?:\/\//)||(a=u.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
4381u.log=function(){u.log.history=u.log.history||[];u.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};u.cd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:u.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:u.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};
4382u.ja={};u.ja.Eb=function(a,c){var d,e,g;a=u.l.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=u.l.Na(e)&&u.l.Na(g)?u.ja.Eb(e,g):c[d]);return a};
4383u.b=u.ka.extend({j:function(a,c,d){this.c=a;this.h=u.l.copy(this.h);c=this.options(c);this.R=c.id||(c.el&&c.el.id?c.el.id:a.id()+"_component_"+u.s++);this.ld=c.name||h;this.a=c.el||this.e();this.K=[];this.Ja={};this.Ka={};this.nc();this.I(d);if(c.vc!==l){var e,g;e=u.bind(this.C(),this.C().reportUserActivity);this.d("touchstart",function(){e();clearInterval(g);g=setInterval(e,250)});a=function(){e();clearInterval(g)};this.d("touchmove",e);this.d("touchend",a);this.d("touchcancel",a)}}});t=u.b.prototype;
4384t.dispose=function(){this.k({type:"dispose",bubbles:l});if(this.K)for(var a=this.K.length-1;0<=a;a--)this.K[a].dispose&&this.K[a].dispose();this.Ka=this.Ja=this.K=h;this.o();this.a.parentNode&&this.a.parentNode.removeChild(this.a);u.uc(this.a);this.a=h};t.c=f;t.C=p("c");t.options=function(a){return a===b?this.h:this.h=u.ja.Eb(this.h,a)};t.e=function(a,c){return u.e(a,c)};t.u=p("a");t.La=function(){return this.G||this.a};t.id=p("R");t.name=p("ld");t.children=p("K");t.ed=function(a){return this.Ja[a]};
4385t.fa=function(a){return this.Ka[a]};t.Y=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||u.Z(e),c.name=e,d=new window.videojs[d](this.c||this,c)):d=a;this.K.push(d);"function"===typeof d.id&&(this.Ja[d.id()]=d);(e=e||d.name&&d.name())&&(this.Ka[e]=d);"function"===typeof d.el&&d.el()&&this.La().appendChild(d.el());return d};
4386t.removeChild=function(a){"string"===typeof a&&(a=this.fa(a));if(a&&this.K){for(var c=l,d=this.K.length-1;0<=d;d--)if(this.K[d]===a){c=f;this.K.splice(d,1);break}c&&(this.Ja[a.id]=h,this.Ka[a.name]=h,(c=a.u())&&c.parentNode===this.La()&&this.La().removeChild(a.u()))}};t.nc=function(){var a=this.h;
4386if(a&&a.children){var c=this;u.l.ra(a.children,function(a,e){e!==l&&!e.loadEvent&&(c[a]=c.Y(a,e))})}};t.Q=q("");t.d=function(a,c){u.d(this.a,a,u.bind(this,c));return this};
4387t.o=function(a,c){u.o(this.a,a,c);return this};t.U=function(a,c){u.U(this.a,a,u.bind(this,c));return this};t.k=function(a,c){u.k(this.a,a,c);return this};t.I=function(a){a&&(this.aa?a.call(this):(this.Ua===b&&(this.Ua=[]),this.Ua.push(a)));return this};t.za=function(){this.aa=f;var a=this.Ua;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.Ua=[];this.k("ready")}};t.n=function(a){u.n(this.a,a);return this};t.t=function(a){u.t(this.a,a);return this};
4388t.show=function(){this.a.style.display="block";return this};t.D=function(){this.a.style.display="none";return this};function C(a){a.t("vjs-lock-showing")}t.disable=function(){this.D();this.show=m()};t.width=function(a,c){return E(this,"width",a,c)};t.height=function(a,c){return E(this,"height",a,c)};t.Yc=function(a,c){return this.width(a,f).height(c)};
4389function E(a,c,d,e){if(d!==b)return a.a.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px",e||a.k("resize"),a;if(!a.a)return 0;d=a.a.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.a["offset"+u.Z(c)],10)}
4390u.q=u.b.extend({j:function(a,c){u.b.call(this,a,c);var d=l;this.d("touchstart",function(a){a.preventDefault();d=f});this.d("touchmove",function(){d=l});var e=this;this.d("touchend",function(a){d&&e.p(a);a.preventDefault()});this.d("click",this.p);this.d("focus",this.Qa);this.d("blur",this.Pa)}});t=u.q.prototype;
4391t.e=function(a,c){c=u.l.B({className:this.Q(),innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+(this.oa||"Need Text")+"</span></div>",role:"button","aria-live":"polite",tabIndex:0},c);return u.b.prototype.e.call(this,a,c)};t.Q=function(){return"vjs-control "+u.b.prototype.Q.call(this)};t.p=m();t.Qa=function(){u.d(document,"keyup",u.bind(this,this.ba))};t.ba=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.p()};
4392t.Pa=function(){u.o(document,"keyup",u.bind(this,this.ba))};u.O=u.b.extend({j:function(a,c){u.b.call(this,a,c);this.Rc=this.fa(this.h.barName);this.handle=this.fa(this.h.handleName);a.d(this.sc,u.bind(this,this.update));this.d("mousedown",this.Ra);this.d("touchstart",this.Ra);this.d("focus",this.Qa);this.d("blur",this.Pa);this.d("click",this.p);this.c.d("controlsvisible",u.bind(this,this.update));a.I(u.bind(this,this.update));this.P={}}});t=u.O.prototype;
4393t.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=u.l.B({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return u.b.prototype.e.call(this,a,c)};t.Ra=function(a){a.preventDefault();u.Sc();this.P.move=u.bind(this,this.Gb);this.P.end=u.bind(this,this.Hb);u.d(document,"mousemove",this.P.move);u.d(document,"mouseup",this.P.end);u.d(document,"touchmove",this.P.move);u.d(document,"touchend",this.P.end);this.Gb(a)};
4394t.Hb=function(){u.Ed();u.o(document,"mousemove",this.P.move,l);u.o(document,"mouseup",this.P.end,l);u.o(document,"touchmove",this.P.move,l);u.o(document,"touchend",this.P.end,l);this.update()};t.update=function(){if(this.a){var a,c=this.xb(),d=this.handle,e=this.Rc;isNaN(c)&&(c=0);a=c;if(d){a=this.a.offsetWidth;var g=d.u().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.u().style.left=u.round(100*c,2)+"%"}e.u().style.width=u.round(100*a,2)+"%"}};
4395function F(a,c){var d,e,g,j;d=a.a;e=u.cd(d);j=g=d.offsetWidth;d=a.handle;if(a.h.Gd)return j=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.u().offsetHeight,j+=d/2,g-=d),Math.max(0,Math.min(1,(j-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.u().offsetWidth,g+=d/2,j-=d);return Math.max(0,Math.min(1,(e-g)/j))}t.Qa=function(){u.d(document,"keyup",u.bind(this,this.ba))};
4396t.ba=function(a){37==a.which?(a.preventDefault(),this.yc()):39==a.which&&(a.preventDefault(),this.zc())};t.Pa=function(){u.o(document,"keyup",u.bind(this,this.ba))};t.p=function(a){a.stopImmediatePropagation();a.preventDefault()};u.W=u.b.extend();u.W.prototype.defaultValue=0;u.W.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=u.l.B({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return u.b.prototype.e.call(this,"div",c)};u.la=u.b.extend();
4397function ca(a,c){a.Y(c);c.d("click",u.bind(a,function(){C(this)}))}u.la.prototype.e=function(){var a=this.options().Uc||"ul";this.G=u.e(a,{className:"vjs-menu-content"});a=u.b.prototype.e.call(this,"div",{append:this.G,className:"vjs-menu"});a.appendChild(this.G);u.d(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};u.N=u.q.extend({j:function(a,c){u.q.call(this,a,c);this.selected(c.selected)}});
4398u.N.prototype.e=function(a,c){return u.q.prototype.e.call(this,"li",u.l.B({className:"vjs-menu-item",innerHTML:this.h.label},c))};u.N.prototype.p=function(){this.selected(f)};u.N.prototype.selected=function(a){a?(this.n("vjs-selected"),this.a.setAttribute("aria-selected",f)):(this.t("vjs-selected"),this.a.setAttribute("aria-selected",l))};
4399u.S=u.q.extend({j:function(a,c){u.q.call(this,a,c);this.ua=this.Ma();this.Y(this.ua);this.L&&0===this.L.length&&this.D();this.d("keyup",this.ba);this.a.setAttribute("aria-haspopup",f);this.a.setAttribute("role","button")}});t=u.S.prototype;t.na=l;t.Ma=function(){var a=new u.la(this.c);this.options().title&&a.u().appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.Z(this.A),Cd:-1}));if(this.L=this.createItems())for(var c=0;c<this.L.length;c++)ca(a,this.L[c]);return a};t.qa=m();
4400t.Q=function(){return this.className+" vjs-menu-button "+u.q.prototype.Q.call(this)};t.Qa=m();t.Pa=m();t.p=function(){this.U("mouseout",u.bind(this,function(){C(this.ua);this.a.blur()}));this.na?G(this):H(this)};t.ba=function(a){a.preventDefault();32==a.which||13==a.which?this.na?G(this):H(this):27==a.which&&this.na&&G(this)};function H(a){a.na=f;a.ua.n("vjs-lock-showing");a.a.setAttribute("aria-pressed",f);
4400a.L&&0<a.L.length&&a.L[0].u().focus()}
4401function G(a){a.na=l;C(a.ua);a.a.setAttribute("aria-pressed",l)}
4402u.Player=u.b.extend({j:function(a,c,d){this.M=a;a.id=a.id||"vjs_video_"+u.s++;c=u.l.B(da(a),c);this.v={};this.tc=c.poster;this.rb=c.controls;a.controls=l;c.vc=l;u.b.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");this.U("play",function(a){u.k(this.a,{type:"firstplay",target:this.a})||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())});this.d("ended",this.md);this.d("play",this.Jb);this.d("firstplay",this.nd);this.d("pause",this.Ib);
4403this.d("progress",this.pd);this.d("durationchange",this.qc);this.d("error",this.Fb);this.d("fullscreenchange",this.od);u.va[this.R]=this;c.plugins&&u.l.ra(c.plugins,function(a,c){this[a](c)},this);var e,g,j,k;e=u.bind(this,this.reportUserActivity);this.d("mousedown",function(){e();clearInterval(g);g=setInterval(e,250)});this.d("mousemove",e);this.d("mouseup",function(){e();clearInterval(g)});this.d("keydown",e);this.d("keyup",e);j=setInterval(u.bind(this,function(){this.ia&&(this.ia=l,this.userActive(f),
4404clearTimeout(k),k=setTimeout(u.bind(this,function(){this.ia||this.userActive(l)}),2E3))}),250);this.d("dispose",function(){clearInterval(j);clearTimeout(k)})}});t=u.Player.prototype;t.h=u.options;t.dispose=function(){this.k("dispose");this.o("dispose");u.va[this.R]=h;this.M&&this.M.player&&(this.M.player=h);this.a&&this.a.player&&(this.a.player=h);clearInterval(this.Ta);this.wa();this.i&&this.i.dispose();u.b.prototype.dispose.call(this)};
4405function da(a){var c={sources:[],tracks:[]};u.l.B(c,u.wb(a));if(a.hasChildNodes()){var d,e,g,j;a=a.childNodes;g=0;for(j=a.length;g<j;g++)d=a[g],e=d.nodeName.toLowerCase(),"source"===e?c.sources.push(u.wb(d)):"track"===e&&c.tracks.push(u.wb(d))}return c}
4406t.e=function(){var a=this.a=u.b.prototype.e.call(this,"div"),c=this.M;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var d,e,g,j,k;d=c.childNodes;e=d.length;for(k=[];e--;)g=d[e],j=g.nodeName.toLowerCase(),"track"===j&&k.push(g);for(d=0;d<k.length;d++)c.removeChild(k[d])}a.id=c.id;a.className=c.className;c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.h.width,f);this.height(this.h.height,f);c.parentNode&&c.parentNode.insertBefore(a,
4407c);u.yb(c,a);return a};
4408function I(a,c,d){a.i&&(a.aa=l,a.i.dispose(),a.Cb&&(a.Cb=l,clearInterval(a.Ta)),a.Db&&J(a),a.i=l);"Html5"!==c&&a.M&&(u.g.gc(a.M),a.M=h);a.xa=c;a.aa=l;var e=u.l.B({source:d,parentEl:a.a},a.h[c.toLowerCase()]);d&&(d.src==a.v.src&&0<a.v.currentTime&&(e.startTime=a.v.currentTime),a.v.src=d.src);a.i=new window.videojs[c](a,e);a.i.I(function(){this.c.za();if(!this.m.progressEvents){var a=this.c;a.Cb=f;a.Ta=setInterval(u.bind(a,function(){this.v.mb<this.buffered().end(0)?this.k("progress"):1==this.bufferedPercent()&&
4409(clearInterval(this.Ta),this.k("progress"))}),500);a.i.U("progress",function(){this.m.progressEvents=f;var a=this.c;a.Cb=l;clearInterval(a.Ta)})}this.m.timeupdateEvents||(a=this.c,a.Db=f,a.d("play",a.Cc),a.d("pause",a.wa),a.i.U("timeupdate",function(){this.m.timeupdateEvents=f;J(this.c)}))})}function J(a){a.Db=l;a.wa();a.o("play",a.Cc);a.o("pause",a.wa)}t.Cc=function(){this.fc&&this.wa();this.fc=setInterval(u.bind(this,function(){this.k("timeupdate")}),250)};t.wa=function(){clearInterval(this.fc)};
4410t.Jb=function(){u.t(this.a,"vjs-paused");u.n(this.a,"vjs-playing")};t.nd=function(){this.h.starttime&&this.currentTime(this.h.starttime);this.n("vjs-has-started")};t.Ib=function(){u.t(this.a,"vjs-playing");u.n(this.a,"vjs-paused")};t.pd=function(){1==this.bufferedPercent()&&this.k("loadedalldata")};t.md=function(){this.h.loop&&(this.currentTime(0),this.play())};t.qc=function(){var a=K(this,"duration");a&&this.duration(a)};t.od=function(){this.isFullScreen()?this.n("vjs-fullscreen"):this.t("vjs-fullscreen")};
4411t.Fb=function(a){u.log("Video Error",a)};function L(a,c,d){if(a.i&&!a.i.aa)a.i.I(function(){this[c](d)});else try{a.i[c](d)}catch(e){throw u.log(e),e;}}function K(a,c){if(a.i&&a.i.aa)try{return a.i[c]()}catch(d){throw a.i[c]===b?u.log("Video.js: "+c+" method not defined for "+a.xa+" playback technology.",d):"TypeError"==d.name?(u.log("Video.js: "+c+" unavailable on "+a.xa+" playback technology element.",d),a.i.aa=l):u.log(d),d;}}t.play=function(){L(this,"play");return this};
4412t.pause=function(){L(this,"pause");return this};t.paused=function(){return K(this,"paused")===l?l:f};t.currentTime=function(a){return a!==b?(L(this,"setCurrentTime",a),this.Db&&this.k("timeupdate"),this):this.v.currentTime=K(this,"currentTime")||0};
4412t.duration=function(a){if(a!==b)return this.v.duration=parseFloat(a),this;this.v.duration===b&&this.qc();return this.v.duration||0};
4413t.buffered=function(){var a=K(this,"buffered"),c=a.length-1,d=this.v.mb=this.v.mb||0;a&&(0<=c&&a.end(c)!==d)&&(d=a.end(c),this.v.mb=d);return u.sb(0,d)};t.bufferedPercent=function(){return this.duration()?this.buffered().end(0)/this.duration():0};t.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.v.volume=a,L(this,"setVolume",a),u.wd(a),this;a=parseFloat(K(this,"volume"));return isNaN(a)?1:a};
4414t.muted=function(a){return a!==b?(L(this,"setMuted",a),this):K(this,"muted")||l};t.Wa=function(){return K(this,"supportsFullScreen")||l};t.oc=l;t.isFullScreen=function(a){return a!==b?(this.oc=a,this):this.oc};
4415t.requestFullScreen=function(){var a=u.Nb.requestFullScreen;this.isFullScreen(f);a?(u.d(document,a.ub,u.bind(this,function(c){this.isFullScreen(document[a.isFullScreen]);this.isFullScreen()===l&&u.o(document,a.ub,arguments.callee);this.k("fullscreenchange")})),this.a[a.wc]()):this.i.Wa()?L(this,"enterFullScreen"):(this.gd=f,this.Zc=document.documentElement.style.overflow,u.d(document,"keydown",u.bind(this,this.jc)),document.documentElement.style.overflow="hidden",u.n(document.body,"vjs-full-window"),
4416this.k("enterFullWindow"),this.k("fullscreenchange"));return this};t.cancelFullScreen=function(){var a=u.Nb.requestFullScreen;this.isFullScreen(l);if(a)document[a.ob]();else this.i.Wa()?L(this,"exitFullScreen"):(M(this),this.k("fullscreenchange"));return this};t.jc=function(a){27===a.keyCode&&(this.isFullScreen()===f?this.cancelFullScreen():M(this))};
4417function M(a){a.gd=l;u.o(document,"keydown",a.jc);document.documentElement.style.overflow=a.Zc;u.t(document.body,"vjs-full-window");a.k("exitFullWindow")}
4418t.src=function(a){if(a===b)return K(this,"src");if(a instanceof Array){var c;a:{c=a;for(var d=0,e=this.h.techOrder;d<e.length;d++){var g=u.Z(e[d]),j=window.videojs[g];if(j.isSupported())for(var k=0,r=c;k<r.length;k++){var n=r[k];if(j.canPlaySource(n)){c={source:n,i:g};break a}}}c=l}c?(a=c.source,c=c.i,c==this.xa?this.src(a):I(this,c,a)):(this.a.appendChild(u.e("p",{innerHTML:this.options().notSupportedMessage})),this.za())}else a instanceof Object?window.videojs[this.xa].canPlaySource(a)?this.src(a.src):
4419this.src([a]):(this.v.src=a,this.aa?(L(this,"src",a),"auto"==this.h.preload&&this.load(),this.h.autoplay&&this.play()):this.I(function(){this.src(a)}));return this};t.load=function(){L(this,"load");return this};t.currentSrc=function(){return K(this,"currentSrc")||this.v.src||""};t.Sa=function(a){return a!==b?(L(this,"setPreload",a),this.h.preload=a,this):K(this,"preload")};t.autoplay=function(a){return a!==b?(L(this,"setAutoplay",a),this.h.autoplay=a,this):K(this,"autoplay")};
4420t.loop=function(a){return a!==b?(L(this,"setLoop",a),this.h.loop=a,this):K(this,"loop")};t.poster=function(a){if(a===b)return this.tc;this.tc=a;L(this,"setPoster",a);this.k("posterchange")};t.controls=function(a){return a!==b?(a=!!a,this.rb!==a&&((this.rb=a)?(this.t("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.k("controlsenabled")):(this.t("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.k("controlsdisabled"))),this):this.rb};u.Player.prototype.Pb;t=u.Player.prototype;
4421t.usingNativeControls=function(a){return a!==b?(a=!!a,this.Pb!==a&&((this.Pb=a)?(this.n("vjs-using-native-controls"),this.k("usingnativecontrols")):(this.t("vjs-using-native-controls"),this.k("usingcustomcontrols"))),this):this.Pb};t.error=function(){return K(this,"error")};t.ended=function(){return K(this,"ended")};t.seeking=function(){return K(this,"seeking")};t.ia=f;t.reportUserActivity=function(){this.ia=f};t.Ob=f;
4422t.userActive=function(a){return a!==b?(a=!!a,a!==this.Ob&&((this.Ob=a)?(this.ia=f,this.t("vjs-user-inactive"),this.n("vjs-user-active"),this.k("useractive")):(this.ia=l,this.i&&this.i.U("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.t("vjs-user-active"),this.n("vjs-user-inactive"),this.k("userinactive"))),this):this.Ob};var N,O,P;P=document.createElement("div");O={};
4423P.Md!==b?(O.wc="requestFullscreen",O.ob="exitFullscreen",O.ub="fullscreenchange",O.isFullScreen="fullScreen"):(document.mozCancelFullScreen?(N="moz",O.isFullScreen=N+"FullScreen"):(N="webkit",O.isFullScreen=N+"IsFullScreen"),P[N+"RequestFullScreen"]&&(O.wc=N+"RequestFullScreen",O.ob=N+"CancelFullScreen"),O.ub=N+"fullscreenchange");document[O.ob]&&(u.Nb.requestFullScreen=O);u.Da=u.b.extend();
4424u.Da.prototype.h={Rd:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{}}};u.Da.prototype.e=function(){return u.e("div",{className:"vjs-control-bar"})};u.Xb=u.q.extend({j:function(a,c){u.q.call(this,a,c);a.d("play",u.bind(this,this.Jb));a.d("pause",u.bind(this,this.Ib))}});t=u.Xb.prototype;t.oa="Play";t.Q=function(){return"vjs-play-control "+u.q.prototype.Q.call(this)};
4425t.p=function(){this.c.paused()?this.c.play():this.c.pause()};t.Jb=function(){u.t(this.a,"vjs-paused");u.n(this.a,"vjs-playing");this.a.children[0].children[0].innerHTML="Pause"};t.Ib=function(){u.t(this.a,"vjs-playing");u.n(this.a,"vjs-paused");this.a.children[0].children[0].innerHTML="Play"};u.$a=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});
4426u.$a.prototype.e=function(){var a=u.b.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-control
4426s vjs-control"});this.G=u.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.G);return a};u.$a.prototype.da=function(){var a=this.c.Va?this.c.v.currentTime:this.c.currentTime();this.G.innerHTML='<span class="vjs-control-text">Current Time </span>'+u.ta(a,this.c.duration())};
4427u.ab=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});u.ab.prototype.e=function(){var a=u.b.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.G=u.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">Duration Time </span>0:00',"aria-live":"off"});a.appendChild(this.G);return a};
4428u.ab.prototype.da=function(){var a=this.c.duration();a&&(this.G.innerHTML='<span class="vjs-control-text">Duration Time </span>'+u.ta(a))};u.bc=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.bc.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};u.gb=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});
4429u.gb.prototype.e=function(){var a=u.b.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.G=u.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">Remaining Time </span>-0:00',"aria-live":"off"});a.appendChild(this.G);return a};u.gb.prototype.da=function(){this.c.duration()&&(this.G.innerHTML='<span class="vjs-control-text">Remaining Time </span>-'+u.ta(this.c.duration()-this.c.currentTime()))};
4430u.Ea=u.q.extend({j:function(a,c){u.q.call(this,a,c)}});u.Ea.prototype.oa="Fullscreen";u.Ea.prototype.Q=function(){return"vjs-fullscreen-control "+u.q.prototype.Q.call(this)};u.Ea.prototype.p=function(){this.c.isFullScreen()?(this.c.cancelFullScreen(),this.a.children[0].children[0].innerHTML="Fullscreen"):(this.c.requestFullScreen(),this.a.children[0].children[0].innerHTML="Non-Fullscreen")};u.fb=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.fb.prototype.h={children:{seekBar:{}}};
4431u.fb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};u.Yb=u.O.extend({j:function(a,c){u.O.call(this,a,c);a.d("timeupdate",u.bind(this,this.Aa));a.I(u.bind(this,this.Aa))}});t=u.Yb.prototype;t.h={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};t.sc="timeupdate";t.e=function(){return u.O.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
4432t.Aa=function(){var a=this.c.Va?this.c.v.currentTime:this.c.currentTime();this.a.setAttribute("aria-valuenow",u.round(100*this.xb(),2));this.a.setAttribute("aria-valuetext",u.ta(a,this.c.duration()))};t.xb=function(){return this.c.currentTime()/this.c.duration()};t.Ra=function(a){u.O.prototype.Ra.call(this,a);this.c.Va=f;this.Hd=!this.c.paused();this.c.pause()};t.Gb=function(a){a=F(this,a)*this.c.duration();a==this.c.duration()&&(a-=0.1);this.c.currentTime(a)};
4433t.Hb=function(a){u.O.prototype.Hb.call(this,a);this.c.Va=l;this.Hd&&this.c.play()};t.zc=function(){this.c.currentTime(this.c.currentTime()+5)};t.yc=function(){this.c.currentTime(this.c.currentTime()-5)};u.cb=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("progress",u.bind(this,this.update))}});u.cb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text">Loaded: 0%</span>'})};
4434u.cb.prototype.update=function(){this.a.style&&(this.a.style.width=u.round(100*this.c.bufferedPercent(),2)+"%")};u.Wb=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.Wb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text">Progress: 0%</span>'})};u.Ga=u.W.extend({j:function(a,c){u.W.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});u.Ga.prototype.defaultValue="00:00";
4435u.Ga.prototype.e=function(){return u.W.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};u.Ga.prototype.da=function(){var a=this.c.Va?this.c.v.currentTime:this.c.currentTime();this.a.innerHTML='<span class="vjs-control-text">'+u.ta(a,this.c.duration())+"</span>"};u.ib=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.i&&(a.i.m&&a.i.m.volumeControl===l)&&this.n("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.i.m&&a.i.m.volumeControl===l?this.n("vjs-hidden"):this.t("vjs-hidden")}))}});
4436u.ib.prototype.h={children:{volumeBar:{}}};u.ib.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};u.hb=u.O.extend({j:function(a,c){u.O.call(this,a,c);a.d("volumechange",u.bind(this,this.Aa));a.I(u.bind(this,this.Aa));setTimeout(u.bind(this,this.update),0)}});t=u.hb.prototype;t.Aa=function(){this.a.setAttribute("aria-valuenow",u.round(100*this.c.volume(),2));this.a.setAttribute("aria-valuetext",u.round(100*this.c.volume(),2)+"%")};
4437t.h={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};t.sc="volumechange";t.e=function(){return u.O.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};t.Gb=function(a){this.c.muted()&&this.c.muted(l);this.c.volume(F(this,a))};t.xb=function(){return this.c.muted()?0:this.c.volume()};t.zc=function(){this.c.volume(this.c.volume()+0.1)};t.yc=function(){this.c.volume(this.c.volume()-0.1)};
4438u.cc=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.cc.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};u.jb=u.W.extend();u.jb.prototype.defaultValue="00:00";u.jb.prototype.e=function(){return u.W.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
4439u.ea=u.q.extend({j:function(a,c){u.q.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.i&&(a.i.m&&a.i.m.volumeControl===l)&&this.n("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.i.m&&a.i.m.volumeControl===l?this.n("vjs-hidden"):this.t("vjs-hidden")}))}});u.ea.prototype.e=function(){return u.q.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})};
4440u.ea.prototype.p=function(){this.c.muted(this.c.muted()?l:f)};u.ea.prototype.update=function(){var a=this.c.volume(),c=3;0===a||this.c.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.c.muted()?"Unmute"!=this.a.children[0].children[0].innerHTML&&(this.a.children[0].children[0].innerHTML="Unmute"):"Mute"!=this.a.children[0].children[0].innerHTML&&(this.a.children[0].children[0].innerHTML="Mute");for(a=0;4>a;a++)u.t(this.a,"vjs-vol-"+a);u.n(this.a,"vjs-vol-"+c)};
4441u.ma=u.S.extend({j:function(a,c){u.S.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.i&&(a.i.m&&a.i.m.Dc===l)&&this.n("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.i.m&&a.i.m.Dc===l?this.n("vjs-hidden"):this.t("vjs-hidden")}));this.n("vjs-menu-button")}});u.ma.prototype.Ma=function(){var a=new u.la(this.c,{Uc:"div"}),c=new u.hb(this.c,u.l.B({Gd:f},this.h.Yd));a.Y(c);return a};u.ma.prototype.p=function(){u.ea.prototype.p.call(this);u.S.prototype.p.call(this)};
4442u.ma.prototype.e=function(){return u.q.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})};u.ma.prototype.update=u.ea.prototype.update;u.Fa=u.q.extend({j:function(a,c){u.q.call(this,a,c);
4442a.poster()&&this.src(a.poster());(!a.poster()||!a.controls())&&this.D();a.d("posterchange",u.bind(this,function(){this.src(a.poster())}));a.d("play",u.bind(this,this.D))}});var Q="backgroundSize"in u.F.style;
4443u.Fa.prototype.e=function(){var a=u.e("div",{className:"vjs-poster",tabIndex:-1});Q||a.appendChild(u.e("img"));return a};u.Fa.prototype.src=function(a){var c=this.u();a!==b&&(Q?c.style.backgroundImage='url("'+a+'")':c.firstChild.src=a)};u.Fa.prototype.p=function(){this.C().controls()&&this.c.play()};
4444u.Vb=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("canplay",u.bind(this,this.D));a.d("canplaythrough",u.bind(this,this.D));a.d("playing",u.bind(this,this.D));a.d("seeking",u.bind(this,this.show));a.d("seeked",u.bind(this,this.D));a.d("error",u.bind(this,this.show));a.d("ended",u.bind(this,this.D));a.d("waiting",u.bind(this,this.show))}});u.Vb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};u.Ya=u.q.extend();
4445u.Ya.prototype.e=function(){return u.q.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};u.Ya.prototype.p=function(){this.c.play()};
4446u.r=u.b.extend({j:function(a,c,d){c=c||{};c.vc=l;u.b.call(this,a,c,d);var e,g;g=this;e=this.C();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;g.d("mousedown",g.p);g.d("touchstart",function(c){c.preventDefault();a=this.c.userActive()});g.d("touchmove",function(){a&&this.C().reportUserActivity()});var c,d,n,s;c=0;g.d("touchstart",function(){c=(new Date).getTime();n=f});s=function(){n=l};g.d("touchmove",s);g.d("touchleave",s);g.d("touchcancel",s);g.d("touchend",function(){n===f&&(d=(new Date).getTime()-
4447c,250>d&&this.k("tap"))});g.d("tap",g.qd)}};c=u.bind(g,g.td);this.I(a);e.d("controlsenabled",a);e.d("controlsdisabled",c)}});t=u.r.prototype;t.td=function(){this.o("tap");this.o("touchstart");this.o("touchmove");this.o("touchleave");this.o("touchcancel");this.o("touchend");this.o("click");this.o("mousedown")};t.p=function(a){0===a.button&&this.C().controls()&&(this.C().paused()?this.C().play():this.C().pause())};t.qd=function(){this.C().userActive(!this.C().userActive())};t.Lb=m();
4448t.m={volumeControl:f,fullscreenResize:l,progressEvents:l,timeupdateEvents:l};u.media={};u.media.Xa="play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
4449function ea(){var a=u.media.Xa[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=u.media.Xa.length-1;0<=i;i--)u.r.prototype[u.media.Xa[i]]=ea();
4450u.g=u.r.extend({j:function(a,c,d){this.m.volumeControl=u.g.Tc();this.m.movingMediaElementInDOM=!u.Ic;this.m.fullscreenResize=f;u.r.call(this,a,c,d);for(d=u.g.bb.length-1;0<=d;d--)u.d(this.a,u.g.bb[d],u.bind(this.c,this.ad));(c=c.source)&&this.a.currentSrc===c.src&&0<this.a.networkState?a.k("loadstart"):c&&(this.a.src=c.src);if(u.$b&&a.options().nativeControlsForTouch!==l){var e,g,j,k;e=this;g=this.C();c=g.controls();e.a.controls=!!c;j=function(){e.a.controls=f};k=function(){e.a.controls=l};g.d("controlsenabled",
4451j);g.d("controlsdisabled",k);c=function(){g.o("controlsenabled",j);g.o("controlsdisabled",k)};e.d("dispose",c);g.d("usingcustomcontrols",c);g.usingNativeControls(f)}a.I(function(){this.M&&(this.h.autoplay&&this.paused())&&(delete this.M.poster,this.play())});this.za()}});t=u.g.prototype;t.dispose=function(){u.r.prototype.dispose.call(this)};
4452t.e=function(){var a=this.c,c=a.M,d;if(!c||this.m.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),u.g.gc(c),c=d,a.M=h):c=u.e("video",{id:a.id()+"_html5_api",className:"vjs-tech"}),c.player=a,u.yb(c,a.u());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e];a.h[g]!==h&&(c[g]=a.h[g])}return c};t.ad=function(a){this.k(a);a.stopPropagation()};t.play=function(){this.a.play()};t.pause=function(){this.a.pause()};t.paused=function(){return this.a.paused};t.currentTime=function(){return this.a.currentTime};
4453t.vd=function(a){try{this.a.currentTime=a}catch(c){u.log(c,"Video is not ready. (Video.js)")}};t.duration=function(){return this.a.duration||0};t.buffered=function(){return this.a.buffered};t.volume=function(){return this.a.volume};t.Ad=function(a){this.a.volume=a};t.muted=function(){return this.a.muted};t.yd=function(a){this.a.muted=a};t.width=function(){return this.a.offsetWidth};t.height=function(){return this.a.offsetHeight};
4454t.Wa=function(){return"function"==typeof this.a.webkitEnterFullScreen&&(/Android/.test(u.J)||!/Chrome|Mac OS X 10.5/.test(u.J))?f:l};t.hc=function(){var a=this.a;a.paused&&a.networkState<=a.Jd?(this.a.play(),setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};t.bd=function(){this.a.webkitExitFullScreen()};t.src=function(a){this.a.src=a};t.load=function(){this.a.load()};t.currentSrc=function(){return this.a.currentSrc};t.poster=function(){return this.a.poster};
4455t.Lb=function(a){this.a.poster=a};t.Sa=function(){return this.a.Sa};t.zd=function(a){this.a.Sa=a};t.autoplay=function(){return this.a.autoplay};t.ud=function(a){this.a.autoplay=a};t.controls=function(){return this.a.controls};t.loop=function(){return this.a.loop};t.xd=function(a){this.a.loop=a};t.error=function(){return this.a.error};t.seeking=function(){return this.a.seeking};t.ended=function(){return this.a.ended};u.g.isSupported=function(){try{u.F.volume=0.5}catch(a){return l}return!!u.F.canPlayType};
4456u.g.nb=function(a){try{return!!u.F.canPlayType(a.type)}catch(c){return""}};u.g.Tc=function(){var a=u.F.volume;u.F.volume=a/2+0.1;return a!==u.F.volume};var R,fa=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ga=/^video\/mp4/i;
4457u.g.rc=function(){4<=u.Qb&&(R||(R=u.F.constructor.prototype.canPlayType),u.F.constructor.prototype.canPlayType=function(a){return a&&fa.test(a)?"maybe":R.call(this,a)});u.Mc&&(R||(R=u.F.constructor.prototype.canPlayType),u.F.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":R.call(this,a)})};u.g.Fd=function(){var a=u.F.constructor.prototype.canPlayType;u.F.constructor.prototype.canPlayType=R;R=h;return a};u.g.rc();u.g.bb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
4458u.g.gc=function(a){if(a){a.player=h;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
4459u.f=u.r.extend({j:function(a,c,d){u.r.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.a=u.e("div",{id:a.id()+"_temp_flash"}),j=a.id()+"_flash_api";a=a.h;var k=u.l.B({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.Sa,loop:a.loop,muted:a.muted},c.flashVars),r=u.l.B({wmode:"opaque",bgcolor:"#000000"},c.params),n=u.l.B({id:j,name:j,"class":"vjs-tech"},c.attributes),s;e&&(e.type&&u.f.jd(e.type)?
4460(a=u.f.Ac(e.src),k.rtmpConnection=encodeURIComponent(a.qb),k.rtmpStream=encodeURIComponent(a.Mb)):k.src=encodeURIComponent(u.kc(e.src)));this.setCurrentTime=function(a){s=a;this.a.vjs_setProperty("currentTime",a)};this.currentTime=function(){return this.seeking()?s:this.a.vjs_getProperty("currentTime")};u.yb(g,d);c.startTime&&this.I(function(){this.load();this.play();this.currentTime(c.startTime)});u.Ub&&this.I(function(){u.d(this.u(),"mousemove",u.bind(this,function(){this.C().k({type:"mousemove",
4461bubbles:l})}))});if(c.iFrameMode===f&&!u.Ub){var D=u.e("iframe",{id:j+"_iframe",name:j+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});k.readyFunction="ready";k.eventProxyFunction="events";k.errorEventProxyFunction="errors";u.d(D,"load",u.bind(this,function(){var a,d=D.contentWindow;a=D.contentDocument?D.contentDocument:D.contentWindow.document;a.write(u.f.lc(c.swf,k,r,n));d.player=this.c;d.ready=u.bind(this.c,function(c){var d=this.i;d.a=a.getElementById(c);
4462u.f.pb(d)});d.events=u.bind(this.c,function(a,c){this&&"flash"===this.xa&&this.k(c)});d.errors=u.bind(this.c,function(a,c){u.log("Flash Error",c)})}));g.parentNode.replaceChild(D,g)}else u.f.$c(c.swf,g,k,r,n)}});t=u.f.prototype;t.dispose=function(){u.r.prototype.dispose.call(this)};t.play=function(){this.a.vjs_play()};t.pause=function(){this.a.vjs_pause()};
4463t.src=function(a){if(a===b)return this.currentSrc();u.f.hd(a)?(a=u.f.Ac(a),this.Td(a.qb),this.Ud(a.Mb)):(a=u.kc(a),this.a.vjs_src(a));if(this.c.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.currentSrc=function(){var a=this.a.vjs_getProperty("currentSrc");if(a==h){var c=this.rtmpConnection(),d=this.rtmpStream();c&&d&&(a=u.f.Bd(c,d))}return a};t.load=function(){this.a.vjs_load()};t.poster=function(){this.a.vjs_getProperty("poster")};t.Lb=m();t.buffered=function(){return u.sb(0,this.a.vjs_getProperty("buffered"))};
4464t.Wa=q(l);t.hc=q(l);var S=u.f.prototype,T="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),U="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");function ha(){var a=T[V],c=a.charAt(0).toUpperCase()+a.slice(1);S["set"+c]=function(c){return this.a.vjs_setProperty(a,c)}}
4465function W(a){S[a]=function(){return this.a.vjs_getProperty(a)}}var V;for(V=0;V<T.length;V++)W(T[V]),ha();for(V=0;V<U.length;V++)W(U[V]);u.f.isSupported=function(){return 10<=u.f.version()[0]};u.f.nb=function(a){if(!a.type)return"";a=a.type.replace(/;.*/,"").toLowerCase();if(a in u.f.dd||a in u.f.Bc)return"maybe"};u.f.dd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};u.f.Bc={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};
4466u.f.onReady=function(a){a=u.u(a);var c=a.player||a.parentNode.player,d=c.i;a.player=c;d.a=a;u.f.pb(d)};u.f.pb=function(a){a.u().vjs_getProperty?a.za():setTimeout(function(){u.f.pb(a)},50)};u.f.onEvent=function(a,c){u.u(a).player.k(c)};u.f.onError=function(a,c){u.u(a).player.k("error");u.log("Flash Error",c,a)};
4467u.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
4468u.f.$c=function(a,c,d,e,g){a=u.f.lc(a,d,e,g);a=u.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var j=d.childNodes[0];setTimeout(function(){j.style.display="block"},1E3)};
4469u.f.lc=function(a,c,d,e){var g="",j="",k="";c&&u.l.ra(c,function(a,c){g+=a+"="+c+"&amp;"});d=u.l.B({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);u.l.ra(d,function(a,c){j+='<param name="'+a+'" value="'+c+'" />'});e=u.l.B({data:a,width:"100%",height:"100%"},e);u.l.ra(e,function(a,c){k+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+k+">"+j+"</object>"};u.f.Bd=function(a,c){return a+"&"+c};
4470u.f.Ac=function(a){var c={qb:"",Mb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.qb=a.substring(0,d);c.Mb=a.substring(e,a.length);return c};u.f.jd=function(a){return a in u.f.Bc};u.f.Oc=/^rtmp[set]?:\/\//i;u.f.hd=function(a){return u.f.Oc.test(a)};
4471u.Nc=u.b.extend({j:function(a,c,d){u.b.call(this,a,c,d);if(!a.h.sources||0===a.h.sources.length){c=0;for(d=a.h.techOrder;c<d.length;c++){var e=u.Z(d[c]),g=window.videojs[e];if(g&&g.isSupported()){I(a,e);break}}}else a.src(a.h.sources)}});u.Player.prototype.textTracks=function(){return this.ya=this.ya||[]};function X(a,c,d){for(var e=a.ya,g=0,j=e.length,k,r;g<j;g++)k=e[g],k.id()===c?(k.show(),r=k):d&&(k.H()==d&&0<k.mode())&&k.disable();(c=r?r.H():d?d:l)&&a.k(c+"trackchange")}
4472u.w=u.b.extend({j:function(a,c){u.b.call(this,a,c);this.R=c.id||"vjs_"+c.kind+"_"+c.language+"_"+u.s++;this.xc=c.src;this.Xc=c["default"]||c.dflt;this.Dd=c.title;this.Qd=c.srclang;this.kd=c.label;this.$=[];this.kb=[];this.ga=this.ha=0;this.c.d("fullscreenchange",u.bind(this,this.Qc))}});t=u.w.prototype;t.H=p("A");t.src=p("xc");t.tb=p("Xc");t.title=p("Dd");t.label=p("kd");t.Vc=p("$");t.Pc=p("kb");t.readyState=p("ha");t.mode=p("ga");
4473t.Qc=function(){this.a.style.fontSize=this.c.isFullScreen()?140*(screen.width/this.c.width())+"%":""};t.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-"+this.A
4473+" vjs-text-track"})};t.show=function(){Y(this);this.ga=2;u.b.prototype.show.call(this)};t.D=function(){Y(this);this.ga=1;u.b.prototype.D.call(this)};
4474t.disable=function(){2==this.ga&&this.D();this.c.o("timeupdate",u.bind(this,this.update,this.R));this.c.o("ended",u.bind(this,this.reset,this.R));this.reset();this.c.fa("textTrackDisplay").removeChild(this);this.ga=0};function Y(a){0===a.ha&&a.load();0===a.ga&&(a.c.d("timeupdate",u.bind(a,a.update,a.R)),a.c.d("ended",u.bind(a,a.reset,a.R)),("captions"===a.A||"subtitles"===a.A)&&a.c.fa("textTrackDisplay").Y(a))}
4475t.load=function(){0===this.ha&&(this.ha=1,u.get(this.xc,u.bind(this,this.rd),u.bind(this,this.Fb)))};t.Fb=function(a){this.error=a;this.ha=3;this.k("error")};t.rd=function(a){var c,d;a=a.split("\n");for(var e="",g=1,j=a.length;g<j;g++)if(e=u.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=u.trim(a[++g])):c=this.$.length;c={id:c,index:this.$.length};d=e.split(" --\x3e ");c.startTime=ia(d[0]);c.sa=ia(d[1]);for(d=[];a[++g]&&(e=u.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.$.push(c)}this.ha=2;this.k("loaded")};
4476function ia(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
4477t.update=function(){if(0<this.$.length){var a=this.c.currentTime();if(this.Kb===b||a<this.Kb||this.Oa<=a){var c=this.$,d=this.c.duration(),e=0,g=l,j=[],k,r,n,s;a>=this.Oa||this.Oa===b?s=this.vb!==b?this.vb:0:(g=f,s=this.Bb!==b?this.Bb:c.length-1);for(;;){n=c[s];if(n.sa<=a)e=Math.max(e,n.sa),n.Ia&&(n.Ia=l);else if(a<n.startTime){if(d=Math.min(d,n.startTime),n.Ia&&(n.Ia=l),!g)break}else g?(j.splice(0,0,n),r===b&&(r=s),k=s):(j.push(n),k===b&&(k=s),r=s),d=Math.min(d,n.sa),e=Math.max(e,n.startTime),n.Ia=
4478f;if(g)if(0===s)break;else s--;else if(s===c.length-1)break;else s++}this.kb=j;this.Oa=d;this.Kb=e;this.vb=k;this.Bb=r;a=this.kb;c="";d=0;for(e=a.length;d<e;d++)c+='<span class="vjs-tt-cue">'+a[d].text+"</span>";this.a.innerHTML=c;this.k("cuechange")}}};t.reset=function(){this.Oa=0;this.Kb=this.c.duration();this.Bb=this.vb=0};u.Sb=u.w.extend();u.Sb.prototype.A="captions";u.Zb=u.w.extend();u.Zb.prototype.A="subtitles";u.Tb=u.w.extend();u.Tb.prototype.A="chapters";
4479u.ac=u.b.extend({j:function(a,c,d){u.b.call(this,a,c,d);if(a.h.tracks&&0<a.h.tracks.length){c=this.c;a=a.h.tracks;var e;for(d=0;d<a.length;d++){e=a[d];var g=c,j=e.kind,k=e.label,r=e.language,n=e;e=g.ya=g.ya||[];n=n||{};n.kind=j;n.label=k;n.language=r;j=u.Z(j||"subtitles");g=new window.videojs[j+"Track"](g,n);e.push(g)}}}});u.ac.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};
4480u.X=u.N.extend({j:function(a,c){var d=this.ca=c.track;c.label=d.label();c.selected=d.tb();u.N.call(this,a,c);this.c.d(d.H()+"trackchange",u.bind(this,this.update))}});u.X.prototype.p=function(){u.N.prototype.p.call(this);X(this.c,this.ca.R,this.ca.H())};u.X.prototype.update=function(){this.selected(2==this.ca.mode())};u.eb=u.X.extend({j:function(a,c){c.track={H:function(){return c.kind},C:a,label:function(){return c.kind+" off"},tb:q(l),mode:q(l)};u.X.call(this,a,c);this.selected(f)}});
4481u.eb.prototype.p=function(){u.X.prototype.p.call(this);X(this.c,this.ca.R,this.ca.H())};u.eb.prototype.update=function(){for(var a=this.c.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.H()==this.ca.H()&&2==e.mode()&&(g=l);this.selected(g)};u.T=u.S.extend({j:function(a,c){u.S.call(this,a,c);1>=this.L.length&&this.D()}});
4482u.T.prototype.qa=function(){var a=[],c;a.push(new u.eb(this.c,{kind:this.A}));for(var d=0;d<this.c.textTracks().length;d++)c=this.c.textTracks()[d],c.H()===this.A&&a.push(new u.X(this.c,{track:c}));return a};u.Ba=u.T.extend({j:function(a,c,d){u.T.call(this,a,c,d);this.a.setAttribute("aria-label","Captions Menu")}});u.Ba.prototype.A="captions";u.Ba.prototype.oa="Captions";u.Ba.prototype.className="vjs-captions-button";
4483u.Ha=u.T.extend({j:function(a,c,d){u.T.call(this,a,c,d);this.a.setAttribute("aria-label","Subtitles Menu")}});u.Ha.prototype.A="subtitles";u.Ha.prototype.oa="Subtitles";u.Ha.prototype.className="vjs-subtitles-button";u.Ca=u.T.extend({j:function(a,c,d){u.T.call(this,a,c,d);this.a.setAttribute("aria-label","Chapters Menu")}});t=u.Ca.prototype;t.A="chapters";t.oa="Chapters";t.className="vjs-chapters-button";
4484t.qa=function(){for(var a=[],c,d=0;d<this.c.textTracks().length;d++)c=this.c.textTracks()[d],c.H()===this.A&&a.push(new u.X(this.c,{track:c}));return a};
4485t.Ma=function(){for(var a=this.c.textTracks(),c=0,d=a.length,e,g,j=this.L=[];c<d;c++)if(e=a[c],e.H()==this.A&&e.tb()){if(2>e.readyState()){this.Nd=e;e.d("loaded",u.bind(this,this.Ma));return}g=e;break}a=this.ua=new u.la(this.c);a.a.appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.Z(this.A),Cd:-1}));if(g){e=g.$;for(var k,c=0,d=e.length;c<d;c++)k=e[c],k=new u.Za(this.c,{track:g,cue:k}),j.push(k),a.Y(k)}0<this.L.length&&this.show();return a};
4486u.Za=u.N.extend({j:function(a,c){var d=this.ca=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.sa;u.N.call(this,a,c);d.d("cuechange",u.bind(this,this.update))}});u.Za.prototype.p=function(){u.N.prototype.p.call(this);this.c.currentTime(this.cue.startTime);this.update(this.cue.startTime)};u.Za.prototype.update=function(){var a=this.cue,c=this.c.currentTime();this.selected(a.startTime<=c&&c<a.sa)};
4487u.l.B(u.Da.prototype.h.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
4488if("undefined"!==typeof window.JSON&&"function"===window.JSON.parse)u.JSON=window.JSON;else{u.JSON={};
4488var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;u.JSON.parse=function(a,c){function d(a,e){var k,r,n=a[e];if(n&&"object"===typeof n)for(k in n)Object.prototype.hasOwnProperty.call(n,k)&&(r=d(n,k),r!==b?n[k]=r:delete n[k]);return c.call(a,e,n)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
4489if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
4490u.dc=function(){var a,c,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((c=d[e])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==h&&(a=u.JSON.parse(a||"{}"),videojs(c,a)));else{u.lb();break}else u.Ec||u.lb()};u.lb=function(){setTimeout(u.dc,1)};"complete"===document.readyState?u.Ec=f:u.U(window,"load",function(){u.Ec=f});u.lb();u.sd=function(a,c){u.Player.prototype[a]=c};var ja=this;ja.Id=f;function $(a,c){var d=a.split("."),e=ja;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",u);$("_V_",u);$("videojs.options",u.options);$("videojs.players",u.va);$("videojs.TOUCH_ENABLED",u.$b);$("videojs.cache",u.pa);$("videojs.Component",u.b);u.b.prototype.player=u.b.prototype.C;u.b.prototype.options=u.b.prototype.options;u.b.prototype.init=u.b.prototype.j;u.b.prototype.dispose=u.b.prototype.dispose;u.b.prototype.createEl=u.b.prototype.e;u.b.prototype.contentEl=u.b.prototype.La;u.b.prototype.el=u.b.prototype.u;u.b.prototype.addChild=u.b.prototype.Y;
4491u.b.prototype.getChild=u.b.prototype.fa;u.b.prototype.getChildById=u.b.prototype.ed;u.b.prototype.children=u.b.prototype.children;u.b.prototype.initChildren=u.b.prototype.nc;u.b.prototype.removeChild=u.b.prototype.removeChild;u.b.prototype.on=u.b.prototype.d;u.b.prototype.off=u.b.prototype.o;u.b.prototype.one=u.b.prototype.U;u.b.prototype.trigger=u.b.prototype.k;u.b.prototype.triggerReady=u.b.prototype.za;u.b.prototype.show=u.b.prototype.show;u.b.prototype.hide=u.b.prototype.D;
4492u.b.prototype.width=u.b.prototype.width;u.b.prototype.height=u.b.prototype.height;u.b.prototype.dimensions=u.b.prototype.Yc;u.b.prototype.ready=u.b.prototype.I;u.b.prototype.addClass=u.b.prototype.n;u.b.prototype.removeClass=u.b.prototype.t;u.b.prototype.buildCSSClass=u.b.prototype.Q;u.Player.prototype.ended=u.Player.prototype.ended;$("videojs.MediaLoader",u.Nc);$("videojs.TextTrackDisplay",u.ac);$("videojs.ControlBar",u.Da);$("videojs.Button",u.q);$("videojs.PlayToggle",u.Xb);
4493$("videojs.FullscreenToggle",u.Ea);$("videojs.BigPlayButton",u.Ya);$("videojs.LoadingSpinner",u.Vb);$("videojs.CurrentTimeDisplay",u.$a);$("videojs.DurationDisplay",u.ab);$("videojs.TimeDivider",u.bc);$("videojs.RemainingTimeDisplay",u.gb);$("videojs.Slider",u.O);$("videojs.ProgressControl",u.fb);$("videojs.SeekBar",u.Yb);$("videojs.LoadProgressBar",u.cb);$("videojs.PlayProgressBar",u.Wb);$("videojs.SeekHandle",u.Ga);$("videojs.VolumeControl",u.ib);$("videojs.VolumeBar",u.hb);
4494$("videojs.VolumeLevel",u.cc);$("videojs.VolumeMenuButton",u.ma);$("videojs.VolumeHandle",u.jb);$("videojs.MuteToggle",u.ea);$("videojs.PosterImage",u.Fa);$("videojs.Menu",u.la);$("videojs.MenuItem",u.N);$("videojs.MenuButton",u.S);u.S.prototype.createItems=u.S.prototype.qa;u.T.prototype.createItems=u.T.prototype.qa;u.Ca.prototype.createItems=u.Ca.prototype.qa;$("videojs.SubtitlesButton",u.Ha);$("videojs.CaptionsButton",u.Ba);$("videojs.ChaptersButton",u.Ca);$("videojs.MediaTechController",u.r);
4495u.r.prototype.features=u.r.prototype.m;u.r.prototype.m.volumeControl=u.r.prototype.m.Dc;u.r.prototype.m.fullscreenResize=u.r.prototype.m.Od;u.r.prototype.m.progressEvents=u.r.prototype.m.Sd;u.r.prototype.m.timeupdateEvents=u.r.prototype.m.Vd;u.r.prototype.setPoster=u.r.prototype.Lb;$("videojs.Html5",u.g);u.g.Events=u.g.bb;u.g.isSupported=u.g.isSupported;u.g.canPlaySource=u.g.nb;u.g.patchCanPlayType=u.g.rc;u.g.unpatchCanPlayType=u.g.Fd;u.g.prototype.setCurrentTime=u.g.prototype.vd;
4496u.g.prototype.setVolume=u.g.prototype.Ad;u.g.prototype.setMuted=u.g.prototype.yd;u.g.prototype.setPreload=u.g.prototype.zd;u.g.prototype.setAutoplay=u.g.prototype.ud;u.g.prototype.setLoop=u.g.prototype.xd;u.g.prototype.enterFullScreen=u.g.prototype.hc;u.g.prototype.exitFullScreen=u.g.prototype.bd;$("videojs.Flash",u.f);u.f.isSupported=u.f.isSupported;u.f.canPlaySource=u.f.nb;u.f.onReady=u.f.onReady;$("videojs.TextTrack",u.w);u.w.prototype.label=u.w.prototype.label;u.w.prototype.kind=u.w.prototype.H;
4497u.w.prototype.mode=u.w.prototype.mode;u.w.prototype.cues=u.w.prototype.Vc;u.w.prototype.activeCues=u.w.prototype.Pc;$("videojs.CaptionsTrack",u.Sb);$("videojs.SubtitlesTrack",u.Zb);$("videojs.ChaptersTrack",u.Tb);$("videojs.autoSetup",u.dc);$("videojs.plugin",u.sd);$("videojs.createTimeRange",u.sb);$("videojs.util",u.ja);u.ja.mergeOptions=u.ja.Eb;})();
4498
4499
4500wAllowMinimize = true;
4501
4502if(typeof(window.bannerSliderObjects) == 'undefined'){
4503  window.bannerSliderObjects = {};
4504}
4505
4506function initBannerSlider(listId, preselectedEntry){
4507
4508  window.bannerSliderObjects[listId] = {};
4509  window.bannerSliderObjects[listId]['numberChanges'] = -1;
4510
4511  var maxWidthImages = 0;
4512
4513  jQuery('#listEntries_' + listId + ' .listEntryImage').each(function(index){
4514    maxWidthImages = jQuery(this).width() > maxWidthImages ? jQuery(this).width() : maxWidthImages;
4515  });
4516
4517  jQuery('#listEntries_' + listId + ' .listEntryImage').each(function(index){
4518    jQuery(this).attr('data-maxwidthifinvisible', maxWidthImages);
4519  });
4520
4521  var fadeTime             = jQuery('#bannerSlider_' + listId).data('fadetime');
4522  var animation            = jQuery('#bannerSlider_' + listId).data('animation');
4523  var animationDuration    = jQuery('#bannerSlider_' + listId).data('animationduration');
4524  var numberEntries        = jQuery('#bannerSlider_' + listId).data('numberentries');
4525  var currentEntry         = jQuery('#bannerSlider_' + listId).data('currententry');
4526  var preventEventsOnTouch = jQuery('#bannerSlider_' + listId).data('preventeventsontouch');
4527  var allowtouch           = jQuery('#bannerSlider_' + listId).data('allowtouch');
4528  var pauseOnMouseover     = jQuery('#bannerSlider_' + listId).data('pauseonmouseover');
4529
4530  onAfterSelectListEntryBannerSlider(listId, 0, true);
4531
4532  if(typeof(fadeTime) != 'undefined' && fadeTime != '' && fadeTime != 0){
4533    jQuery('#bannerSlider_' + listId).data('intervalcount', 1);
4534    window.bannerSliderObjects[listId]['interval'] = window.setInterval(function(){
4535      jQuery('#bannerSlider_' + listId).data('intervalcount', jQuery('#bannerSlider_' + listId).data('intervalcount') + 1);
4536      if(jQuery('#bannerSlider_' + listId).data('intervalcount') >= 128){
4537        window.clearInterval(window.bannerSliderObjects[listId]['interval'])
4538      };
4539      if(typeof(jQuery('#bannerSlider_' + listId + ' .listMoverForward').length > 0 && jQuery('#bannerSlider_' + listId + ' .listMoverForward').click) == 'function'){
4540        jQuery('#bannerSlider_' + listId + ' .listMoverForward').trigger('click');
4541      }
4542      else{
4543        selectListEntryBannerSlider(listId, "+");
4544      }
4545    }, fadeTime * 1000);
4546    jQuery(window).blur(function(){
4547      window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4548    });
4549    if(pauseOnMouseover == 'yes'){
4550	    jQuery('#bannerSlider_' + listId + ' .listEntries').mouseenter(function(event){
4551	      window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4552	      event.preventDefault ? event.preventDefault() : event.returnValue = false;
4553	      event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true;
4554	    });
4555	    jQuery('#bannerSlider_' + listId + ' .listEntries').mouseleave(function(event){
4556		    window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4557        window.bannerSliderObjects[listId]['interval'] = window.setInterval(function(){
4558          jQuery('#bannerSlider_' + listId).data('intervalcount', jQuery('#bannerSlider_' + listId).data('intervalcount') + 1);
4559          if(jQuery('#bannerSlider_' + listId).data('intervalcount') >= 128){
4560            window.clearInterval(window.bannerSliderObjects[listId]['interval'])
4561          };
4562          if(typeof(jQuery('#bannerSlider_' + listId + ' .listMoverForward').length > 0 && jQuery('#bannerSlider_' + listId + ' .listMoverForward').click) == 'function'){
4563            jQuery('#bannerSlider_' + listId + ' .listMoverForward').trigger('click');
4564          }
4565          else{
4566            selectListEntryBannerSlider(listId, "+");
4567          }
4568        }, fadeTime * 1000);
4569	    });
4570    }
4571    jQuery(window).focus(function(){
4572      window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4573      window.bannerSliderObjects[listId]['interval'] = window.setInterval(function(){
4574        jQuery('#bannerSlider_' + listId).data('intervalcount', jQuery('#bannerSlider_' + listId).data('intervalcount') + 1);
4575        if(jQuery('#bannerSlider_' + listId).data('intervalcount') >= 128){
4576          window.clearInterval(window.bannerSliderObjects[listId]['interval'])
4577        };
4578        if(typeof(jQuery('#bannerSlider_' + listId + ' .listMoverForward').length > 0 && jQuery('#bannerSlider_' + listId + ' .listMoverForward').click) == 'function'){
4579          jQuery('#bannerSlider_' + listId + ' .listMoverForward').trigger('click');
4580        }
4581        else{
4582          selectListEntryBannerSlider(listId, "+");
4583        }
4584      }, fadeTime * 1000);
4585    });
4586  }
4587
4588  if(jQuery('#bannerSlider_' + listId + ' .listEntries .listEntry').length > 1 && allowtouch != 'no'){
4589    if(window.name.indexOf('fancy') == -1 && /(slide|scroll)/.test(animation) && ('ontouchstart' in window || !!(navigator.msMaxTouchPoints) || window.DocumentTouch && document instanceof DocumentTouch)){
4590      jQuery('body').on('touchstart', function(event){
4591        if(jQuery(event.target).closest('#bannerSlider_' + listId + ' .listEntries').length != 0){
4592          window.bannerSliderObjects[listId]['mouseStartX'] = event.originalEvent.touches[0].pageX;
4593          window.bannerSliderObjects[listId]['mouseStartY'] = event.originalEvent.touches[0].pageY;
4594          window.bannerSliderObjects[listId]['mouseStartInnerMarginLeft'] = parseInt(jQuery('#listEntries_' + listId).css('margin-left'));
4595          window.bannerSliderObjects[listId]['touchdirection'] = '';
4596        }
4597      });
4598
4599      jQuery('body').on('touchmove', function(event){
4600        if(window.bannerSliderObjects[listId] && window.bannerSliderObjects[listId]['mouseStartX']){
4601          window.bannerSliderObjects[listId]['mouseX'] = event.originalEvent.touches[0].pageX;
4602          window.bannerSliderObjects[listId]['mouseY'] = event.originalEvent.touches[0].pageY;
4603          window.bannerSliderObjects[listId]['divX']   = window.bannerSliderObjects[listId]['mouseX'] - window.bannerSliderObjects[listId]['mouseStartX'];
4604          window.bannerSliderObjects[listId]['divY']   = window.bannerSliderObjects[listId]['mouseY'] - window.bannerSliderObjects[listId]['mouseStartY'];
4605          var diffX = window.bannerSliderObjects[listId]['divX'] > 0 ? window.bannerSliderObjects[listId]['divX'] : - window.bannerSliderObjects[listId]['divX'];
4606          var diffY = window.bannerSliderObjects[listId]['divY'] > 0 ? window.bannerSliderObjects[listId]['divY'] : - window.bannerSliderObjects[listId]['divY'];
4607          if(diffX > 10 && diffX > diffY){
4608            listEntryBannerSliderMove(listId);
4609            window.bannerSliderObjects[listId]['touchdirection'] = 'h';
4610            if(preventEventsOnTouch == '1'){
4611              event.preventDefault();
4612            }
4613          }
4614          else if(window.bannerSliderObjects[listId]['touchdirection'] == ''){
4615            window.bannerSliderObjects[listId]['touchdirection'] = 'v';
4616          }
4617        }
4618      });
4619
4620      jQuery('body').on('touchend', function(event){
4621        if(jQuery(event.target).closest('#bannerSlider_' + listId + ' .listEntries').length != 0){
4622          //event.preventDefault();
4623          if(window.bannerSliderObjects[listId] && window.bannerSliderObjects[listId]['mouseStartX']){
4624            if(window.bannerSliderObjects[listId]['touchdirection'] == 'h'){
4625              bannerSliderMoveEnd(listId);
4626            }
4627          }
4628        }
4629      });
4630    }
4631
4632    jQuery('#bannerSlider_' + listId + ' .listEntries').mousedown(function(event){
4633      window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4634      event.preventDefault ? event.preventDefault() : event.returnValue = false;
4635      event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true;
4636      window.bannerSliderObjects[listId]['mouseStartX'] = event.pageX;
4637      window.bannerSliderObjects[listId]['mouseStartInnerMarginLeft'] = parseInt(jQuery('#listEntries_' + listId).css('margin-left'));
4638    });
4639
4640    jQuery(document).mousemove(function(event){
4641      if(window.bannerSliderObjects[listId] && window.bannerSliderObjects[listId]['mouseStartX']){
4642        window.bannerSliderObjects[listId]['mouseX'] = event.pageX;
4643        window.bannerSliderObjects[listId]['divX'] = window.bannerSliderObjects[listId]['mouseX'] - window.bannerSliderObjects[listId]['mouseStartX'];
4644        listEntryBannerSliderMove(listId);
4645      }
4646    });
4647
4648    jQuery(document).mouseup(function(e){
4649      if(window.bannerSliderObjects[listId] && window.bannerSliderObjects[listId]['mouseStartX']){
4650        bannerSliderMoveEnd(listId);
4651      }
4652    });
4653  }
4654
4655  jQuery('#listEntries_' + listId + ' .listEntryProgress').removeClass('listEntryProgress');
4656
4657  if(animation == 'scrollHorizontal'){
4658    var scrollingElement      = jQuery('#bannerSlider_' + listId).find('.listEntries');
4659    var scrollingElementInner = jQuery('#bannerSlider_' + listId).find('.listEntriesInner');
4660    scrollingElementInner.children('*').each(function(index){
4661      widthTmp = jQuery(this).width();
4662      if(widthTmp > 1){
4663        jQuery(this).css('width', widthTmp);
4664      }
4665    });
4666    var lastElementInner      = scrollingElementInner.children('*:last');
4667    var marginRight           = isNaN(lastElementInner.css('margin-right')) ? 0 : Math.round(lastElementInner.css('margin-right'));
4668    var offsetRightLastElementInner = lastElementInner.get(0).offsetLeft + lastElementInner.outerWidth() + marginRight;
4669    if(offsetRightLastElementInner > 10){
4670      scrollingElementInner.css({'width' : String(offsetRightLastElementInner) + 'px'});
4671    }
4672
4673    var rightNew = - (Math.round(scrollingElement.width()) - (isNaN(parseInt(scrollingElementInner.css('margin-left'))) ? 0 : Math.round(parseFloat(scrollingElementInner.css('margin-left')))) - scrollingElementInner.width());
4674    if(rightNew <= 0){
4675      jQuery('#bannerSlider_' + listId).addClass('lastEntryVisible');
4676      jQuery('#bannerSlider_' + listId).parent('.elementStandard').addClass('lastEntryVisible');
4677    }
4678    else{
4679      jQuery('#bannerSlider_' + listId).removeClass('lastEntryVisible');
4680      jQuery('#bannerSlider_' + listId).parent('.elementStandard').removeClass('lastEntryVisible');
4681    }
4682
4683    jQuery('#bannerSlider_' + listId + ' .listMoverForward').removeAttr('onclick').click(function(){
4684      if(window.bannerSliderObjects[listId]['inmove']){
4685        return;
4686      }
4687      window.bannerSliderObjects[listId]['inmove'] = true;
4688      var scrollingElement      = jQuery(this).parent().parent().find('.listEntries');
4689      var scrollingElementInner = jQuery(this).parent().parent().find('.listEntriesInner');
4690      var movingWidth  = scrollingElement.innerWidth();
4691      var innerWidth   = scrollingElementInner.width();
4692      var right        = - (Math.round(scrollingElement.width()) - (isNaN(parseInt(scrollingElementInner.css('margin-left'))) ? 0 : Math.round(parseFloat(scrollingElementInner.css('margin-left')))) - scrollingElementInner.width());
4693      var rest         = right % movingWidth;
4694
4695      if(right < 20){
4696        movingWidth = 0;
4697      }
4698      else if(right < movingWidth + 20){
4699        movingWidth = right;
4700      }
4701      else if(rest < -20){
4702        movingWidth = rest;
4703      }
4704
4705      var duration = animationDuration;
4706      if(right > 0){
4707        scrollingElementInner.animate({'margin-left' : '-=' + String(movingWidth)}, {'duration' : duration, 'done' : function(){
4708          var leftContainer = parseInt(jQuery('#listEntries_' + listId).css('margin-left'));
4709
4710          var position = 1;
4711          var minLeft  = 1000000;
4712          var curLeft  = 0;
4713
4714          jQuery('#listEntries_' + listId + ' .listEntry').each(function(index){
4715            curLeft = Math.abs(jQuery(this).position().left + leftContainer);
4716            if(curLeft < minLeft){
4717              minLeft = curLeft;
4718              position = index + 1;
4719            }
4720          });
4721          var rightNew = - (Math.round(scrollingElement.width()) 
4721- (isNaN(parseInt(scrollingElementInner.css('margin-left'))) ? 0 : Math.round(parseFloat(scrollingElementInner.css('margin-left')))) - scrollingElementInner.width());
4722          if(rightNew <= 0){
4723            jQuery('#bannerSlider_' + listId).addClass('lastEntryVisible');
4724            jQuery('#bannerSlider_' + listId).parent('.elementStandard').addClass('lastEntryVisible');
4725          }
4726          else{
4727            jQuery('#bannerSlider_' + listId).removeClass('lastEntryVisible');
4728            jQuery('#bannerSlider_' + listId).parent('.elementStandard').removeClass('lastEntryVisible');
4729          }
4730          jQuery('#bannerSlider_' + listId).data('currententry', position);
4731          selectListEntryBannerSliderPreview(listId, position);
4732          onAfterSelectListEntryBannerSlider(listId, position - 1);
4733          window.bannerSliderObjects[listId]['inmove'] = false;
4734        }});
4735      }
4736      else{
4737        window.bannerSliderObjects[listId]['inmove'] = false;
4738      }
4739    });
4740    jQuery('#bannerSlider_' + listId + ' .listMoverBack').removeAttr('onclick').click(function(){
4741      if(window.bannerSliderObjects[listId]['inmove']){
4742        return;
4743      }
4744      window.bannerSliderObjects[listId]['inmove'] = true;
4745      var scrollingElement      = jQuery(this).parent().parent().find('.listEntries');
4746      var scrollingElementInner = jQuery(this).parent().parent().find('.listEntriesInner');
4747      var movingWidth  = scrollingElement.innerWidth();
4748      var innerWidth   = scrollingElementInner.width();
4749      var left         = parseInt(scrollingElementInner.css('margin-left'));
4750      var rest         = left % movingWidth;
4751
4752      if(rest > -20){
4753        movingWidth = movingWidth - rest;
4754      }
4755      else{
4756        movingWidth = rest != 0 ? -rest : movingWidth;
4757      }
4758
4759      jQuery('#bannerSlider_' + listId).removeClass('lastEntryVisible');
4760      jQuery('#bannerSlider_' + listId).parent('.elementStandard').removeClass('lastEntryVisible');
4761
4762      var duration = animationDuration;
4763      if(left < 0){
4764        scrollingElementInner.animate({'margin-left' : '+=' + String(movingWidth)}, {'duration' : duration, 'done' : function(){
4765          var leftContainer = parseInt(jQuery('#listEntries_' + listId).css('margin-left'));
4766          var position = 1;
4767          var minLeft  = 1000000;
4768          var curLeft  = 0;
4769
4770          jQuery('#listEntries_' + listId + ' .listEntry').each(function(index){
4771            curLeft = Math.abs(jQuery(this).position().left + leftContainer);
4772            if(curLeft < minLeft){
4773              minLeft = curLeft;
4774              position = index + 1;
4775            }
4776          });
4777
4778          jQuery('#bannerSlider_' + listId).data('currententry', position);
4779          selectListEntryBannerSliderPreview(listId, position);
4780          onAfterSelectListEntryBannerSlider(listId, position - 1);
4781          window.bannerSliderObjects[listId]['inmove'] = false;
4782        }});
4783      }
4784      else{
4785        window.bannerSliderObjects[listId]['inmove'] = false;
4786      }
4787    });
4788  }
4789
4790  jQuery('#listEntries_' + listId + ' .listEntrySelectedInit').addClass('listEntrySelectedReady');
4791}
4792
4793function listEntryBannerSliderMove(listId){
4794
4795  var numberEntries     = jQuery('#bannerSlider_' + listId).data('numberentries');
4796  var currentEntry      = jQuery('#bannerSlider_' + listId).data('currententry');
4797  var animation         = jQuery('#bannerSlider_' + listId).data('animation');
4798
4799  var positionNext      = currentEntry + 1;
4800  var positionPrev      = currentEntry - 1;
4801  if(positionNext > numberEntries){
4802    positionNext = 1;
4803  }
4804  if(positionPrev < 0){
4805    positionPrev = numberEntries;
4806  }
4807
4808  var slideWidth        = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').width();
4809  var widthSlideCurrent = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').innerWidth()
4810
4811  if(animation == 'scrollHorizontal'){
4812    var scrollingElement      = jQuery('#listEntries_' + listId).parent();
4813    var scrollingElementInner = jQuery('#listEntries_' + listId);
4814    var movingWidth  = scrollingElement.innerWidth();
4815    var innerWidth   = scrollingElementInner.width();
4816    var right        = - (Math.round(scrollingElement.width()) - (isNaN(parseInt(scrollingElementInner.css('margin-left'))) ? 0 : Math.round(parseFloat(scrollingElementInner.css('margin-left')))) - scrollingElementInner.width());
4817    var rest         = right % movingWidth;
4818
4819    if(right < 20){
4820      movingWidth = 0;
4821    }
4822    else if(right < movingWidth + 20){
4823      movingWidth = right;
4824    }
4825    else if(rest < -20){
4826      movingWidth = rest;
4827    }
4828
4829    if(window.bannerSliderObjects[listId]['divX'] < 0 && (scrollingElement.width() - scrollingElementInner.width()) < window.bannerSliderObjects[listId]['mouseStartInnerMarginLeft'] + window.bannerSliderObjects[listId]['divX']){
4830      scrollingElementInner.css({'margin-left' : String(window.bannerSliderObjects[listId]['mouseStartInnerMarginLeft'] + window.bannerSliderObjects[listId]['divX']) + 'px'});
4831    }
4832    else if(window.bannerSliderObjects[listId]['divX'] > 0 && window.bannerSliderObjects[listId]['mouseStartInnerMarginLeft'] + window.bannerSliderObjects[listId]['divX'] < 0){
4833      scrollingElementInner.css({'margin-left' : String(window.bannerSliderObjects[listId]['mouseStartInnerMarginLeft'] + window.bannerSliderObjects[listId]['divX']) + 'px'});
4834    }
4835  }
4836  else if(animation == 'slideHorizontal'){
4837    if(window.bannerSliderObjects[listId]['divX'] > 0){
4838      if(typeof jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionPrev - 1) + ')').data('position') == 'undefined'){
4839        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionPrev - 1) + ')').data('position', jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionPrev - 1) + ')').css('position'));
4840      }
4841      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionPrev - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: 0, left: String(window.bannerSliderObjects[listId]['divX'] - slideWidth) +  'px'});;
4842      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({width: String(widthSlideCurrent) + 'px', display: 'block', 'margin-left' : window.bannerSliderObjects[listId]['divX']});
4843    }
4844    else if(window.bannerSliderObjects[listId]['divX'] < 0){
4845      if(typeof jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').data('position') == 'undefined'){
4846        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').data('position', jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').css('position'));
4847      }
4848      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: 0, left: String(slideWidth + window.bannerSliderObjects[listId]['divX']) +  'px'});;
4849      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({width: String(widthSlideCurrent) + 'px', display: 'block', 'margin-left' : window.bannerSliderObjects[listId]['divX']});
4850    }
4851  }
4852  else if(animation == 'slideFromRight'){
4853    if(window.bannerSliderObjects[listId]['divX'] < 0){
4854      if(typeof jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').data('position') == 'undefined'){
4855        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').data('position', jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').css('position'));
4856      }
4857      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(positionNext - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: 0, left: String(slideWidth + window.bannerSliderObjects[listId]['divX']) +  'px'});;
4858      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({width: String(widthSlideCurrent) + 'px', display: 'block', 'margin-left' : window.bannerSliderObjects[listId]['divX']});
4859    }
4860  }
4861}
4862
4863function bannerSliderMoveEnd(listId){
4864
4865  var currentEntry      = jQuery('#bannerSlider_' + listId).data('currententry');
4866  var numberEntries     = jQuery('#bannerSlider_' + listId).data('numberentries');
4867  var animation         = jQuery('#bannerSlider_' + listId).data('animation');
4868  var positionNext      = currentEntry + 1;
4869  var positionPrev      = currentEntry - 1;
4870  if(positionNext > numberEntries){
4871    positionNext = 1;
4872  }
4873  if(positionPrev <= 0){
4874    positionPrev = numberEntries;
4875  }
4876  window.bannerSliderObjects[listId]['mouseStartX'] = null;
4877  window.bannerSliderObjects[listId]['mouseX'] = null;
4878  window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4879
4880  //console.log('divx:' + window.bannerSliderObjects[listId]['divX']);
4881
4882  if(animation == 'scrollHorizontal'){
4883    var scrollingElement      = jQuery('#listEntries_' + listId).parent();
4884    var scrollingElementInner = jQuery('#listEntries_' + listId);
4885    var widthEntry            = scrollingElementInner.find('.listEntry').width();
4886    var marginLeftInner       = parseInt(scrollingElementInner.css('margin-left'));
4887    var positionNew           = Math.round((-marginLeftInner / widthEntry) + 1.1);
4888    selectListEntryBannerSlider(listId, positionNew);
4889  }
4890  else if(animation == 'slideHorizontal'){
4891    if(window.bannerSliderObjects[listId]['divX'] > 0){
4892      selectListEntryBannerSlider(listId, positionPrev, {'directionFrom' : 'left'});
4893    }
4894    else if(window.bannerSliderObjects[listId]['divX'] < 0){
4895      selectListEntryBannerSlider(listId, positionNext, {'directionFrom' : 'right'});
4896    }
4897  }
4898  else if(animation == 'slideFromRight'){
4899    if(window.bannerSliderObjects[listId]['divX'] < 0){
4900      selectListEntryBannerSlider(listId, positionNext, {});
4901    }
4902  }
4903  window.bannerSliderObjects[listId]['divX'] = 0;
4904}
4905
4906function selectListEntryBannerSlider(listId, position, options){
4907
4908  options = options || {};
4909
4910  if(jQuery('#listEntries_' + listId).data('entryactive') == '1'){
4911    return false;
4912  }
4913
4914  if(!window.bannerSliderObjects[listId]){
4915    return false;
4916  }
4917
4918  var fadeTime          = jQuery('#bannerSlider_' + listId).data('fadetime');
4919  var animation         = jQuery('#bannerSlider_' + listId).data('animation');
4920  var animationDuration = jQuery('#bannerSlider_' + listId).data('animationduration');
4921  var previewAnimation  = jQuery('#bannerSlider_' + listId).data('previewanimation');
4922  var numberEntries     = jQuery('#bannerSlider_' + listId).data('numberentries');
4923  var currentEntry      = jQuery('#bannerSlider_' + listId).data('currententry');
4924  var embedType         = jQuery('#bannerSlider_' + listId).data('embedtype');
4925
4926  if(options['animation']){
4927    animation = options['animation'];
4928  }
4929
4930  if(position == '+'){
4931    position = currentEntry < numberEntries ? parseInt(currentEntry) + 1 : 1;
4932  }
4933  else if(position == '-'){
4934    position = currentEntry != 1 ? parseInt(currentEntry) - 1 : numberEntries;
4935  }
4936  else if(position == 'init'){
4937    position = 1;
4938  }
4939
4940  //console.log(position + ' ' + currentEntry);
4941  if(position == currentEntry && animation != 'scrollHorizontal'){
4942    return false;
4943  }
4944
4945  if(typeof(fadeTime) != 'undefined' && fadeTime != '' && fadeTime != 0){
4946    window.clearInterval(window.bannerSliderObjects[listId]['interval']);
4947    window.bannerSliderObjects[listId]['interval'] = window.setInterval(function(){jQuery('#bannerSlider_' + listId).data('intervalcount', jQuery('#bannerSlider_' + listId).data('intervalcount') + 1);if(jQuery('#bannerSlider_' + listId).data('intervalcount') >= 128){window.clearInterval(window.bannerSliderObjects[listId]['interval'])};selectListEntryBannerSlider(listId, "+")}, fadeTime * 1000);
4948  }
4949
4950  jQuery('#bannerSlider_' + listId).data('currententry', position);
4951  jQuery('#listEntries_' + listId).data('entryactive', 1);
4952
4953  //console.log(currentEntry + ' / ' + position);
4954  //console.log(options['directionFrom']);
4955
4956  if(typeof options['directionFrom'] == 'undefined'){
4957    if(position == 1 &&  currentEntry > 2 && currentEntry >= numberEntries){
4958      options['directionFrom'] = 'right';
4959    }
4960    else if(currentEntry == 1 && position > 2 && position >= numberEntries){
4961      options['directionFrom'] = 'left';
4962    }
4963    else if(currentEntry - position < 0){
4964      options['directionFrom'] = 'right';
4965    }
4966    else{
4967      options['directionFrom'] = 'left';
4968    }
4969  }
4970
4971  //console.log(options['directionFrom']);
4972
4973  jQuery('#listEntries_' + listId + ' .listEntrySelectedInit').removeClass('listEntrySelectedInit');
4974  jQuery('#listEntries_' + listId + ' .listEntrySelectedReady').removeClass('listEntrySelectedReady');
4975  jQuery('#listEntries_' + listId + ' .listEntryProgress').removeClass('listEntryProgress');
4976  jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
4977  jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
4978  jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').addClass('listEntryFadingOut');
4979  jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntryFadingIn');
4980
4981  jQuery('#listEntriesPreview_' + listId + ' .listEntrySelectedInit').removeClass('listEntrySelectedInit');
4982
4983  if(animation == 'slideFromRight' || animation == 'slideHorizontal' && options['directionFrom'] == 'right'){
4984    var slideWidth             = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').width();
4985    var widthSlideCurrent      = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').innerWidth();
4986    var marginLeftSlideCurrent = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css('marginLeft');
4987    if(typeof jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').data('position') == 'undefined'){
4988      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').data('position', jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css('position'));
4989    }
4990
4991    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', zIndex: 1, top: 0, left: String(slideWidth + parseInt(marginLeftSlideCurrent)) +  'px'});
4992    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({width: String(widthSlideCurrent) + 'px', display: 'block'});
4993
4994    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').animate({'marginLeft': '-=' + String(slideWidth + parseInt(marginLeftSlideCurrent))}, animationDuration, function(){
4995      jQuery(this).css({display: 'none', marginLeft: 0, zIndex: 0});
4996    });
4997    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').animate({'left': '-=' + String(slideWidth + parseInt(marginLeftSlideCurrent))}, animationDuration, function(){
4998      //console.log(jQuery(this).data('position'));
4999      jQuery(this).css({display: 'block', position: jQuery(this).data('position'), marginLeft: 0, zIndex: 0});
5000      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').hide();
5001      jQuery('#listEntries_' + listId).data('entryactive', '');
5002      jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5003      jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5004      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5005      window.setTimeout(function(){
5006        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5007      }, 16);
5008    });
5009  }
5010  else if(animation == 'slideFromLeft' || animation == 'slideHorizontal'){
5011    var slideWidth             = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').width();
5012    var widthSlideCurrent      = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').innerWidth();
5013    var marginLeftSlideCurrent = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css('marginLeft');
5014    if(typeof jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').data('position') == 'undefined'){
5015      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').data('position', jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css('position'));
5016    }
5017
5018    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', zIndex: 1, top: 0, left: String(parseInt(marginLeftSlideCurrent) - slideWidth) +  'px'});
5019    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({width: String(widthSlideCurrent) + 'px', display: 'block'});
5020
5021    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').animate({'marginLeft': '+=' + String(slideWidth - parseInt(marginLeftSlideCurrent))}, animationDuration, function(){
5022      jQuery(this).css({display: 'none', marginLeft: 0, zIndex: 0});
5023    });
5024    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').animate({'left': '+=' + String(slideWidth - parseInt(marginLeftSlideCurrent))}, animationDuration, function(){
5025      jQuery(this).css({display: 'block', position: jQuery(this).data('position'), marginLeft: 0, zIndex: 0});
5026      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').hide();
5027      jQuery('#listEntries_' + listId).data('entryactive', '');
5028      jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5029      jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5030      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5031      window.setTimeout(function(){
5032        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5033      }, 16);
5034    });
5035  }
5036  else if(animation == 'overlapFromRight'){
5037    var slideWidth = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').width();
5038    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: 0, left: String(slideWidth) +  'px', zIndex: window.bannerSliderObjects[listId]['numberChanges']});
5039    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').animate({'marginLeft': '-=' + String(slideWidth)}, animationDuration, function(){
5040      jQuery(this).css({display: 'block', position: 'static', marginLeft: 0, zIndex: 0});
5041      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({position: 'static', display: 'none'});
5042      jQuery('#listEntries_' + listId).data('entryactive', '');
5043      jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5044      jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5045      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5046      window.setTimeout(function(){
5047        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5048      }, 16);
5049    });
5050  }
5051  else if(animation == 'overlapFromTop'){
5052    var slideHeight = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').height();
5053    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: '-' + String(slideHeight) +  'px', left: 0, zIndex: window.bannerSliderObjects[listId]['numberChanges']});
5054    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').animate({'top': '+=' + String(slideHeight)}, animationDuration, function(){
5055      jQuery(this).css({display: 'block', position: 'static', marginLeft: 0, zIndex: 0});
5056      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({position: 'static', display: 'none'});
5057      jQuery('#listEntries_' + listId).data('entryactive', '');
5058      jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5059      jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5060      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5061      window.setTimeout(function(){
5062        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5063      }, 16);
5064    });
5065  }
5066  else if(animation == 'scrollHorizontal'){
5067    var leftContainer = parseInt(jQuery('#listEntries_' + listId).css('margin-left'));
5068    var leftEntry     = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').position().left;
5069    var leftDiff      = leftEntry + leftContainer;
5070
5071    var movingWidth = String(leftDiff) + 'px';
5072    var scrollingElement      = jQuery('#listEntries_' + listId).parent();
5073    var scrollingElementInner = jQuery('#listEntries_' + listId);
5074    scrollingElementInner.animate({'margin-left' : '-=' + String(movingWidth)}, animationDuration, function(){
5075      var rightNew = - (Math.round(scrollingElement.width()) - (isNaN(parseInt(scrollingElementInner.css('margin-left'))) ? 0 : Math.round(parseFloat(scrollingElementInner.css('margin-left')))) - scrollingElementInner.width());
5076      if(rightNew <= 0){
5077        jQuery('#bannerSlider_' + listId).addClass('lastEntryVisible');
5078        jQuery('#bannerSlider_' + listId).parent('.elementStandard').addClass('lastEntryVisible');
5079      }
5080      else{
5081        jQuery('#bannerSlider_' + listId).removeClass('lastEntryVisible');
5082        jQuery('#bannerSlider_' + listId).parent('.elementStandard').removeClass('lastEntryVisible');
5083      }
5084    });
5085    jQuery('#listEntries_' + listId).data('entryactive', '');
5086    jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5087    jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5088    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5089    window.setTimeout(function(){
5090      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5091    }, 16);
5092  }
5093  else if(animation == 'zooming'){
5094    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: 0, opacity: 0});
5095    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({display: 'block', opacity: 1});
5096    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').fadeTo(animationDuration, 0, function(){
5097      jQuery(this).css({display: 'none', opacity: 1});
5098    });
5099    window.setTimeout(function(){
5100      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5101    }, 16);
5102    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').fadeTo(animationDuration, 1, function(){
5103      jQuery(this).css({display: 'block', position: 'static'});
5104      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').hide();
5105      jQuery('#listEntries_' + listId).data('entryactive', '');
5106      jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5107      jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5108      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5109    });
5110  }
5111  else if(animation == 'none'){
5112    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({display: 'block',  opacity: 1});
5113    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({display: 'none', opacity: 1});
5114    jQuery('#listEntries_' + listId).data('entryactive', '');
5115    jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5116    jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5117    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5118    window.setTimeout(function(){
5119      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5120    }, 10);
5121  }
5122  else{
5123    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').css({position: 'absolute', display: 'block', width: '100%', top: 0, opacity: 0});
5124    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').css({display: 'block', opacity: 1});
5125    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').fadeTo(animationDuration, 0, function(){
5126      jQuery(this).css({display: 'none', opacity: 1});
5127    });
5128    jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').fadeTo(animationDuration, 1, function(){
5129      jQuery(this).css({display: 'block', position: 'static'});
5130      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').hide();
5131      jQuery('#listEntries_' + listId).data('entryactive', '');
5132      jQuery('#listEntries_' + listId + ' .listEntryFadingIn').removeClass('listEntryFadingIn');
5133      jQuery('#listEntries_' + listId + ' .listEntryFadingOut').removeClass('listEntryFadingOut');
5134      jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').removeClass('listEntrySelected');
5135      window.setTimeout(function(){
5136        jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5137      }, 16);
5138    });
5139  }
5140  selectListEntryBannerSliderPreview(listId, position);
5141  onAfterSelectListEntryBannerSlider(listId, position - 1);
5142}
5143
5144function selectListEntryBannerSliderPreview(listId, position){
5145
5146  var fadeTime          = jQuery('#bannerSlider_' + listId).data('fadetime');
5147  var animation         = jQuery('#bannerSlider_' + listId).data('previewanimation');
5148  var animationDuration = jQuery('#bannerSlider_' + listId).data('animationduration');
5149  var numberEntries     = jQuery('#bannerSlider_' + listId).data('numberentries');
5150  var currentEntry      = jQuery('#bannerSlider_' + listId).data('currententry');
5151
5152  jQuery('#listEntriesPreview_' + listId + ' .listEntry').removeClass('listEntrySelected');
5153  jQuery('#listEntriesPreview_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntrySelected');
5154  if(fadeTime != ''){
5155    jQuery('#listEntriesPreview_' + listId + ' .listEntry').removeClass('listEntryProgress');
5156    jQuery('#listEntriesPreview_' + listId + ' .listEntry:eq(' + String(position - 1) + ')').addClass('listEntryProgress');
5157  }
5158
5159  if(animation == 'slidehorizontal'){
5160    var widthContainerPreviewEntry = jQuery('#listEntriesPreview_' + listId).parent().width();
5161    var widthOuterPreviewEntry     = jQuery('#listEntriesPreview_' + listId + ' .listEntry').first().outerWidth() + parseInt(j
5161Query('#listEntriesPreview_' + listId + ' .listEntry').first().css('margin-right'));
5162    var numberEntriesVisible       = parseInt(widthContainerPreviewEntry / widthOuterPreviewEntry);
5163    var marginLeft                 = (position - 1 - Math.round(numberEntriesVisible / 2)) * (widthOuterPreviewEntry);
5164
5165    if(marginLeft < 0){
5166      marginLeft = 0;
5167    }
5168
5169    jQuery('#listEntriesPreview_' + listId).animate('listEntrySelected').animate({'marginLeft': '-' + String(marginLeft) + 'px'}, animationDuration);
5170  }
5171  else if(animation == 'slidevertical'){
5172    var heightContainerPreviewEntry = jQuery('#listEntriesPreview_' + listId).parent().height();
5173    var heightOuterPreviewEntry     = jQuery('#listEntriesPreview_' + listId + ' .listEntry').first().outerHeight() + parseInt(jQuery('#listEntriesPreview_' + listId + ' .listEntry').first().css('margin-bottom'));
5174    var numberEntriesVisible        = parseInt(heightContainerPreviewEntry / heightOuterPreviewEntry);
5175    var marginTop                   = (position - 1 - Math.round(numberEntriesVisible / 2)) * (heightOuterPreviewEntry);
5176
5177    if(marginTop < 0){
5178      marginTop = 0;
5179    }
5180
5181    jQuery('#listEntriesPreview_' + listId).animate('listEntrySelected').animate({'marginTop': '-' + String(marginTop) + 'px'}, animationDuration);
5182  }
5183}
5184
5185
5186function onAfterSelectListEntryBannerSlider(listId, currentEntry, init){
5187
5188  var fadeTime          = jQuery('#bannerSlider_' + listId).data('fadetime');
5189  var animation         = jQuery('#bannerSlider_' + listId).data('animation');
5190  var animationZoom     = jQuery('#bannerSlider_' + listId).data('animationzoom');
5191  var animationDuration = jQuery('#bannerSlider_' + listId).data('animationduration');
5192  var numberEntries     = jQuery('#bannerSlider_' + listId).data('numberentries');
5193  var currentEntry      = jQuery('#bannerSlider_' + listId).data('currententry');
5194  var backgroundTarget  = jQuery('#bannerSlider_' + listId).data('background-target');
5195  var backgroundImgSrc  = jQuery('#listEntriesPreview_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').data('src-detail');
5196
5197  var urlEntryOnSelect = jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')').data('urlentryonselect');
5198
5199  //console.log(listId);
5200  //console.log(window.bannerSliderObjects[listId]);
5201  window.bannerSliderObjects[listId]['numberChanges'] += 1;
5202
5203  //console.log(window.bannerSliderObjects[listId]);
5204  //console.log('numberChanges' + window.bannerSliderObjects[listId]['numberChanges']);
5205  jQuery('#bannerSlider_' + listId).get(0).className = jQuery('#bannerSlider_' + listId).get(0).className.replace(/\s+numberChanges-\d+/, '') + ' numberChanges-' + window.bannerSliderObjects[listId]['numberChanges'];
5206
5207  if(currentEntry == 1){
5208    jQuery('#bannerSlider_' + listId).addClass('firstEntrySelected');
5209    jQuery('#bannerSlider_' + listId).parent('.elementStandard').addClass('firstEntrySelected');
5210  }
5211  else{
5212    jQuery('#bannerSlider_' + listId).removeClass('firstEntrySelected');
5213    jQuery('#bannerSlider_' + listId).parent('.elementStandard').removeClass('firstEntrySelected');
5214  }
5215
5216  if(currentEntry == numberEntries){
5217    jQuery('#bannerSlider_' + listId).addClass('lastEntrySelected');
5218    jQuery('#bannerSlider_' + listId).parent('.elementStandard').addClass('lastEntrySelected');
5219  }
5220  else{
5221    jQuery('#bannerSlider_' + listId).removeClass('lastEntrySelected');
5222    jQuery('#bannerSlider_' + listId).parent('.elementStandard').removeClass('lastEntrySelected');
5223  }
5224
5225  if(typeof(urlEntryOnSelect) != 'undefined' && location.href.indexOf('/apps/wEditor') == -1){
5226    if(history.pushState){
5227      history.pushState({page: urlEntryOnSelect}, '', urlEntryOnSelect);
5228    }
5229  }
5230
5231  if(typeof backgroundTarget != 'undefined'){
5232    if(backgroundTarget == 'body'){
5233      if(jQuery('#backgroundImageSliderTmp').length == 0){
5234        jQuery(backgroundTarget).prepend('<div id="backgroundImageSliderTmp" style="position:absolute;z-index:-1;top:0;height:100%;width:100%"></div>');
5235        if(backgroundTarget != 'body'){
5236          jQuery('#backgroundImageSliderTmp').get(0).zIndex = '0';
5237        }
5238        var backgroundRepeatSet = jQuery(backgroundTarget).css('background-repeat');
5239        if(backgroundRepeatSet == 'repeat-x'){backgroundRepeatSet = 'repeat no-repeat';}
5240        else if(backgroundRepeatSet == 'repeat-y'){backgroundRepeatSet = 'no-repeat repeat';}
5241        else if(backgroundRepeatSet == 'repeat'){backgroundRepeatSet = 'repeat';}
5242        jQuery('#backgroundImageSliderTmp').get(0).style.backgroundRepeat     = backgroundRepeatSet;
5243        jQuery('#backgroundImageSliderTmp').get(0).style.backgroundAttachment = jQuery(backgroundTarget).css('background-attachment')
5244        jQuery('#backgroundImageSliderTmp').get(0).style.backgroundSize = jQuery(backgroundTarget).css('background-size');
5245      }
5246      jQuery('#backgroundImageSliderTmp').css({'display': 'none', 'background-image': 'url(' + backgroundImgSrc + ')', 'height': jQuery(backgroundTarget == 'body' ? 'html' : backgroundTarget).height()});
5247      if(init){
5248        jQuery(backgroundTarget).css({'background-image': 'url(' + backgroundImgSrc + ')'});
5249      }
5250      else{
5251        jQuery('#backgroundImageSliderTmp').fadeIn(animationDuration, function(){jQuery(this).hide();jQuery(backgroundTarget).css({'background-image': 'url(' + backgroundImgSrc + ')'})});
5252      }
5253    }
5254    else{
5255      jQuery(backgroundTarget).css({'position': 'relative'});
5256      if(jQuery('#backgroundImageSliderTmp').length == 0){
5257        var heightCurrent = String(jQuery(backgroundTarget).outerHeight()) + 'px';
5258        var widthCurrent  = String(jQuery(backgroundTarget).outerWidth()) + 'px';
5259        var marginTop     = '-' + String(jQuery(backgroundTarget).outerHeight() + parseInt(j
5259Query(backgroundTarget).css('margin-top')) + parseInt(jQuery(backgroundTarget).css('margin-bottom'))) + 'px';
5260        var marginLeft    = parseInt(jQuery(backgroundTarget).css('margin-left')) + 'px';
5261        jQuery(backgroundTarget).css({'height': heightCurrent}).wrapInner('<div id="backgroundImageSliderWrapperInner" style="position:absolute;z-index:1;width:100%;height:100%"/>').after('<div id="backgroundImageSliderTmp" style="position:absolute;z-index:0;margin-top:' + marginTop + ';margin-left:' + marginLeft + ';width:' + widthCurrent + ';height:' + heightCurrent + '"></div>');
5262        var backgroundRepeatSet = jQuery(backgroundTarget).css('background-repeat');
5263        if(backgroundRepeatSet == 'repeat-x'){backgroundRepeatSet = 'repeat no-repeat';}
5264        else if(backgroundRepeatSet == 'repeat-y'){backgroundRepeatSet = 'no-repeat repeat';}
5265        else if(backgroundRepeatSet == 'repeat'){backgroundRepeatSet = 'repeat';}
5266        jQuery('#backgroundImageSliderTmp').get(0).style.backgroundRepeat     = backgroundRepeatSet;
5267        jQuery('#backgroundImageSliderTmp').get(0).style.backgroundAttachment = jQuery(backgroundTarget).css('background-attachment')
5268        jQuery('#backgroundImageSliderTmp').get(0).style.backgroundSize = jQuery(backgroundTarget).css('background-size');
5269      }
5270      jQuery('#backgroundImageSliderTmp').css({'display': 'none', 'background-image': 'url(' + backgroundImgSrc + ')', 'height': jQuery(backgroundTarget == 'body' ? 'html' : backgroundTarget).height()});
5271      if(init){
5272        jQuery(backgroundTarget).css({'background-image': 'url(' + backgroundImgSrc + ')'});
5273      }
5274      else{
5275        jQuery('#backgroundImageSliderTmp').fadeIn(animationDuration, function(){
5276          jQuery(this).hide();
5277          jQuery(backgroundTarget).css({'background-image': 'url(' + backgroundImgSrc + ')'})
5278          jQuery('#backgroundImageSliderWrapperInner').children().unwrap();
5279          jQuery('#backgroundImageSliderTmp').remove();
5280        });
5281      }
5282    }
5283  }
5284
5285  if(animation == 'zooming'){
5286    jQuery.each(jQuery('#listEntries_' + listId + ' .listEntry:eq(' + String(currentEntry - 1) + ')'), function(){
5287
5288      animationZoom = (typeof(animationZoom) == 'number' ? parseFloat(animationZoom) : 1.5);
5289
5290      jQc = jQuery(this);
5291
5292      if(!fadeTime || fadeTime == ''){
5293        fadeTime = 10;
5294      }
5295
5296      fadeTime = Math.round((fadeTime + animationDuration / 1000 - 0.05) * 10) / 10;
5297
5298      jQc.find('.listEntryImage').css({'transition' : 'all 0s linear', 'transform' : 'scale(1) rotate(0)', 'margin' : '0', 'width' : '100%', 'height' : 'auto'});
5299      (function(jQc){
5300        window.setTimeout(function(){
5301          jQc.find('.listEntryImage').css({'transition' : 'all ' + String(fadeTime) + 's linear', 'transform' : 'scale(' + String(animationZoom) + ') rotate(0.1deg)'});}, 32);
5302      })(jQc);
5303    });
5304  }
5305
5306  wOptimizePictureSizes();
5307  
5308  //Event definierbar in design.js nach Welchsel des BannerSliders
5309  if(typeof(onAfterSelectListEntryBannerSliderProject) ==  'function') {
5310    onAfterSelectListEntryBannerSliderProject(listId, currentEntry, init);
5311  }
5312}
5313

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.