
(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bR(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bQ(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bs.test(a)?e(a,f):bQ(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bQ(a+"["+f+"]",b[f],c,e)}function bP(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bJ,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bP(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bP(a,c,d,e,"*",g));return l}function bO(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bD),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bq(a,b,c){var e=b==="width"?bk:bl,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function bc(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bb(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function ba(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function _(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function $(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Q(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(L.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(r,"")===a.type?q.push(g.selector):t.splice(i--,1);f=d(a.target).closest(q,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){f=p[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:D?function(a){return a==null?"":D.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?B.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){F["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),E&&(d.inArray=function(a,b){return E.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?y=function(){c.removeEventListener("DOMContentLoaded",y,!1),d.ready()}:c.attachEvent&&(y=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",y),d.ready())});return d}(),e="then done fail isResolved isRejected promise".split(" "),f=[].slice;d.extend({_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),f;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(f)return f;f=a={}}var c=e.length;while(c--)a[e[c]]=b[e[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;c<e;c++)b[c]&&d.isFunction(b[c].promise)?b[c].promise().then(i(c),h.reject):--g;g||h.resolveWith(h,b)}else h!==a&&h.resolveWith(h,e?[a]:[]);return h.promise()}}),function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i<j;i++)g=f[i].name,g.indexOf("data-")===0&&(g=g.substr(5),h(this[0],g,e[g]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=h(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var j=/[\n\t\r]/g,k=/\s+/,l=/\r/g,m=/^(?:href|src|style)$/,n=/^(?:button|input)$/i,o=/^(?:button|input|object|select|textarea)$/i,p=/^a(?:rea)?$/i,q=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(k);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(k);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(j," ");for(var i=0,l=c.length;i<l;i++)h=h.replace(" "+c[i]+" "," ");g.className=d.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),i=b,j=a.split(k);while(f=j[g++])i=e?i:!h.hasClass(f),h[i?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(j," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j<k;j++){var m=h[j];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(q.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(l,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&q.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,H(a.origType,a.selector),d.extend({},a,{handler:G,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,H(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?y:x):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=y;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y,this.stopPropagation()},isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x};var z=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},A=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?A:z,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?A:z)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&E("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&E("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var B,C=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var F={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=r.exec(h),k="",j&&(k=j[0],h=h.replace(r,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(F[h]+k),h=h+k):h=(F[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)d.event.add(n[p],"live."+H(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+H(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var I=/Until$/,J=/^(?:parents|prevUntil|prevAll)/,K=/,/,L=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,N=d.expr.match.POS,O={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(Q(this,a,!1),"not",a)},filter:function(a){return this.pushStack(Q(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/<tbody/i,W=/<|&#?\w+;/,X=/<(?:script|object|embed|option|style)/i,Y=/checked\s*(?:[^=]|=\s*.checked.)/i,Z={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.length?this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&Y.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?$(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,bc)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!X.test(a[0])&&(d.support.checkClone||!Y.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1></$2>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bC=/^(?:select|textarea)/i,bD=/\s+/,bE=/([?&])_=[^&]*/,bF=/(^|\-)([a-z])/g,bG=function(a,b,c){return b+c.toUpperCase()},bH=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bI=d.fn.load,bJ={},bK={},bL,bM;try{bL=c.location.href}catch(bN){bL=c.createElement("a"),bL.href="",bL=bL.href}bM=bH.exec(bL.toLowerCase())||[],d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bI)return bI.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("<div>").append(c.replace(bB,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bC.test(this.nodeName)||bw.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bt,"\r\n")}}):{name:b.name,value:c.replace(bt,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bL,isLocal:bx.test(bM[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bO(bJ),ajaxTransport:bO(bK),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bR(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bS(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bF,bG)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bv.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bu,"").replace(bz,bM[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bD),e.crossDomain==null&&(q=bH.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bM[1]||q[2]!=bM[2]||(q[3]||(q[1]==="http:"?80:443))!=(bM[3]||(bM[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bP(bJ,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!by.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(bA.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bE,"$1_="+w);e.url=x+(x===e.url?(bA.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bP(bK,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bQ(g,a[g],c,f);return e.join("&").replace(br,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bT=d.now(),bU=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bT++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bU.test(b.url)||f&&bU.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bU,l),b.url===j&&(f&&(k=k.replace(bU,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bV=d.now(),bW,bX;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bZ()||b$()}:bZ,bX=d.ajaxSettings.xhr(),d.support.ajax=!!bX,d.support.cors=bX&&"withCredentials"in bX,bX=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bW[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bW||(bW={},bY()),h=bV++,g.onreadystatechange=bW[h]=c):c()},abort:function(){c&&c(0,1)}}}});var b_={},ca=/^(?:toggle|show|hide)$/,cb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cc,cd=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(ce("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",cf(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ce("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(ce("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=cf(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(ca.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=cb.exec(e),j=f.cur();if(i){var k=parseFloat(i[2]),l=i[3]||(d.cssNumber[c]?"":"px");l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:ce("show",1),slideUp:ce("hide",1),slideToggle:ce("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!cc&&(cc=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(cc),cc=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var cg=/^t(?:able|d|h)$/i,ch=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=ci(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!cg.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=(e==="absolute"||e==="fixed")&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=ch.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!ch.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=ci(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=ci(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window);
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=
this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":
"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,
"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&
a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&
c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;
(function(d,C){function M(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.bind("mouseout",
function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},
setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,
"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c==
"focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():
d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,
b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=
1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/
2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=
d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=
a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,
"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==
a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?
d.extend({},e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");H(e.settings,f);if(i!==null&&f.dateFormat!==C&&f.minDate===C)e.settings.minDate=this._formatDate(e,i);if(g!==null&&f.dateFormat!==C&&f.maxDate===C)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);
this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");
b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]);if(a=d.datepicker._get(b,"onSelect")){c=d.datepicker._formatDate(b);a.apply(b.input?b.input[0]:null,[c,b])}else d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,
a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=
a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,
"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);
return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",
a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value=
"";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);
c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=
true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});
a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&
!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),
h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=
this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);
this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):
0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"?
"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);
this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");
if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?
b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1<a.length&&a.charAt(A+1)==p)&&A++;return p},m=function(p){var D=
o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&D?4:p=="o"?3:2)+"}");p=b.substring(q).match(p);if(!p)throw"Missing number at position "+q;q+=p[0].length;return parseInt(p[0],10)},n=function(p,D,K){p=d.map(o(p)?K:D,function(w,x){return[[x,w]]}).sort(function(w,x){return-(w[1].length-x[1].length)});var E=-1;d.each(p,function(w,x){w=x[1];if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;return false}});if(E!=-1)return E+1;else throw"Unknown name at position "+q;},s=
function(){if(b.charAt(q)!=a.charAt(A))throw"Unexpected literal at position "+q;q++},q=0,A=0;A<a.length;A++)if(k)if(a.charAt(A)=="'"&&!o("'"))k=false;else s();else switch(a.charAt(A)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var v=new Date(m("@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case "!":v=new Date((m("!")-this._ticksTo1970)/1E4);c=v.getFullYear();j=v.getMonth()+
1;l=v.getDate();break;case "'":if(o("'"))s();else k=true;break;default:s()}if(q<b.length)throw"Extra/unparsed characters found in date: "+b.substring(q);if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd",
COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:
null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,s){return i(o)?s[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-
(new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=
0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+="0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==C?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);
var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;
i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=
Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>
12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&
a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?
new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));
n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m,
g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&&
a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+B+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,s)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
B+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x<i[0];x++){var O=
"";this.maxRows=4;for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",y="";if(l){y+='<div class="ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&
x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+s[r]+'">'+q[r]+"</span></th>"}y+=z+"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q<z;Q++){y+="<tr>";var R=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(r)+"</td>";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(r.getTime()==
P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!D?"":" "+I[1]+(r.getTime()==u.getTime()?" "+this._currentClass:"")+(r.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!F||D)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+B+".datepicker._selectDay('#"+a.id+"',"+r.getMonth()+","+r.getFullYear()+', this);return false;"')+">"+(F&&!D?"&#xa0;":L?'<span class="ui-state-default">'+
r.getDate()+"</span>":'<a class="ui-state-default'+(r.getTime()==b.getTime()?" ui-state-highlight":"")+(r.getTime()==u.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+r.getDate()+"</a>")+"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+"</tr>"}g++;if(g>11){g=0;m++}y+="</tbody></table>"+(l?"</div>"+(i[0]>0&&G==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" >";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&
(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&l)?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,
e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" >";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?"&#xa0;":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+
(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input?
a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,
e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,
"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this;
if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a==
"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery);
;
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});
$(function(){
$("body").removeClass("coda-slider-no-js");
$(".coda-slider").children('.panel').hide().end().prepend('<p class="loading">Chargement...</p>');
});
var sliderCount = 1;
$.fn.codaSlider = function(settings) {
settings = $.extend({
autoHeight: true,
autoHeightEaseDuration: 1000,
autoHeightEaseFunction: "easeInOutExpo",
autoSlide: false,
autoSlideInterval: 7000,
autoSlideStopWhenClicked: true,
crossLinking: true,
dynamicArrows: true,
dynamicArrowLeftText: "<span>Prédécent</span>",
dynamicArrowRightText: "<span>Suivant</span>",
dynamicTabs: true,
dynamicTabsAlign: "center",
dynamicTabsPosition: "top",
externalTriggerSelector: "a.xtrig",
firstPanelToLoad: 1,
panelTitleSelector: "h2.title",
slideEaseDuration: 1000,
slideEaseFunction: "easeInOutExpo"
}, settings);
return this.each(function(){
var slider = $(this);
slider.css({'overflow':'hidden'});
if (settings.dynamicArrows) {
slider.parent().addClass("arrows");
slider.before('<div class="coda-nav-left" id="coda-nav-left-' + sliderCount + '"><a href="#">' + settings.dynamicArrowLeftText + '</a></div>');
slider.before('<div class="coda-nav-right" id="coda-nav-right-' + sliderCount + '"><a href="#">' + settings.dynamicArrowRightText + '</a></div>');
}
var panelWidth = slider.find(".panel").width();
var panelCount = slider.find(".panel").size();
var panelContainerWidth = panelWidth*panelCount;
var navClicks = 0; // Used if autoSlideStopWhenClicked = true
var mypanelConteneur = slider.next();
$('.panel', slider).wrapAll(mypanelConteneur);
$(".panel-container", slider).css({ width: panelContainerWidth });
if (settings.crossLinking && location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
var currentPanel = parseInt(location.hash.slice(1));
var offset = - (panelWidth*(currentPanel - 1));
$('.panel-container', slider).css({ marginLeft: offset });
} else if (settings.firstPanelToLoad != 1 && settings.firstPanelToLoad <= panelCount) {
var currentPanel = settings.firstPanelToLoad;
var offset = - (panelWidth*(currentPanel - 1));
$('.panel-container', slider).css({ marginLeft: offset });
} else {
var currentPanel = 1;
};
$("#coda-nav-left-" + sliderCount + " a").click(function(){
navClicks++;
if (currentPanel == 1) {
offset = - (panelWidth*(panelCount - 1));
alterPanelHeight(panelCount - 1);
currentPanel = panelCount;
slider.siblings('.coda-nav').find('a.current').removeClass('current').parents('ul').find('li:last a').addClass('current');
} else {
currentPanel -= 1;
alterPanelHeight(currentPanel - 1);
offset = - (panelWidth*(currentPanel - 1));
slider.siblings('.coda-nav').find('a.current').removeClass('current').parent().prev().find('a').addClass('current');
};
$('.panel-container', slider).animate({ marginLeft: offset });
if (settings.crossLinking) { location.hash = currentPanel }; // Change the URL hash (cross-linking)
return false;
});
$('#coda-nav-right-' + sliderCount + ' a').click(function(){
navClicks++;
if (currentPanel == panelCount) {
offset = 0;
currentPanel = 1;
alterPanelHeight(0);
slider.siblings('.coda-nav').find('a.current').removeClass('current').parents('ul').find('a:eq(0)').addClass('current');
} else {
offset = - (panelWidth*currentPanel);
alterPanelHeight(currentPanel);
currentPanel += 1;
slider.siblings('.coda-nav').find('a.current').removeClass('current').parent().next().find('a').addClass('current');
};
$('.panel-container', slider).animate({ marginLeft: offset });
if (settings.crossLinking) { location.hash = currentPanel }; // Change the URL hash (cross-linking)
return false;
});
if (settings.dynamicTabs) {
var dynamicTabs = '<div class="coda-nav" id="coda-nav-' + sliderCount + '"><ul></ul></div>';
switch (settings.dynamicTabsPosition) {
case "bottom":
slider.parent().append(dynamicTabs);
break;
default:
slider.parent().append(dynamicTabs);
break;
};
ul = $('#coda-nav-' + sliderCount + ' ul');
$('.panel', slider).each(function(n) {
$(this).attr('id', function(i, val) {  return val + "pannel" + (n+1)  });
ul.append('<li class="tab' + (n+1) + '"><a href="#' + "pannel" + (n+1) + '"  title="Slide numéro ' + (n+1) + '"  rel="bookmark"  ><span>' + $(this).find(settings.panelTitleSelector).text() + '</span></a></li>');
});
navContainerWidth = '';
ul.parent().css({ width: navContainerWidth });
switch (settings.dynamicTabsAlign) {
case "center":
ul.addClass('list-tab');
break;
case "right":
ul.css({ float: 'right' });
break;
};
};
$('#coda-nav-' + sliderCount + ' a').each(function(z) {
$(this).bind("click", function() {
navClicks++;
$(this).addClass('current').parents('ul').find('a').not($(this)).removeClass('current');
offset = - (panelWidth*z);
alterPanelHeight(z);
currentPanel = z + 1;
$('.panel-container', slider).css({ marginLeft: offset } );
if (!settings.crossLinking) { return false }; // Don't change the URL hash unless cross-linking is specified
});
$(this).keyup(function (event) {
if (event.keyCode == 9) {
navClicks++;
$(this).addClass('current').parents('ul').find('a').not($(this)).removeClass('current');
offset = - (panelWidth*z);
alterPanelHeight(z);
currentPanel = z + 1;
$('.panel-container', slider).css({ marginLeft: offset } );
if (!settings.crossLinking) { return false }; // Don't change the URL hash unless cross-linking is specified
}
});
});
$(settings.externalTriggerSelector).each(function() {
if (sliderCount == parseInt($(this).attr("rel").slice(12))) {
$(this).bind("click", function() {
navClicks++;
targetPanel = parseInt($(this).attr("href").slice(1));
offset = - (panelWidth*(targetPanel - 1));
alterPanelHeight(targetPanel - 1);
currentPanel = targetPanel;
slider.siblings('.coda-nav').find('a').removeClass('current').parents('ul').find('li:eq(' + (targetPanel - 1) + ') a').addClass('current');
$('.panel-container', slider).stop().animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
if (!settings.crossLinking) { return false }; // Don't change the URL hash unless cross-linking is specified
});
};
});
if (settings.crossLinking && location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
$("#coda-nav-" + sliderCount + " a:eq(" + (location.hash.slice(1) - 1) + ")").addClass("current");
} else if (settings.firstPanelToLoad != 1 && settings.firstPanelToLoad <= panelCount) {
$("#coda-nav-" + sliderCount + " a:eq(" + (settings.firstPanelToLoad - 1) + ")").addClass("current");
} else {
$("#coda-nav-" + sliderCount + " a:eq(0)").addClass("current");
};
if (settings.autoHeight) {
panelHeight = $('.panel:eq(' + (currentPanel - 1) + ')', slider).height();
slider.css({ 'min-height': panelHeight });
};
if (settings.autoSlide) {
slider.ready(function() {
setTimeout(autoSlide,settings.autoSlideInterval);
});
};
function alterPanelHeight(x) {
if (settings.autoHeight) {
panelHeight = $('.panel:eq(' + x + ')', slider).height()
slider.css({ 'min-height': 'panelHeight' });
};
};
function autoSlide() {
if (navClicks == 0 || !settings.autoSlideStopWhenClicked) {
if (currentPanel == panelCount) {
var offset = 0;
currentPanel = 1;
} else {
var offset = - (panelWidth*currentPanel);
currentPanel += 1;
};
alterPanelHeight(currentPanel - 1);
slider.siblings('.coda-nav').find('a').removeClass('current').parents('ul').find('li:eq(' + (currentPanel - 1) + ') a').addClass('current');
$('.panel-container', slider).stop().animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
setTimeout(autoSlide,settings.autoSlideInterval);
};
};
$('.panel', slider).show().end().find("p.loading").remove();
slider.removeClass("preload");
sliderCount++;
});
};
(function($){
var defaultOptions = {preloadImg:true};
var jqTransformImgPreloaded = false;
var jqTransformPreloadHoverFocusImg = function(strImgUrl) {
strImgUrl = strImgUrl.replace(/^url\((.*)\)/,'$1').replace(/^\"(.*)\"$/,'$1');
var imgHover = new Image();
imgHover.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-hover.$1');
var imgFocus = new Image();
imgFocus.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-focus.$1');
};
var jqTransformGetLabel = function(objfield){
var selfForm = $(objfield.get(0).form);
var oLabel = objfield.next();
if(!oLabel.is('label')) {
oLabel = objfield.prev();
if(oLabel.is('label')){
var inputname = objfield.attr('id');
if(inputname){
oLabel = selfForm.find('label[for="'+inputname+'"]');
}
}
}
if(oLabel.is('label')){return oLabel.css('cursor','pointer');}
return false;
};
var jqTransformHideSelect = function(oTarget){
var ulVisible = $('.jqTransformSelectWrapper ul:visible');
ulVisible.each(function(){
var oSelect = $(this).parents(".jqTransformSelectWrapper:first").find("select").get(0);
if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();}
});
};
var jqTransformCheckExternalClick = function(event) {
if ($(event.target).parents('.jqTransformSelectWrapper').length === 0) { jqTransformHideSelect($(event.target)); }
};
var jqTransformAddDocumentListener = function (){
$(document).mousedown(jqTransformCheckExternalClick);
};
var jqTransformReset = function(f){
var sel;
$('.jqTransformSelectWrapper select', f).each(function(){sel = (this.selectedIndex<0) ? 0 : this.selectedIndex; $('ul', $(this).parent()).each(function(){$('a:eq('+ sel +')', this).click();});});
$('a.jqTransformCheckbox, a.jqTransformRadio', f).removeClass('jqTransformChecked');
$('input:checkbox, input:radio', f).each(function(){if(this.checked){$('a', $(this).parent()).addClass('jqTransformChecked');}});
};
$.fn.jqTransInputButton = function(){
return this.each(function(){
var newBtn = $('<button id="'+ this.id +'" name="'+ this.name +'" type="'+ this.type +'" class="'+ this.className +' jqTransformButton"><span><span>'+ $(this).attr('value') +'</span></span>')
.hover(function(){newBtn.addClass('jqTransformButton_hover');},function(){newBtn.removeClass('jqTransformButton_hover')})
.mousedown(function(){newBtn.addClass('jqTransformButton_click')})
.mouseup(function(){newBtn.removeClass('jqTransformButton_click')})
;
$(this).replaceWith(newBtn);
});
};
$.fn.jqTransInputText = function(){
return this.each(function(){
var $input = $(this);
if($input.hasClass('jqtranformdone') || !$input.is('input')) {return;}
$input.addClass('jqtranformdone');
var oLabel = jqTransformGetLabel($(this));
oLabel && oLabel.bind('click',function(){$input.focus();});
var inputSize=$input.width();
if($input.attr('size')){
inputSize = $input.attr('size')*10;
$input.css('width',inputSize);
}
$input.addClass("jqTransformInput").wrap('<div class="jqTransformInputWrapper"><div class="jqTransformInputInner"><div></div></div></div>');
var $wrapper = $input.parent().parent().parent();
$wrapper.css("width", inputSize+10);
$input
.focus(function(){$wrapper.addClass("jqTransformInputWrapper_focus");})
.blur(function(){$wrapper.removeClass("jqTransformInputWrapper_focus");})
.hover(function(){$wrapper.addClass("jqTransformInputWrapper_hover");},function(){$wrapper.removeClass("jqTransformInputWrapper_hover");})
;
$.browser.safari && $wrapper.addClass('jqTransformSafari');
$.browser.safari && $input.css('width',$wrapper.width()+16);
this.wrapper = $wrapper;
});
};
$.fn.jqTransCheckBox = function(){
return this.each(function(){
if($(this).hasClass('jqTransformHidden')) {return;}
var $input = $(this);
var inputSelf = this;
var oLabel=jqTransformGetLabel($input);
oLabel && oLabel.click(function(){aLink.trigger('click');});
var aLink = $('<a href="#" class="jqTransformCheckbox"></a>');
$input.addClass('jqTransformHidden').wrap('<span class="jqTransformCheckboxWrapper"></span>').parent().prepend(aLink);
$input.change(function(){
this.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked');
return true;
});
aLink.click(function(){
if($input.attr('disabled')){return false;}
$input.trigger('click').trigger("change");
return false;
});
this.checked && aLink.addClass('jqTransformChecked');
});
};
$.fn.jqTransRadio = function(){
return this.each(function(){
if($(this).hasClass('jqTransformHidden')) {return;}
var $input = $(this);
var inputSelf = this;
oLabel = jqTransformGetLabel($input);
oLabel && oLabel.click(function(){aLink.trigger('click');});
var aLink = $('<a href="#" class="jqTransformRadio" rel="'+ this.name +'"></a>');
$input.addClass('jqTransformHidden').wrap('<span class="jqTransformRadioWrapper"></span>').parent().prepend(aLink);
$input.change(function(){
inputSelf.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked');
return true;
});
aLink.click(function(){
if($input.attr('disabled')){return false;}
$input.trigger('click').trigger('change');
$('input[name="'+$input.attr('name')+'"]',inputSelf.form).not($input).each(function(){
$(this).attr('type')=='radio' && $(this).trigger('change');
});
return false;
});
inputSelf.checked && aLink.addClass('jqTransformChecked');
});
};
$.fn.jqTransTextarea = function(){
return this.each(function(){
var textarea = $(this);
if(textarea.hasClass('jqtransformdone')) {return;}
textarea.addClass('jqtransformdone');
oLabel = jqTransformGetLabel(textarea);
oLabel && oLabel.click(function(){textarea.focus();});
var strTable = '<table cellspacing="0" cellpadding="0" border="0" class="jqTransformTextarea">';
strTable +='<tr><td id="jqTransformTextarea-tl"></td><td id="jqTransformTextarea-tm"></td><td id="jqTransformTextarea-tr"></td></tr>';
strTable +='<tr><td id="jqTransformTextarea-ml">&nbsp;</td><td id="jqTransformTextarea-mm"><div></div></td><td id="jqTransformTextarea-mr">&nbsp;</td></tr>';
strTable +='<tr><td id="jqTransformTextarea-bl"></td><td id="jqTransformTextarea-bm"></td><td id="jqTransformTextarea-br"></td></tr>';
strTable +='</table>';
var oTable = $(strTable)
.insertAfter(textarea)
.hover(function(){
!oTable.hasClass('jqTransformTextarea-focus') && oTable.addClass('jqTransformTextarea-hover');
},function(){
oTable.removeClass('jqTransformTextarea-hover');
})
;
textarea
.focus(function(){oTable.removeClass('jqTransformTextarea-hover').addClass('jqTransformTextarea-focus');})
.blur(function(){oTable.removeClass('jqTransformTextarea-focus');})
.appendTo($('#jqTransformTextarea-mm div',oTable))
;
this.oTable = oTable;
if($.browser.safari){
$('#jqTransformTextarea-mm',oTable)
.addClass('jqTransformSafariTextarea')
.find('div')
.css('height',textarea.height())
.css('width',textarea.width())
;
}
});
};
$.fn.jqTransSelect = function(){
return this.each(function(index){
var $select = $(this);
if($select.hasClass('jqTransformHidden')) {return;}
if($select.attr('multiple')) {return;}
var oLabel  =  jqTransformGetLabel($select);
var $wrapper = $select
.addClass('jqTransformHidden')
.wrap('<div class="jqTransformSelectWrapper"></div>')
.parent()
.css({zIndex: 10-index})
;
$wrapper.prepend('<div><span></span><a href="#" class="jqTransformSelectOpen"></a></div><ul></ul>');
var $ul = $('ul', $wrapper).css('width',$select.width()).hide();
$('option', this).each(function(i){
var oLi = $('<li><a href="#" index="'+ i +'">'+ $(this).html() +'</a></li>');
$ul.append(oLi);
});
$ul.find('a').click(function(){
$('a.selected', $wrapper).removeClass('selected');
$(this).addClass('selected');
if ($select[0].selectedIndex != $(this).attr('index') && $select[0].onchange) { $select[0].selectedIndex = $(this).attr('index'); $select[0].onchange(); }
$select[0].selectedIndex = $(this).attr('index');
$('span:eq(0)', $wrapper).html($(this).html());
$ul.hide();
return false;
});
$('a:eq('+ this.selectedIndex +')', $ul).click();
$('span:first', $wrapper).click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
oLabel && oLabel.click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
this.oLabel = oLabel;
var oLinkOpen = $('a.jqTransformSelectOpen', $wrapper)
.click(function(){
if( $ul.css('display') == 'none' ) {jqTransformHideSelect();}
if($select.attr('disabled')){return false;}
$ul.slideToggle('fast', function(){
var offSet = ($('a.selected', $ul).offset().top - $ul.offset().top);
$ul.animate({scrollTop: offSet});
});
return false;
})
;
var iSelectWidth = $select.outerWidth();
var oSpan = $('span:first',$wrapper);
var newWidth = (iSelectWidth > oSpan.innerWidth())?iSelectWidth+oLinkOpen.outerWidth():$wrapper.width();
$wrapper.css('width',newWidth);
$ul.css('width',newWidth-2);
oSpan.css({width:iSelectWidth});
$ul.css({display:'block',visibility:'hidden'});
var iSelectHeight = ($('li',$ul).length)*($('li:first',$ul).height());//+1 else bug ff
(iSelectHeight < $ul.height()) && $ul.css({height:iSelectHeight,'overflow':'hidden'});//hidden else bug with ff
$ul.css({display:'none',visibility:'visible'});
});
};
$.fn.jqTransform = function(options){
var opt = $.extend({},defaultOptions,options);
return this.each(function(){
var selfForm = $(this);
if(selfForm.hasClass('jqtransformdone')) {return;}
selfForm.addClass('jqtransformdone');
$('input:checkbox', this).jqTransCheckBox();
$('input:radio', this).jqTransRadio();
if( $('select', this).jqTransSelect().length > 0 ){jqTransformAddDocumentListener();}
selfForm.bind('reset',function(){var action = function(){jqTransformReset(this);}; window.setTimeout(action, 10);});
});
};
})(jQuery);
;(function($) {
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
loadingTimer, loadingFrame = 1,
titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
_abort = function() {
loading.hide();
imgPreloader.onerror = imgPreloader.onload = null;
if (ajaxLoader) {
ajaxLoader.abort();
}
tmp.empty();
},
_error = function() {
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
loading.hide();
busy = false;
return;
}
selectedOpts.titleShow = false;
selectedOpts.width = 'auto';
selectedOpts.height = 'auto';
tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
_process_inline();
},
_start = function() {
var obj = selectedArray[ selectedIndex ],
href,
type,
title,
str,
emb,
ret;
_abort();
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
if (ret === false) {
busy = false;
return;
} else if (typeof ret == 'object') {
selectedOpts = $.extend(selectedOpts, ret);
}
title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
if (obj.nodeName && !selectedOpts.orig) {
selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
}
if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
title = selectedOpts.orig.attr('alt');
}
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
if ((/^(?:javascript)/i).test(href) || href == '#') {
href = null;
}
if (selectedOpts.type) {
type = selectedOpts.type;
if (!href) {
href = selectedOpts.content;
}
} else if (selectedOpts.content) {
type = 'html';
} else if (href) {
if (href.match(imgRegExp)) {
type = 'image';
} else if (href.match(swfRegExp)) {
type = 'swf';
} else if ($(obj).hasClass("iframe")) {
type = 'iframe';
} else if (href.indexOf("#") === 0) {
type = 'inline';
} else {
type = 'ajax';
}
}
if (!type) {
_error();
return;
}
if (type == 'inline') {
obj	= href.substr(href.indexOf("#"));
type = $(obj).length > 0 ? 'inline' : 'ajax';
}
selectedOpts.type = type;
selectedOpts.href = href;
selectedOpts.title = title;
if (selectedOpts.autoDimensions) {
if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
selectedOpts.width = 'auto';
selectedOpts.height = 'auto';
} else {
selectedOpts.autoDimensions = false;
}
}
if (selectedOpts.modal) {
selectedOpts.overlayShow = true;
selectedOpts.hideOnOverlayClick = false;
selectedOpts.hideOnContentClick = false;
selectedOpts.enableEscapeButton = false;
selectedOpts.showCloseButton = false;
}
selectedOpts.padding = parseInt(selectedOpts.padding, 10);
selectedOpts.margin = parseInt(selectedOpts.margin, 10);
tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
$(this).replaceWith(content.children());
});
switch (type) {
case 'html' :
tmp.html( selectedOpts.content );
_process_inline();
break;
case 'inline' :
if ( $(obj).parent().is('#fancybox-content') === true) {
busy = false;
return;
}
$('<div class="fancybox-inline-tmp" />')
.hide()
.insertBefore( $(obj) )
.bind('fancybox-cleanup', function() {
$(this).replaceWith(content.children());
}).bind('fancybox-cancel', function() {
$(this).replaceWith(tmp.children());
});
$(obj).appendTo(tmp);
_process_inline();
break;
case 'image':
busy = false;
$.fancybox.showActivity();
imgPreloader = new Image();
imgPreloader.onerror = function() {
_error();
};
imgPreloader.onload = function() {
busy = true;
imgPreloader.onerror = imgPreloader.onload = null;
_process_image();
};
imgPreloader.src = href;
break;
case 'swf':
selectedOpts.scrolling = 'no';
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
emb = '';
$.each(selectedOpts.swf, function(name, val) {
str += '<param name="' + name + '" value="' + val + '"></param>';
emb += ' ' + name + '="' + val + '"';
});
str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
tmp.html(str);
_process_inline();
break;
case 'ajax':
busy = false;
$.fancybox.showActivity();
selectedOpts.ajax.win = selectedOpts.ajax.success;
ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
url	: href,
data : selectedOpts.ajax.data || {},
error : function(XMLHttpRequest, textStatus, errorThrown) {
if ( XMLHttpRequest.status > 0 ) {
_error();
}
},
success : function(data, textStatus, XMLHttpRequest) {
var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
if (o.status == 200) {
if ( typeof selectedOpts.ajax.win == 'function' ) {
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
if (ret === false) {
loading.hide();
return;
} else if (typeof ret == 'string' || typeof ret == 'object') {
data = ret;
}
}
tmp.html( data );
_process_inline();
}
}
}));
break;
case 'iframe':
_show();
break;
}
},
_process_inline = function() {
var
w = selectedOpts.width,
h = selectedOpts.height;
if (w.toString().indexOf('%') > -1) {
w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
} else {
w = w == 'auto' ? 'auto' : w + 'px';
}
if (h.toString().indexOf('%') > -1) {
h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
} else {
h = h == 'auto' ? 'auto' : h + 'px';
}
tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
selectedOpts.width = tmp.width();
selectedOpts.height = tmp.height();
_show();
},
_process_image = function() {
selectedOpts.width = imgPreloader.width;
selectedOpts.height = imgPreloader.height;
$("<img />").attr({
'id' : 'fancybox-img',
'src' : imgPreloader.src,
'alt' : selectedOpts.title
}).appendTo( tmp );
_show();
},
_show = function() {
var pos, equal;
loading.hide();
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
$.event.trigger('fancybox-cancel');
busy = false;
return;
}
busy = true;
$(content.add( overlay )).unbind();
$(window).unbind("resize.fb scroll.fb");
$(document).unbind('keydown.fb');
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
wrap.css('height', wrap.height());
}
currentArray = selectedArray;
currentIndex = selectedIndex;
currentOpts = selectedOpts;
if (currentOpts.overlayShow) {
overlay.css({
'background-color' : currentOpts.overlayColor,
'opacity' : currentOpts.overlayOpacity,
'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
'height' : $(document).height()
});
if (!overlay.is(':visible')) {
if (isIE6) {
$('select:not(#fancybox-tmp select)').filter(function() {
return this.style.visibility !== 'hidden';
}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
this.style.visibility = 'inherit';
});
}
overlay.show();
}
} else {
overlay.hide();
}
final_pos = _get_zoom_to();
_process_title();
if (wrap.is(":visible")) {
$( close.add( nav_left ).add( nav_right ) ).hide();
pos = wrap.position(),
start_pos = {
top	 : pos.top,
left : pos.left,
width : wrap.width(),
height : wrap.height()
};
equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
content.fadeTo(currentOpts.changeFade, 0.3, function() {
var finish_resizing = function() {
content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
};
$.event.trigger('fancybox-change');
content
.empty()
.removeAttr('filter')
.css({
'border-width' : currentOpts.padding,
'width'	: final_pos.width - currentOpts.padding * 2,
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
});
if (equal) {
finish_resizing();
} else {
fx.prop = 0;
$(fx).animate({prop: 1}, {
duration : currentOpts.changeSpeed,
easing : currentOpts.easingChange,
step : _draw,
complete : finish_resizing
});
}
});
return;
}
wrap.removeAttr("style");
content.css('border-width', currentOpts.padding);
if (currentOpts.transitionIn == 'elastic') {
start_pos = _get_zoom_from();
content.html( tmp.contents() );
wrap.show();
if (currentOpts.opacity) {
final_pos.opacity = 0;
}
fx.prop = 0;
$(fx).animate({prop: 1}, {
duration : currentOpts.speedIn,
easing : currentOpts.easingIn,
step : _draw,
complete : _finish
});
return;
}
if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
title.show();
}
content
.css({
'width' : final_pos.width - currentOpts.padding * 2,
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
})
.html( tmp.contents() );
wrap
.css(final_pos)
.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
},
_format_title = function(title) {
if (title && title.length) {
if (currentOpts.titlePosition == 'float') {
return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
}
return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
}
return false;
},
_process_title = function() {
titleStr = currentOpts.title || '';
titleHeight = 0;
title
.empty()
.removeAttr('style')
.removeClass();
if (currentOpts.titleShow === false) {
title.hide();
return;
}
titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
if (!titleStr || titleStr === '') {
title.hide();
return;
}
title
.addClass('fancybox-title-' + currentOpts.titlePosition)
.html( titleStr )
.appendTo( 'body' )
.show();
switch (currentOpts.titlePosition) {
case 'inside':
title
.css({
'width' : final_pos.width - (currentOpts.padding * 2),
'marginLeft' : currentOpts.padding,
'marginRight' : currentOpts.padding
});
titleHeight = title.outerHeight(true);
title.appendTo( outer );
final_pos.height += titleHeight;
break;
case 'over':
title
.css({
'marginLeft' : currentOpts.padding,
'width'	: final_pos.width - (currentOpts.padding * 2),
'bottom' : currentOpts.padding
})
.appendTo( outer );
break;
case 'float':
title
.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
.appendTo( wrap );
break;
default:
title
.css({
'width' : final_pos.width - (currentOpts.padding * 2),
'paddingLeft' : currentOpts.padding,
'paddingRight' : currentOpts.padding
})
.appendTo( wrap );
break;
}
title.hide();
},
_set_navigation = function() {
if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
$(document).bind('keydown.fb', function(e) {
if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
e.preventDefault();
$.fancybox.close();
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
e.preventDefault();
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
}
});
}
if (!currentOpts.showNavArrows) {
nav_left.hide();
nav_right.hide();
return;
}
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
nav_left.show();
}
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
nav_right.show();
}
},
_finish = function () {
if (!$.support.opacity) {
content.get(0).style.removeAttribute('filter');
wrap.get(0).style.removeAttribute('filter');
}
if (selectedOpts.autoDimensions) {
content.css('height', 'auto');
}
wrap.css('height', 'auto');
if (titleStr && titleStr.length) {
title.show();
}
if (currentOpts.showCloseButton) {
close.show();
}
_set_navigation();
if (currentOpts.hideOnContentClick)	{
content.bind('click', $.fancybox.close);
}
if (currentOpts.hideOnOverlayClick)	{
overlay.bind('click', $.fancybox.close);
}
$(window).bind("resize.fb", $.fancybox.resize);
if (currentOpts.centerOnScroll) {
$(window).bind("scroll.fb", $.fancybox.center);
}
if (currentOpts.type == 'iframe') {
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
}
wrap.show();
busy = false;
$.fancybox.center();
currentOpts.onComplete(currentArray, currentIndex, currentOpts);
_preload_images();
},
_preload_images = function() {
var href,
objNext;
if ((currentArray.length -1) > currentIndex) {
href = currentArray[ currentIndex + 1 ].href;
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
objNext = new Image();
objNext.src = href;
}
}
if (currentIndex > 0) {
href = currentArray[ currentIndex - 1 ].href;
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
objNext = new Image();
objNext.src = href;
}
}
},
_draw = function(pos) {
var dim = {
width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
};
if (typeof final_pos.opacity !== 'undefined') {
dim.opacity = pos < 0.5 ? 0.5 : pos;
}
wrap.css(dim);
content.css({
'width' : dim.width - currentOpts.padding * 2,
'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
});
},
_get_viewport = function() {
return [
$(window).width() - (currentOpts.margin * 2),
$(window).height() - (currentOpts.margin * 2),
$(document).scrollLeft() + currentOpts.margin,
$(document).scrollTop() + currentOpts.margin
];
},
_get_zoom_to = function () {
var view = _get_viewport(),
to = {},
resize = currentOpts.autoScale,
double_padding = currentOpts.padding * 2,
ratio;
if (currentOpts.width.toString().indexOf('%') > -1) {
to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
} else {
to.width = currentOpts.width + double_padding;
}
if (currentOpts.height.toString().indexOf('%') > -1) {
to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
} else {
to.height = currentOpts.height + double_padding;
}
if (resize && (to.width > view[0] || to.height > view[1])) {
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
ratio = (currentOpts.width ) / (currentOpts.height );
if ((to.width ) > view[0]) {
to.width = view[0];
to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
}
if ((to.height) > view[1]) {
to.height = view[1];
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
}
} else {
to.width = Math.min(to.width, view[0]);
to.height = Math.min(to.height, view[1]);
}
}
to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
return to;
},
_get_obj_pos = function(obj) {
var pos = obj.offset();
pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
pos.width = obj.width();
pos.height = obj.height();
return pos;
},
_get_zoom_from = function() {
var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
from = {},
pos,
view;
if (orig && orig.length) {
pos = _get_obj_pos(orig);
from = {
width : pos.width + (currentOpts.padding * 2),
height : pos.height + (currentOpts.padding * 2),
top	: pos.top - currentOpts.padding - 20,
left : pos.left - currentOpts.padding - 20
};
} else {
view = _get_viewport();
from = {
width : currentOpts.padding * 2,
height : currentOpts.padding * 2,
top	: parseInt(view[3] + view[1] * 0.5, 10),
left : parseInt(view[2] + view[0] * 0.5, 10)
};
}
return from;
},
_animate_loading = function() {
if (!loading.is(':visible')){
clearInterval(loadingTimer);
return;
}
$('div', loading).css('top', (loadingFrame * -40) + 'px');
loadingFrame = (loadingFrame + 1) % 12;
};
$.fn.fancybox = function(options) {
if (!$(this).length) {
return this;
}
$(this)
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
.unbind('click.fb')
.bind('click.fb', function(e) {
e.preventDefault();
if (busy) {
return;
}
busy = true;
$(this).blur();
selectedArray = [];
selectedIndex = 0;
var rel = $(this).attr('rel') || '';
if (!rel || rel == '' || rel === 'nofollow') {
selectedArray.push(this);
} else {
selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
selectedIndex = selectedArray.index( this );
}
_start();
return;
});
return this;
};
$.fancybox = function(obj) {
var opts;
if (busy) {
return;
}
busy = true;
opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
selectedArray = [];
selectedIndex = parseInt(opts.index, 10) || 0;
if ($.isArray(obj)) {
for (var i = 0, j = obj.length; i < j; i++) {
if (typeof obj[i] == 'object') {
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
} else {
obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
}
}
selectedArray = jQuery.merge(selectedArray, obj);
} else {
if (typeof obj == 'object') {
$(obj).data('fancybox', $.extend({}, opts, obj));
} else {
obj = $({}).data('fancybox', $.extend({content : obj}, opts));
}
selectedArray.push(obj);
}
if (selectedIndex > selectedArray.length || selectedIndex < 0) {
selectedIndex = 0;
}
_start();
};
$.fancybox.showActivity = function() {
clearInterval(loadingTimer);
loading.show();
loadingTimer = setInterval(_animate_loading, 66);
};
$.fancybox.hideActivity = function() {
loading.hide();
};
$.fancybox.next = function() {
return $.fancybox.pos( currentIndex + 1);
};
$.fancybox.prev = function() {
return $.fancybox.pos( currentIndex - 1);
};
$.fancybox.pos = function(pos) {
if (busy) {
return;
}
pos = parseInt(pos);
selectedArray = currentArray;
if (pos > -1 && pos < currentArray.length) {
selectedIndex = pos;
_start();
} else if (currentOpts.cyclic && currentArray.length > 1) {
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
_start();
}
return;
};
$.fancybox.cancel = function() {
if (busy) {
return;
}
busy = true;
$.event.trigger('fancybox-cancel');
_abort();
selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
busy = false;
};
$.fancybox.close = function() {
if (busy || wrap.is(':hidden')) {
return;
}
busy = true;
if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
busy = false;
return;
}
_abort();
$(close.add( nav_left ).add( nav_right )).hide();
$(content.add( overlay )).unbind();
$(window).unbind("resize.fb scroll.fb");
$(document).unbind('keydown.fb');
content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
if (currentOpts.titlePosition !== 'inside') {
title.empty();
}
wrap.stop();
function _cleanup() {
overlay.fadeOut('fast');
title.empty().hide();
wrap.hide();
$.event.trigger('fancybox-cleanup');
content.empty();
currentOpts.onClosed(currentArray, currentIndex, currentOpts);
currentArray = selectedOpts	= [];
currentIndex = selectedIndex = 0;
currentOpts = selectedOpts	= {};
busy = false;
}
if (currentOpts.transitionOut == 'elastic') {
start_pos = _get_zoom_from();
var pos = wrap.position();
final_pos = {
top	 : pos.top ,
left : pos.left,
width :	wrap.width(),
height : wrap.height()
};
if (currentOpts.opacity) {
final_pos.opacity = 1;
}
title.empty().hide();
fx.prop = 1;
$(fx).animate({ prop: 0 }, {
duration : currentOpts.speedOut,
easing : currentOpts.easingOut,
step : _draw,
complete : _cleanup
});
} else {
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
}
};
$.fancybox.resize = function() {
if (overlay.is(':visible')) {
overlay.css('height', $(document).height());
}
$.fancybox.center(true);
};
$.fancybox.center = function() {
var view, align;
if (busy) {
return;
}
align = arguments[0] === true ? 1 : 0;
view = _get_viewport();
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
return;
}
wrap
.stop()
.animate({
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
}, typeof arguments[0] == 'number' ? arguments[0] : 200);
};
$.fancybox.init = function() {
if ($("#fancybox-wrap").length) {
return;
}
$('body').append(
tmp	= $('<div id="fancybox-tmp"></div>'),
loading	= $('<div id="fancybox-loading"><div></div></div>'),
overlay	= $('<div id="fancybox-overlay"></div>'),
wrap = $('<div id="fancybox-wrap"></div>')
);
outer = $('<div id="fancybox-outer"></div>')
.append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
.appendTo( wrap );
outer.append(
content = $('<div id="fancybox-content"></div>'),
close = $('<a id="fancybox-close"></a>'),
title = $('<div id="fancybox-title"></div>'),
nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
);
close.click($.fancybox.close);
loading.click($.fancybox.cancel);
nav_left.click(function(e) {
e.preventDefault();
$.fancybox.prev();
});
nav_right.click(function(e) {
e.preventDefault();
$.fancybox.next();
});
if ($.fn.mousewheel) {
wrap.bind('mousewheel.fb', function(e, delta) {
if (busy) {
e.preventDefault();
} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
e.preventDefault();
$.fancybox[ delta > 0 ? 'prev' : 'next']();
}
});
}
if (!$.support.opacity) {
wrap.addClass('fancybox-ie');
}
if (isIE6) {
loading.addClass('fancybox-ie6');
wrap.addClass('fancybox-ie6');
$('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
}
};
$.fn.fancybox.defaults = {
padding : 10,
margin : 40,
opacity : false,
modal : false,
cyclic : false,
scrolling : 'auto',	// 'auto', 'yes' or 'no'
width : 560,
height : 340,
autoScale : true,
autoDimensions : true,
centerOnScroll : false,
ajax : {},
swf : { wmode: 'transparent' },
hideOnOverlayClick : true,
hideOnContentClick : false,
overlayShow : true,
overlayOpacity : 0.7,
overlayColor : '#777',
titleShow : true,
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
titleFormat : null,
titleFromAlt : false,
transitionIn : 'fade', // 'elastic', 'fade' or 'none'
transitionOut : 'fade', // 'elastic', 'fade' or 'none'
speedIn : 300,
speedOut : 300,
changeSpeed : 300,
changeFade : 'fast',
easingIn : 'swing',
easingOut : 'swing',
showCloseButton	 : true,
showNavArrows : true,
enableEscapeButton : true,
enableKeyboardNav : true,
onStart : function(){},
onCancel : function(){},
onComplete : function(){},
onCleanup : function(){},
onClosed : function(){},
onError : function(){}
};
$(document).ready(function() {
$.fancybox.init();
});
})(jQuery);
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
if(typeof jwplayer=="undefined"){var jwplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a)}};var $jw=jwplayer;jwplayer.version="5.7.1896";jwplayer.vid=document.createElement("video");jwplayer.audio=document.createElement("audio");jwplayer.source=document.createElement("source");(function(b){b.utils=function(){};b.utils.typeOf=function(d){var c=typeof d;if(c==="object"){if(d){if(d instanceof Array){c="array"}}else{c="null"}}return c};b.utils.extend=function(){var c=b.utils.extend["arguments"];if(c.length>1){for(var e=1;e<c.length;e++){for(var d in c[e]){c[0][d]=c[e][d]}}return c[0]}return null};b.utils.clone=function(f){var c;var d=b.utils.clone["arguments"];if(d.length==1){switch(b.utils.typeOf(d[0])){case"object":c={};for(var e in d[0]){c[e]=b.utils.clone(d[0][e])}break;case"array":c=[];for(var e in d[0]){c[e]=b.utils.clone(d[0][e])}break;default:return d[0];break}}return c};b.utils.extension=function(c){if(!c){return""}c=c.substring(c.lastIndexOf("/")+1,c.length);c=c.split("?")[0];if(c.lastIndexOf(".")>-1){return c.substr(c.lastIndexOf(".")+1,c.length).toLowerCase()}return};b.utils.html=function(c,d){c.innerHTML=d};b.utils.wrap=function(c,d){if(c.parentNode){c.parentNode.replaceChild(d,c)}d.appendChild(c)};b.utils.ajax=function(g,f,c){var e;if(window.XMLHttpRequest){e=new XMLHttpRequest()}else{e=new ActiveXObject("Microsoft.XMLHTTP")}e.onreadystatechange=function(){if(e.readyState===4){if(e.status===200){if(f){f(e)}}else{if(c){c(g)}}}};try{e.open("GET",g,true);e.send(null)}catch(d){if(c){c(g)}}return e};b.utils.load=function(d,e,c){d.onreadystatechange=function(){if(d.readyState===4){if(d.status===200){if(e){e()}}else{if(c){c()}}}}};b.utils.find=function(d,c){return d.getElementsByTagName(c)};b.utils.append=function(c,d){c.appendChild(d)};b.utils.isIE=function(){return((!+"\v1")||(typeof window.ActiveXObject!="undefined"))};b.utils.isLegacyAndroid=function(){var c=navigator.userAgent.toLowerCase();return(c.match(/android 2.[012]/i)!==null)};b.utils.isIOS=function(d){if(typeof d=="undefined"){d=/iP(hone|ad|od)/i}var c=navigator.userAgent.toLowerCase();return(c.match(d)!==null)};b.utils.isIPad=function(){return b.utils.isIOS(/iPad/i)};b.utils.isIPod=function(){return b.utils.isIOS(/iP(hone|od)/i)};b.utils.getFirstPlaylistItemFromConfig=function(c){var d={};var e;if(c.playlist&&c.playlist.length){e=c.playlist[0]}else{e=c}d.file=e.file;d.levels=e.levels;d.streamer=e.streamer;d.playlistfile=e.playlistfile;d.provider=e.provider;if(!d.provider){if(d.file&&(d.file.toLowerCase().indexOf("youtube.com")>-1||d.file.toLowerCase().indexOf("youtu.be")>-1)){d.provider="youtube"}if(d.streamer&&d.streamer.toLowerCase().indexOf("rtmp://")==0){d.provider="rtmp"}if(e.type){d.provider=e.type.toLowerCase()}}if(d.provider=="audio"){d.provider="sound"}return d};b.utils.getOuterHTML=function(c){if(c.outerHTML){return c.outerHTML}else{try{return new XMLSerializer().serializeToString(c)}catch(d){return""}}};b.utils.setOuterHTML=function(f,e){if(f.outerHTML){f.outerHTML=e}else{var g=document.createElement("div");g.innerHTML=e;var c=document.createRange();c.selectNodeContents(g);var d=c.extractContents();f.parentNode.insertBefore(d,f);f.parentNode.removeChild(f)}};b.utils.hasFlash=function(){if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined"){return true}if(typeof window.ActiveXObject!="undefined"){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(c){}}return false};b.utils.getPluginName=function(c){if(c.lastIndexOf("/")>=0){c=c.substring(c.lastIndexOf("/")+1,c.length)}if(c.lastIndexOf("-")>=0){c=c.substring(0,c.lastIndexOf("-"))}if(c.lastIndexOf(".swf")>=0){c=c.substring(0,c.lastIndexOf(".swf"))}if(c.lastIndexOf(".js")>=0){c=c.substring(0,c.lastIndexOf(".js"))}return c};b.utils.getPluginVersion=function(c){if(c.lastIndexOf("-")>=0){if(c.lastIndexOf(".js")>=0){return c.substring(c.lastIndexOf("-")+1,c.lastIndexOf(".js"))}else{if(c.lastIndexOf(".swf")>=0){return c.substring(c.lastIndexOf("-")+1,c.lastIndexOf(".swf"))}else{return c.substring(c.lastIndexOf("-")+1)}}}return""};b.utils.getAbsolutePath=function(j,h){if(!b.utils.exists(h)){h=document.location.href}if(!b.utils.exists(j)){return undefined}if(a(j)){return j}var k=h.substring(0,h.indexOf("://")+3);var g=h.substring(k.length,h.indexOf("/",k.length+1));var d;if(j.indexOf("/")===0){d=j.split("/")}else{var e=h.split("?")[0];e=e.substring(k.length+g.length+1,e.lastIndexOf("/"));d=e.split("/").concat(j.split("/"))}var c=[];for(var f=0;f<d.length;f++){if(!d[f]||!b.utils.exists(d[f])||d[f]=="."){continue}else{if(d[f]==".."){c.pop()}else{c.push(d[f])}}}return k+g+"/"+c.join("/")};function a(d){if(!b.utils.exists(d)){return}var e=d.indexOf("://");var c=d.indexOf("?");return(e>0&&(c<0||(c>e)))}b.utils.pluginPathType={ABSOLUTE:"ABSOLUTE",RELATIVE:"RELATIVE",CDN:"CDN"};b.utils.getPluginPathType=function(d){if(typeof d!="string"){return}d=d.split("?")[0];var e=d.indexOf("://");if(e>0){return b.utils.pluginPathType.ABSOLUTE}var c=d.indexOf("/");var f=b.utils.extension(d);if(e<0&&c<0&&(!f||!isNaN(f))){return b.utils.pluginPathType.CDN}return b.utils.pluginPathType.RELATIVE};b.utils.mapEmpty=function(c){for(var d in c){return false}return true};b.utils.mapLength=function(d){var c=0;for(var e in d){c++}return c};b.utils.log=function(d,c){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(c){console.log(d,c)}else{console.log(d)}}};b.utils.css=function(d,g,c){if(b.utils.exists(d)){for(var e in g){try{if(typeof g[e]==="undefined"){continue}else{if(typeof g[e]=="number"&&!(e=="zIndex"||e=="opacity")){if(isNaN(g[e])){continue}if(e.match(/color/i)){g[e]="#"+b.utils.strings.pad(g[e].toString(16),6)}else{g[e]=Math.ceil(g[e])+"px"}}}d.style[e]=g[e]}catch(f){}}}};b.utils.isYouTube=function(c){return(c.indexOf("youtube.com")>-1||c.indexOf("youtu.be")>-1)};b.utils.transform=function(c,d){c.style.webkitTransform=d;c.style.MozTransform=d;c.style.OTransform=d};b.utils.stretch=function(h,n,m,f,l,g){if(typeof m=="undefined"||typeof f=="undefined"||typeof l=="undefined"||typeof g=="undefined"){return}var d=m/l;var e=f/g;var k=0;var j=0;n.style.overflow="hidden";b.utils.transform(n,"");var c={};switch(h.toUpperCase()){case b.utils.stretching.NONE:c.width=l;c.height=g;break;case b.utils.stretching.UNIFORM:if(d>e){c.width=l*e;c.height=g*e}else{c.width=l*d;c.height=g*d}break;case b.utils.stretching.FILL:if(d>e){c.width=l*d;c.height=g*d}else{c.width=l*e;c.height=g*e}break;case b.utils.stretching.EXACTFIT:b.utils.transform(n,["scale(",d,",",e,")"," translate(0px,0px)"].join(""));c.width=l;c.height=g;break;default:break}c.top=(f-c.height)/2;c.left=(m-c.width)/2;b.utils.css(n,c)};b.utils.stretching={NONE:"NONE",FILL:"FILL",UNIFORM:"UNIFORM",EXACTFIT:"EXACTFIT"};b.utils.deepReplaceKeyName=function(h,e,c){switch(b.utils.typeOf(h)){case"array":for(var g=0;g<h.length;g++){h[g]=b.utils.deepReplaceKeyName(h[g],e,c)}break;case"object":for(var f in h){var d=f.replace(new RegExp(e,"g"),c);h[d]=b.utils.deepReplaceKeyName(h[f],e,c);if(f!=d){delete h[f]}}break}return h};b.utils.isInArray=function(e,d){if(!(e)||!(e instanceof Array)){return false}for(var c=0;c<e.length;c++){if(d===e[c]){return true}}return false};b.utils.exists=function(c){switch(typeof(c)){case"string":return(c.length>0);break;case"object":return(c!==null);case"undefined":return false}return true};b.utils.empty=function(c){if(typeof c.hasChildNodes=="function"){while(c.hasChildNodes()){c.removeChild(c.firstChild)}}};b.utils.parseDimension=function(c){if(typeof c=="string"){if(c===""){return 0}else{if(c.lastIndexOf("%")>-1){return c}else{return parseInt(c.replace("px",""),10)}}}return c};b.utils.getDimensions=function(c){if(c&&c.style){return{x:b.utils.parseDimension(c.style.left),y:b.utils.parseDimension(c.style.top),width:b.utils.parseDimension(c.style.width),height:b.utils.parseDimension(c.style.height)}}else{return{}}};b.utils.timeFormat=function(c){str="00:00";if(c>0){str=Math.floor(c/60)<10?"0"+Math.floor(c/60)+":":Math.floor(c/60)+":";str+=Math.floor(c%60)<10?"0"+Math.floor(c%60):Math.floor(c%60)}return str}})(jwplayer);(function(a){a.events=function(){};a.events.COMPLETE="COMPLETE";a.events.ERROR="ERROR"})(jwplayer);(function(jwplayer){jwplayer.events.eventdispatcher=function(debug){var _debug=debug;var _listeners;var _globallisteners;this.resetEventListeners=function(){_listeners={};_globallisteners=[]};this.resetEventListeners();this.addEventListener=function(type,listener,count){try{if(!jwplayer.utils.exists(_listeners[type])){_listeners[type]=[]}if(typeof(listener)=="string"){eval("listener = "+listener)}_listeners[type].push({listener:listener,count:count})}catch(err){jwplayer.utils.log("error",err)}return false};this.removeEventListener=function(type,listener){if(!_listeners[type]){return}try{for(var listenerIndex=0;listenerIndex<_listeners[type].length;listenerIndex++){if(_listeners[type][listenerIndex].listener.toString()==listener.toString()){_listeners[type].splice(listenerIndex,1);break}}}catch(err){jwplayer.utils.log("error",err)}return false};this.addGlobalListener=function(listener,count){try{if(typeof(listener)=="string"){eval("listener = "+listener)}_globallisteners.push({listener:listener,count:count})}catch(err){jwplayer.utils.log("error",err)}return false};this.removeGlobalListener=function(listener){if(!_globallisteners[type]){return}try{for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){if(_globallisteners[globalListenerIndex].listener.toString()==listener.toString()){_globallisteners.splice(globalListenerIndex,1);break}}}catch(err){jwplayer.utils.log("error",err)}return false};this.sendEvent=function(type,data){if(!jwplayer.utils.exists(data)){data={}}if(_debug){jwplayer.utils.log(type,data)}if(typeof _listeners[type]!="undefined"){for(var listenerIndex=0;listenerIndex<_listeners[type].length;listenerIndex++){try{_listeners[type][listenerIndex].listener(data)}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_listeners[type][listenerIndex].listener)}if(_listeners[type][listenerIndex]){if(_listeners[type][listenerIndex].count===1){delete _listeners[type][listenerIndex]}else{if(_listeners[type][listenerIndex].count>0){_listeners[type][listenerIndex].count=_listeners[type][listenerIndex].count-1}}}}}for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){try{_globallisteners[globalListenerIndex].listener(data)}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_globallisteners[globalListenerIndex].listener)}if(_globallisteners[globalListenerIndex]){if(_globallisteners[globalListenerIndex].count===1){delete _globallisteners[globalListenerIndex]}else{if(_globallisteners[globalListenerIndex].count>0){_globallisteners[globalListenerIndex].count=_globallisteners[globalListenerIndex].count-1}}}}}}})(jwplayer);(function(a){var b={};a.utils.animations=function(){};a.utils.animations.transform=function(c,d){c.style.webkitTransform=d;c.style.MozTransform=d;c.style.OTransform=d;c.style.msTransform=d};a.utils.animations.transformOrigin=function(c,d){c.style.webkitTransformOrigin=d;c.style.MozTransformOrigin=d;c.style.OTransformOrigin=d;c.style.msTransformOrigin=d};a.utils.animations.rotate=function(c,d){a.utils.animations.transform(c,["rotate(",d,"deg)"].join(""))};a.utils.cancelAnimation=function(c){delete b[c.id]};a.utils.fadeTo=function(m,f,e,j,h,d){if(b[m.id]!=d&&a.utils.exists(d)){return}if(m.style.opacity==f){return}var c=new Date().getTime();if(d>c){setTimeout(function(){a.utils.fadeTo(m,f,e,j,0,d)},d-c)}if(m.style.display=="none"){m.style.display="block"}if(!a.utils.exists(j)){j=m.style.opacity===""?1:m.style.opacity}if(m.style.opacity==f&&m.style.opacity!==""&&a.utils.exists(d)){if(f===0){m.style.display="none"}return}if(!a.utils.exists(d)){d=c;b[m.id]=d}if(!a.utils.exists(h)){h=0}var k=(e>0)?((c-d)/(e*1000)):0;k=k>1?1:k;var l=f-j;var g=j+(k*l);if(g>1){g=1}else{if(g<0){g=0}}m.style.opacity=g;if(h>0){b[m.id]=d+h*1000;a.utils.fadeTo(m,f,e,j,0,b[m.id]);return}setTimeout(function(){a.utils.fadeTo(m,f,e,j,0,d)},10)}})(jwplayer);(function(a){a.utils.arrays=function(){};a.utils.arrays.indexOf=function(c,d){for(var b=0;b<c.length;b++){if(c[b]==d){return b}}return -1};a.utils.arrays.remove=function(c,d){var b=a.utils.arrays.indexOf(c,d);if(b>-1){c.splice(b,1)}}})(jwplayer);(function(a){a.utils.extensionmap={"3gp":{html5:"video/3gpp",flash:"video"},"3gpp":{html5:"video/3gpp"},"3g2":{html5:"video/3gpp2",flash:"video"},"3gpp2":{html5:"video/3gpp2"},flv:{flash:"video"},f4a:{html5:"audio/mp4"},f4b:{html5:"audio/mp4",flash:"video"},f4v:{html5:"video/mp4",flash:"video"},mov:{html5:"video/quicktime",flash:"video"},m4a:{html5:"audio/mp4",flash:"video"},m4b:{html5:"audio/mp4"},m4p:{html5:"audio/mp4"},m4v:{html5:"video/mp4",flash:"video"},mp4:{html5:"video/mp4",flash:"video"},rbs:{flash:"sound"},aac:{html5:"audio/aac",flash:"video"},mp3:{html5:"audio/mp3",flash:"sound"},ogg:{html5:"audio/ogg"},oga:{html5:"audio/ogg"},ogv:{html5:"video/ogg"},webm:{html5:"video/webm"},m3u8:{html5:"audio/x-mpegurl"},gif:{flash:"image"},jpeg:{flash:"image"},jpg:{flash:"image"},swf:{flash:"image"},png:{flash:"image"},wav:{html5:"audio/x-wav"}}})(jwplayer);(function(e){e.utils.mediaparser=function(){};var g={element:{width:"width",height:"height",id:"id","class":"className",name:"name"},media:{src:"file",preload:"preload",autoplay:"autostart",loop:"repeat",controls:"controls"},source:{src:"file",type:"type",media:"media","data-jw-width":"width","data-jw-bitrate":"bitrate"},video:{poster:"image"}};var f={};e.utils.mediaparser.parseMedia=function(j){return d(j)};function c(k,j){if(!e.utils.exists(j)){j=g[k]}else{e.utils.extend(j,g[k])}return j}function d(n,j){if(f[n.tagName.toLowerCase()]&&!e.utils.exists(j)){return f[n.tagName.toLowerCase()](n)}else{j=c("element",j);var o={};for(var k in j){if(k!="length"){var m=n.getAttribute(k);if(e.utils.exists(m)){o[j[k]]=m}}}var l=n.style["#background-color"];if(l&&!(l=="transparent"||l=="rgba(0, 0, 0, 0)")){o.screencolor=l}return o}}function h(n,k){k=c("media",k);var l=[];var j=e.utils.selectors("source",n);for(var m in j){if(!isNaN(m)){l.push(a(j[m]))}}var o=d(n,k);if(e.utils.exists(o.file)){l[0]={file:o.file}}o.levels=l;return o}function a(l,k){k=c("source",k);var j=d(l,k);j.width=j.width?j.width:0;j.bitrate=j.bitrate?j.bitrate:0;return j}function b(l,k){k=c("video",k);var j=h(l,k);return j}f.media=h;f.audio=h;f.source=a;f.video=b})(jwplayer);(function(a){a.utils.loaderstatus={NEW:"NEW",LOADING:"LOADING",ERROR:"ERROR",COMPLETE:"COMPLETE"};a.utils.scriptloader=function(c){var d=a.utils.loaderstatus.NEW;var b=new a.events.eventdispatcher();a.utils.extend(this,b);this.load=function(){if(d==a.utils.loaderstatus.NEW){d=a.utils.loaderstatus.LOADING;var e=document.createElement("script");e.onload=function(f){d=a.utils.loaderstatus.COMPLETE;b.sendEvent(a.events.COMPLETE)};e.onerror=function(f){d=a.utils.loaderstatus.ERROR;b.sendEvent(a.events.ERROR)};e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){d=a.utils.loaderstatus.COMPLETE;b.sendEvent(a.events.COMPLETE)}};document.getElementsByTagName("head")[0].appendChild(e);e.src=c}};this.getStatus=function(){return d}}})(jwplayer);(function(a){a.utils.selectors=function(b,e){if(!a.utils.exists(e)){e=document}b=a.utils.strings.trim(b);var c=b.charAt(0);if(c=="#"){return e.getElementById(b.substr(1))}else{if(c=="."){if(e.getElementsByClassName){return e.getElementsByClassName(b.substr(1))}else{return a.utils.selectors.getElementsByTagAndClass("*",b.substr(1))}}else{if(b.indexOf(".")>0){var d=b.split(".");return a.utils.selectors.getElementsByTagAndClass(d[0],d[1])}else{return e.getElementsByTagName(b)}}}return null};a.utils.selectors.getElementsByTagAndClass=function(e,h,g){var j=[];if(!a.utils.exists(g)){g=document}var f=g.getElementsByTagName(e);for(var d=0;d<f.length;d++){if(a.utils.exists(f[d].className)){var c=f[d].className.split(" ");for(var b=0;b<c.length;b++){if(c[b]==h){j.push(f[d])}}}}return j}})(jwplayer);(function(a){a.utils.strings=function(){};a.utils.strings.trim=function(b){return b.replace(/^\s*/,"").replace(/\s*$/,"")};a.utils.strings.pad=function(c,d,b){if(!b){b="0"}while(c.length<d){c=b+c}return c};a.utils.strings.serialize=function(b){if(b==null){return null}else{if(b=="true"){return true}else{if(b=="false"){return false}else{if(isNaN(Number(b))||b.length>5||b.length==0){return b}else{return Number(b)}}}}};a.utils.strings.seconds=function(d){d=d.replace(",",".");var b=d.split(":");var c=0;if(d.substr(-1)=="s"){c=Number(d.substr(0,d.length-1))}else{if(d.substr(-1)=="m"){c=Number(d.substr(0,d.length-1))*60}else{if(d.substr(-1)=="h"){c=Number(d.substr(0,d.length-1))*3600}else{if(b.length>1){c=Number(b[b.length-1]);c+=Number(b[b.length-2])*60;if(b.length==3){c+=Number(b[b.length-3])*3600}}else{c=Number(d)}}}}return c};a.utils.strings.xmlAttribute=function(b,c){for(var d=0;d<b.attributes.length;d++){if(b.attributes[d].name&&b.attributes[d].name.toLowerCase()==c.toLowerCase()){return b.attributes[d].value.toString()}}return""};a.utils.strings.jsonToString=function(f){var h=h||{};if(h&&h.stringify){return h.stringify(f)}var c=typeof(f);if(c!="object"||f===null){if(c=="string"){f='"'+f+'"'}else{return String(f)}}else{var g=[],b=(f&&f.constructor==Array);for(var d in f){var e=f[d];switch(typeof(e)){case"string":e='"'+e+'"';break;case"object":if(a.utils.exists(e)){e=a.utils.strings.jsonToString(e)}break}if(b){if(typeof(e)!="function"){g.push(String(e))}}else{if(typeof(e)!="function"){g.push('"'+d+'":'+String(e))}}}if(b){return"["+String(g)+"]"}else{return"{"+String(g)+"}"}}}})(jwplayer);(function(c){var d=new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/);c.utils.typechecker=function(g,f){f=!c.utils.exists(f)?b(g):f;return e(g,f)};function b(f){var g=["true","false","t","f"];if(g.toString().indexOf(f.toLowerCase().replace(" ",""))>=0){return"boolean"}else{if(d.test(f)){return"color"}else{if(!isNaN(parseInt(f,10))&&parseInt(f,10).toString().length==f.length){return"integer"}else{if(!isNaN(parseFloat(f))&&parseFloat(f).toString().length==f.length){return"float"}}}}return"string"}function e(g,f){if(!c.utils.exists(f)){return g}switch(f){case"color":if(g.length>0){return a(g)}return null;case"integer":return parseInt(g,10);case"float":return parseFloat(g);case"boolean":if(g.toLowerCase()=="true"){return true}else{if(g=="1"){return true}}return false}return g}function a(f){switch(f.toLowerCase()){case"blue":return parseInt("0000FF",16);case"green":return parseInt("00FF00",16);case"red":return parseInt("FF0000",16);case"cyan":return parseInt("00FFFF",16);case"magenta":return parseInt("FF00FF",16);case"yellow":return parseInt("FFFF00",16);case"black":return parseInt("000000",16);case"white":return parseInt("FFFFFF",16);default:f=f.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(f.length==3){f=f.charAt(0)+f.charAt(0)+f.charAt(1)+f.charAt(1)+f.charAt(2)+f.charAt(2)}return parseInt(f,16)}return parseInt("000000",16)}})(jwplayer);(function(a){a.utils.parsers=function(){};a.utils.parsers.localName=function(b){if(!b){return""}else{if(b.localName){return b.localName}else{if(b.baseName){return b.baseName}else{return""}}}};a.utils.parsers.textContent=function(b){if(!b){return""}else{if(b.textContent){return b.textContent}else{if(b.text){return b.text}else{return""}}}}})(jwplayer);(function(a){a.utils.parsers.jwparser=function(){};a.utils.parsers.jwparser.PREFIX="jwplayer";a.utils.parsers.jwparser.parseEntry=function(c,d){for(var b=0;b<c.childNodes.length;b++){if(c.childNodes[b].prefix==a.utils.parsers.jwparser.PREFIX){d[a.utils.parsers.localName(c.childNodes[b])]=a.utils.strings.serialize(a.utils.parsers.textContent(c.childNodes[b]))}if(!d.file&&String(d.link).toLowerCase().indexOf("youtube")>-1){d.file=d.link}}return d};a.utils.parsers.jwparser.getProvider=function(c){if(c.type){return c.type}else{if(c.file.indexOf("youtube.com/w")>-1||c.file.indexOf("youtube.com/v")>-1||c.file.indexOf("youtu.be/")>-1){return"youtube"}else{if(c.streamer&&c.streamer.indexOf("rtmp")==0){return"rtmp"}else{if(c.streamer&&c.streamer.indexOf("http")==0){return"http"}else{var b=a.utils.strings.extension(c.file);if(extensions.hasOwnProperty(b)){return extensions[b]}}}}}return""}})(jwplayer);(function(a){a.utils.parsers.mediaparser=function(){};a.utils.parsers.mediaparser.PREFIX="media";a.utils.parsers.mediaparser.parseGroup=function(d,f){var e=false;for(var c=0;c<d.childNodes.length;c++){if(d.childNodes[c].prefix==a.utils.parsers.mediaparser.PREFIX){if(!a.utils.parsers.localName(d.childNodes[c])){continue}switch(a.utils.parsers.localName(d.childNodes[c]).toLowerCase()){case"content":if(!e){f.file=a.utils.strings.xmlAttribute(d.childNodes[c],"url")}if(a.utils.strings.xmlAttribute(d.childNodes[c],"duration")){f.duration=a.utils.strings.seconds(a.utils.strings.xmlAttribute(d.childNodes[c],"duration"))}if(a.utils.strings.xmlAttribute(d.childNodes[c],"start")){f.start=a.utils.strings.seconds(a.utils.strings.xmlAttribute(d.childNodes[c],"start"))}if(d.childNodes[c].childNodes&&d.childNodes[c].childNodes.length>0){f=a.utils.parsers.mediaparser.parseGroup(d.childNodes[c],f)}if(a.utils.strings.xmlAttribute(d.childNodes[c],"width")||a.utils.strings.xmlAttribute(d.childNodes[c],"bitrate")||a.utils.strings.xmlAttribute(d.childNodes[c],"url")){if(!f.levels){f.levels=[]}f.levels.push({width:a.utils.strings.xmlAttribute(d.childNodes[c],"width"),bitrate:a.utils.strings.xmlAttribute(d.childNodes[c],"bitrate"),file:a.utils.strings.xmlAttribute(d.childNodes[c],"url")})}break;case"title":f.title=a.utils.parsers.textContent(d.childNodes[c]);break;case"description":f.description=a.utils.parsers.textContent(d.childNodes[c]);break;case"keywords":f.tags=a.utils.parsers.textContent(d.childNodes[c]);break;case"thumbnail":f.image=a.utils.strings.xmlAttribute(d.childNodes[c],"url");break;case"credit":f.author=a.utils.parsers.textContent(d.childNodes[c]);break;case"player":var b=d.childNodes[c].url;if(b.indexOf("youtube.com")>=0||b.indexOf("youtu.be")>=0){e=true;f.file=a.utils.strings.xmlAttribute(d.childNodes[c],"url")}break;case"group":a.utils.parsers.mediaparser.parseGroup(d.childNodes[c],f);break}}}return f}})(jwplayer);(function(b){b.utils.parsers.rssparser=function(){};b.utils.parsers.rssparser.parse=function(f){var c=[];for(var e=0;e<f.childNodes.length;e++){if(b.utils.parsers.localName(f.childNodes[e]).toLowerCase()=="channel"){for(var d=0;d<f.childNodes[e].childNodes.length;d++){if(b.utils.parsers.localName(f.childNodes[e].childNodes[d]).toLowerCase()=="item"){c.push(a(f.childNodes[e].childNodes[d]))}}}}return c};function a(d){var e={};for(var c=0;c<d.childNodes.length;c++){if(!b.utils.parsers.localName(d.childNodes[c])){continue}switch(b.utils.parsers.localName(d.childNodes[c]).toLowerCase()){case"enclosure":e.file=b.utils.strings.xmlAttribute(d.childNodes[c],"url");break;case"title":e.title=b.utils.parsers.textContent(d.childNodes[c]);break;case"pubdate":e.date=b.utils.parsers.textContent(d.childNodes[c]);break;case"description":e.description=b.utils.parsers.textContent(d.childNodes[c]);break;case"link":e.link=b.utils.parsers.textContent(d.childNodes[c]);break;case"category":if(e.tags){e.tags+=b.utils.parsers.textContent(d.childNodes[c])}else{e.tags=b.utils.parsers.textContent(d.childNodes[c])}break}}e=b.utils.parsers.mediaparser.parseGroup(d,e);e=b.utils.parsers.jwparser.parseEntry(d,e);return new b.html5.playlistitem(e)}})(jwplayer);(function(a){var c={};var b={};a.plugins=function(){};a.plugins.loadPlugins=function(e,d){b[e]=new a.plugins.pluginloader(new a.plugins.model(c),d);return b[e]};a.plugins.registerPlugin=function(h,f,e){var d=a.utils.getPluginName(h);if(c[d]){c[d].registerPlugin(h,f,e)}else{a.utils.log("A plugin ("+h+") was registered with the player that was not loaded. Please check your configuration.");for(var g in b){b[g].pluginFailed()}}}})(jwplayer);(function(a){a.plugins.model=function(b){this.addPlugin=function(c){var d=a.utils.getPluginName(c);if(!b[d]){b[d]=new a.plugins.plugin(c)}return b[d]}}})(jwplayer);(function(a){a.plugins.pluginmodes={FLASH:"FLASH",JAVASCRIPT:"JAVASCRIPT",HYBRID:"HYBRID"};a.plugins.plugin=function(b){var d="http://plugins.longtailvideo.com";var j=a.utils.loaderstatus.NEW;var k;var h;var l;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function e(){switch(a.utils.getPluginPathType(b)){case a.utils.pluginPathType.ABSOLUTE:return b;case a.utils.pluginPathType.RELATIVE:return a.utils.getAbsolutePath(b,window.location.href);case a.utils.pluginPathType.CDN:var n=a.utils.getPluginName(b);var m=a.utils.getPluginVersion(b);return d+"/"+a.version.split(".")[0]+"/"+n+"/"+n+(m!==""?("-"+m):"")+".js"}}function g(m){l=setTimeout(function(){j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)},1000)}function f(m){j=a.utils.loaderstatus.ERROR;c.sendEvent(a.events.ERROR)}this.load=function(){if(j==a.utils.loaderstatus.NEW){if(b.lastIndexOf(".swf")>0){k=b;j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);return}j=a.utils.loaderstatus.LOADING;var m=new a.utils.scriptloader(e());m.addEventListener(a.events.COMPLETE,g);m.addEventListener(a.events.ERROR,f);m.load()}};this.registerPlugin=function(o,n,m){if(l){clearTimeout(l);l=undefined}if(n&&m){k=m;h=n}else{if(typeof n=="string"){k=n}else{if(typeof n=="function"){h=n}else{if(!n&&!m){k=o}}}}j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)};this.getStatus=function(){return j};this.getPluginName=function(){return a.utils.getPluginName(b)};this.getFlashPath=function(){if(k){switch(a.utils.getPluginPathType(k)){case a.utils.pluginPathType.ABSOLUTE:return k;case a.utils.pluginPathType.RELATIVE:if(b.lastIndexOf(".swf")>0){return a.utils.getAbsolutePath(k,window.location.href)}return a.utils.getAbsolutePath(k,e());case a.utils.pluginPathType.CDN:if(k.indexOf("-")>-1){return k+"h"}return k+"-h"}}return null};this.getJS=function(){return h};this.getPluginmode=function(){if(typeof k!="undefined"&&typeof h!="undefined"){return a.plugins.pluginmodes.HYBRID}else{if(typeof k!="undefined"){return a.plugins.pluginmodes.FLASH}else{if(typeof h!="undefined"){return a.plugins.pluginmodes.JAVASCRIPT}}}};this.getNewInstance=function(n,m,o){return new h(n,m,o)};this.getURL=function(){return b}}})(jwplayer);(function(a){a.plugins.pluginloader=function(h,e){var g={};var k=a.utils.loaderstatus.NEW;var d=false;var b=false;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function f(){if(!b){b=true;k=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)}}function j(){if(!b){var m=0;for(plugin in g){var l=g[plugin].getStatus();if(l==a.utils.loaderstatus.LOADING||l==a.utils.loaderstatus.NEW){m++}}if(m==0){f()}}}this.setupPlugins=function(n,l,s){var m={length:0,plugins:{}};var p={length:0,plugins:{}};for(var o in g){var q=g[o].getPluginName();if(g[o].getFlashPath()){m.plugins[g[o].getFlashPath()]=l.plugins[o];m.plugins[g[o].getFlashPath()].pluginmode=g[o].getPluginmode();m.length++}if(g[o].getJS()){var r=document.createElement("div");r.id=n.id+"_"+q;r.style.position="absolute";r.style.zIndex=p.length+10;p.plugins[q]=g[o].getNewInstance(n,l.plugins[o],r);p.length++;if(typeof p.plugins[q].resize!="undefined"){n.onReady(s(p.plugins[q],r,true));n.onResize(s(p.plugins[q],r))}}}n.plugins=p.plugins;return m};this.load=function(){k=a.utils.loaderstatus.LOADING;d=true;for(var l in e){if(a.utils.exists(l)){g[l]=h.addPlugin(l);g[l].addEventListener(a.events.COMPLETE,j);g[l].addEventListener(a.events.ERROR,j)}}for(l in g){g[l].load()}d=false;j()};this.pluginFailed=function(){f()};this.getStatus=function(){return k}}})(jwplayer);(function(b){var a=[];b.api=function(d){this.container=d;this.id=d.id;var n={};var s={};var q={};var c=[];var h=undefined;var l=false;var j=[];var p=b.utils.getOuterHTML(d);var r={};var k={};this.getBuffer=function(){return this.callInternal("jwGetBuffer")};this.getContainer=function(){return this.container};function e(u,t){return function(z,v,w,x){if(u.renderingMode=="flash"||u.renderingMode=="html5"){var y;if(v){k[z]=v;y="jwplayer('"+u.id+"').callback('"+z+"')"}else{if(!v&&k[z]){delete k[z]}}h.jwDockSetButton(z,y,w,x)}return t}}this.getPlugin=function(t){var v=this;var u={};if(t=="dock"){return b.utils.extend(u,{setButton:e(v,u),show:function(){v.callInternal("jwDockShow");return u},hide:function(){v.callInternal("jwDockHide");return u},onShow:function(w){v.componentListener("dock",b.api.events.JWPLAYER_COMPONENT_SHOW,w);return u},onHide:function(w){v.componentListener("dock",b.api.events.JWPLAYER_COMPONENT_HIDE,w);return u}})}else{if(t=="controlbar"){return b.utils.extend(u,{show:function(){v.callInternal("jwControlbarShow");return u},hide:function(){v.callInternal("jwControlbarHide");return u},onShow:function(w){v.componentListener("controlbar",b.api.events.JWPLAYER_COMPONENT_SHOW,w);return u},onHide:function(w){v.componentListener("controlbar",b.api.events.JWPLAYER_COMPONENT_HIDE,w);return u}})}else{if(t=="display"){return b.utils.extend(u,{show:function(){v.callInternal("jwDisplayShow");return u},hide:function(){v.callInternal("jwDisplayHide");return u},onShow:function(w){v.componentListener("display",b.api.events.JWPLAYER_COMPONENT_SHOW,w);return u},onHide:function(w){v.componentListener("display",b.api.events.JWPLAYER_COMPONENT_HIDE,w);return u}})}else{return this.plugins[t]}}}};this.callback=function(t){if(k[t]){return k[t]()}};this.getDuration=function(){return this.callInternal("jwGetDuration")};this.getFullscreen=function(){return this.callInternal("jwGetFullscreen")};this.getHeight=function(){return this.callInternal("jwGetHeight")};this.getLockState=function(){return this.callInternal("jwGetLockState")};this.getMeta=function(){return this.getItemMeta()};this.getMute=function(){return this.callInternal("jwGetMute")};this.getPlaylist=function(){var u=this.callInternal("jwGetPlaylist");if(this.renderingMode=="flash"){b.utils.deepReplaceKeyName(u,"__dot__",".")}for(var t=0;t<u.length;t++){if(!b.utils.exists(u[t].index)){u[t].index=t}}return u};this.getPlaylistItem=function(t){if(!b.utils.exists(t)){t=this.getCurrentItem()}return this.getPlaylist()[t]};this.getPosition=function(){return this.callInternal("jwGetPosition")};this.getRenderingMode=function(){return this.renderingMode};this.getState=function(){return this.callInternal("jwGetState")};this.getVolume=function(){return this.callInternal("jwGetVolume")};this.getWidth=function(){return this.callInternal("jwGetWidth")};this.setFullscreen=function(t){if(!b.utils.exists(t)){this.callInternal("jwSetFullscreen",!this.callInternal("jwGetFullscreen"))}else{this.callInternal("jwSetFullscreen",t)}return this};this.setMute=function(t){if(!b.utils.exists(t)){this.callInternal("jwSetMute",!this.callInternal("jwGetMute"))}else{this.callInternal("jwSetMute",t)}return this};this.lock=function(){return this};this.unlock=function(){return this};this.load=function(t){this.callInternal("jwLoad",t);return this};this.playlistItem=function(t){this.callInternal("jwPlaylistItem",t);return this};this.playlistPrev=function(){this.callInternal("jwPlaylistPrev");return this};this.playlistNext=function(){this.callInternal("jwPlaylistNext");return this};this.resize=function(u,t){if(this.renderingMode=="html5"){h.jwResize(u,t)}else{this.container.width=u;this.container.height=t}return this};this.play=function(t){if(typeof t=="undefined"){t=this.getState();if(t==b.api.events.state.PLAYING||t==b.api.events.state.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPlay",t)}return this};this.pause=function(t){if(typeof t=="undefined"){t=this.getState();if(t==b.api.events.state.PLAYING||t==b.api.events.state.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPause",t)}return this};this.stop=function(){this.callInternal("jwStop");return this};this.seek=function(t){this.callInternal("jwSeek",t);return this};this.setVolume=function(t){this.callInternal("jwSetVolume",t);return this};this.onBufferChange=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BUFFER,t)};this.onBufferFull=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL,t)};this.onError=function(t){return this.eventListener(b.api.events.JWPLAYER_ERROR,t)};this.onFullscreen=function(t){return this.eventListener(b.api.events.JWPLAYER_FULLSCREEN,t)};this.onMeta=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_META,t)};this.onMute=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_MUTE,t)};this.onPlaylist=function(t){return this.eventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED,t)};this.onPlaylistItem=function(t){return this.eventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,t)};this.onReady=function(t){return this.eventListener(b.api.events.API_READY,t)};this.onResize=function(t){return this.eventListener(b.api.events.JWPLAYER_RESIZE,t)};this.onComplete=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_COMPLETE,t)};this.onSeek=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_SEEK,t)};this.onTime=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_TIME,t)};this.onVolume=function(t){return this.eventListener(b.api.events.JWPLAYER_MEDIA_VOLUME,t)};this.onBuffer=function(t){return this.stateListener(b.api.events.state.BUFFERING,t)};this.onPause=function(t){return this.stateListener(b.api.events.state.PAUSED,t)};this.onPlay=function(t){return this.stateListener(b.api.events.state.PLAYING,t)};this.onIdle=function(t){return this.stateListener(b.api.events.state.IDLE,t)};this.remove=function(){n={};j=[];if(b.utils.getOuterHTML(this.container)!=p){b.api.destroyPlayer(this.id,p)}};this.setup=function(u){if(b.embed){var t=this.id;this.remove();var v=b(t);v.config=u;return new b.embed(v)}return this};this.registerPlugin=function(v,u,t){b.plugins.registerPlugin(v,u,t)};this.setPlayer=function(t,u){h=t;this.renderingMode=u};this.stateListener=function(t,u){if(!s[t]){s[t]=[];this.eventListener(b.api.events.JWPLAYER_PLAYER_STATE,g(t))}s[t].push(u);return this};function g(t){return function(v){var u=v.newstate,x=v.oldstate;if(u==t){var w=s[u];if(w){for(var y=0;y<w.length;y++){if(typeof w[y]=="function"){w[y].call(this,{oldstate:x,newstate:u})}}}}}}this.componentListener=function(t,u,v){if(!q[t]){q[t]={}}if(!q[t][u]){q[t][u]=[];this.eventListener(u,m(t,u))}q[t][u].push(v);return this};function m(t,u){return function(w){if(t==w.component){var v=q[t][u];if(v){for(var x=0;x<v.length;x++){if(typeof v[x]=="function"){v[x].call(this,w)}}}}}}this.addInternalListener=function(t,u){t.jwAddEventListener(u,'function(dat) { jwplayer("'+this.id+'").dispatchEvent("'+u+'", dat); }')};this.eventListener=function(t,u){if(!n[t]){n[t]=[];if(h&&l){this.addInternalListener(h,t)}}n[t].push(u);return this};this.dispatchEvent=function(v){if(n[v]){var u=f(v,arguments[1]);for(var t=0;t<n[v].length;t++){if(typeof n[v][t]=="function"){n[v][t].call(this,u)}}}};function f(v,t){var x=b.utils.extend({},t);if(v==b.api.events.JWPLAYER_FULLSCREEN&&!x.fullscreen){x.fullscreen=x.message=="true"?true:false;delete x.message}else{if(typeof x.data=="object"){x=b.utils.extend(x,x.data);delete x.data}}var u=["position","duration","offset"];for(var w in u){if(x[u[w]]){x[u[w]]=Math.round(x[u[w]]*1000)/1000}}return x}this.callInternal=function(u,t){if(l){if(typeof h!="undefined"&&typeof h[u]=="function"){if(b.utils.exists(t)){return(h[u])(t)}else{return(h[u])()}}return null}else{j.push({method:u,parameters:t})}};this.playerReady=function(v){l=true;if(!h){this.setPlayer(document.getElementById(v.id))}this.container=document.getElementById(this.id);for(var t in n){this.addInternalListener(h,t)}this.eventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,function(w){r={}});this.eventListener(b.api.events.JWPLAYER_MEDIA_META,function(w){b.utils.extend(r,w.metadata)});this.dispatchEvent(b.api.events.API_READY);while(j.length>0){var u=j.shift();this.callInternal(u.method,u.parameters)}};this.getItemMeta=function(){return r};this.getCurrentItem=function(){return this.callInternal("jwGetPlaylistIndex")};function o(v,x,w){var t=[];if(!x){x=0}if(!w){w=v.length-1}for(var u=x;u<=w;u++){t.push(v[u])}return t}return this};b.api.selectPlayer=function(d){var c;if(!b.utils.exists(d)){d=0}if(d.nodeType){c=d}else{if(typeof d=="string"){c=document.getElementById(d)}}if(c){var e=b.api.playerById(c.id);if(e){return e}else{return b.api.addPlayer(new b.api(c))}}else{if(typeof d=="number"){return b.getPlayers()[d]}}return null};b.api.events={API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem"};b.api.events.state={BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"};b.api.playerById=function(d){for(var c=0;c<a.length;c++){if(a[c].id==d){return a[c]}}return null};b.api.addPlayer=function(c){for(var d=0;d<a.length;d++){if(a[d]==c){return c}}a.push(c);return c};b.api.destroyPlayer=function(g,d){var f=-1;for(var j=0;j<a.length;j++){if(a[j].id==g){f=j;continue}}if(f>=0){var c=document.getElementById(a[f].id);if(document.getElementById(a[f].id+"_wrapper")){c=document.getElementById(a[f].id+"_wrapper")}if(c){if(d){b.utils.setOuterHTML(c,d)}else{var h=document.createElement("div");var e=c.id;if(c.id.indexOf("_wrapper")==c.id.length-8){newID=c.id.substring(0,c.id.length-8)}h.setAttribute("id",e);c.parentNode.replaceChild(h,c)}}a.splice(f,1)}return null};b.getPlayers=function(){return a.slice(0)}})(jwplayer);var _userPlayerReady=(typeof playerReady=="function")?playerReady:undefined;playerReady=function(b){var a=jwplayer.api.playerById(b.id);if(a){a.playerReady(b)}else{jwplayer.api.selectPlayer(b.id).playerReady(b)}if(_userPlayerReady){_userPlayerReady.call(this,b)}};(function(a){a.embed=function(g){var j={width:400,height:300,components:{controlbar:{position:"over"}}};var f=a.utils.mediaparser.parseMedia(g.container);var e=new a.embed.config(a.utils.extend(j,f,g.config),this);var h=a.plugins.loadPlugins(g.id,e.plugins);function c(m,l){for(var k in l){if(typeof m[k]=="function"){(m[k]).call(m,l[k])}}}function d(){if(h.getStatus()==a.utils.loaderstatus.COMPLETE){for(var m=0;m<e.modes.length;m++){if(e.modes[m].type&&a.embed[e.modes[m].type]){var k=e;if(e.modes[m].config){k=a.utils.extend(a.utils.clone(e),e.modes[m].config)}var l=new a.embed[e.modes[m].type](document.getElementById(g.id),e.modes[m],k,h,g);if(l.supportsConfig()){l.embed();c(g,e.events);return g}}}a.utils.log("No suitable players found");new a.embed.logo(a.utils.extend({hide:true},e.components.logo),"none",g.id)}}h.addEventListener(a.events.COMPLETE,d);h.addEventListener(a.events.ERROR,d);h.load();return g};function b(){if(!document.body){return setTimeout(b,15)}var c=a.utils.selectors.getElementsByTagAndClass("video","jwplayer");for(var d=0;d<c.length;d++){var e=c[d];a(e.id).setup({})}}b()})(jwplayer);(function(e){function h(){return[{type:"flash",src:"/jwplayer/player.swf"},{type:"html5"},{type:"download"}]}var a={players:"modes",autoplay:"autostart"};function b(n){var m=n.toLowerCase();var l=["left","right","top","bottom"];for(var k=0;k<l.length;k++){if(m==l[k]){return true}}return false}function c(l){var k=false;k=(l instanceof Array)||(typeof l=="object"&&!l.position&&!l.size);return k}function j(k){if(typeof k=="string"){if(parseInt(k).toString()==k||k.toLowerCase().indexOf("px")>-1){return parseInt(k)}}return k}var g=["playlist","dock","controlbar","logo","display"];function f(k){var n={};switch(e.utils.typeOf(k.plugins)){case"object":for(var m in k.plugins){n[e.utils.getPluginName(m)]=m}break;case"string":var o=k.plugins.split(",");for(var l=0;l<o.length;l++){n[e.utils.getPluginName(o[l])]=o[l]}break}return n}function d(o,n,m,k){if(e.utils.typeOf(o[n])!="object"){o[n]={}}var l=o[n][m];if(e.utils.typeOf(l)!="object"){o[n][m]=l={}}if(k){if(n=="plugins"){var p=e.utils.getPluginName(m);l[k]=o[p+"."+k];delete o[p+"."+k]}else{l[k]=o[m+"."+k];delete o[m+"."+k]}}}e.embed.deserialize=function(l){var m=f(l);for(var k in m){d(l,"plugins",m[k])}for(var p in l){if(p.indexOf(".")>-1){var o=p.split(".");var n=o[0];var p=o[1];if(e.utils.isInArray(g,n)){d(l,"components",n,p)}else{if(m[n]){d(l,"plugins",m[n],p)}}}}return l};e.embed.config=function(k,u){var t=e.utils.extend({},k);var r;if(c(t.playlist)){r=t.playlist;delete t.playlist}t=e.embed.deserialize(t);t.height=j(t.height);t.width=j(t.width);if(typeof t.plugins=="string"){var l=t.plugins.split(",");if(typeof t.plugins!="object"){t.plugins={}}for(var p=0;p<l.length;p++){var q=e.utils.getPluginName(l[p]);if(typeof t[q]=="object"){t.plugins[l[p]]=t[q];delete t[q]}else{t.plugins[l[p]]={}}}}for(var s=0;s<g.length;s++){var o=g[s];if(e.utils.exists(t[o])){if(typeof t[o]!="object"){if(!t.components[o]){t.components[o]={}}if(o=="logo"){t.components[o].file=t[o]}else{t.components[o].position=t[o]}delete t[o]}else{if(!t.components[o]){t.components[o]={}}e.utils.extend(t.components[o],t[o]);delete t[o]}}if(typeof t[o+"size"]!="undefined"){if(!t.components[o]){t.components[o]={}}t.components[o].size=t[o+"size"];delete t[o+"size"]}}if(typeof t.icons!="undefined"){if(!t.components.display){t.components.display={}}t.components.display.icons=t.icons;delete t.icons}for(var n in a){if(t[n]){if(!t[a[n]]){t[a[n]]=t[n]}delete t[n]}}var m;if(t.flashplayer&&!t.modes){m=h();m[0].src=t.flashplayer;delete t.flashplayer}else{if(t.modes){if(typeof t.modes=="string"){m=h();m[0].src=t.modes}else{if(t.modes instanceof Array){m=t.modes}else{if(typeof t.modes=="object"&&t.modes.type){m=[t.modes]}}}delete t.modes}else{m=h()}}t.modes=m;if(r){t.playlist=r}return t}})(jwplayer);(function(a){a.embed.download=function(c,g,b,d,f){this.embed=function(){var k=a.utils.extend({},b);var q={};var j=b.width?b.width:480;if(typeof j!="number"){j=parseInt(j,10)}var m=b.height?b.height:320;if(typeof m!="number"){m=parseInt(m,10)}var u,o,n;var s={};if(b.playlist&&b.playlist.length){s.file=b.playlist[0].file;o=b.playlist[0].image;s.levels=b.playlist[0].levels}else{s.file=b.file;o=b.image;s.levels=b.levels}if(s.file){u=s.file}else{if(s.levels&&s.levels.length){u=s.levels[0].file}}n=u?"pointer":"auto";var l={display:{style:{cursor:n,width:j,height:m,backgroundColor:"#000",position:"relative",textDecoration:"none",border:"none",display:"block"}},display_icon:{style:{cursor:n,position:"absolute",display:u?"block":"none",top:0,left:0,border:0,margin:0,padding:0,zIndex:3,width:50,height:50,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg==)"}},display_iconBackground:{style:{cursor:n,position:"absolute",display:u?"block":"none",top:((m-50)/2),left:((j-50)/2),border:0,width:50,height:50,margin:0,padding:0,zIndex:2,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC)"}},display_image:{style:{width:j,height:m,display:o?"block":"none",position:"absolute",cursor:n,left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1,border:"none"}}};var h=function(v,x,y){var w=document.createElement(v);if(y){w.id=y}else{w.id=c.id+"_jwplayer_"+x}a.utils.css(w,l[x].style);return w};q.display=h("a","display",c.id);if(u){q.display.setAttribute("href",a.utils.getAbsolutePath(u))}q.display_image=h("img","display_image");q.display_image.setAttribute("alt","Click to download...");if(o){q.display_image.setAttribute("src",a.utils.getAbsolutePath(o))}if(true){q.display_icon=h("div","display_icon");q.display_iconBackground=h("div","display_iconBackground");q.display.appendChild(q.display_image);q.display_iconBackground.appendChild(q.display_icon);q.display.appendChild(q.display_iconBackground)}_css=a.utils.css;_hide=function(v){_css(v,{display:"none"})};function r(v){_imageWidth=q.display_image.naturalWidth;_imageHeight=q.display_image.naturalHeight;t()}function t(){a.utils.stretch(a.utils.stretching.UNIFORM,q.display_image,j,m,_imageWidth,_imageHeight)}q.display_image.onerror=function(v){_hide(q.display_image)};q.display_image.onload=r;c.parentNode.replaceChild(q.display,c);var p=(b.plugins&&b.plugins.logo)?b.plugins.logo:{};q.display.appendChild(new a.embed.logo(b.components.logo,"download",c.id));f.container=document.getElementById(f.id);f.setPlayer(q.display,"download")};this.supportsConfig=function(){if(b){var j=a.utils.getFirstPlaylistItemFromConfig(b);if(typeof j.file=="undefined"&&typeof j.levels=="undefined"){return true}else{if(j.file){return e(j.file,j.provider,j.playlistfile)}else{if(j.levels&&j.levels.length){for(var h=0;h<j.levels.length;h++){if(j.levels[h].file&&e(j.levels[h].file,j.provider,j.playlistfile)){return true}}}}}}else{return true}};function e(j,l,h){if(h){return false}var k=["image","sound","youtube","http"];if(l&&(k.toString().indexOf(l)>-1)){return true}if(!l||(l&&l=="video")){var m=a.utils.extension(j);if(m&&a.utils.extensionmap[m]){return true}}return false}}})(jwplayer);(function(a){a.embed.flash=function(f,g,l,e,j){function m(o,n,p){var q=document.createElement("param");q.setAttribute("name",n);q.setAttribute("value",p);o.appendChild(q)}function k(o,p,n){return function(q){if(n){document.getElementById(j.id+"_wrapper").appendChild(p)}var s=document.getElementById(j.id).getPluginConfig("display");o.resize(s.width,s.height);var r={left:s.x,top:s.y};a.utils.css(p,r)}}function d(p){if(!p){return{}}var r={};for(var o in p){var n=p[o];for(var q in n){r[o+"."+q]=n[q]}}return r}function h(q,p){if(q[p]){var s=q[p];for(var o in s){var n=s[o];if(typeof n=="string"){if(!q[o]){q[o]=n}}else{for(var r in n){if(!q[o+"."+r]){q[o+"."+r]=n[r]}}}}delete q[p]}}function b(q){if(!q){return{}}var t={},s=[];for(var n in q){var p=a.utils.getPluginName(n);var o=q[n];s.push(n);for(var r in o){t[p+"."+r]=o[r]}}t.plugins=s.join(",");return t}function c(p){var n=p.netstreambasepath?"":"netstreambasepath="+encodeURIComponent(window.location.href.split("#")[0])+"&";for(var o in p){if(typeof(p[o])=="object"){n+=o+"="+encodeURIComponent("[[JSON]]"+a.utils.strings.jsonToString(p[o]))+"&"}else{n+=o+"="+encodeURIComponent(p[o])+"&"}}return n.substring(0,n.length-1)}this.embed=function(){l.id=j.id;var y;var q=a.utils.extend({},l);var n=q.width;var w=q.height;if(f.id+"_wrapper"==f.parentNode.id){y=document.getElementById(f.id+"_wrapper")}else{y=document.createElement("div");y.id=f.id+"_wrapper";a.utils.wrap(f,y);a.utils.css(y,{position:"relative",width:n,height:w})}var o=e.setupPlugins(j,q,k);if(o.length>0){a.utils.extend(q,b(o.plugins))}else{delete q.plugins}var r=["height","width","modes","events"];for(var u=0;u<r.length;u++){delete q[r[u]]}var p="opaque";if(q.wmode){p=q.wmode}h(q,"components");h(q,"providers");if(typeof q["dock.position"]!="undefined"){if(q["dock.position"].toString().toLowerCase()=="false"){q.dock=q["dock.position"];delete q["dock.position"]}}var x="#000000";var t;if(a.utils.isIE()){var v='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="'+x+'" width="100%" height="100%" id="'+f.id+'" name="'+f.id+'" tabindex=0"">';v+='<param name="movie" value="'+g.src+'">';v+='<param name="allowfullscreen" value="true">';v+='<param name="allowscriptaccess" value="always">';v+='<param name="seamlesstabbing" value="true">';v+='<param name="wmode" value="'+p+'">';v+='<param name="flashvars" value="'+c(q)+'">';v+="</object>";a.utils.setOuterHTML(f,v);t=document.getElementById(f.id)}else{var s=document.createElement("object");s.setAttribute("type","application/x-shockwave-flash");s.setAttribute("data",g.src);s.setAttribute("width","100%");s.setAttribute("height","100%");s.setAttribute("bgcolor","#000000");s.setAttribute("id",f.id);s.setAttribute("name",f.id);s.setAttribute("tabindex",0);m(s,"allowfullscreen","true");m(s,"allowscriptaccess","always");m(s,"seamlesstabbing","true");m(s,"wmode",p);m(s,"flashvars",c(q));f.parentNode.replaceChild(s,f);t=s}j.container=t;j.setPlayer(t,"flash")};this.supportsConfig=function(){if(a.utils.hasFlash()){if(l){var o=a.utils.getFirstPlaylistItemFromConfig(l);if(typeof o.file=="undefined"&&typeof o.levels=="undefined"){return true}else{if(o.file){return flashCanPlay(o.file,o.provider)}else{if(o.levels&&o.levels.length){for(var n=0;n<o.levels.length;n++){if(o.levels[n].file&&flashCanPlay(o.levels[n].file,o.provider)){return true}}}}}}else{return true}}return false};flashCanPlay=function(n,p){var o=["video","http","sound","image"];if(p&&(o.toString().indexOf(p<0))){return true}var q=a.utils.extension(n);if(!q){return true}if(a.utils.exists(a.utils.extensionmap[q])&&!a.utils.exists(a.utils.extensionmap[q].flash)){return false}return true}}})(jwplayer);(function(a){a.embed.html5=function(c,g,b,d,f){function e(j,k,h){return function(l){var m=document.getElementById(c.id+"_displayarea");if(h){m.appendChild(k)}var n=m.style;j.resize(parseInt(n.width.replace("px","")),parseInt(n.height.replace("px","")));k.left=n.left;k.top=n.top}}this.embed=function(){if(a.html5){d.setupPlugins(f,b,e);c.innerHTML="";var j=a.utils.extend({screencolor:"0x000000"},b);var h=["plugins","modes","events"];for(var k=0;k<h.length;k++){delete j[h[k]]}if(j.levels&&!j.sources){j.sources=b.levels}if(j.skin&&j.skin.toLowerCase().indexOf(".zip")>0){j.skin=j.skin.replace(/\.zip/i,".xml")}var l=new (a.html5(c)).setup(j);f.container=document.getElementById(f.id);f.setPlayer(l,"html5")}else{return null}};this.supportsConfig=function(){if(!!a.vid.canPlayType){if(b){var j=a.utils.getFirstPlaylistItemFromConfig(b);if(typeof j.file=="undefined"&&typeof j.levels=="undefined"){return true}else{if(j.file){return html5CanPlay(a.vid,j.file,j.provider,j.playlistfile)}else{if(j.levels&&j.levels.length){for(var h=0;h<j.levels.length;h++){if(j.levels[h].file&&html5CanPlay(a.vid,j.levels[h].file,j.provider,j.playlistfile)){return true}}}}}}else{return true}}return false};html5CanPlay=function(k,j,l,h){if(h){return false}if(l&&l=="youtube"){return true}if(l&&l!="video"&&l!="http"&&l!="sound"){return false}var m=a.utils.extension(j);if(!a.utils.exists(m)||!a.utils.exists(a.utils.extensionmap[m])){return true}if(!a.utils.exists(a.utils.extensionmap[m].html5)){return false}if(a.utils.isLegacyAndroid()&&m.match(/m4v|mp4/)){return true}return browserCanPlay(k,a.utils.extensionmap[m].html5)};browserCanPlay=function(j,h){if(!h){return true}if(j.canPlayType(h)){return true}else{if(h=="audio/mp3"&&navigator.userAgent.match(/safari/i)){return j.canPlayType("audio/mpeg")}else{return false}}}}})(jwplayer);(function(a){a.embed.logo=function(m,l,d){var j={prefix:"http://l.longtailvideo.com/"+l+"/",file:"logo.png",link:"http://www.longtailvideo.com/players/jw-flv-player/",margin:8,out:0.5,over:1,timeout:5,hide:false,position:"bottom-left"};_css=a.utils.css;var b;var h;k();function k(){o();c();f()}function o(){if(j.prefix){var q=a.version.split(/\W/).splice(0,2).join("/");if(j.prefix.indexOf(q)<0){j.prefix+=q+"/"}}h=a.utils.extend({},j)}function p(){var s={border:"none",textDecoration:"none",position:"absolute",cursor:"pointer",zIndex:10};s.display=h.hide?"none":"block";var r=h.position.toLowerCase().split("-");for(var q in r){s[r[q]]=h.margin}return s}function c(){b=document.createElement("img");b.id=d+"_jwplayer_logo";b.style.display="none";b.onload=function(q){_css(b,p());e()};if(!h.file){return}if(h.file.indexOf("http://")===0){b.src=h.file}else{b.src=h.prefix+h.file}}if(!h.file){return}function f(){if(h.link){b.onmouseover=g;b.onmouseout=e;b.onclick=n}else{this.mouseEnabled=false}}function n(q){if(typeof q!="undefined"){q.preventDefault();q.stopPropagation()}if(h.link){window.open(h.link,"_blank")}return}function e(q){if(h.link){b.style.opacity=h.out}return}function g(q){if(h.hide){b.style.opacity=h.over}return}return b}})(jwplayer);(function(a){a.html5=function(b){var c=b;this.setup=function(d){a.utils.extend(this,new a.html5.api(c,d));return this};return this}})(jwplayer);(function(b){var d=b.utils;var c=d.css;b.html5.view=function(r,q,f){var u=r;var n=q;var x=f;var w;var g;var C;var s;var D;var p;var A;function z(){w=document.createElement("div");w.id=n.id;w.className=n.className;_videowrapper=document.createElement("div");_videowrapper.id=w.id+"_video_wrapper";n.id=w.id+"_video";c(w,{position:"relative",height:x.height,width:x.width,padding:0,backgroundColor:E(),zIndex:0});function E(){if(u.skin.getComponentSettings("display")&&u.skin.getComponentSettings("display").backgroundcolor){return u.skin.getComponentSettings("display").backgroundcolor}return parseInt("000000",16)}c(n,{width:x.width,height:x.height,top:0,left:0,zIndex:1,margin:"auto",display:"block"});c(_videowrapper,{overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0});d.wrap(n,w);d.wrap(n,_videowrapper);s=document.createElement("div");s.id=w.id+"_displayarea";w.appendChild(s)}function k(){for(var E=0;E<x.plugins.order.length;E++){var F=x.plugins.order[E];if(d.exists(x.plugins.object[F].getDisplayElement)){x.plugins.object[F].height=d.parseDimension(x.plugins.object[F].getDisplayElement().style.height);x.plugins.object[F].width=d.parseDimension(x.plugins.object[F].getDisplayElement().style.width);x.plugins.config[F].currentPosition=x.plugins.config[F].position}}v()}function m(E){c(s,{display:x.getMedia().hasChrome()?"none":"block"})}function v(F){var H=x.getMedia()?x.getMedia().getDisplayElement():null;if(d.exists(H)){if(A!=H){if(A&&A.parentNode){A.parentNode.replaceChild(H,A)}A=H}for(var E=0;E<x.plugins.order.length;E++){var G=x.plugins.order[E];if(d.exists(x.plugins.object[G].getDisplayElement)){x.plugins.config[G].currentPosition=x.plugins.config[G].position}}}j(x.width,x.height)}this.setup=function(){if(x&&x.getMedia()){n=x.getMedia().getDisplayElement()}z();k();u.jwAddEventListener(b.api.events.JWPLAYER_PLAYER_STATE,m);u.jwAddEventListener(b.api.events.JWPLAYER_MEDIA_LOADED,v);u.jwAddEventListener(b.api.events.JWPLAYER_MEDIA_META,function(){y()});var E;if(d.exists(window.onresize)){E=window.onresize}window.onresize=function(F){if(d.exists(E)){try{E(F)}catch(H){}}if(u.jwGetFullscreen()){var G=document.body.getBoundingClientRect();x.width=Math.abs(G.left)+Math.abs(G.right);x.height=window.innerHeight}j(x.width,x.height)}};function h(E){switch(E.keyCode){case 27:if(u.jwGetFullscreen()){u.jwSetFullscreen(false)}break;case 32:if(u.jwGetState()!=b.api.events.state.IDLE&&u.jwGetState()!=b.api.events.state.PAUSED){u.jwPause()}else{u.jwPlay()}break}}function j(H,E){if(w.style.display=="none"){return}var G=[].concat(x.plugins.order);G.reverse();D=G.length+2;if(!x.fullscreen){x.width=H;x.height=E;g=H;C=E;c(s,{top:0,bottom:0,left:0,right:0,width:H,height:E,position:"relative"});c(w,{height:C,width:g});var F=o(t,G);if(F.length>0){D+=F.length;var J=F.indexOf("playlist"),I=F.indexOf("controlbar");if(J>=0&&I>=0){F[J]=F.splice(I,1,F[J])[0]}o(l,F,true)}}else{if(!(navigator&&navigator.vendor&&navigator.vendor.indexOf("Apple")==0)){o(B,G,true)}}y()}function o(J,G,H){var F=[];for(var E=0;E<G.length;E++){var K=G[E];if(d.exists(x.plugins.object[K].getDisplayElement)){if(x.plugins.config[K].currentPosition!=b.html5.view.positions.NONE){var I=J(K,D--);if(!I){F.push(K)}else{x.plugins.object[K].resize(I.width,I.height);if(H){delete I.width;delete I.height}c(x.plugins.object[K].getDisplayElement(),I)}}else{c(x.plugins.object[K].getDisplayElement(),{display:"none"})}}}return F}function t(F,G){if(d.exists(x.plugins.object[F].getDisplayElement)){if(x.plugins.config[F].position&&a(x.plugins.config[F].position)){if(!d.exists(x.plugins.object[F].getDisplayElement().parentNode)){w.appendChild(x.plugins.object[F].getDisplayElement())}var E=e(F);E.zIndex=G;return E}}return false}function l(G,H){if(!d.exists(x.plugins.object[G].getDisplayElement().parentNode)){s.appendChild(x.plugins.object[G].getDisplayElement())}var E=x.width,F=x.height;if(typeof x.width=="string"&&x.width.lastIndexOf("%")>-1){percentage=parseFloat(x.width.substring(0,x.width.lastIndexOf("%")))/100;E=Math.round(window.innerWidth*percentage)}if(typeof x.height=="string"&&x.height.lastIndexOf("%")>-1){percentage=parseFloat(x.height.substring(0,x.height.lastIndexOf("%")))/100;F=Math.round(window.innerHeight*percentage)}return{position:"absolute",width:(E-d.parseDimension(s.style.left)-d.parseDimension(s.style.right)),height:(F-d.parseDimension(s.style.top)-d.parseDimension(s.style.bottom)),zIndex:H}}function B(E,F){return{position:"fixed",width:x.width,height:x.height,zIndex:F}}function y(){if(!d.exists(x.getMedia())){return}s.style.position="absolute";var H=x.getMedia().getDisplayElement();if(H&&H.tagName.toLowerCase()=="video"){H.style.position="absolute";var E,I;if(s.style.width.toString().lastIndexOf("%")>-1||s.style.width.toString().lastIndexOf("%")>-1){var F=s.getBoundingClientRect();E=Math.abs(F.left)+Math.abs(F.right);I=Math.abs(F.top)+Math.abs(F.bottom)}else{E=d.parseDimension(s.style.width);I=d.parseDimension(s.style.height)}if(H.parentNode){H.parentNode.style.left=s.style.left;H.parentNode.style.top=s.style.top}d.stretch(u.jwGetStretching(),H,E,I,H.videoWidth?H.videoWidth:400,H.videoHeight?H.videoHeight:300)}else{var G=x.plugins.object.display.getDisplayElement();if(G){x.getMedia().resize(d.parseDimension(G.style.width),d.parseDimension(G.style.height))}else{x.getMedia().resize(d.parseDimension(s.style.width),d.parseDimension(s.style.height))}}}function e(F){var G={position:"absolute",margin:0,padding:0,top:null};var E=x.plugins.config[F].currentPosition.toLowerCase();switch(E.toUpperCase()){case b.html5.view.positions.TOP:G.top=d.parseDimension(s.style.top);G.left=d.parseDimension(s.style.left);G.width=g-d.parseDimension(s.style.left)-d.parseDimension(s.style.right);G.height=x.plugins.object[F].height;s.style[E]=d.parseDimension(s.style[E])+x.plugins.object[F].height+"px";s.style.height=d.parseDimension(s.style.height)-G.height+"px";break;case b.html5.view.positions.RIGHT:G.top=d.parseDimension(s.style.top);G.right=d.parseDimension(s.style.right);G.width=x.plugins.object[F].width;G.height=C-d.parseDimension(s.style.top)-d.parseDimension(s.style.bottom);s.style[E]=d.parseDimension(s.style[E])+x.plugins.object[F].width+"px";s.style.width=d.parseDimension(s.style.width)-G.width+"px";break;case b.html5.view.positions.BOTTOM:G.bottom=d.parseDimension(s.style.bottom);G.left=d.parseDimension(s.style.left);G.width=g-d.parseDimension(s.style.left)-d.parseDimension(s.style.right);G.height=x.plugins.object[F].height;s.style[E]=d.parseDimension(s.style[E])+x.plugins.object[F].height+"px";s.style.height=d.parseDimension(s.style.height)-G.height+"px";break;case b.html5.view.positions.LEFT:G.top=d.parseDimension(s.style.top);G.left=d.parseDimension(s.style.left);G.width=x.plugins.object[F].width;G.height=C-d.parseDimension(s.style.top)-d.parseDimension(s.style.bottom);s.style[E]=d.parseDimension(s.style[E])+x.plugins.object[F].width+"px";s.style.width=d.parseDimension(s.style.width)-G.width+"px";break;default:break}return G}this.resize=j;this.fullscreen=function(H){if(navigator&&navigator.vendor&&navigator.vendor.indexOf("Apple")===0){if(x.getMedia().getDisplayElement().webkitSupportsFullscreen){if(H){try{x.getMedia().getDisplayElement().webkitEnterFullscreen()}catch(G){}}else{try{x.getMedia().getDisplayElement().webkitExitFullscreen()}catch(G){}}}}else{if(H){document.onkeydown=h;clearInterval(p);var F=document.body.getBoundingClientRect();x.width=Math.abs(F.left)+Math.abs(F.right);x.height=window.innerHeight;var E={position:"fixed",width:"100%",height:"100%",top:0,left:0,zIndex:2147483000};c(w,E);E.zIndex=1;if(x.getMedia()&&x.getMedia().getDisplayElement()){c(x.getMedia().getDisplayElement(),E)}E.zIndex=2;c(s,E)}else{document.onkeydown="";x.width=g;x.height=C;c(w,{position:"relative",height:x.height,width:x.width,zIndex:0})}j(x.width,x.height)}}};function a(e){return([b.html5.view.positions.TOP,b.html5.view.positions.RIGHT,b.html5.view.positions.BOTTOM,b.html5.view.positions.LEFT].toString().indexOf(e.toUpperCase())>-1)}b.html5.view.positions={TOP:"TOP",RIGHT:"RIGHT",BOTTOM:"BOTTOM",LEFT:"LEFT",OVER:"OVER",NONE:"NONE"}})(jwplayer);(function(a){var b={backgroundcolor:"",margin:10,font:"Arial,sans-serif",fontsize:10,fontcolor:parseInt("000000",16),fontstyle:"normal",fontweight:"bold",buttoncolor:parseInt("ffffff",16),position:a.html5.view.positions.BOTTOM,idlehide:false,layout:{left:{position:"left",elements:[{name:"play",type:"button"},{name:"divider",type:"divider"},{name:"prev",type:"button"},{name:"divider",type:"divider"},{name:"next",type:"button"},{name:"divider",type:"divider"},{name:"elapsed",type:"text"}]},center:{position:"center",elements:[{name:"time",type:"slider"}]},right:{position:"right",elements:[{name:"duration",type:"text"},{name:"blank",type:"button"},{name:"divider",type:"divider"},{name:"mute",type:"button"},{name:"volume",type:"slider"},{name:"divider",type:"divider"},{name:"fullscreen",type:"button"}]}}};_utils=a.utils;_css=_utils.css;_hide=function(c){_css(c,{display:"none"})};_show=function(c){_css(c,{display:"block"})};a.html5.controlbar=function(l,V){var k=l;var D=_utils.extend({},b,k.skin.getComponentSettings("controlbar"),V);if(D.position==a.html5.view.positions.NONE||typeof a.html5.view.positions[D.position]=="undefined"){return}if(_utils.mapLength(k.skin.getComponentLayout("controlbar"))>0){D.layout=k.skin.getComponentLayout("controlbar")}var ac;var P;var ab;var E;var v="none";var g;var j;var ad;var f;var e;var y;var Q={};var p=false;var c={};var Y;var h=false;var o;var d;var S=false;var G=false;var W=new a.html5.eventdispatcher();_utils.extend(this,W);function J(){if(!Y){Y=k.skin.getSkinElement("controlbar","background");if(!Y){Y={width:0,height:0,src:null}}}return Y}function N(){ab=0;E=0;P=0;if(!p){var ak={height:J().height,backgroundColor:D.backgroundcolor};ac=document.createElement("div");ac.id=k.id+"_jwplayer_controlbar";_css(ac,ak)}var aj=(k.skin.getSkinElement("controlbar","capLeft"));var ai=(k.skin.getSkinElement("controlbar","capRight"));if(aj){x("capLeft","left",false,ac)}var al={position:"absolute",height:J().height,left:(aj?aj.width:0),zIndex:0};Z("background",ac,al,"img");if(J().src){Q.background.src=J().src}al.zIndex=1;Z("elements",ac,al);if(ai){x("capRight","right",false,ac)}}this.getDisplayElement=function(){return ac};this.resize=function(ak,ai){_utils.cancelAnimation(ac);document.getElementById(k.id).onmousemove=A;e=ak;y=ai;if(G!=k.jwGetFullscreen()){G=k.jwGetFullscreen();d=undefined}var aj=w();A();I({id:k.id,duration:ad,position:j});u({id:k.id,bufferPercent:f});return aj};this.show=function(){if(h){h=false;_show(ac);T()}};this.hide=function(){if(!h){h=true;_hide(ac);aa()}};function q(){var aj=["timeSlider","volumeSlider","timeSliderRail","volumeSliderRail"];for(var ak in aj){var ai=aj[ak];if(typeof Q[ai]!="undefined"){c[ai]=Q[ai].getBoundingClientRect()}}}function A(ai){if(h){return}if(D.position==a.html5.view.positions.OVER||k.jwGetFullscreen()){clearTimeout(o);switch(k.jwGetState()){case a.api.events.state.PAUSED:case a.api.events.state.IDLE:if(!D.idlehide||_utils.exists(ai)){U()}if(D.idlehide){o=setTimeout(function(){z()},2000)}break;default:if(ai){U()}o=setTimeout(function(){z()},2000);break}}}function z(ai){aa();_utils.cancelAnimation(ac);_utils.fadeTo(ac,0,0.1,1,0)}function U(){T();_utils.cancelAnimation(ac);_utils.fadeTo(ac,1,0,1,0)}function H(ai){return function(){if(S&&d!=ai){d=ai;W.sendEvent(ai,{component:"controlbar",boundingRect:O()})}}}var T=H(a.api.events.JWPLAYER_COMPONENT_SHOW);var aa=H(a.api.events.JWPLAYER_COMPONENT_HIDE);function O(){if(D.position==a.html5.view.positions.OVER||k.jwGetFullscreen()){return _utils.getDimensions(ac)}else{return{x:0,y:0,width:0,height:0}}}function Z(am,al,ak,ai){var aj;if(!p){if(!ai){ai="div"}aj=document.createElement(ai);Q[am]=aj;aj.id=ac.id+"_"+am;al.appendChild(aj)}else{aj=document.getElementById(ac.id+"_"+am)}if(_utils.exists(ak)){_css(aj,ak)}return aj}function M(){ah(D.layout.left);ah(D.layout.right,-1);ah(D.layout.center)}function ah(al,ai){var am=al.position=="right"?"right":"left";var ak=_utils.extend([],al.elements);if(_utils.exists(ai)){ak.reverse()}for(var aj=0;aj<ak.length;aj++){C(ak[aj],am)}}function K(){return P++}function C(am,ao){var al,aj,ak,ai,aq;if(am.type=="divider"){x("divider"+K(),ao,true,undefined,undefined,am.width,am.element);return}switch(am.name){case"play":x("playButton",ao,false);x("pauseButton",ao,true);R("playButton","jwPlay");R("pauseButton","jwPause");break;case"prev":x("prevButton",ao,true);R("prevButton","jwPlaylistPrev");break;case"stop":x("stopButton",ao,true);R("stopButton","jwStop");break;case"next":x("nextButton",ao,true);R("nextButton","jwPlaylistNext");break;case"elapsed":x("elapsedText",ao,true);break;case"time":aj=!_utils.exists(k.skin.getSkinElement("controlbar","timeSliderCapLeft"))?0:k.skin.getSkinElement("controlbar","timeSliderCapLeft").width;ak=!_utils.exists(k.skin.getSkinElement("controlbar","timeSliderCapRight"))?0:k.skin.getSkinElement("controlbar","timeSliderCapRight").width;al=ao=="left"?aj:ak;ai=k.skin.getSkinElement("controlbar","timeSliderRail").width+aj+ak;aq={height:J().height,position:"absolute",top:0,width:ai};aq[ao]=ao=="left"?ab:E;var an=Z("timeSlider",Q.elements,aq);x("timeSliderCapLeft",ao,true,an,ao=="left"?0:al);x("timeSliderRail",ao,false,an,al);x("timeSliderBuffer",ao,false,an,al);x("timeSliderProgress",ao,false,an,al);x("timeSliderThumb",ao,false,an,al);x("timeSliderCapRight",ao,true,an,ao=="right"?0:al);X("time");break;case"fullscreen":x("fullscreenButton",ao,false);x("normalscreenButton",ao,true);R("fullscreenButton","jwSetFullscreen",true);R("normalscreenButton","jwSetFullscreen",false);break;case"volume":aj=!_utils.exists(k.skin.getSkinElement("controlbar","volumeSliderCapLeft"))?0:k.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;ak=!_utils.exists(k.skin.getSkinElement("controlbar","volumeSliderCapRight"))?0:k.skin.getSkinElement("controlbar","volumeSliderCapRight").width;al=ao=="left"?aj:ak;ai=k.skin.getSkinElement("controlbar","volumeSliderRail").width+aj+ak;aq={height:J().height,position:"absolute",top:0,width:ai};aq[ao]=ao=="left"?ab:E;var ap=Z("volumeSlider",Q.elements,aq);x("volumeSliderCapLeft",ao,true,ap,ao=="left"?0:al);x("volumeSliderRail",ao,true,ap,al);x("volumeSliderProgress",ao,false,ap,al);x("volumeSliderCapRight",ao,true,ap,ao=="right"?0:al);X("volume");break;case"mute":x("muteButton",ao,false);x("unmuteButton",ao,true);R("muteButton","jwSetMute",true);R("unmuteButton","jwSetMute",false);break;case"duration":x("durationText",ao,true);break}}function x(al,ao,aj,ar,am,ai,ak){if(_utils.exists(k.skin.getSkinElement("controlbar",al))||al.indexOf("Text")>0||al.indexOf("divider")===0){var an={height:J().height,position:"absolute",display:"block",top:0};if((al.indexOf("next")===0||al.indexOf("prev")===0)&&k.jwGetPlaylist().length<2){aj=false;an.display="none"}var at;if(al.indexOf("Text")>0){al.innerhtml="00:00";an.font=D.fontsize+"px/"+(J().height+1)+"px "+D.font;an.color=D.fontcolor;an.textAlign="center";an.fontWeight=D.fontweight;an.fontStyle=D.fontstyle;an.cursor="default";at=14+3*D.fontsize}else{if(al.indexOf("divider")===0){if(ai){if(!isNaN(parseInt(ai))){at=parseInt(ai)}}else{if(ak){var ap=k.skin.getSkinElement("controlbar",ak);if(ap){an.background="url("+ap.src+") repeat-x center left";at=ap.width}}else{an.background="url("+k.skin.getSkinElement("controlbar","divider").src+") repeat-x center left";at=k.skin.getSkinElement("controlbar","divider").width}}}else{an.background="url("+k.skin.getSkinElement("controlbar",al).src+") repeat-x center left";at=k.skin.getSkinElement("controlbar",al).width}}if(ao=="left"){an.left=isNaN(am)?ab:am;if(aj){ab+=at}}else{if(ao=="right"){an.right=isNaN(am)?E:am;if(aj){E+=at}}}if(_utils.typeOf(ar)=="undefined"){ar=Q.elements}an.width=at;if(p){_css(Q[al],an)}else{var aq=Z(al,ar,an);if(_utils.exists(k.skin.getSkinElement("controlbar",al+"Over"))){aq.onmouseover=function(au){aq.style.backgroundImage=["url(",k.skin.getSkinElement("controlbar",al+"Over").src,")"].join("")};aq.onmouseout=function(au){aq.style.backgroundImage=["url(",k.skin.getSkinElement("controlbar",al).src,")"].join("")}}}}}function F(){k.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,B);k.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,s);k.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_BUFFER,u);k.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,r);k.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_TIME,I);k.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_MUTE,ag);k.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_VOLUME,m);k.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_COMPLETE,L)}function B(){N();M();w();ae()}function s(ai){ad=k.jwGetPlaylist()[ai.index].duration;I({id:k.id,duration:ad,position:0});u({id:k.id,bufferProgress:0})}function ae(){I({id:k.id,duration:k.jwGetDuration(),position:0});u({id:k.id,bufferProgress:0});ag({id:k.id,mute:k.jwGetMute()});r({id:k.id,newstate:a.api.events.state.IDLE});m({id:k.id,volume:k.jwGetVolume()})}function R(ak,al,aj){if(p){return}if(_utils.exists(k.skin.getSkinElement("controlbar",ak))){var ai=Q[ak];if(_utils.exists(ai)){_css(ai,{cursor:"pointer"});if(al=="fullscreen"){ai.onmouseup=function(am){am.stopPropagation();k.jwSetFullscreen(!k.jwGetFullscreen())}}else{ai.onmouseup=function(am){am.stopPropagation();if(_utils.exists(aj)){k[al](aj)}else{k[al]()}}}}}}function X(ai){if(p){return}var aj=Q[ai+"Slider"];_css(Q.elements,{cursor:"pointer"});_css(aj,{cursor:"pointer"});aj.onmousedown=function(ak){v=ai};aj.onmouseup=function(ak){ak.stopPropagation();af(ak.pageX)};aj.onmousemove=function(ak){if(v=="time"){g=true;var al=ak.pageX-c[ai+"Slider"].left-window.pageXOffset;_css(Q.timeSliderThumb,{left:al})}}}function af(aj){g=false;var ai;if(v=="time"){ai=aj-c.timeSliderRail.left+window.pageXOffset;var al=ai/c.timeSliderRail.width*ad;if(al<0){al=0}else{if(al>ad){al=ad-3}}if(k.jwGetState()==a.api.events.state.PAUSED||k.jwGetState()==a.api.events.state.IDLE){k.jwPlay()}k.jwSeek(al)}else{if(v=="volume"){ai=aj-c.volumeSliderRail.left-window.pageXOffset;var ak=Math.round(ai/c.volumeSliderRail.width*100);if(ak<0){ak=0}else{if(ak>100){ak=100}}if(k.jwGetMute()){k.jwSetMute(false)}k.jwSetVolume(ak)}}v="none"}function u(aj){if(_utils.exists(aj.bufferPercent)){f=aj.bufferPercent}if(c.timeSliderRail){var ak=c.timeSliderRail.width;var ai=isNaN(Math.round(ak*f/100))?0:Math.round(ak*f/100);_css(Q.timeSliderBuffer,{width:ai})}}function ag(ai){if(ai.mute){_hide(Q.muteButton);_show(Q.unmuteButton);_hide(Q.volumeSliderProgress)}else{_show(Q.muteButton);_hide(Q.unmuteButton);_show(Q.volumeSliderProgress)}}function r(ai){if(ai.newstate==a.api.events.state.BUFFERING||ai.newstate==a.api.events.state.PLAYING){_show(Q.pauseButton);_hide(Q.playButton)}else{_hide(Q.pauseButton);_show(Q.playButton)}A();if(ai.newstate==a.api.events.state.IDLE){_hide(Q.timeSliderBuffer);_hide(Q.timeSliderProgress);_hide(Q.timeSliderThumb);I({id:k.id,duration:k.jwGetDuration(),position:0})}else{_show(Q.timeSliderBuffer);if(ai.newstate!=a.api.events.state.BUFFERING){_show(Q.timeSliderProgress);_show(Q.timeSliderThumb)}}}function L(ai){u({bufferPercent:0});I(_utils.extend(ai,{position:0,duration:ad}))}function I(al){if(_utils.exists(al.position)){j=al.position}if(_utils.exists(al.duration)){ad=al.duration}var aj=(j===ad===0)?0:j/ad;var am=c.timeSliderRail;if(am){var ai=isNaN(Math.round(am.width*aj))?0:Math.round(am.width*aj);var ak=ai;if(Q.timeSliderProgress){Q.timeSliderProgress.style.width=ai+"px";if(!g){if(Q.timeSliderThumb){Q.timeSliderThumb.style.left=ak+"px"}}}}if(Q.durationText){Q.durationText.innerHTML=_utils.timeFormat(ad)}if(Q.elapsedText){Q.elapsedText.innerHTML=_utils.timeFormat(j)}}function n(){var am,aj;var ak=document.getElementById(ac.id+"_elements");if(!ak){return}var al=ak.childNodes;for(var ai in ak.childNodes){if(isNaN(parseInt(ai,10))){continue}if(al[ai].id.indexOf(ac.id+"_divider")===0&&aj&&aj.id.indexOf(ac.id+"_divider")===0&&al[ai].style.backgroundImage==aj.style.backgroundImage){al[ai].style.display="none"}else{if(al[ai].id.indexOf(ac.id+"_divider")===0&&am&&am.style.display!="none"){al[ai].style.display="block"}}if(al[ai].style.display!="none"){aj=al[ai]}am=al[ai]}}function w(){n();if(k.jwGetFullscreen()){_show(Q.normalscreenButton);_hide(Q.fullscreenButton)}else{_hide(Q.normalscreenButton);_show(Q.fullscreenButton)}var aj={width:e};var ai={};if(D.position==a.html5.view.positions.OVER||k.jwGetFullscreen()){aj.left=D.margin;aj.width-=2*D.margin;aj.top=y-J().height-D.margin;aj.height=J().height}var al=k.skin.getSkinElement("controlbar","capLeft");var ak=k.skin.getSkinElement("controlbar","capRight");ai.left=al?al.width:0;ai.width=aj.width-ai.left-(ak?ak.width:0);var am=!_utils.exists(k.skin.getSkinElement("controlbar","timeSliderCapLeft"))?0:k.skin.getSkinElement("controlbar","timeSliderCapLeft").width;_css(Q.timeSliderRail,{width:(ai.width-ab-E),left:am});if(_utils.exists(Q.timeSliderCapRight)){_css(Q.timeSliderCapRight,{left:am+(ai.width-ab-E)})}_css(ac,aj);_css(Q.elements,ai);_css(Q.background,ai);q();return aj}function m(am){if(_utils.exists(Q.volumeSliderRail)){var ak=isNaN(am.volume/100)?1:am.volume/100;var al=_utils.parseDimension(Q.volumeSliderRail.style.width);var ai=isNaN(Math.round(al*ak))?0:Math.round(al*ak);var an=_utils.parseDimension(Q.volumeSliderRail.style.right);var aj=(!_utils.exists(k.skin.getSkinElement("controlbar","volumeSliderCapLeft")))?0:k.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;_css(Q.volumeSliderProgress,{width:ai,left:aj});if(_utils.exists(Q.volumeSliderCapLeft)){_css(Q.volumeSliderCapLeft,{left:0})}}}function t(){N();M();q();p=true;F();D.idlehide=(D.idlehide.toString().toLowerCase()=="true");if(D.position==a.html5.view.positions.OVER&&D.idlehide){ac.style.opacity=0;S=true}else{setTimeout((function(){S=true;T()}),1)}ae()}t();return this}})(jwplayer);(function(b){var a=["width","height","state","playlist","item","position","buffer","duration","volume","mute","fullscreen"];var c=b.utils;b.html5.controller=function(z,w,h,v){var C=z;var G=h;var g=v;var o=w;var J=true;var e=-1;var A=c.exists(G.config.debug)&&(G.config.debug.toString().toLowerCase()=="console");var m=new b.html5.eventdispatcher(o.id,A);c.extend(this,m);var E=[];var d=false;function r(M){if(d){m.sendEvent(M.type,M)}else{E.push(M)}}function K(M){if(!d){m.sendEvent(b.api.events.JWPLAYER_READY,M);if(b.utils.exists(window.playerReady)){playerReady(M)}if(b.utils.exists(window[h.config.playerReady])){window[h.config.playerReady](M)}while(E.length>0){var O=E.shift();m.sendEvent(O.type,O)}if(h.config.autostart&&!b.utils.isIOS()){t(G.item)}while(p.length>0){var N=p.shift();x(N.method,N.arguments)}d=true}}G.addGlobalListener(r);G.addEventListener(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL,function(){G.getMedia().play()});G.addEventListener(b.api.events.JWPLAYER_MEDIA_TIME,function(M){if(M.position>=G.playlist[G.item].start&&e>=0){G.playlist[G.item].start=e;e=-1}});G.addEventListener(b.api.events.JWPLAYER_MEDIA_COMPLETE,function(M){setTimeout(s,25)});function u(){try{f(G.item);if(G.playlist[G.item].levels[0].file.length>0){if(J||G.state==b.api.events.state.IDLE){G.getMedia().load(G.playlist[G.item]);J=false}else{if(G.state==b.api.events.state.PAUSED){G.getMedia().play()}}}return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function I(){try{if(G.playlist[G.item].levels[0].file.length>0){switch(G.state){case b.api.events.state.PLAYING:case b.api.events.state.BUFFERING:G.getMedia().pause();break}}return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function D(M){try{if(G.playlist[G.item].levels[0].file.length>0){if(typeof M!="number"){M=parseFloat(M)}switch(G.state){case b.api.events.state.IDLE:if(e<0){e=G.playlist[G.item].start;G.playlist[G.item].start=M}u();break;case b.api.events.state.PLAYING:case b.api.events.state.PAUSED:case b.api.events.state.BUFFERING:G.seek(M);break}}return true}catch(N){m.sendEvent(b.api.events.JWPLAYER_ERROR,N)}return false}function n(M){if(!c.exists(M)){M=true}try{G.getMedia().stop(M);return true}catch(N){m.sendEvent(b.api.events.JWPLAYER_ERROR,N)}return false}function k(){try{if(G.playlist[G.item].levels[0].file.length>0){if(G.config.shuffle){f(y())}else{if(G.item+1==G.playlist.length){f(0)}else{f(G.item+1)}}}if(G.state!=b.api.events.state.IDLE){var N=G.state;G.state=b.api.events.state.IDLE;m.sendEvent(b.api.events.JWPLAYER_PLAYER_STATE,{oldstate:N,newstate:b.api.events.state.IDLE})}u();return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function j(){try{if(G.playlist[G.item].levels[0].file.length>0){if(G.config.shuffle){f(y())}else{if(G.item===0){f(G.playlist.length-1)}else{f(G.item-1)}}}if(G.state!=b.api.events.state.IDLE){var N=G.state;G.state=b.api.events.state.IDLE;m.sendEvent(b.api.events.JWPLAYER_PLAYER_STATE,{oldstate:N,newstate:b.api.events.state.IDLE})}u();return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function y(){var M=null;if(G.playlist.length>1){while(!c.exists(M)){M=Math.floor(Math.random()*G.playlist.length);if(M==G.item){M=null}}}else{M=0}return M}function t(N){if(!G.playlist||!G.playlist[N]){return false}try{if(G.playlist[N].levels[0].file.length>0){var O=G.state;if(O!==b.api.events.state.IDLE){if(G.playlist[G.item].provider==G.playlist[N].provider){n(false)}else{n()}}f(N);u()}return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function f(M){if(!G.playlist[M]){return}G.setActiveMediaProvider(G.playlist[M]);if(G.item!=M){G.item=M;J=true;m.sendEvent(b.api.events.JWPLAYER_PLAYLIST_ITEM,{index:M})}}function H(N){try{f(G.item);var O=G.getMedia();switch(typeof(N)){case"number":O.volume(N);break;case"string":O.volume(parseInt(N,10));break}return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function q(N){try{f(G.item);var O=G.getMedia();if(typeof N=="undefined"){O.mute(!G.mute)}else{if(N.toString().toLowerCase()=="true"){O.mute(true)}else{O.mute(false)}}return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function l(N,M){try{G.width=N;G.height=M;g.resize(N,M);m.sendEvent(b.api.events.JWPLAYER_RESIZE,{width:G.width,height:G.height});return true}catch(O){m.sendEvent(b.api.events.JWPLAYER_ERROR,O)}return false}function B(N){try{if(typeof N=="undefined"){G.fullscreen=!G.fullscreen;g.fullscreen(!G.fullscreen)}else{if(N.toString().toLowerCase()=="true"){G.fullscreen=true;g.fullscreen(true)}else{G.fullscreen=false;g.fullscreen(false)}}m.sendEvent(b.api.events.JWPLAYER_RESIZE,{width:G.width,height:G.height});m.sendEvent(b.api.events.JWPLAYER_FULLSCREEN,{fullscreen:N});return true}catch(M){m.sendEvent(b.api.events.JWPLAYER_ERROR,M)}return false}function L(M){try{n();G.loadPlaylist(M);f(G.item);return true}catch(N){m.sendEvent(b.api.events.JWPLAYER_ERROR,N)}return false}b.html5.controller.repeatoptions={LIST:"LIST",ALWAYS:"ALWAYS",SINGLE:"SINGLE",NONE:"NONE"};function s(){switch(G.config.repeat.toUpperCase()){case b.html5.controller.repeatoptions.SINGLE:u();break;case b.html5.controller.repeatoptions.ALWAYS:if(G.item==G.playlist.length-1&&!G.config.shuffle){t(0)}else{k()}break;case b.html5.controller.repeatoptions.LIST:if(G.item==G.playlist.length-1&&!G.config.shuffle){n();f(0)}else{k()}break;default:n();break}}var p=[];function F(M){return function(){if(d){x(M,arguments)}else{p.push({method:M,arguments:arguments})}}}function x(O,N){var M=[];for(i=0;i<N.length;i++){M.push(N[i])}O.apply(this,M)}this.play=F(u);this.pause=F(I);this.seek=F(D);this.stop=F(n);this.next=F(k);this.prev=F(j);this.item=F(t);this.setVolume=F(H);this.setMute=F(q);this.resize=F(l);this.setFullscreen=F(B);this.load=F(L);this.playerReady=K}})(jwplayer);(function(a){a.html5.defaultSkin=function(){this.text='<?xml version="1.0" ?><skin author="LongTail Video" name="Five" version="1.0"><settings><setting name="backcolor" value="0xFFFFFF"/><setting name="frontcolor" value="0x000000"/><setting name="lightcolor" value="0x000000"/><setting name="screencolor" value="0x000000"/></settings><components><component name="controlbar"><settings><setting name="margin" value="20"/><setting name="fontsize" value="11"/></settings><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAIAAABvFaqvAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFJJREFUeNrslLENwAAIwxLU/09j5AiOgD5hVQzNAVY8JK4qEfHMIKBnd2+BQlBINaiRtL/aV2rdzYBsM6CIONbI1NZENTr3RwdB2PlnJgJ6BRgA4hwu5Qg5iswAAAAASUVORK5CYII="/><element name="capLeft" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD5JREFUeNosi8ENACAMAgnuv14H0Z8asI19XEjhOiKCMmibVgJTUt7V6fe9KXOtSQCfctJHu2q3/ot79hNgANc2OTz9uTCCAAAAAElFTkSuQmCC"/><element name="capRight" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD5JREFUeNosi8ENACAMAgnuv14H0Z8asI19XEjhOiKCMmibVgJTUt7V6fe9KXOtSQCfctJHu2q3/ot79hNgANc2OTz9uTCCAAAAAElFTkSuQmCC"/><element name="divider" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD5JREFUeNosi8ENACAMAgnuv14H0Z8asI19XEjhOiKCMmibVgJTUt7V6fe9KXOtSQCfctJHu2q3/ot79hNgANc2OTz9uTCCAAAAAElFTkSuQmCC"/><element name="playButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhJREFUeNpiYqABYBo1dNRQ+hr6H4jvA3E8NS39j4SpZvh/LJig4YxEGEqy3kET+w+AOGFQRhTJhrEQkGcczfujhg4CQwECDADpTRWU/B3wHQAAAABJRU5ErkJggg=="/><element name="pauseButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAChJREFUeNpiYBgFo2DwA0YC8v/R1P4nRu+ooaOGUtnQUTAKhgIACDAAFCwQCfAJ4gwAAAAASUVORK5CYII="/><element name="prevButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEtJREFUeNpiYBgFo2Dog/9QDAPyQHweTYwiQ/2B+D0Wi8g2tB+JTdBQRiIMJVkvEy0iglhDF9Aq9uOpHVEwoE+NJDUKRsFgAAABBgDe2hqZcNNL0AAAAABJRU5ErkJggg=="/><element name="nextButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAElJREFUeNpiYBgFo2Dog/9AfB6I5dHE/lNqKAi/B2J/ahsKw/3EGMpIhKEk66WJoaR6fz61IyqemhEFSlL61ExSo2AUDAYAEGAAiG4hj+5t7M8AAAAASUVORK5CYII="/><element name="timeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADxJREFUeNpiYBgFo2AU0Bwwzluw+D8tLWARFhKiqQ9YuLg4aWsBGxs7bS1gZ6e5BWyjSX0UjIKhDgACDABlYQOGh5pYywAAAABJRU5ErkJggg=="/><element name="timeSliderBuffer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYBgFo2AU0Bww1jc0/aelBSz8/Pw09QELOzs7bS1gY2OjrQWsrKy09gHraFIfBaNgqAOAAAMAvy0DChXHsZMAAAAASUVORK5CYII="/><element name="timeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiYBgFo2AU0BwwAvF/WlrARGsfjFow8BaMglEwCugAAAIMAOHfAQunR+XzAAAAAElFTkSuQmCC"/><element name="timeSliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAICAYAAAA870V8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABZJREFUeNpiZICA/yCCiQEJUJcDEGAAY0gBD1/m7Q0AAAAASUVORK5CYII="/><element name="muteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiYBgFIw3MB+L/5Gj8j6yRiRTFyICJXHfTXyMLAXlGati4YDRFDj8AEGAABk8GSqqS4CoAAAAASUVORK5CYII="/><element name="unmuteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYBgFgxz8p7bm+cQa+h8LHy7GhEcjIz4bmAjYykiun/8j0fakGPIfTfPgiSr6aB4FVAcAAQYAWdwR1G1Wd2gAAAAASUVORK5CYII="/><element name="volumeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAYCAYAAADkgu3FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGpJREFUeNpi/P//PwM9ABMDncCoRYPfIqqDZcuW1UPp/6AUDcNM1DQYKtRAlaAj1mCSLSLXYIIWUctgDItoZfDA5aOoqKhGEANIM9LVR7SymGDQUctikuOIXkFNdhHEOFrDjlpEd4sAAgwAriRMub95fu8AAAAASUVORK5CYII="/><element name="volumeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAYCAYAAADkgu3FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFtJREFUeNpi/P//PwM9ABMDncCoRYPfIlqAeij9H5SiYZiqBqPTlFqE02BKLSLaYFItIttgQhZRzWB8FjENiuRJ7aAbsMQwYMl7wDIsWUUQ42gNO2oR3S0CCDAAKhKq6MLLn8oAAAAASUVORK5CYII="/><element name="fullscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAE5JREFUeNpiYBgFo2DQA0YC8v/xqP1PjDlMRDrEgUgxkgHIlfZoriVGjmzLsLFHAW2D6D8eA/9Tw7L/BAwgJE90PvhPpNgoGAVDEQAEGAAMdhTyXcPKcAAAAABJRU5ErkJggg=="/><element name="normalscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEZJREFUeNpiYBgFo2DIg/9UUkOUAf8JiFFsyX88fJyAkcQgYMQjNkzBoAgiezyRbE+tFGSPxQJ7auYBmma0UTAKBhgABBgAJAEY6zON61sAAAAASUVORK5CYII="/></elements></component><component name="display"><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC"/><element name="playIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg=="/><element name="muteIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNrs1jEOgCAMBVAg7t5/8qaoIy4uoobyXsLCxA+0NCUAAADGUWvdQoQ41x4ixNBB2hBvBskdD3w5ZCkl3+33VqI0kjBBlh9rp+uTcyOP33TnolfsU85XX3yIRpQph8ZQY3wTZtU5AACASA4BBgDHoVuY1/fvOQAAAABJRU5ErkJggg=="/><element name="errorIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWlJREFUeNrsl+1twjAQhsHq/7BBYQLYIBmBDcoGMAIjtBPQTcII2SDtBDBBwrU6pGsUO7YbO470PtKJkz9iH++d4ywWAAAAAABgljRNsyWr2bZzDuJG1rLdZhcMbTjrBCGDyUKsqQLFciJb9bSvuG/WagRVRUVUI6gqy5HVeKWfSgRyJruKIU//TrZTSn2nmlaXThrloi/v9F2STC1W4+Aw5cBzkquRc09bofFNc6YLxEON0VUZS5FPTftO49vMjRsIF3RhOGr7/D/pJw+FKU+q0vDyq8W42jCunDqI3LC5XxNj2wHLU1XjaRnb0Lhykhqhhd8MtSF5J9tbjCv4mXGvKJz/65FF/qJryyaaIvzP2QRxZTX2nTuXjvV/VPFSwyLnW7mpH99yTh1FEVro6JBSd40/pMrRdV8vPtcKl28T2pT8TnFZ4yNosct3Q0io6JfBiz1FlGdqVQH3VHnepAEAAAAAADDzEGAAcTwB10jWgxcAAAAASUVORK5CYII="/><element name="bufferIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuhJREFUeNrsWr9rU1EUznuNGqvFQh1ULOhiBx0KDtIuioO4pJuik3FxFfUPaAV1FTdx0Q5d2g4FFxehTnEpZHFoBy20tCIWtGq0TZP4HfkeHB5N8m6Sl/sa74XDybvv3vvOd8/Pe4lXrVZT3dD8VJc0B8QBcUAcEAfESktHGeR5XtMfqFQq/f92zPe/NbtGlKTdCY30kuxrpMGO94BlQCXs+rbh3ONgA6BlzP1p20d80gEI5hmA2A92Qua1Q2PtAFISM+bvjMG8U+Q7oA3rQGASwrYCU6WpNdLGYbA+Pq5jjXIiwi8EEa2UDbQSaKOIuV+SlkcCrfjY8XTI9EpKGwP0C2kru2hLtHqa4zoXtZRWyvi4CLwv9Opr6Hkn6A9HKgEANsQ1iqC3Ub/vRUk2JgmRkatK36kVrnt0qObunwUdUUMXMWYpakJsO5Am8tAw2GBIgwWA+G2S2dMpiw0gDioQRQJoKhRb1QiDwlHZUABYbaXWsm5ae6loTE4ZDxN4CZar8foVzOJ2iyZ2kWF3t7YIevffaMT5yJ70kQb2fQ1sE5SHr2wazs2wgMxgbsEKEAgxAvZUJbQLBGTSBMgNrncJbA6AljtS/eKDJ0Ez+DmrQEzXS2h1Ck25kAg0IZcUOaydCy4sYnN2fOA+2AP16gNoHALlQ+fwH7XO4CxLenUpgj4xr6ugY2roPMbMx+Xs18m/E8CVEIhxsNeg83XWOAN6grG3lGbk8uE5fr4B/WH3cJw+co/l9nTYsSGYCJ/lY5/qv0thn6nrIWmjeJcPSnWOeY++AkF8tpJHIMAUs/MaBBpj3znZfQo5psY+ZrG4gv5HickjEOymKjEeRpgyST6IuZcTcWbnjcgdPi5ghxciRKsl1lDSsgwA1i8fssonJgzmTSqfGUkCENndNdAL7PS6QQ7ZYISTo+1qq0LEWjTWcvY4isa4z+yfQB+7ooyHVg5RI7/i1Ijn/vnggDggDogD4oC00P4KMACd/juEHOrS4AAAAABJRU5ErkJggg=="/></elements></component><component name="dock"><elements><element name="button" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFBJREFUeNrs0cEJACAQA8Eofu0fu/W6EM5ZSAFDRpKTBs00CQQEBAQEBAQEBAQEBAQEBATkK8iqbY+AgICAgICAgICAgICAgICAgIC86QowAG5PAQzEJ0lKAAAAAElFTkSuQmCC"/></elements></component><component name="playlist"><elements><element name="item" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHhJREFUeNrs2NEJwCAMBcBYuv/CFuIE9VN47WWCR7iocXR3pdWdGPqqwIoMjYfQeAiNh9B4JHc6MHQVHnjggQceeOCBBx77TifyeOY0iHi8DqIdEY8dD5cL094eePzINB5CO/LwcOTptNB4CP25L4TIbZzpU7UEGAA5wz1uF5rF9AAAAABJRU5ErkJggg=="/><element name="sliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAA8CAIAAADpFA0BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUeNrsy6ENACAMAMHClp2wYxZLAg5Fcu9e3OjuOKqqfTMzbs14CIZhGIZhGIZhGP4VLwEGAK/BBnVFpB0oAAAAAElFTkSuQmCC"/><element name="sliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAA8CAIAAADpFA0BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNrsy7ENACAMBLE8++8caFFKKiRffU53112SGs3ttOohGIZhGIZhGIZh+Fe8BRgAiaUGde6NOSEAAAAASUVORK5CYII="/></elements></component></components></skin>';this.xml=null;if(window.DOMParser){parser=new DOMParser();this.xml=parser.parseFromString(this.text,"text/xml")}else{this.xml=new ActiveXObject("Microsoft.XMLDOM");this.xml.async="false";this.xml.loadXML(this.text)}return this}})(jwplayer);(function(a){_utils=a.utils;_css=_utils.css;_hide=function(b){_css(b,{display:"none"})};_show=function(b){_css(b,{display:"block"})};a.html5.display=function(k,G){var j={icons:true,showmute:false};var Q=_utils.extend({},j,G);var h=k;var P={};var e;var u;var w;var N;var s;var I;var A;var J=!_utils.exists(h.skin.getComponentSettings("display").bufferrotation)?15:parseInt(h.skin.getComponentSettings("display").bufferrotation,10);var q=!_utils.exists(h.skin.getComponentSettings("display").bufferinterval)?100:parseInt(h.skin.getComponentSettings("display").bufferinterval,10);var z=-1;var t="";var K=true;var d;var g=false;var n=false;var H=new a.html5.eventdispatcher();_utils.extend(this,H);var D={display:{style:{cursor:"pointer",top:0,left:0,overflow:"hidden"},click:m},display_icon:{style:{cursor:"pointer",position:"absolute",top:((h.skin.getSkinElement("display","background").height-h.skin.getSkinElement("display","playIcon").height)/2),left:((h.skin.getSkinElement("display","background").width-h.skin.getSkinElement("display","playIcon").width)/2),border:0,margin:0,padding:0,zIndex:3,display:"none"}},display_iconBackground:{style:{cursor:"pointer",position:"absolute",top:((u-h.skin.getSkinElement("display","background").height)/2),left:((e-h.skin.getSkinElement("display","background").width)/2),border:0,backgroundImage:(["url(",h.skin.getSkinElement("display","background").src,")"]).join(""),width:h.skin.getSkinElement("display","background").width,height:h.skin.getSkinElement("display","background").height,margin:0,padding:0,zIndex:2,display:"none"}},display_image:{style:{display:"none",width:e,height:u,position:"absolute",cursor:"pointer",left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1}},display_text:{style:{zIndex:4,position:"relative",opacity:0.8,backgroundColor:parseInt("000000",16),color:parseInt("ffffff",16),textAlign:"center",fontFamily:"Arial,sans-serif",padding:"0 5px",fontSize:14}}};h.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,p);h.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_MUTE,p);h.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,p);h.jwAddEventListener(a.api.events.JWPLAYER_ERROR,o);L();function L(){P.display=C("div","display");P.display_text=C("div","display_text");P.display.appendChild(P.display_text);P.display_image=C("img","display_image");P.display_image.onerror=function(R){_hide(P.display_image)};P.display_image.onload=y;P.display_icon=C("div","display_icon");P.display_iconBackground=C("div","display_iconBackground");P.display.appendChild(P.display_image);P.display_iconBackground.appendChild(P.display_icon);P.display.appendChild(P.display_iconBackground);f();setTimeout((function(){n=true;if(Q.icons.toString()=="true"){F()}}),1)}this.getDisplayElement=function(){return P.display};this.resize=function(S,R){_css(P.display,{width:S,height:R});_css(P.display_text,{width:(S-10),top:((R-P.display_text.getBoundingClientRect().height)/2)});_css(P.display_iconBackground,{top:((R-h.skin.getSkinElement("display","background").height)/2),left:((S-h.skin.getSkinElement("display","background").width)/2)});if(e!=S||u!=R){e=S;u=R;d=undefined;F()}c();p({})};this.show=function(){if(g){g=false;r(h.jwGetState())}};this.hide=function(){if(!g){B();g=true}};function y(R){w=P.display_image.naturalWidth;N=P.display_image.naturalHeight;c()}function c(){_utils.stretch(h.jwGetStretching(),P.display_image,e,u,w,N)}function C(R,T){var S=document.createElement(R);S.id=h.id+"_jwplayer_"+T;_css(S,D[T].style);return S}function f(){for(var R in P){if(_utils.exists(D[R].click)){P[R].onclick=D[R].click}}}function m(R){if(typeof R.preventDefault!="undefined"){R.preventDefault()}else{R.returnValue=false}if(h.jwGetState()!=a.api.events.state.PLAYING){h.jwPlay()}else{h.jwPause()}}function O(R){if(A){B();return}P.display_icon.style.backgroundImage=(["url(",h.skin.getSkinElement("display",R).src,")"]).join("");_css(P.display_icon,{width:h.skin.getSkinElement("display",R).width,height:h.skin.getSkinElement("display",R).height,top:(h.skin.getSkinElement("display","background").height-h.skin.getSkinElement("display",R).height)/2,left:(h.skin.getSkinElement("display","background").width-h.skin.getSkinElement("display",R).width)/2});b();if(_utils.exists(h.skin.getSkinElement("display",R+"Over"))){P.display_icon.onmouseover=function(S){P.display_icon.style.backgroundImage=["url(",h.skin.getSkinElement("display",R+"Over").src,")"].join("")};P.display_icon.onmouseout=function(S){P.display_icon.style.backgroundImage=["url(",h.skin.getSkinElement("display",R).src,")"].join("")}}else{P.display_icon.onmouseover=null;P.display_icon.onmouseout=null}}function B(){if(Q.icons.toString()=="true"){_hide(P.display_icon);_hide(P.display_iconBackground);M()}}function b(){if(!g&&Q.icons.toString()=="true"){_show(P.display_icon);_show(P.display_iconBackground);F()}}function o(R){A=true;B();P.display_text.innerHTML=R.error;_show(P.display_text);P.display_text.style.top=((u-P.display_text.getBoundingClientRect().height)/2)+"px"}function E(){P.display_image.style.display="none"}function p(R){if((R.type==a.api.events.JWPLAYER_PLAYER_STATE||R.type==a.api.events.JWPLAYER_PLAYLIST_ITEM)&&A){A=false;_hide(P.display_text)}var S=h.jwGetState();if(S==t){return}t=S;if(z>=0){clearTimeout(z)}if(K||h.jwGetState()==a.api.events.state.PLAYING||h.jwGetState()==a.api.events.state.PAUSED){r(h.jwGetState())}else{z=setTimeout(l(h.jwGetState()),500)}}function l(R){return(function(){r(R)})}function r(R){if(_utils.exists(I)){clearInterval(I);I=null;_utils.animations.rotate(P.display_icon,0)}switch(R){case a.api.events.state.BUFFERING:if(_utils.isIOS()){E();B()}else{if(h.jwGetPlaylist()[h.jwGetItem()].provider=="sound"){v()}s=0;I=setInterval(function(){s+=J;_utils.animations.rotate(P.display_icon,s%360)},q);O("bufferIcon");K=true}break;case a.api.events.state.PAUSED:if(!_utils.isIOS()){if(h.jwGetPlaylist()[h.jwGetItem()].provider!="sound"){_css(P.display_image,{background:"transparent no-repeat center center"})}O("playIcon");K=true}break;case a.api.events.state.IDLE:if(h.jwGetPlaylist()[h.jwGetItem()]&&h.jwGetPlaylist()[h.jwGetItem()].image){v()}else{E()}O("playIcon");K=true;break;default:if(h.jwGetPlaylist()[h.jwGetItem()]&&h.jwGetPlaylist()[h.jwGetItem()].provider=="sound"){if(_utils.isIOS()){E();K=false}else{v()}}else{E();K=false}if(h.jwGetMute()&&Q.showmute){O("muteIcon")}else{B()}break}z=-1}function v(){if(h.jwGetPlaylist()[h.jwGetItem()]&&h.jwGetPlaylist()[h.jwGetItem()].image){_css(P.display_image,{display:"block"});P.display_image.src=_utils.getAbsolutePath(h.jwGetPlaylist()[h.jwGetItem()].image)}}function x(R){return function(){if(!n){return}if(!g&&d!=R){d=R;H.sendEvent(R,{component:"display",boundingRect:_utils.getDimensions(P.display_iconBackground)})}}}var F=x(a.api.events.JWPLAYER_COMPONENT_SHOW);var M=x(a.api.events.JWPLAYER_COMPONENT_HIDE);return this}})(jwplayer);(function(a){_css=a.utils.css;a.html5.dock=function(p,u){function q(){return{align:a.html5.view.positions.RIGHT}}var k=a.utils.extend({},q(),u);if(k.align=="FALSE"){return}var f={};var s=[];var g;var v;var d=false;var t=false;var e={x:0,y:0,width:0,height:0};var r;var j=new a.html5.eventdispatcher();_utils.extend(this,j);var m=document.createElement("div");m.id=p.id+"_jwplayer_dock";p.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,l);this.getDisplayElement=function(){return m};this.setButton=function(A,x,y,z){if(!x&&f[A]){a.utils.arrays.remove(s,A);m.removeChild(f[A].div);delete f[A]}else{if(x){if(!f[A]){f[A]={}}f[A].handler=x;f[A].outGraphic=y;f[A].overGraphic=z;if(!f[A].div){s.push(A);f[A].div=document.createElement("div");f[A].div.style.position="relative";m.appendChild(f[A].div);f[A].div.appendChild(document.createElement("img"));f[A].div.childNodes[0].style.position="absolute";f[A].div.childNodes[0].style.left=0;f[A].div.childNodes[0].style.top=0;f[A].div.childNodes[0].style.zIndex=10;f[A].div.childNodes[0].style.cursor="pointer";f[A].div.appendChild(document.createElement("img"));f[A].div.childNodes[1].style.position="absolute";f[A].div.childNodes[1].style.left=0;f[A].div.childNodes[1].style.top=0;if(p.skin.getSkinElement("dock","button")){f[A].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}f[A].div.childNodes[1].style.zIndex=9;f[A].div.childNodes[1].style.cursor="pointer";f[A].div.onmouseover=function(){if(f[A].overGraphic){f[A].div.childNodes[0].src=f[A].overGraphic}if(p.skin.getSkinElement("dock","buttonOver")){f[A].div.childNodes[1].src=p.skin.getSkinElement("dock","buttonOver").src}};f[A].div.onmouseout=function(){if(f[A].outGraphic){f[A].div.childNodes[0].src=f[A].outGraphic}if(p.skin.getSkinElement("dock","button")){f[A].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}};if(f[A].overGraphic){f[A].div.childNodes[0].src=f[A].overGraphic}if(f[A].outGraphic){f[A].div.childNodes[0].src=f[A].outGraphic}if(p.skin.getSkinElement("dock","button")){f[A].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}}if(x){f[A].div.onclick=function(B){B.preventDefault();a(p.id).callback(A);if(f[A].overGraphic){f[A].div.childNodes[0].src=f[A].overGraphic}if(p.skin.getSkinElement("dock","button")){f[A].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}}}}}h(g,v)};function h(x,J){if(s.length>0){var y=10;var I=y;var F=-1;var G=p.skin.getSkinElement("dock","button").height;var E=p.skin.getSkinElement("dock","button").width;var C=x-E-y;var H,B;if(k.align==a.html5.view.positions.LEFT){F=1;C=y}for(var z=0;z<s.length;z++){var K=Math.floor(I/J);if((I+G+y)>((K+1)*J)){I=((K+1)*J)+y;K=Math.floor(I/J)}var A=f[s[z]].div;A.style.top=(I%J)+"px";A.style.left=(C+(p.skin.getSkinElement("dock","button").width+y)*K*F)+"px";var D={x:a.utils.parseDimension(A.style.left),y:a.utils.parseDimension(A.style.top),width:E,height:G};if(!H||(D.x<=H.x&&D.y<=H.y)){H=D}if(!B||(D.x>=B.x&&D.y>=B.y)){B=D}I+=p.skin.getSkinElement("dock","button").height+y}e={x:H.x,y:H.y,width:B.x-H.x+B.width,height:H.y-B.y+B.height}}if(t!=p.jwGetFullscreen()||g!=x||v!=J){g=x;v=J;t=p.jwGetFullscreen();r=undefined;setTimeout(n,1)}}function b(x){return function(){if(!d&&r!=x&&s.length>0){r=x;j.sendEvent(x,{component:"dock",boundingRect:e})}}}function l(x){if(a.utils.isIOS()){switch(x.newstate){case a.api.events.state.IDLE:o();break;default:c();break}}}var n=b(a.api.events.JWPLAYER_COMPONENT_SHOW);var w=b(a.api.events.JWPLAYER_COMPONENT_HIDE);this.resize=h;var o=function(){_css(m,{display:"block"});if(d){d=false;n()}};var c=function(){_css(m,{display:"none"});if(!d){w();d=true}};this.hide=c;this.show=o;return this}})(jwplayer);(function(a){a.html5.eventdispatcher=function(d,b){var c=new a.events.eventdispatcher(b);a.utils.extend(this,c);this.sendEvent=function(e,f){if(!a.utils.exists(f)){f={}}a.utils.extend(f,{id:d,version:a.version,type:e});c.sendEvent(e,f)}}})(jwplayer);(function(a){var b={prefix:"http://l.longtailvideo.com/html5/",file:"logo.png",link:"http://www.longtailvideo.com/players/jw-flv-player/",margin:8,out:0.5,over:1,timeout:5,hide:true,position:"bottom-left"};_css=a.utils.css;a.html5.logo=function(n,r){var q=n;var u;var d;var t;var h=false;g();function g(){o();c();l()}function o(){if(b.prefix){var v=n.version.split(/\W/).splice(0,2).join("/");if(b.prefix.indexOf(v)<0){b.prefix+=v+"/"}}if(r.position==a.html5.view.positions.OVER){r.position=b.position}d=a.utils.extend({},b)}function c(){t=document.createElement("img");t.id=q.id+"_jwplayer_logo";t.style.display="none";t.onload=function(v){_css(t,k());q.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,j);p()};if(!d.file){return}if(d.file.indexOf("http://")===0){t.src=d.file}else{t.src=d.prefix+d.file}}if(!d.file){return}this.resize=function(w,v){};this.getDisplayElement=function(){return t};function l(){if(d.link){t.onmouseover=f;t.onmouseout=p;t.onclick=s}else{this.mouseEnabled=false}}function s(v){if(typeof v!="undefined"){v.stopPropagation()}if(!h){return}q.jwPause();q.jwSetFullscreen(false);if(d.link){window.open(d.link,"_top")}return}function p(v){if(d.link&&h){t.style.opacity=d.out}return}function f(v){if(d.hide.toString()=="true"&&h){t.style.opacity=d.over}return}function k(){var x={textDecoration:"none",position:"absolute",cursor:"pointer"};x.display=(d.hide.toString()=="true")?"none":"block";var w=d.position.toLowerCase().split("-");for(var v in w){x[w[v]]=d.margin}return x}function m(){if(d.hide.toString()=="true"){t.style.display="block";t.style.opacity=0;a.utils.fadeTo(t,d.out,0.1,parseFloat(t.style.opacity));u=setTimeout(function(){e()},d.timeout*1000)}h=true}function e(){h=false;if(d.hide.toString()=="true"){a.utils.fadeTo(t,0,0.1,parseFloat(t.style.opacity))}}function j(v){if(v.newstate==a.api.events.state.BUFFERING){clearTimeout(u);m()}}return this}})(jwplayer);(function(a){var c={ended:a.api.events.state.IDLE,playing:a.api.events.state.PLAYING,pause:a.api.events.state.PAUSED,buffering:a.api.events.state.BUFFERING};var e=a.utils;var b=e.css;var d=e.isIOS();a.html5.mediavideo=function(h,s){var r={abort:n,canplay:k,canplaythrough:k,durationchange:G,emptied:n,ended:k,error:u,loadeddata:G,loadedmetadata:G,loadstart:k,pause:k,play:n,playing:k,progress:v,ratechange:n,seeked:k,seeking:k,stalled:k,suspend:k,timeupdate:D,volumechange:n,waiting:k,canshowcurrentframe:n,dataunavailable:n,empty:n,load:z,loadedfirstframe:n};var j=new a.html5.eventdispatcher();e.extend(this,j);var y=h,l=s,m,B,A,x,f,H=false,C,p,q;o();this.load=function(J,K){if(typeof K=="undefined"){K=true}x=J;e.empty(m);q=0;if(J.levels&&J.levels.length>0){if(J.levels.length==1){m.src=J.levels[0].file}else{if(m.src){m.removeAttribute("src")}for(var I=0;I<J.levels.length;I++){var L=m.ownerDocument.createElement("source");L.src=J.levels[I].file;m.appendChild(L);q++}}}else{m.src=J.file}if(d){if(J.image){m.poster=J.image}m.controls="controls";m.style.display="block"}C=p=A=false;y.buffer=0;if(!e.exists(J.start)){J.start=0}y.duration=J.duration;j.sendEvent(a.api.events.JWPLAYER_MEDIA_LOADED);if((!d&&J.levels.length==1)||!H){m.load()}H=false;if(K){E(a.api.events.state.BUFFERING);j.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:0});this.play()}};this.play=function(){if(B!=a.api.events.state.PLAYING){t();if(p){E(a.api.events.state.PLAYING)}else{E(a.api.events.state.BUFFERING)}m.play()}};this.pause=function(){m.pause();E(a.api.events.state.PAUSED)};this.seek=function(I){if(!(y.duration<=0||isNaN(y.duration))&&!(y.position<=0||isNaN(y.position))){m.currentTime=I;m.play()}};_stop=this.stop=function(I){if(!e.exists(I)){I=true}g();if(I){m.style.display="none";p=false;var J=navigator.userAgent;if(J.match(/chrome/i)){m.src=undefined}else{if(J.match(/safari/i)){m.removeAttribute("src")}else{m.src=""}}m.removeAttribute("controls");m.removeAttribute("poster");e.empty(m);m.load();H=true;if(m.webkitSupportsFullscreen){try{m.webkitExitFullscreen()}catch(K){}}}E(a.api.events.state.IDLE)};this.fullscreen=function(I){if(I===true){this.resize("100%","100%")}else{this.resize(y.config.width,y.config.height)}};this.resize=function(J,I){if(false){b(l,{width:J,height:I})}j.sendEvent(a.api.events.JWPLAYER_MEDIA_RESIZE,{fullscreen:y.fullscreen,width:J,hieght:I})};this.volume=function(I){if(!d){m.volume=I/100;y.volume=I;j.sendEvent(a.api.events.JWPLAYER_MEDIA_VOLUME,{volume:Math.round(I)})}};this.mute=function(I){if(!d){m.muted=I;y.mute=I;j.sendEvent(a.api.events.JWPLAYER_MEDIA_MUTE,{mute:I})}};this.getDisplayElement=function(){return m};this.hasChrome=function(){return false};function o(){m=document.createElement("video");B=a.api.events.state.IDLE;for(var I in r){m.addEventListener(I,function(J){if(e.exists(J.target.parentNode)){r[J.type](J)}},true)}m.setAttribute("x-webkit-airplay","allow");if(l.parentNode){l.parentNode.replaceChild(m,l)}if(!m.id){m.id=l.id}}function E(I){if(I==a.api.events.state.PAUSED&&B==a.api.events.state.IDLE){return}if(B!=I){var J=B;y.state=B=I;j.sendEvent(a.api.events.JWPLAYER_PLAYER_STATE,{oldstate:J,newstate:I})}}function n(I){}function v(K){var J;if(e.exists(K)&&K.lengthComputable&&K.total){J=K.loaded/K.total*100}else{if(e.exists(m.buffered)&&(m.buffered.length>0)){var I=m.buffered.length-1;if(I>=0){J=m.buffered.end(I)/m.duration*100}}}if(p===false&&B==a.api.events.state.BUFFERING){j.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER_FULL);p=true}if(!C){if(J==100){C=true}if(e.exists(J)&&(J>y.buffer)){y.buffer=Math.round(J);j.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:Math.round(J)})}}}function D(J){if(e.exists(J)&&e.exists(J.target)){if(!isNaN(J.target.duration)&&(isNaN(y.duration)||y.duration<1)){if(J.target.duration==Infinity){y.duration=0}else{y.duration=Math.round(J.target.duration*10)/10}}if(!A&&m.readyState>0){m.style.display="block";E(a.api.events.state.PLAYING)}if(B==a.api.events.state.PLAYING){if(!A&&m.readyState>0){A=true;try{if(m.currentTime<x.start){m.currentTime=x.start}}catch(I){}m.volume=y.volume/100;m.muted=y.mute}y.position=y.duration>0?(Math.round(J.target.currentTime*10)/10):0;j.sendEvent(a.api.events.JWPLAYER_MEDIA_TIME,{position:y.position,duration:y.duration});if(y.position>=y.duration&&(y.position>0||y.duration>0)){w()}}}v(J)}function z(I){}function k(I){if(c[I.type]){if(I.type=="ended"){w()}else{E(c[I.type])}}}function G(I){var J={height:I.target.videoHeight,width:I.target.videoWidth,duration:Math.round(I.target.duration*10)/10};if((y.duration===0||isNaN(y.duration))&&I.target.duration!=Infinity){y.duration=Math.round(I.target.duration*10)/10}j.sendEvent(a.api.events.JWPLAYER_MEDIA_META,{metadata:J})}function u(K){if(B==a.api.events.state.IDLE){return}var J="There was an error: ";if((K.target.error&&K.target.tagName.toLowerCase()=="video")||K.target.parentNode.error&&K.target.parentNode.tagName.toLowerCase()=="video"){var I=!e.exists(K.target.error)?K.target.parentNode.error:K.target.error;switch(I.code){case I.MEDIA_ERR_ABORTED:J="You aborted the video playback: ";break;case I.MEDIA_ERR_NETWORK:J="A network error caused the video download to fail part-way: ";break;case I.MEDIA_ERR_DECODE:J="The video playback was aborted due to a corruption problem or because the video used features your browser did not support: ";break;case I.MEDIA_ERR_SRC_NOT_SUPPORTED:J="The video could not be loaded, either because the server or network failed or because the format is not supported: ";break;default:J="An unknown error occurred: ";break}}else{if(K.target.tagName.toLowerCase()=="source"){q--;if(q>0){return}J="The video could not be loaded, either because the server or network failed or because the format is not supported: "}else{e.log("An unknown error occurred.  Continuing...");return}}_stop(false);J+=F();_error=true;j.sendEvent(a.api.events.JWPLAYER_ERROR,{error:J});return}function F(){var K="";for(var J in x.levels){var I=x.levels[J];var L=l.ownerDocument.createElement("source");K+=a.utils.getAbsolutePath(I.file);if(J<(x.levels.length-1)){K+=", "}}return K}function t(){if(!e.exists(f)){f=setInterval(function(){v()},100)}}function g(){clearInterval(f);f=null}function w(){if(B!=a.api.events.state.IDLE){_stop(false);j.sendEvent(a.api.events.JWPLAYER_MEDIA_COMPLETE)}}}})(jwplayer);(function(a){var c={ended:a.api.events.state.IDLE,playing:a.api.events.state.PLAYING,pause:a.api.events.state.PAUSED,buffering:a.api.events.state.BUFFERING};var b=a.utils.css;a.html5.mediayoutube=function(j,e){var f=new a.html5.eventdispatcher();a.utils.extend(this,f);var l=j;var h=document.getElementById(e.id);var g=a.api.events.state.IDLE;var n,m;function k(p){if(g!=p){var q=g;l.state=p;g=p;f.sendEvent(a.api.events.JWPLAYER_PLAYER_STATE,{oldstate:q,newstate:p})}}this.getDisplayElement=function(){return h};this.play=function(){if(g==a.api.events.state.IDLE){f.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:100});f.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER_FULL);k(a.api.events.state.PLAYING)}else{if(g==a.api.events.state.PAUSED){k(a.api.events.state.PLAYING)}}};this.pause=function(){k(a.api.events.state.PAUSED)};this.seek=function(p){};this.stop=function(p){if(!_utils.exists(p)){p=true}l.position=0;k(a.api.events.state.IDLE);if(p){b(h,{display:"none"})}};this.volume=function(p){l.volume=p;f.sendEvent(a.api.events.JWPLAYER_MEDIA_VOLUME,{volume:Math.round(p)})};this.mute=function(p){h.muted=p;l.mute=p;f.sendEvent(a.api.events.JWPLAYER_MEDIA_MUTE,{mute:p})};this.resize=function(q,p){if(q*p>0&&n){n.width=m.width=q;n.height=m.height=p}f.sendEvent(a.api.events.JWPLAYER_MEDIA_RESIZE,{fullscreen:l.fullscreen,width:q,height:p})};this.fullscreen=function(p){if(p===true){this.resize("100%","100%")}else{this.resize(l.config.width,l.config.height)}};this.load=function(p){o(p);b(n,{display:"block"});k(a.api.events.state.BUFFERING);f.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:0});f.sendEvent(a.api.events.JWPLAYER_MEDIA_LOADED);this.play()};this.hasChrome=function(){return(g!=a.api.events.state.IDLE)};function o(v){var s=v.levels[0].file;s=["http://www.youtube.com/v/",d(s),"&amp;hl=en_US&amp;fs=1&autoplay=1"].join("");n=document.createElement("object");n.id=h.id;n.style.position="absolute";var u={movie:s,allowfullscreen:"true",allowscriptaccess:"always"};for(var p in u){var t=document.createElement("param");t.name=p;t.value=u[p];n.appendChild(t)}m=document.createElement("embed");n.appendChild(m);var q={src:s,type:"application/x-shockwave-flash",allowfullscreen:"true",allowscriptaccess:"always",width:n.width,height:n.height};for(var r in q){m.setAttribute(r,q[r])}n.appendChild(m);n.style.zIndex=2147483000;if(h!=n&&h.parentNode){h.parentNode.replaceChild(n,h)}h=n}function d(q){var p=q.split(/\?|\#\!/);var s="";for(var r=0;r<p.length;r++){if(p[r].substr(0,2)=="v="){s=p[r].substr(2)}}if(s==""){if(q.indexOf("/v/")>=0){s=q.substr(q.indexOf("/v/")+3)}else{if(q.indexOf("youtu.be")>=0){s=q.substr(q.indexOf("youtu.be/")+9)}else{s=q}}}if(s.indexOf("?")>-1){s=s.substr(0,s.indexOf("?"))}if(s.indexOf("&")>-1){s=s.substr(0,s.indexOf("&"))}return s}this.embed=m;return this}})(jwplayer);(function(jwplayer){var _configurableStateVariables=["width","height","start","duration","volume","mute","fullscreen","item","plugins","stretching"];jwplayer.html5.model=function(api,container,options){var _api=api;var _container=container;var _model={id:_container.id,playlist:[],state:jwplayer.api.events.state.IDLE,position:0,buffer:0,config:{width:480,height:320,item:-1,skin:undefined,file:undefined,image:undefined,start:0,duration:0,bufferlength:5,volume:90,mute:false,fullscreen:false,repeat:"",stretching:jwplayer.utils.stretching.UNIFORM,autostart:false,debug:undefined,screencolor:undefined}};var _media;var _eventDispatcher=new jwplayer.html5.eventdispatcher();var _components=["display","logo","controlbar","playlist","dock"];jwplayer.utils.extend(_model,_eventDispatcher);for(var option in options){if(typeof options[option]=="string"){var type=/color$/.test(option)?"color":null;options[option]=jwplayer.utils.typechecker(options[option],type)}var config=_model.config;var path=option.split(".");for(var edge in path){if(edge==path.length-1){config[path[edge]]=options[option]}else{if(!jwplayer.utils.exists(config[path[edge]])){config[path[edge]]={}}config=config[path[edge]]}}}for(var index in _configurableStateVariables){var configurableStateVariable=_configurableStateVariables[index];_model[configurableStateVariable]=_model.config[configurableStateVariable]}var pluginorder=_components.concat([]);if(jwplayer.utils.exists(_model.plugins)){if(typeof _model.plugins=="string"){var userplugins=_model.plugins.split(",");for(var userplugin in userplugins){if(typeof userplugins[userplugin]=="string"){pluginorder.push(userplugins[userplugin].replace(/^\s+|\s+$/g,""))}}}}if(jwplayer.utils.isIOS()){pluginorder=["display","logo","dock","playlist"];if(!jwplayer.utils.exists(_model.config.repeat)){_model.config.repeat="list"}}else{if(_model.config.chromeless){pluginorder=["logo","dock","playlist"];if(!jwplayer.utils.exists(_model.config.repeat)){_model.config.repeat="list"}}}_model.plugins={order:pluginorder,config:{},object:{}};if(typeof _model.config.components!="undefined"){for(var component in _model.config.components){_model.plugins.config[component]=_model.config.components[component]}}for(var pluginIndex in _model.plugins.order){var pluginName=_model.plugins.order[pluginIndex];var pluginConfig=!jwplayer.utils.exists(_model.plugins.config[pluginName])?{}:_model.plugins.config[pluginName];_model.plugins.config[pluginName]=!jwplayer.utils.exists(_model.plugins.config[pluginName])?pluginConfig:jwplayer.utils.extend(_model.plugins.config[pluginName],pluginConfig);if(!jwplayer.utils.exists(_model.plugins.config[pluginName].position)){if(pluginName=="playlist"){_model.plugins.config[pluginName].position=jwplayer.html5.view.positions.NONE}else{_model.plugins.config[pluginName].position=jwplayer.html5.view.positions.OVER}}else{_model.plugins.config[pluginName].position=_model.plugins.config[pluginName].position.toString().toUpperCase()}}if(typeof _model.plugins.config.dock!="undefined"){if(typeof _model.plugins.config.dock!="object"){var position=_model.plugins.config.dock.toString().toUpperCase();_model.plugins.config.dock={position:position}}if(typeof _model.plugins.config.dock.position!="undefined"){_model.plugins.config.dock.align=_model.plugins.config.dock.position;_model.plugins.config.dock.position=jwplayer.html5.view.positions.OVER}}function _loadExternal(playlistfile){var loader=new jwplayer.html5.playlistloader();loader.addEventListener(jwplayer.api.events.JWPLAYER_PLAYLIST_LOADED,function(evt){_model.playlist=new jwplayer.html5.playlist(evt);_loadComplete(true)});loader.addEventListener(jwplayer.api.events.JWPLAYER_ERROR,function(evt){_model.playlist=new jwplayer.html5.playlist({playlist:[]});_loadComplete(false)});loader.load(playlistfile)}function _loadComplete(){if(_model.config.shuffle){_model.item=_getShuffleItem()}else{if(_model.config.item>=_model.playlist.length){_model.config.item=_model.playlist.length-1}else{if(_model.config.item<0){_model.config.item=0}}_model.item=_model.config.item}_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:_model.playlist});_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_PLAYLIST_ITEM,{index:_model.item})}_model.loadPlaylist=function(arg){var input;if(typeof arg=="string"){if(arg.indexOf("[")==0||arg.indexOf("{")=="0"){try{input=eval(arg)}catch(err){input=arg}}else{input=arg}}else{input=arg}var config;switch(jwplayer.utils.typeOf(input)){case"object":config=input;break;case"array":config={playlist:input};break;default:_loadExternal(input);return;break}_model.playlist=new jwplayer.html5.playlist(config);if(jwplayer.utils.extension(_model.playlist[0].file)=="xml"){_loadExternal(_model.playlist[0].file)}else{_loadComplete()}};function _getShuffleItem(){var result=null;if(_model.playlist.length>1){while(!jwplayer.utils.exists(result)){result=Math.floor(Math.random()*_model.playlist.length);if(result==_model.item){result=null}}}else{result=0}return result}function forward(evt){if(evt.type==jwplayer.api.events.JWPLAYER_MEDIA_LOADED){_container=_media.getDisplayElement()}_eventDispatcher.sendEvent(evt.type,evt)}var _mediaProviders={};_model.setActiveMediaProvider=function(playlistItem){if(playlistItem.provider=="audio"){playlistItem.provider="sound"}var provider=playlistItem.provider;var current=_media?_media.getDisplayElement():null;if(provider=="sound"||provider=="http"||provider==""){provider="video"}if(!jwplayer.utils.exists(_mediaProviders[provider])){switch(provider){case"video":_media=new jwplayer.html5.mediavideo(_model,current?current:_container);break;case"youtube":_media=new jwplayer.html5.mediayoutube(_model,current?current:_container);break}if(!jwplayer.utils.exists(_media)){return false}_media.addGlobalListener(forward);_mediaProviders[provider]=_media}else{if(_media!=_mediaProviders[provider]){if(_media){_media.stop()}_media=_mediaProviders[provider]}}return true};_model.getMedia=function(){return _media};_model.seek=function(pos){_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_MEDIA_SEEK,{position:_model.position,offset:pos});return _media.seek(pos)};_model.setupPlugins=function(){if(!jwplayer.utils.exists(_model.plugins)||!jwplayer.utils.exists(_model.plugins.order)||_model.plugins.order.length==0){jwplayer.utils.log("No plugins to set up");return _model}for(var i=0;i<_model.plugins.order.length;i++){try{var pluginName=_model.plugins.order[i];if(jwplayer.utils.exists(jwplayer.html5[pluginName])){if(pluginName=="playlist"){_model.plugins.object[pluginName]=new jwplayer.html5.playlistcomponent(_api,_model.plugins.config[pluginName])}else{_model.plugins.object[pluginName]=new jwplayer.html5[pluginName](_api,_model.plugins.config[pluginName])}}else{_model.plugins.order.splice(plugin,plugin+1)}if(typeof _model.plugins.object[pluginName].addGlobalListener=="function"){_model.plugins.object[pluginName].addGlobalListener(forward)}}catch(err){jwplayer.utils.log("Could not setup "+pluginName)}}};return _model}})(jwplayer);(function(a){a.html5.playlist=function(b){var d=[];if(b.playlist&&b.playlist instanceof Array&&b.playlist.length>0){for(var c in b.playlist){if(!isNaN(parseInt(c))){d.push(new a.html5.playlistitem(b.playlist[c]))}}}else{d.push(new a.html5.playlistitem(b))}return d}})(jwplayer);(function(a){var c={size:180,position:a.html5.view.positions.NONE,itemheight:60,thumbs:true,fontcolor:"#000000",overcolor:"",activecolor:"",backgroundcolor:"#f8f8f8",font:"_sans",fontsize:"",fontstyle:"",fontweight:""};var b={_sans:"Arial, Helvetica, sans-serif",_serif:"Times, Times New Roman, serif",_typewriter:"Courier New, Courier, monospace"};_utils=a.utils;_css=_utils.css;_hide=function(d){_css(d,{display:"none"})};_show=function(d){_css(d,{display:"block"})};a.html5.playlistcomponent=function(r,B){var w=r;var e=a.utils.extend({},c,w.skin.getComponentSettings("playlist"),B);if(e.position==a.html5.view.positions.NONE||typeof a.html5.view.positions[e.position]=="undefined"){return}var x;var l;var C;var d;var g;var f;var k=-1;var h={background:undefined,item:undefined,itemOver:undefined,itemImage:undefined,itemActive:undefined};this.getDisplayElement=function(){return x};this.resize=function(F,D){l=F;C=D;if(w.jwGetFullscreen()){_hide(x)}else{var E={display:"block",width:l,height:C};_css(x,E)}};this.show=function(){_show(x)};this.hide=function(){_hide(x)};function j(){x=document.createElement("div");x.id=w.id+"_jwplayer_playlistcomponent";switch(e.position){case a.html5.view.positions.RIGHT:case a.html5.view.positions.LEFT:x.style.width=e.size+"px";break;case a.html5.view.positions.TOP:case a.html5.view.positions.BOTTOM:x.style.height=e.size+"px";break}A();if(h.item){e.itemheight=h.item.height}x.style.backgroundColor="#C6C6C6";w.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,s);w.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,u);w.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,m)}function p(){var D=document.createElement("ul");_css(D,{width:x.style.width,minWidth:x.style.width,height:x.style.height,backgroundColor:e.backgroundcolor,backgroundImage:h.background?"url("+h.background.src+")":"",color:e.fontcolor,listStyle:"none",margin:0,padding:0,fontFamily:b[e.font]?b[e.font]:b._sans,fontSize:(e.fontsize?e.fontsize:11)+"px",fontStyle:e.fontstyle,fontWeight:e.fontweight,overflowY:"auto"});return D}function y(D){return function(){var E=f.getElementsByClassName("item")[D];var F=e.fontcolor;var G=h.item?"url("+h.item.src+")":"";if(D==w.jwGetPlaylistIndex()){if(e.activecolor!==""){F=e.activecolor}if(h.itemActive){G="url("+h.itemActive.src+")"}}_css(E,{color:e.overcolor!==""?e.overcolor:F,backgroundImage:h.itemOver?"url("+h.itemOver.src+")":G})}}function o(D){return function(){var E=f.getElementsByClassName("item")[D];var F=e.fontcolor;var G=h.item?"url("+h.item.src+")":"";if(D==w.jwGetPlaylistIndex()){if(e.activecolor!==""){F=e.activecolor}if(h.itemActive){G="url("+h.itemActive.src+")"}}_css(E,{color:F,backgroundImage:G})}}function q(I){var P=d[I];var O=document.createElement("li");O.className="item";_css(O,{height:e.itemheight,display:"block",cursor:"pointer",backgroundImage:h.item?"url("+h.item.src+")":"",backgroundSize:"100% "+e.itemheight+"px"});O.onmouseover=y(I);O.onmouseout=o(I);var J=document.createElement("div");var F=new Image();var K=0;var L=0;var M=0;if(v()&&(P.image||P["playlist.image"]||h.itemImage)){F.className="image";if(h.itemImage){K=(e.itemheight-h.itemImage.height)/2;L=h.itemImage.width;M=h.itemImage.height}else{L=e.itemheight*4/3;M=e.itemheight}_css(J,{height:M,width:L,"float":"left",styleFloat:"left",cssFloat:"left",margin:"0 5px 0 0",background:"black",overflow:"hidden",margin:K+"px",position:"relative"});_css(F,{position:"relative"});J.appendChild(F);F.onload=function(){a.utils.stretch(a.utils.stretching.FILL,F,L,M,this.naturalWidth,this.naturalHeight)};if(P["playlist.image"]){F.src=P["playlist.image"]}else{if(P.image){F.src=P.image}else{if(h.itemImage){F.src=h.itemImage.src}}}O.appendChild(J)}var E=l-L-K*2;if(C<e.itemheight*d.length){E-=15}var D=document.createElement("div");_css(D,{position:"relative",height:"100%",overflow:"hidden"});var G=document.createElement("span");if(P.duration>0){G.className="duration";_css(G,{fontSize:(e.fontsize?e.fontsize:11)+"px",fontWeight:(e.fontweight?e.fontweight:"bold"),width:"40px",height:e.fontsize?e.fontsize+10:20,lineHeight:24,"float":"right",styleFloat:"right",cssFloat:"right"});G.innerHTML=_utils.timeFormat(P.duration);D.appendChild(G)}var N=document.createElement("span");N.className="title";_css(N,{padding:"5px 5px 0 "+(K?0:"5px"),height:e.fontsize?e.fontsize+10:20,lineHeight:e.fontsize?e.fontsize+10:20,overflow:"hidden","float":"left",styleFloat:"left",cssFloat:"left",width:((P.duration>0)?E-50:E)-10+"px",fontSize:(e.fontsize?e.fontsize:13)+"px",fontWeight:(e.fontweight?e.fontweight:"bold")});N.innerHTML=P?P.title:"";D.appendChild(N);if(P.description){var H=document.createElement("span");H.className="description";_css(H,{display:"block","float":"left",styleFloat:"left",cssFloat:"left",margin:0,paddingLeft:N.style.paddingLeft,paddingRight:N.style.paddingRight,lineHeight:(e.fontsize?e.fontsize+4:16)+"px",overflow:"hidden",position:"relative"});H.innerHTML=P.description;D.appendChild(H)}O.appendChild(D);return O}function s(E){x.innerHTML="";d=w.jwGetPlaylist();if(!d){return}items=[];f=p();for(var F=0;F<d.length;F++){var D=q(F);D.onclick=z(F);f.appendChild(D);items.push(D)}k=w.jwGetPlaylistIndex();o(k)();x.appendChild(f);if(_utils.isIOS()&&window.iScroll){f.style.height=e.itemheight*d.length+"px";var G=new iScroll(x.id)}}function z(D){return function(){w.jwPlaylistItem(D);w.jwPlay(true)}}function n(){f.scrollTop=w.jwGetPlaylistIndex()*e.itemheight}function v(){return e.thumbs.toString().toLowerCase()=="true"}function u(D){if(k>=0){o(k)();k=D.index}o(D.index)();n()}function m(){if(e.position==a.html5.view.positions.OVER){switch(w.jwGetState()){case a.api.events.state.IDLE:_show(x);break;default:_hide(x);break}}}function A(){for(var D in h){h[D]=t(D)}}function t(D){return w.skin.getSkinElement("playlist",D)}j();return this}})(jwplayer);(function(b){b.html5.playlistitem=function(d){var e={author:"",date:"",description:"",image:"",link:"",mediaid:"",tags:"",title:"",provider:"",file:"",streamer:"",duration:-1,start:0,currentLevel:-1,levels:[]};var c=b.utils.extend({},e,d);if(c.type){c.provider=c.type;delete c.type}if(c.levels.length===0){c.levels[0]=new b.html5.playlistitemlevel(c)}if(!c.provider){c.provider=a(c.levels[0])}else{c.provider=c.provider.toLowerCase()}return c};function a(e){if(b.utils.isYouTube(e.file)){return"youtube"}else{var f=b.utils.extension(e.file);var c;if(f&&b.utils.extensionmap[f]){if(f=="m3u8"){return"video"}c=b.utils.extensionmap[f].html5}else{if(e.type){c=e.type}}if(c){var d=c.split("/")[0];if(d=="audio"){return"sound"}else{if(d=="video"){return d}}}}return""}})(jwplayer);(function(a){a.html5.playlistitemlevel=function(b){var d={file:"",streamer:"",bitrate:0,width:0};for(var c in d){if(a.utils.exists(b[c])){d[c]=b[c]}}return d}})(jwplayer);(function(a){a.html5.playlistloader=function(){var c=new a.html5.eventdispatcher();a.utils.extend(this,c);this.load=function(e){a.utils.ajax(e,d,b)};function d(g){var f=[];try{var f=a.utils.parsers.rssparser.parse(g.responseXML.firstChild);c.sendEvent(a.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:new a.html5.playlist({playlist:f})})}catch(h){b("Could not parse the playlist")}}function b(e){c.sendEvent(a.api.events.JWPLAYER_ERROR,{error:e?e:"could not load playlist for whatever reason.  too bad"})}}})(jwplayer);(function(a){a.html5.skin=function(){var b={};var c=false;this.load=function(d,e){new a.html5.skinloader(d,function(f){c=true;b=f;e()},function(){new a.html5.skinloader("",function(f){c=true;b=f;e()})})};this.getSkinElement=function(d,e){if(c){try{return b[d].elements[e]}catch(f){a.utils.log("No such skin component / element: ",[d,e])}}return null};this.getComponentSettings=function(d){if(c){return b[d].settings}return null};this.getComponentLayout=function(d){if(c){return b[d].layout}return null}}})(jwplayer);(function(a){a.html5.skinloader=function(f,p,k){var o={};var c=p;var l=k;var e=true;var j;var n=f;var s=false;function m(){if(typeof n!="string"||n===""){d(a.html5.defaultSkin().xml)}else{a.utils.ajax(a.utils.getAbsolutePath(n),function(t){try{if(a.utils.exists(t.responseXML)){d(t.responseXML);return}}catch(u){h()}d(a.html5.defaultSkin().xml)},function(t){d(a.html5.defaultSkin().xml)})}}function d(y){var E=y.getElementsByTagName("component");if(E.length===0){return}for(var H=0;H<E.length;H++){var C=E[H].getAttribute("name");var B={settings:{},elements:{},layout:{}};o[C]=B;var G=E[H].getElementsByTagName("elements")[0].getElementsByTagName("element");for(var F=0;F<G.length;F++){b(G[F],C)}var z=E[H].getElementsByTagName("settings")[0];if(z&&z.childNodes.length>0){var K=z.getElementsByTagName("setting");for(var P=0;P<K.length;P++){var Q=K[P].getAttribute("name");var I=K[P].getAttribute("value");var x=/color$/.test(Q)?"color":null;o[C].settings[Q]=a.utils.typechecker(I,x)}}var L=E[H].getElementsByTagName("layout")[0];if(L&&L.childNodes.length>0){var M=L.getElementsByTagName("group");for(var w=0;w<M.length;w++){var A=M[w];o[C].layout[A.getAttribute("position")]={elements:[]};for(var O=0;O<A.attributes.length;O++){var D=A.attributes[O];o[C].layout[A.getAttribute("position")][D.name]=D.value}var N=A.getElementsByTagName("*");for(var v=0;v<N.length;v++){var t=N[v];o[C].layout[A.getAttribute("position")].elements.push({type:t.tagName});for(var u=0;u<t.attributes.length;u++){var J=t.attributes[u];o[C].layout[A.getAttribute("position")].elements[v][J.name]=J.value}if(!a.utils.exists(o[C].layout[A.getAttribute("position")].elements[v].name)){o[C].layout[A.getAttribute("position")].elements[v].name=t.tagName}}}}e=false;r()}}function r(){clearInterval(j);if(!s){j=setInterval(function(){q()},100)}}function b(y,x){var w=new Image();var t=y.getAttribute("name");var v=y.getAttribute("src");var A;if(v.indexOf("data:image/png;base64,")===0){A=v}else{var u=a.utils.getAbsolutePath(n);var z=u.substr(0,u.lastIndexOf("/"));A=[z,x,v].join("/")}o[x].elements[t]={height:0,width:0,src:"",ready:false,image:w};w.onload=function(B){g(w,t,x)};w.onerror=function(B){s=true;r();l()};w.src=A}function h(){for(var u in o){var w=o[u];for(var t in w.elements){var x=w.elements[t];var v=x.image;v.onload=null;v.onerror=null;delete x.image;delete w.elements[t]}delete o[u]}}function q(){for(var t in o){if(t!="properties"){for(var u in o[t].elements){if(!o[t].elements[u].ready){return}}}}if(e===false){clearInterval(j);c(o)}}function g(t,v,u){if(o[u]&&o[u].elements[v]){o[u].elements[v].height=t.height;o[u].elements[v].width=t.width;o[u].elements[v].src=t.src;o[u].elements[v].ready=true;r()}else{a.utils.log("Loaded an image for a missing element: "+u+"."+v)}}m()}})(jwplayer);(function(a){a.html5.api=function(c,n){var m={};var f=document.createElement("div");c.parentNode.replaceChild(f,c);f.id=c.id;m.version=a.version;m.id=f.id;var l=new a.html5.model(m,f,n);var j=new a.html5.view(m,f,l);var k=new a.html5.controller(m,f,l,j);m.skin=new a.html5.skin();m.jwPlay=function(o){if(typeof o=="undefined"){e()}else{if(o.toString().toLowerCase()=="true"){k.play()}else{k.pause()}}};m.jwPause=function(o){if(typeof o=="undefined"){e()}else{if(o.toString().toLowerCase()=="true"){k.pause()}else{k.play()}}};function e(){if(l.state==a.api.events.state.PLAYING||l.state==a.api.events.state.BUFFERING){k.pause()}else{k.play()}}m.jwStop=k.stop;m.jwSeek=k.seek;m.jwPlaylistItem=k.item;m.jwPlaylistNext=k.next;m.jwPlaylistPrev=k.prev;m.jwResize=k.resize;m.jwLoad=k.load;function h(o){return function(){return l[o]}}function d(o,q,p){return function(){var r=l.plugins.object[o];if(r&&r[q]&&typeof r[q]=="function"){r[q].apply(r,p)}}}m.jwGetItem=h("item");m.jwGetPosition=h("position");m.jwGetDuration=h("duration");m.jwGetBuffer=h("buffer");m.jwGetWidth=h("width");m.jwGetHeight=h("height");m.jwGetFullscreen=h("fullscreen");m.jwSetFullscreen=k.setFullscreen;m.jwGetVolume=h("volume");m.jwSetVolume=k.setVolume;m.jwGetMute=h("mute");m.jwSetMute=k.setMute;m.jwGetStretching=h("stretching");m.jwGetState=h("state");m.jwGetVersion=function(){return m.version};m.jwGetPlaylist=function(){return l.playlist};m.jwGetPlaylistIndex=m.jwGetItem;m.jwAddEventListener=k.addEventListener;m.jwRemoveEventListener=k.removeEventListener;m.jwSendEvent=k.sendEvent;m.jwDockSetButton=function(r,o,p,q){if(l.plugins.object.dock&&l.plugins.object.dock.setButton){l.plugins.object.dock.setButton(r,o,p,q)}};m.jwControlbarShow=d("controlbar","show");m.jwControlbarHide=d("controlbar","hide");m.jwDockShow=d("dock","show");m.jwDockHide=d("dock","hide");m.jwDisplayShow=d("display","show");m.jwDisplayHide=d("display","hide");m.jwGetLevel=function(){};m.jwGetBandwidth=function(){};m.jwGetLockState=function(){};m.jwLock=function(){};m.jwUnlock=function(){};function b(){if(l.config.playlistfile){l.addEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,g);l.loadPlaylist(l.config.playlistfile)}else{if(typeof l.config.playlist=="string"){l.addEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,g);l.loadPlaylist(l.config.playlist)}else{l.loadPlaylist(l.config);setTimeout(g,25)}}}function g(o){l.removeEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,g);l.setupPlugins();j.setup();var o={id:m.id,version:m.version};k.playerReady(o)}if(l.config.chromeless&&!a.utils.isIOS()){b()}else{m.skin.load(l.config.skin,b)}return m}})(jwplayer)};
﻿/* French initialisation for the jQuery UI date picker plugin. */
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: '&#x3c;Préc',
nextText: 'Suiv&#x3e;',
currentText: 'Courant',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
'Jul','Aoû','Sep','Oct','Nov','Déc'],
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
weekHeader: 'Sm',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fr']);
});
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
$(document).ready(function() {
$("#header #mainmenu ul li a").hover(function() {
$(this).parent().find(".submenu").show();
$(this).parent().addClass("active");
$(this).parent().hover(function() {
}, function(){
$(this).find(".submenu").hide()
$(this).removeClass("active");
});
});
$("#header #mainmenu ul li a:not(#header #mainmenu ul ul a)").keyup(function (event) {
if (event.keyCode == 9) {
if( $("#header #mainmenu .submenu:visible")) {
$("#header #mainmenu .submenu").hide();
$(this).parent().removeClass("active");
}
if( $("#header #mainmenu ul:hidden")) {
$(this).parent().find(".submenu").show();
$(this).parent().find(".submenu").sliblings().hide();
$(this).parent().addClass("active");
}
}
});
$("#form-search").keyup(function (event) {
if (event.keyCode == 9) {
$("#header #mainmenu .submenu").hide();
}
});
$(".box-connexion").css({'position':'absolute','display':'none'});
$(".box-connecte").css({'position':'absolute','display':'none'});
$('#btn-acces').click(function() {
var checkElement = $(this).parent().parent().find('#block-connecte');
if((checkElement.is('#block-connecte')) && (checkElement.is(':visible'))) {
$(this).addClass('non-active').removeClass('active');
$('#block-connecte:visible').slideUp('normal');
return false;
}
if((checkElement.is('#block-connecte')) && (!checkElement.is(':visible'))) {
$(this).addClass('active').removeClass('non-active');
checkElement.slideDown('normal');
return false;
}
});
$('.list-menus a:last').css({'background-image':'none'});
$('#footer ul.list-map li.toggle ul').hide();
$('#footer ul.list-map li.toggle a').click(function() {
var subElement = $(this).next('ul');
if (subElement.length) {
subElement.slideToggle('fast');
return false;
}
});
var carouselSlideDuration = $('#carousel-slide-duration').val();
$('#carousel').codaSlider({
autoSlide:true,
dynamicTabs:true,
dynamicArrows:false,
autoSlideInterval:7000,
slideEaseFunction: "easeOutQuad",
slideEaseDuration:carouselSlideDuration*1000,
panelTitleSelector: "h3",
crossLinking:false
});
var len = $(".dl .listemenu a").length;
var rand = parseInt(Math.random()*len);
$(".dl .listemenu a:eq("+rand+")").addClass('active');
$(".listemenu a").append("<span></span>");
$(".node-thematique .dl .dd").css({'display':'block','width':'290px','position':'absolute','top':'0','right':'0','z-index':'2'});
$(".node-thematique .dl .dd").hide();
$(".node-thematique .dl .dd:eq("+rand+")").show();
$(".dl .listemenu a").click(function(){return false;});
function recupId(o) {
whoiam = $(o).attr('href');
$(".dl .dd").hide();
$(whoiam).show();
$('.dl .listemenu a').removeClass('active');
}
$('.dl .listemenu a').click(function (){
recupId(this);
$(this).addClass('active');
});
$(".dl .listemenu a").keyup(function (event) {
if (event.keyCode == 9) {
recupId(this);
$(this).addClass('active');
}
});
$('input[type="text"]').not('.not-clear').focus(function() {
if (this.value == this.defaultValue){
this.value = '';
}
if(this.value != this.defaultValue){
this.select();
}
});
$("a.fancy").fancybox({overlayColor: "#ffffff", titlePosition: "over"});
$('.node-article ul li').not('ul.list-sommaire li, ul.error li, div.bg-grey ul.list-links li, ul.list-links-pdf li, .tableauMulti ul li, ul.list-links-kmz li, .legende ul li')
.prepend('<img src="/extension/csa/design/csa/images/arrow_orange.gif" width="5" height="9" alt="" class="arrow-orange" />');
$('.trans-form').jqTransform();
if ($(".liste_flux_rss").length)
{
$("img.arrow-orange").attr("src","/extension/csa/design/csa/images/rss.png");
$("img.arrow-orange").removeAttr("width");
$("img.arrow-orange").removeAttr("height");
}
$('.frm-date').datepicker({
changeMonth: true,
changeYear: true,
maxDate: '0',
yearRange: '1900:c+1'
});
$("div.addthis_toolbox").insertAfter($("h1")).after('<div class="clear-both"></div>');
$('#ie6_no_more .close').click(function() {
$('#ie6_no_more').hide();
});
$("img").each(function()
{
var title = $(this).attr("title");
var alt = $(this).attr("alt");
if ((title == "") && (alt != "")) $(this).attr("title",alt);
});
numeriqueSelect();
});
function numeriqueSelect() {
if($("#form_sujet").val() == 1 ) {
$("#numerique").css('display', 'block');
}
else {
$("#numerique").css('display', 'none');
}
}
function recherche(page)
{
document.requete.page.value=page;
document.requete.submit();
}
function survolTR(obj){
obj.className = 'bg-lightblue';
}
function quitteTR(obj,val){
obj.className = val;
}
function ficheAuto(id){
window.location.href = "detail?id=" + id;
}
function auto_dpt(objSel){
document.requete.page.value   = 1;
document.requete.dpt.value    = objSel.value;
document.requete.zone.value   = '';
document.requete.prog.value	  = '';
document.requete.action       = '';
document.requete.target       = '_self';
document.requete.submit();
}
function auto_zone(objSel){
document.requete.page.value   = 1;
document.requete.dpt.value    = '';
document.requete.prog.value	  = '';
document.requete.zone.value   = objSel.value;
document.requete.action       = '';
document.requete.target       = '_self';
document.requete.submit();
}
function auto_prog(objSel){
document.requete.page.value   = 1;
document.requete.prog.value   = objSel.value;
document.requete.dpt.value    = '';
document.requete.zone.value   = '';
document.requete.action       = '';
document.requete.target       = '_self';
document.requete.submit();
}
function fichePlan(id,plan){
window.location.href = "detail?id=" + id + "&plan=" + plan;
}
function plan_dpt(dpt) {
document.requete.page.value   = 1;
document.requete.dpt.value    = dpt;
document.requete.action       = '';
document.requete.target       = '_self';
document.requete.submit();
}
function departement(dpt) {
var listeDpt = new Array(971,972,973,974,975,985,986,988);
var valide = true;
for( i=0 ; i<=listeDpt.length; i++ ){
if (dpt == listeDpt[i]) valide = false;
}
if (valide){
document.formStation.dptCarte.value=dpt;
document.formStation.recherche.value=0;
document.formStation.submit();
} else {
alert("Les données de ce département sont en cours de réactualisation.");
}
}
function recherche1() {
if(document.formStation.station.value==''){
alert("Vous devez saisir un mot clé !");
return false;
} else {
return true;
}
}
function recherche2() {
if((document.formGeo.dpt.selectedIndex==0)&&(document.formGeo.zone.selectedIndex==0)){
alert("Vous devez choisir un département ou une agglomération !");
return false;
} else {
return true;
}
}
function trier(colonne) {
if (document.requete.colonne.value == colonne)
document.requete.tri.value = (document.requete.tri.value == 'asc')?'desc':'asc';
document.requete.colonne.value    = colonne+'';
document.requete.page.value = 1;
document.requete.target         = '_self';
document.requete.submit();
}
function auto_zone_radio(objSel){
document.requete.zone.value   = objSel.value;
document.requete.action       = '';
document.requete.target       = '_self';
document.requete.submit();
}
var geocoder = null;
var arr_markers = Array();
var arr_windows_1 = Array();
function carteSurvol() {
$("#carteTNT area").each( function () {
$(this).parents("#carteTNT").prepend("<div class='AreaSurvol' id='piece"+$("#carteTNT area").index(this)+"'><a href='"+$(this).attr("href")+"' style='color:black;font-weight:normal'>Zone<br />"+$(this).attr("alt")+"</a></div>");
});
var aid = "#piece";
$("#carteTNT area").bind("mouseover focus", function(){
$(aid+$("#carteTNT area").index(this)).addClass('over');
});
$("#carteTNT area").bind("mouseout blur", function(){
$(aid+$("#carteTNT area").index(this)).removeClass('over');
});
};
function load_tntfrance(adresse, zoom, phptime, strregion, regDesc_slashes, chemin_kml, chemin_img) {
var url_kml = 'http://'+top.location.host + chemin_kml + "reg" + strregion + ".kml?" + phptime;
var reg = new GGeoXml(url_kml);
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"),{
mapTypes:[G_PHYSICAL_MAP,G_NORMAL_MAP]
});
map.setCenter(new GLatLng(46.5, 2.2), 5);
geocoder = new GClientGeocoder();
geocoder.setBaseCountryCode('fr');
geocoder.getLatLng(adresse, function (newcoord) {
if (!newcoord) alert("Un problème technique est survenu.");
else { map.setCenter(newcoord, zoom*1);}
});
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.addOverlay(reg);
points_france(map, phptime, strregion, regDesc_slashes, chemin_kml, chemin_img);
}
}
function points_france(map, phptime, strregion, regDesc_slashes, chemin_kml, chemin_img){
function createMarker_france(id,point,ville,dpt,periode,service,str_window,type,multi) {
var newIcon = new GIcon();
type = 0;
if (type == 1){
newIcon.image = chemin_img + "emetteur_" + service + "_e.png?" + phptime;
newIcon.iconSize = new GSize(48,48);
newIcon.iconAnchor = new GPoint(10, 42);
newIcon.infoWindowAnchor = new GPoint(18, 18);
} else {
newIcon.image = chemin_img + "emetteur_" + service + ".png?" + phptime;
newIcon.iconSize = new GSize(32,32);
newIcon.iconAnchor = new GPoint(8, 28);
newIcon.infoWindowAnchor = new GPoint(10, 15);
}
var marker = new GMarker(point,newIcon);
arr_markers[id] = marker;
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowTabsHtml([
new GInfoWindowTab("En service", arr_windows_1[id])
],{selectedTab: 0}); //par défaut l'onglet 1
});
return marker;
}
GDownloadUrl('http://'+top.location.host + chemin_kml + "data_tnt_zones_regions_plans_" + strregion + ".xml?" + phptime,
function(data, responseCode) {
var xml = GXml.parse(data);
var markers = xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var id = markers[i].getAttribute("id");
var lat = markers[i].getAttribute("lat");
var lng = markers[i].getAttribute("lng");
var ville = markers[i].getAttribute("ville");
var site_ana = markers[i].getAttribute("site_ana");
var site_num = markers[i].getAttribute("site_num");
var dpt = markers[i].getAttribute("reg");
var periode = markers[i].getAttribute("periode");
var service = markers[i].getAttribute("service");
var type = markers[i].getAttribute("type");
var point = new GLatLng(parseFloat(lat),parseFloat(lng));
var multi = markers[i].getAttribute("multi");
var multi_sans_date = markers[i].getAttribute("multi_sans_date");
var multi_date = markers[i].getAttribute("multi_date");
if(lat != "0.0000")
{
var str_window_1 = '<div id="' + id + '" style="font-size:10px">Zone : <b>' + ville + '</b><br />Site : <b>' + site_num + '</b><br />Région : <b>' + regDesc_slashes + '</b><br />Multiplex diffusés : <b>' + multi + '</b><br /><span style="color:#DD0000;"><b></b></span></div>';
map.addOverlay(createMarker_france(id,point,ville,dpt,periode,service,str_window_1,type,multi));
arr_windows_1[id] = str_window_1;
}
}
}
);
}
function afficheNote() {
var fenetreMulti = document.getElementById('fenetreMulti');
fenetreMulti.style.display = 'block';
}
function masqueNote() {
var fenetreMulti = document.getElementById('fenetreMulti');
fenetreMulti.style.display = 'none';
}
function click_marker(id) {
window.location.href = "#carte";
arr_markers[id].openInfoWindowTabsHtml([
new GInfoWindowTab("En service", arr_windows_1[id])
],{selectedTab: 0}); //par défaut l'onglet 1
map.setCenter(arr_markers[id]['B'], 14);
}
var arr_markers = Array();
var arr_windows = Array();
function load_tntom(phptime, strreg, zoom, lat, lng, chemin_imgcsa, chemin_kmlom) {
var pt = null;
var geocoder = null;
var reg = new GGeoXml;
var latLng = new google.maps.LatLng(lat, lng);
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"),{
mapTypes:[G_PHYSICAL_MAP,G_NORMAL_MAP]
});
geocoder = new GClientGeocoder();
geocoder.setBaseCountryCode('fr');
map.setCenter(latLng,zoom); // Centrage et zoom
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
points_om(map, phptime, strreg, chemin_imgcsa, chemin_kmlom);
}
}
function points_om(map, phptime, strreg, chemin_imgcsa, chemin_kmlom){
function createMarker(id,point,ville,terre,periode,service,str_window,type,multi) {
var newIcon = new GIcon();
type = 0;
if (type == 1){
newIcon.image = chemin_imgcsa + "emetteur_" + service + "_e.png?" + phptime;
newIcon.iconSize = new GSize(48,48);
newIcon.iconAnchor = new GPoint(10, 42);
newIcon.infoWindowAnchor = new GPoint(18, 18);
} else {
newIcon.image = chemin_imgcsa + "emetteur_" + service + ".png?" + phptime;
newIcon.iconSize = new GSize(32,32);
newIcon.iconAnchor = new GPoint(8, 28);
newIcon.infoWindowAnchor = new GPoint(10, 15);
}
var marker = new GMarker(point,newIcon);
if (service == 'on') periode = 'En service';
arr_markers[id] = marker;
GEvent.addListener(marker, "click", function() {
if (!arr_markers) alert('undefined 1');
marker.openInfoWindowHtml(str_window);
});
return marker;
}
GDownloadUrl(chemin_kmlom + "data_tnt_zones_regions_" + strreg + ".xml?" + phptime,
function(data, responseCode) {
var xml = GXml.parse(data);
var markers = xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var id = markers[i].getAttribute("id");
var lat = markers[i].getAttribute("lat");
var lng = markers[i].getAttribute("lng");
var ville = markers[i].getAttribute("ville");
var site = markers[i].getAttribute("site");
var terre = markers[i].getAttribute("reg");
var archi = markers[i].getAttribute("archi");
var periode = markers[i].getAttribute("periode");
var service = markers[i].getAttribute("service");
var type = markers[i].getAttribute("type");
var point = new GLatLng(parseFloat(lat),parseFloat(lng));
var multi = markers[i].getAttribute("multi");
var canal = markers[i].getAttribute("canal");
var str_window;
if (service == 'on') str_window = "<div id=\" + id + \" style=\"font-size:10px\">Zone : <b>" + ville + "</b><br />Site : <b>" + site + "</b><br />Territoire : <b>" + terre + "</b><br />Multiplex diffus&eacute; : <b>" + multi + " sur le canal " + canal + "</b><br /><span style='color:#DD0000;'><b>Mis en service</b></span></div>";
else {
str_window = "<div id=' + id + ' style='width:220px;font-size:10px'>Zone : <b>" + ville + "</b><br />Site : <b>" + site + "</b><br />Territoire : <b>" + terre + "</b>";
if (archi != '') str_window += "<br />Archipel : <b>" + archi + "</b>";
str_window += "<br />Multiplex :"+ multi + " sur le canal " + canal + "";
str_window += "<br />Mise en service : " + periode + "</div>";
}
map.addOverlay(createMarker(id,point,ville,terre,periode,service,str_window,type,multi));
arr_windows[id] = str_window;
arr_windows[(id+1)] = str_window;
}
}
);
}
function click_marker_om(id) {
window.location.href = "#carte";
arr_markers[id].openInfoWindowHtml(arr_windows[id]);
}
function getTabDomTom()
{
var tabDomTom = new Array();
var tabGuadeloupe = new Array();
tabGuadeloupe['titre'] = 'Guadeloupe';
tabGuadeloupe['latitude'] = '16.263855';
tabGuadeloupe['longitude'] = '-61.560745';
tabGuadeloupe['lower_left_x'] = '-61.8442964201';
tabGuadeloupe['lower_left_y'] = '15.8043297247';
tabGuadeloupe['higher_left_x'] = '-60.9625311896';
tabGuadeloupe['higher_left_y'] = '16.5478767982';
tabGuadeloupe['zoom'] = 9;
tabDomTom.push(tabGuadeloupe);
var tabGuyane = new Array();
tabGuyane['titre'] = 'Guyane';
tabGuyane['latitude'] = '3.970025';
tabGuyane['longitude'] = '-53.163757';
tabGuyane['lower_left_x'] = '-54.4832477597';
tabGuyane['lower_left_y'] = '3.0270014732';
tabGuyane['higher_left_x'] = '-51.6110400657';
tabGuyane['higher_left_y'] = '5.7814072862';
tabGuyane['zoom'] = 7;
tabDomTom.push(tabGuyane);
var tabMartinique = new Array();
tabMartinique['titre'] = 'Martinique';
tabMartinique['latitude'] = '14.64026';
tabMartinique['longitude'] = '-60.992088';
tabMartinique['lower_left_x'] = '-61.4296419655';
tabMartinique['lower_left_y'] = '14.283930058';
tabMartinique['higher_left_x'] = '-60.631140685';
tabMartinique['higher_left_y'] = '15.0108243415';
tabMartinique['zoom'] = 10;
tabDomTom.push(tabMartinique);
var tabMayotte = new Array();
tabMayotte['titre'] = 'Mayotte';
tabMayotte['latitude'] = '-12.825661';
tabMayotte['longitude'] = '45.157127';
tabMayotte['lower_left_x'] = '44.9691923395';
tabMayotte['lower_left_y'] = '-13.0358034972';
tabMayotte['higher_left_x'] = '45.331390522';
tabMayotte['higher_left_y'] = '-12.6036635967';
tabMayotte['zoom'] = 10;
tabDomTom.push(tabMayotte);
var tabNouvelleCaledonie = new Array();
tabNouvelleCaledonie['titre'] = 'Nouvelle-Cal\351donie';
tabNouvelleCaledonie['latitude'] = '-21.298075';
tabNouvelleCaledonie['longitude'] = '165.381775';
tabNouvelleCaledonie['lower_left_x'] = '163.4800482338';
tabNouvelleCaledonie['lower_left_y'] = '-22.8073866463';
tabNouvelleCaledonie['higher_left_x'] = '167.8757448738';
tabNouvelleCaledonie['higher_left_y'] = '-19.4784752863';
tabNouvelleCaledonie['zoom'] = 7;
tabDomTom.push(tabNouvelleCaledonie);
var tabPolynesieFrancaiseTuamotu = new Array();
tabPolynesieFrancaiseTuamotu['titre'] = 'Polyn\351sie fran\347aise, Archipel des Tuamotu';
tabPolynesieFrancaiseTuamotu['latitude'] = '-18.040833';
tabPolynesieFrancaiseTuamotu['longitude'] = '-141.409444';
tabPolynesieFrancaiseTuamotu['lower_left_x'] = '-147.9558333333';
tabPolynesieFrancaiseTuamotu['lower_left_y'] = '-23.28';
tabPolynesieFrancaiseTuamotu['higher_left_x'] = '-140.6533333514';
tabPolynesieFrancaiseTuamotu['higher_left_y'] = '-14.3233333418';
tabPolynesieFrancaiseTuamotu['zoom'] = 7;
tabDomTom.push(tabPolynesieFrancaiseTuamotu);
var tabPolynesieFrancaiseIlesAustrales = new Array();
tabPolynesieFrancaiseIlesAustrales['titre'] = 'Polyn\351sie fran\347aise, Iles Australes';
tabPolynesieFrancaiseIlesAustrales['latitude'] = '-25.03982';
tabPolynesieFrancaiseIlesAustrales['longitude'] = '-148.868409';
tabPolynesieFrancaiseIlesAustrales['lower_left_x'] = '-152.9283333333';
tabPolynesieFrancaiseIlesAustrales['lower_left_y'] = '-27.6933333333';
tabPolynesieFrancaiseIlesAustrales['higher_left_x'] = '-144.1141666801';
tabPolynesieFrancaiseIlesAustrales['higher_left_y'] = '-22.5233333435';
tabPolynesieFrancaiseIlesAustrales['zoom'] = 6;
tabDomTom.push(tabPolynesieFrancaiseIlesAustrales);
var tabPolynesieFrancaiseIlesMarquises = new Array();
tabPolynesieFrancaiseIlesMarquises['titre'] = 'Polyn\351sie fran\347aise, Iles Marquises';
tabPolynesieFrancaiseIlesMarquises['latitude'] = '-9.208933';
tabPolynesieFrancaiseIlesMarquises['longitude'] = '-139.653626';
tabPolynesieFrancaiseIlesMarquises['lower_left_x'] = '-140.2689921414';
tabPolynesieFrancaiseIlesMarquises['lower_left_y'] = '-10.5742525286';
tabPolynesieFrancaiseIlesMarquises['higher_left_x'] = '-138.5949296494';
tabPolynesieFrancaiseIlesMarquises['higher_left_y'] = '-8.7640135866';
tabPolynesieFrancaiseIlesMarquises['zoom'] = 7;
tabDomTom.push(tabPolynesieFrancaiseIlesMarquises);
var tabPolynesieFrancaiseIlesDuVent = new Array();
tabPolynesieFrancaiseIlesDuVent['titre'] = 'Polyn\351sie fran\347aise, Iles du Vent';
tabPolynesieFrancaiseIlesDuVent['latitude'] = '-17.637217';
tabPolynesieFrancaiseIlesDuVent['longitude'] = '-149.475403';
tabPolynesieFrancaiseIlesDuVent['lower_left_x'] = '-150.6608333333';
tabPolynesieFrancaiseIlesDuVent['lower_left_y'] = '-17.8908333333';
tabPolynesieFrancaiseIlesDuVent['higher_left_x'] = '-149.1150000323';
tabPolynesieFrancaiseIlesDuVent['higher_left_y'] = '-17.4700000168';
tabPolynesieFrancaiseIlesDuVent['zoom'] = 8;
tabDomTom.push(tabPolynesieFrancaiseIlesDuVent);
var tabPolynesieFrancaiseIlesSousLeVent = new Array();
tabPolynesieFrancaiseIlesSousLeVent['titre'] = 'Polyn\351sie fran\347aise, Iles Sous-le-vent';
tabPolynesieFrancaiseIlesSousLeVent['latitude'] = '-18.040833';
tabPolynesieFrancaiseIlesSousLeVent['longitude'] = '-141.409444';
tabPolynesieFrancaiseIlesSousLeVent['lower_left_x'] = '-152.3058333333';
tabPolynesieFrancaiseIlesSousLeVent['lower_left_y'] = '-16.9333333333';
tabPolynesieFrancaiseIlesSousLeVent['higher_left_x'] = '-150.9325000549';
tabPolynesieFrancaiseIlesSousLeVent['higher_left_y'] = '-16.4058333544';
tabPolynesieFrancaiseIlesSousLeVent['zoom'] = 7;
tabDomTom.push(tabPolynesieFrancaiseIlesSousLeVent);
var tabReunion = new Array();
tabReunion['titre'] = ' La R\351union';
tabReunion['latitude'] = '-21.130237';
tabReunion['longitude'] = '55.52742';
tabReunion['lower_left_x'] = '55.1755857017';
tabReunion['lower_left_y'] = '-21.423053016';
tabReunion['higher_left_x'] = '55.8637041977';
tabReunion['higher_left_y'] = '-20.843536776';
tabReunion['zoom'] = 9;
tabDomTom.push(tabReunion);
var tabStMartinStBart = new Array();
tabStMartinStBart['titre'] = 'St Martin - St Barth\351l\351my';
tabStMartinStBart['latitude'] = '17.986113';
tabStMartinStBart['longitude'] = '-62.945595';
tabStMartinStBart['lower_left_x'] = '-63.1834050441';
tabStMartinStBart['lower_left_y'] = '17.824806126';
tabStMartinStBart['higher_left_x'] = '-61.9572301322';
tabStMartinStBart['higher_left_y'] = '18.9831846205';
tabStMartinStBart['zoom'] = 9;
tabDomTom.push(tabStMartinStBart);
var tabStPierreEtMiquelon = new Array();
tabStPierreEtMiquelon['titre'] = 'St-Pierre-et-Miquelon';
tabStPierreEtMiquelon['latitude'] = '46.942106';
tabStPierreEtMiquelon['longitude'] = '-56.32988';
tabStPierreEtMiquelon['lower_left_x'] = '-56.4882956493';
tabStPierreEtMiquelon['lower_left_y'] = '46.7256231627';
tabStPierreEtMiquelon['higher_left_x'] = '-56.0554981973';
tabStPierreEtMiquelon['higher_left_y'] = '47.1620423507';
tabStPierreEtMiquelon['zoom'] = 9;
tabDomTom.push(tabStPierreEtMiquelon);
var tabFutuna = new Array();
tabFutuna['titre'] = 'Wallis & Futuna, Futuna';
tabFutuna['latitude'] = '-14.300549';
tabFutuna['longitude'] = '-178.093586';
tabFutuna['lower_left_x'] = '-178.1849874097';
tabFutuna['lower_left_y'] = '-14.313894006';
tabFutuna['higher_left_x'] = '-178.0518870937';
tabFutuna['higher_left_y'] = '-14.24005068';
tabFutuna['zoom'] = 11;
tabDomTom.push(tabFutuna);
var tabWallis = new Array();
tabWallis['titre'] = 'Wallis & Futuna, Wallis';
tabWallis['latitude'] = '-13.287965';
tabWallis['longitude'] = '-176.208057';
tabWallis['lower_left_x'] = '-176.2551951666';
tabWallis['lower_left_y'] = '-13.3539527518';
tabWallis['higher_left_x'] = '-176.1564259066';
tabWallis['higher_left_y'] = '-13.2135010518';
tabWallis['zoom'] = 11;
tabDomTom.push(tabWallis);
return tabDomTom;
}
function findDomTom_metropolev1(lat, lng)
{
var id = -1;
var tabDomTom = getTabDomTom();
for (var i=0; i<tabDomTom.length; i++)
{
var lngOk = new Boolean(parseFloat(lng) > parseFloat(tabDomTom[i]['lower_left_x']) && parseFloat(lng) < parseFloat(tabDomTom[i]['higher_left_x']));
var latOk = new Boolean (parseFloat(lat) > parseFloat(tabDomTom[i]['lower_left_y']) && parseFloat(lat) < parseFloat(tabDomTom[i]['higher_left_y']));
if (lngOk==true && latOk==true)
id = i;
var debug = "i : " + i + "\n";
debug += "lng : " + lng + "\n";
debug += "lat : " + lat + "\n";
debug += "lower_left_x : " + tabDomTom[i]['lower_left_x'] + "\n";
debug += "higher_left_x : " + tabDomTom[i]['higher_left_x'] + "\n";
debug += "lower_left_y : " + tabDomTom[i]['lower_left_y'] + "\n";
debug += "higher_left_y : " + tabDomTom[i]['higher_left_y'] + "\n";
debug += "lngOk : " + lngOk + "\n";
debug += "latOk : " + latOk + "\n";
debug += "id : " + id + "\n";
}
return id;
}
function initSelectDomTom()
{
var selectDomTom = "";
var listDomTom = "listDomTom";
var tabDomTom = getTabDomTom();
selectDomTom += "<span class='stepTitle'>1) S&eacute;lectionnez un DOM/TOM :&nbsp;</span>";
selectDomTom += "<select name='selectDomTom' id='selectDomTom' onChange='setDomTomMap(this.value);'>";
selectDomTom += "<option value='-1'>Choisissez</option>";
for (var i=0; i<tabDomTom.length; i++)
{
selectDomTom += "<option value='"+i+"'>"+tabDomTom[i]['titre']+"</option>";
}
selectDomTom += "</select>";
document.getElementById(listDomTom).innerHTML = selectDomTom;
document.getElementById(listDomTom).innerHTML += "<br /><b>OU cliquez directement  sur la carte</b> sur une collectivit&eacute; d'Outre-mer.";
return false;
}
function get_result_mv1(lat,longe)
{
tout_numerique = false;
couv_analog = false;
listeChainesOk = new Array();
date_passage_effet = '';
arrBrouil.length = 0;
arrLocales.length = 0;
document.getElementById("couverture").style.display = 'block';
document.getElementById("couverture").innerHTML = 'Traitement en cours...<br />&nbsp;';
if(window.XMLHttpRequest){// Firefox
xhr_object = new XMLHttpRequest();
}
else if(window.ActiveXObject){ // Internet Explorer
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
}
else { // XMLHttpRequest non supporté par le navigateur
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
}
var method   = "POST";
var filename = "ajaxGetResult_mv1";
var data     = null;
if(lat != "")
data = "lat=" + lat + "&lng=" + longe;
filename += "?"+data;
xhr_object.open(method, filename, true);
xhr_object.onreadystatechange = function(message) {
if(xhr_object.readyState == 4) {
var tmp = xhr_object.responseText.split("#");
var content = "";
var chaines_tnt = "";
if(xhr_object.responseText != '#0')
{
for(var i=0; i<tmp.length; i++ )
{
content += write_result_mv1(tmp[i]);
}
document.getElementById("couverture").innerHTML = content + composition();
} else
document.getElementById("couverture").innerHTML = 'Vous ne recevez aucun signal analogique ou numérique.<br />&nbsp;';
document.getElementById("block_couverture").style.display = 'block';
document.getElementById("couverture").style.display = 'block';
write_lien_vers_v2(lat, longe);
document.getElementById("deplace").style.display = 'block';
}
}
if(method == "POST")
xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr_object.send(data);
return;
}
function write_result_mv1(tab)
{
var content = "";
var tabtemp = tab.split("||");
if(tabtemp.length > 0)
{
if(tabtemp[0] == 1)
content = write_fin_couverture(tabtemp);
else if(tabtemp[0] == 2){
contentBrouil();
content = write_couverture_normal(tabtemp);
} else if(tabtemp[0] == 3)
content = write_couverture_moyen(tabtemp);
else if(tabtemp[0] == 4)
content = write_couverture_tnt(tabtemp);
else if(tabtemp[0] == 5 && tout_numerique == false)
content = write_couverture_tnt_prevu(tabtemp);
else if(tabtemp[0] == 7 && tout_numerique == false)
write_couverture_brouillage(tabtemp);
else if(tabtemp[0] == 13)
write_couverture_locales(tabtemp);
}
return content;
}
function write_coordonnees_lambert(tab)
{
var content  = "<div style=\"margin-bottom:6px\">X = " + tab[1] + "<br />";
content += "Y = "+tab[2]+ "<br />";
content += "</div>";
return content;
}
function write_fin_couverture(tab)
{
var content = '';
var chaine;
var chaine_temp = '';
var date_prevu;
var date_technique;
var recep_analog = 'non';
for(var i=0; i<tab.length-1 && recep_analog == 'non'; i+=6 )
{
date_prevu = tab[i+3];
chaine = tab[i+2];
if (chaine == 'France 2'){
var tabtemp = date_prevu.split(":");
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
tmpMois = tmpMois.toString();
if (tmpMois.length < 2) tmpMois = '0' + tmpMois;
var tmpJour = tmpDate.getDate();
tmpJour = tmpJour.toString();
if (tmpJour.length < 2) tmpJour = '0' + tmpJour;
var testDate = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
if (testDate >= tab[i+4]) {
recep_analog = 'fin';
break;
} else {
recep_analog = 'oui';
break;
}
}
}
region = tab[i+1];
chaine = tab[i+2];
date_prevu = tab[i+3];
date_effective = tab[i+4];
if(recep_analog == 'oui')
{
var tabtemp = date_prevu.split(":");
content += "<div style=\"padding:3px\">Vous êtes en principe couvert par un émetteur situé dans cette zone de réception régionale&nbsp;: <b>"+ region +"</b></div>";
content += "<div style=\"padding:3px\">Date d'arrêt de diffusion des chaînes analogiques (hors Canal +) de cette zone&nbsp;: <u>"+ tabtemp[0] +"</u></div>";
date_passage_effet = tabtemp[0];
} else if (recep_analog == 'fin') {
content += "<div style=\"padding:3px\">La zone <b>" + tab[i+1] + "</b> est passée au tout numérique depuis le <u>" + tabtemp[0] + "</u>.</div>";
tout_numerique = true;
}
var recep_canal = 'non';
for(var j=0; j<tab.length-1 && recep_canal == 'non'; j+=6 )
{
date_prevu = tab[j+3];
chaine = tab[j+2];
if (chaine == 'Canal +' && tout_numerique == false){
var tabtemp = date_prevu.split(":");
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
tmpMois = tmpMois.toString();
if (tmpMois.length < 2) tmpMois = '0' + tmpMois;
var tmpJour = tmpDate.getDate();
tmpJour = tmpJour.toString();
if (tmpJour.length < 2) tmpJour = '0' + tmpJour;
var testDate = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
if (testDate >= tab[j+4]) {
recep_canal = 'fin';
break;
} else {
recep_canal = 'oui';
break;
}
}
}
if (recep_canal != 'non') {
region = tab[j+1];
chaine = tab[j+2];
date_prevu = tab[j+3];
date_effective = tab[j+4];
var tabtemp = date_prevu.split(":");
if(recep_canal == 'oui')
{
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
content += "<div style=\"padding: 6px 3px\">Concernant Canal +, vous êtes en principe couvert par un émetteur situé dans cette zone de réception régionale&nbsp;: <b>"+ region +"</b></div>";
content += "<div style=\"padding:3px\">Date d'arrêt de diffusion de Canal + en analogique de cette zone&nbsp;:<br /><u>"+ tabtemp[0] +"</u></div>";
} else if ( recep_analog != 'fin' && recep_canal == 'fin') {
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
content += "<div style=\"padding:3px\">La diffusion de Canal+ est passée au tout numérique sur la zone <b>"+ region +"</b> depuis le <u>" + tabtemp[0] + "</u>.</div>";
}
}
if (recep_analog == 'non' && recep_canal == 'non') {
content += "<div style=\"padding:3px\">Vous ne recevez aucune chaînes analogiques</div>";
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
}
return content;
}
function write_couverture_normal(tab)
{
var content = "<div style=\"margin: 5px 0px; border-top:2px solid #c09;\"></div>";
if (tout_numerique == false) content += "<p style=\"margin:4px;color:#19265A;font-size:1.1em\"><b>Chaînes analogiques nationales</b> (que vous receviez déjà avant le déploiement de la TNT) :</p>";
else content += "<p style=\"margin:4px;color:#19265A;font-size:1.1em\"><b>Chaînes analogiques nationales</b> (que vous receviez avant le passage au tout numérique)&nbsp;:</p>";
content += "<div style=\"padding:3px\"><u>Réception normale :</u></div>";
var chaine;
var display;
var old_chaine = '';
var content_tmp = '';
content += '<div style="color:green;margin:3px">';
for(var i=0; i<tab.length-1; i++ )
{
chaine = tab[i+1];
display = tab[i+2];
var tabtemp = chaine.split(":");
if(display == 'ok') {
listeChainesOk.push(tabtemp[0]);
if (tabtemp[0] != old_chaine) {
if (tabtemp[0] == 'France 2') {
content_tmp += 'TF1, France 2, France 3';
content_tmp += ', ';
} else if (tabtemp[0] != 'TF1' && tabtemp[0] != 'France 3') {
content_tmp += tabtemp[0];
content_tmp += ', ';
}
}
}
old_chaine = tabtemp[0];
i+= 2;
}
if (content_tmp != '') {
content_tmp = content_tmp.substr(0,content_tmp.length-2) + '.';
content += content_tmp + "</div>";
if (content_brouillage != '') content += content_brouillage;
couv_analog = true;
return content;
} else return '';
}
function write_lien_vers_v2(lat, lng)
{
document.getElementById("lien_vers_v2").innerHTML = '<p><a class="link-orange" href="ma_tnt?lat='+lat+'&lng='+lng+'">Si vous souhaitez des informations sur les &eacute;metteurs couvrants et les canaux diffus&eacute;s, cliquez ici</a></p>';
}
function write_couverture_moyen(tab)
{
var content = '';
if (couv_analog == false) {
content += "<div style=\"margin: 5px 0px; border-top:2px solid #c09;\"></div>";
if (tout_numerique == false) content += "<p style=\"margin:4px;color:#19265A;font-size:1.1em\"><b>Chaînes analogiques nationales</b> (que vous receviez déjà avant le déploiement de la TNT)&nbsp;:</p>";
else content += "<p style=\"margin:4px;color:#19265A;font-size:1.1em\"><b>Chaînes analogiques nationales</b> (que vous receviez avant le passage au tout numérique)&nbsp;:</b></p>";
}
content += "<div style=\"padding:3px\"><u>Réception moyenne :</u></div>";
content += "<div style=color:green;margin:4px>";
var chaine;
var old_chaine = '';
var suite = false;
var display;
var content_tmp = '';
for(var i=0; i<tab.length-1; i++ )
{
chaine = tab[i+1];
display = tab[i+2];
var tabtemp = chaine.split(":");
if (tabtemp[0] != old_chaine) {
if(display == 'ok') {
var test_listeChaines = listeChainesOk.join(",");
if (test_listeChaines.indexOf(tabtemp[0]) == -1) {
if (tabtemp[0] == 'France 2') {
content_tmp += 'TF1, France 2, France 3';
content_tmp += ", ";
} else if (tabtemp[0] != 'TF1' && tabtemp[0] != 'France 3') {
content_tmp += tabtemp[0];
content_tmp += ", ";
}
}
} else
content_tmp += "<span style=color:red>, " + tabtemp[0] + "</span>";
}
i+= 2;
old_chaine = tabtemp[0];
}
if (content_tmp != ''){
content_tmp = content_tmp.substr(0,content_tmp.length -2) + '.';
return content += content_tmp + "</div>";
} else return '';
}
function write_couverture_brouillage(tab) {
var region;
var chaine;
var valeur;
var regionTNT;
var multiplex;
var date_prevu;
nbrBrouil = 0;
for( var i=0 ; i<tab.length-1 ; i++ )
{
region 		= tab[i+1];
chaine 		= tab[i+2];
valeur 		= tab[i+3];
regionTNT	= tab[i+4];
multiplex 	= tab[i+5];
date_prevu 	= tab[i+6];
if (valeur > -99 && valeur < 0) {
arrBrouil[i] = new Array(region,chaine,valeur,regionTNT,multiplex,date_prevu);
nbrBrouil++;
}
i+=7;
}
}
function write_couverture_tnt(tab)
{
var multiplex;
var display;
var tabtemp;
var date_effet = '';
var content_tmp = '';
var content_locales = '';
for(var i=0; i<tab.length-1; i++ )
{
multiplex = tab[i+1];
display = tab[i+2];
tabtemp = multiplex.split(":");
if(display == 'ok') {
content_tmp += '<b>' + tabtemp[0] + '</b>, ';
date_effet = tabtemp[2];
}
i+= 2;
}
var long_content_tmp = content_tmp.length -2;
if (content_tmp.substr(long_content_tmp,1) == ',')
content_tmp = content_tmp.substr(0,long_content_tmp) + '.';
var content = "<div style=\"margin: 5px 0px; border-top:2px solid #c09;\"></div>";
if (content_tmp != '') {
content += "<p style=\"margin:4px;color:#19265A;font-size:1.1em\"><b>Couverture actuelle en TNT</b> (données mises à jour le " + date_effet + ")</p>";
content += "<div style=\"padding:3px\"><u>Réception des multiplex suivants (*):</u></div>";
content += "<div style=\"color:green;margin:4px\">";
content += content_tmp;
content += "</div>";
if (arrLocales.length > 1) content_locales = 'Chaînes locales :' + arrLocales;
else if(arrLocales.length == 1) content_locales = 'Chaîne locale :' + arrLocales[0];
content += "<div style=\"color:green;margin:4px\" id=\"div_locales\">" + content_locales + "</div>";
content += "<div style=\"padding:3px;font-size:0.9em\">* Si vous ne recevez pas toutes ces chaînes, votre antenne est peut-être mal orientée. Vous pouvez alors faire appel à votre antenniste.</div>";
} else {
content += "<h3 style=margin:4px>Aucune couverture numérique sur cette zone à ce jour.</h3>";
}
return content;
}
function write_couverture_tnt_prevu(tab)
{
var multiplex;
var display;
var tabtemp;
var content_tmp = '';
var couvert = false;
var predictif = '';
for(i=0; i<tab.length-1; i++ )
{
multiplex = tab[i+1];
display = tab[i+2];
tabtemp = multiplex.split(":");
if(display == 'ok') {
if (content_tmp.indexOf(tabtemp[0]) == '-1') {
content_tmp += '<b>' + tabtemp[0] + '</b>, ';
if (tabtemp[4] == 1) predictif = ' (*)';
}
couvert = true;
}
i+= 2;
}
content_tmp = content_tmp.substr(0,content_tmp.length-2) + '.';
var content = "<div style=\"border-top:2px solid #c09;\"></div>";
content += "<h3 style=margin:4px>Couverture prévue à partir du " + date_passage_effet + predictif + "&nbsp;:</h3>";
if (couvert && predictif == '') {
content += "<div style=\"padding:3px\"><u>Réception des multiplex suivants :</u></div>";
content += "<div style=\"color:green;margin:4px\">" + content_tmp + "</div>";
} else if (couvert) {
content += "<div style=\"color:green;margin:4px\"><b>Vous devriez &ecirc;tre couvert par la TNT</b></div>";
} else {
content += "<div style=\"margin:4px\"><span style=\"color:green\">Vous ne serez pas couvert par la TNT.</span></div><div style=\"text-align:center;padding-top:5px\"><a href=\"http://www.tousaunumerique.fr/aides/\" target=\"_blank\">Nous allons vous aider !</a><br /><a href=\"http://www.tousaunumerique.fr/aides/\" target=\"_blank\"><img src=\"/img/pictos/tousaunumerique.png\" width=\"106\" height=\"65\" alt=\"http://www.tousaunumerique.fr\" title=\"http://www.tousaunumerique.fr\" border=\"0\"></a></div>";
}
if (predictif != '')  content += '<div style="padding:3px;font-size:0.9em">(*) En raison de la nécessité d\'une mise en concurrence des opérateurs techniques, il est actuellement impossible de donner une estimation précise de cette couverture numérique.</div>';
content += "<br />";
return content;
}
function write_couverture_locales(tab){
for( var i=0 ; i<tab.length-1 ; i++ )
{
var tabtemp = tab[i+1].split(':');
var chaine 		= tabtemp[2];
var display 	= tab[i+2];
if(display == 'ok') {
if (chaine == 'Multi7') {
arrLocales.push(' BDM TV');
arrLocales.push(' BFM Business Paris');
arrLocales.push(' Cinaps TV');
arrLocales.push(' Demain IDF');
arrLocales.push(' IDF1');
arrLocales.push(' NRJ Paris');
arrLocales.push(' T&eacute;l&eacute; Bocal');
} else if (chaine == 'OuestTV') {
arrLocales.push(' Canal15');
arrLocales.push(' TLC');
arrLocales.push(' TV Vend&eacute;e');
} else if (in_array(' ' + chaine,arrLocales) === false) arrLocales.push(' ' + chaine);
}
i += 2;
}
}
function load_metropolev1() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"),{
mapTypes:[G_PHYSICAL_MAP,G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]
});
map.addControl(new GMapTypeControl());
map.addControl(new GSmallMapControl());
map.setCenter(new GLatLng(46.7807369, 3.09685), 5);
}
}
function start_search_metropolev1(chemin_imgcsa) {
map.clearOverlays();
var adr = document.getElementById('adr').value;
var ville = document.getElementById('ville').value;
var content = "";
var is_ok = false;
if (ville.length == 0 ){
content = "La zone ville est obligatoire";
map.setCenter(new GLatLng(46.7807369, 3.09685), 5);
} else
is_ok = true;
document.getElementById("required").innerHTML = content;
if(is_ok == true)
geocodage_metropolev1(adr, ville, chemin_imgcsa);
return false;
}
function geocodage_metropolev1(adr,ville, chemin_imgcsa) {
var adr_togeocode = adr + ' ' + ville;
var newIcon = new GIcon();
var geocoder = null;
newIcon.image = chemin_imgcsa + "home.png";
newIcon.iconAnchor = new GPoint(9,9);
newIcon.infoWindowAnchor = new GPoint(20, 0);
geocoder = new GClientGeocoder();
geocoder.setBaseCountryCode('fr');
geocoder.getLatLng(adr_togeocode, function (coord) {
if(coord){
var i = findDomTom_metropolev1(coord.y, coord.x);
if (i > -1)
window.location.replace("ma_tnt_outremer?lat="+coord.y+"&lng="+coord.x);
var i = findDomTom_metropolev1(coord.y, coord.x);
if (i > -1)
window.location.replace("ma_tnt_outremer?lat="+coord.y+"&lng="+coord.x);
var latlng = new GLatLng(coord.y,coord.x);
var latlng_decale = new GLatLng(coord.y + 0.004,coord.x + 0.004);
imarker = new GMarker(latlng,{icon:newIcon, draggable: true});
GEvent.addListener(imarker, "dragstart", function() {
map.closeInfoWindow();
});
GEvent.addListener(imarker, "dragend", function(){
var new_pos = imarker.getPoint();
geocoder.getLocations(new_pos, showAddress);
get_result_mv1(new_pos.y,new_pos.x);
});
geocoder.getLocations(latlng, showAddress);
map.addOverlay(imarker);
map.enableScrollWheelZoom();
GEvent.addListener(imarker, "click", function() {
imarker.openInfoWindowHtml(content_adresse);
});
map.setCenter(latlng_decale, 14);
map.refresh;
document.getElementById("deplace").style.display="block";
get_result_mv1(coord.y,coord.x);
} else {
map.setCenter(new GLatLng(46.7807369, 3.09685), 5);
var content = "Impossible de trouver ce lieu !";
document.getElementById("required").innerHTML = content;
}
});
}
function create_info_window(latlng) {
var content = "<div id=\"adresse\" style=\"font-size:13px;\">";
content +=  adr +"<br />";
content +=  ville + "<br />";
content +=  '<br /><span style="font-size:0.9em"><b>Voir les r&eacute;sultats sur la colonne de droite </b></span><span style="font-size:1.1em;color:#c09"><b>></b></span>';
content += "</div>";
return content;
}
function showAddress(response) {
if ( (response || response.Status.code == 200) && response.Placemark != undefined ) {
var place = response.Placemark[0];
var tmp_adresse = place.address.split(", ");
if (tmp_adresse.length < 3){
tmp_adresse[2] = tmp_adresse[1];
tmp_adresse[1] = tmp_adresse[0];
tmp_adresse[0] = '';
} else if(tmp_adresse.length > 3){
tmp_adresse[2] += ', ' + tmp_adresse[3];
}
content_adresse =
'<div style="padding-top:6px"><u>Localisation de votre recherche :</u></div><br />' +
'<b>Adresse : </b>' + tmp_adresse[0] + '<br>' +
'<b>Ville : </b>' + tmp_adresse[1] + '<br>' +
'<b>Pays : </b>' + tmp_adresse[2] + '<br/><br/>';
imarker.openInfoWindowHtml(content_adresse);
document.getElementById("adr").value = tmp_adresse[0];
document.getElementById("ville").value = tmp_adresse[1] + ', ' + tmp_adresse[2];
} else {
content_adresse = 'Impossible de localiser cette adresse<br />Erreur : ' + response.Status.code;
}
}
function contentBrouil(){
var content = "";
var region;
var chaine;
var valeur;
var regionTNT;
var multiplex;
var date_prevu;
var suivant;
var tmp;
content_brouillage = '';
if (arrBrouil.length > 0) {
arrBrouil = arrBrouil.sort(sortStringNoCase);
for( val in arrBrouil )
{
region 			= arrBrouil[val][0];
chaine 			= arrBrouil[val][1];
valeur 			= arrBrouil[val][2];
regionTNT		= arrBrouil[val][3];
multiplex 		= arrBrouil[val][4];
date_prevu 		= arrBrouil[val][5];
suivant 		= parseInt(val) + 1;
if (suivant < nbrBrouil) {
if (region == arrBrouil[suivant][0] && chaine == arrBrouil[suivant][1])
continue;
}
if (valeur > -99 && valeur < 0) {
if (valeur > -6) tmp = "pourrait être légèrement perturbée";
else tmp = "risque d'être perturbée";
content += "<div style=\"background-color:#F7F2F5;font-size:0.9em;margin:3px 1px;border:1px solid #c09;padding:3px\">La réception analogique de <b>" + arrChaine[chaine] + "</b> " + tmp + " à partir du <b>" + date_prevu.substr(6,2) + "/" + date_prevu.substr(4,2) + "/" + date_prevu.substr(0,4) + "</b>, si vous dépendez de l'émetteur de <b>" + region + "</b>.  N'hésitez pas à passer au numérique.</div>";
}
}
if (content != "") content_brouillage = content;
}
}
function composition(){
var content = "<div style=\"border-top:2px solid #c09\"></div><br />";
content += '<div id="specialContent" style="margin:1px;padding:6px;background-color:#F2F7FF"><h5 style="margin-bottom:0px">Composition des multiplex</h5><br /><b>R1 :</b> France&nbsp;2, France&nbsp;3, France&nbsp;5, France&nbsp;&Ocirc;, LCP/Public&nbsp;S&eacute;nat, Chaîne locale ou 2e programme r&eacute;gional de France 3<br /><br /><b>R2 :</b> I-T&eacute;l&eacute;, BFM&nbsp;TV, Direct&nbsp;8, Gulli, Direct&nbsp;Star, France&nbsp;4<br /><br /><b>R3 :</b> Canal+&nbsp;HD, Canal+&nbsp;Cin&eacute;ma, Canal+&nbsp;Sport, Plan&egrave;te, TPS&nbsp;Star, CFoot<br /><br /><b>R4 :</b> M6, W9, NT1, Paris&nbsp;Premi&egrave;re, Arte&nbsp;HD<br /><br /><b>R5 :</b> TF1&nbsp;HD, France&nbsp;2&nbsp;HD, M6&nbsp;HD<br /><br /><b>R6 :</b> TF1, Arte, LCI, Eurosport, NRJ&nbsp;12, TMC, TF6';
content += '</div><br />&nbsp;';
return content;
}
function in_array (needle, haystack, argStrict) {
var key = '',
strict = !! argStrict;
if (strict) {
for (key in haystack) {
if (haystack[key] === needle) {
return true;
}
}
} else {
for (key in haystack) {
if (haystack[key] == needle) {
return true;
}
}
}
return false;
}
function writeSection1(varChar)
{
var tabVarChar = varChar.split('&&');
var latitude = tabVarChar[1];
var longitude = tabVarChar[2];
var region = tabVarChar[3];
var content = 'Point de coordonn&eacute;s ('+latitude+', '+longitude+') appartenant &agrave; la r&eacute;gion <b>'+region+'</b>.';
return content;
}
function writeSection2(varChar1, varChar2)
{
var theDateOfTheDay = getTheDateOfTheDay();
var dateDebutTNT = '2010-11-30';
var tabVarChar1 = varChar1.split('&&');
receptionNumerique = tabVarChar1[1];
var tabVarChar2 = varChar2.split('&&');
if (tabVarChar2.length>1)
{
var phase = tabVarChar2[4];
var dateAllumage = tabVarChar2[9];
}
else
{
var phase = 0;
var dateAllumage = '';
}
var content = '';
if (receptionNumerique==0)
{
content = '<div class="bg-grey" style="width:630px">';
if (dateAllumage == '')
{
if (theDateOfTheDay < dateDebutTNT)
content += '<h3>Vous ne b&eacute;n&eacute;ficierez pas de la couverture num&eacute;rique au 30/11/2010.</h3>';
else
content += '<h3>Vous ne b&eacute;n&eacute;ficiez pas de la couverture num&eacute;rique.</h3>';
}
else
{
content += '<p>Actuellement, vous ne b&eacute;n&eacute;ficiez pas de la couverture num&eacute;rique.</p>';
content += '<p>Vous serez couvert &agrave; compter du <u>' + dateAllumage + "</u>.</p>";
}
content += '</div>';
}
else
{
content = '<div class="bg-grey" style="width:630px">';
if (dateAllumage == '' && phase == 1)
{
if (theDateOfTheDay < dateDebutTNT)
content += '<h3>Vous serez couvert par la TNT &agrave; compter du 30/11/2010.</h3>';
else
content += '<h3>Vous &ecirc;tes couvert par la TNT depuis le 30/11/2010.</h3>';
}
else
{
content += '<h3>Vous &ecirc;tes couvert par la TNT depuis le <u>' + dateAllumage + "</u>.</h3>";
}
content += '</div>';
}
return content;
}
function writeSection3(varChar1, varChar2, chemin_imgcsa)
{
var theDateOfTheDay = getTheDateOfTheDay();
var dateDebutTNT = '2010-11-30';
var content ='';
var tabVarChar2 = varChar2.split('&&');
if (tabVarChar2.length>1)
{
var id = tabVarChar2[1];
var nom = tabVarChar2[2];
var numeroLigneExcel = tabVarChar2[3];
var phase = tabVarChar2[4];
var latitude = tabVarChar2[5];
var longitude = tabVarChar2[6];
var canal = tabVarChar2[7];
var dateAllumage = tabVarChar2[9];
}
if (receptionNumerique == 1)
{
var tabVarChar1 = varChar1.split('&&');
var multiplex = tabVarChar1[2];
var tableChaines = '<table border=0 width=100%><tr>';
var nbChaines = 0;
var j = 3;
while (j<tabVarChar1.length)
{
var idChaine = tabVarChar1[j];
var nomChaine = tabVarChar1[j+1];
var numChaine = tabVarChar1[j+2];
tableChaines += '<td align="center">';
tableChaines += '<span id="chaine'+j+'">';
tableChaines += '<img src="http://localhost/csa_svn/design/standard/images/csa/img/logos_chaines/'+idChaine+'.gif" alt="'+nomChaine+'" title="'+nomChaine+', num&eacute;rotation de la chaine : '+numChaine+'">';
tableChaines += '</span>';
tableChaines += '</td>';
}
tableChaines += '</tr></table>';
content += '<div class="bg-grey" style="width:630px">';
if (theDateOfTheDay < dateDebutTNT)
content += '<p>Vous recevrez ';
else
content += '<p>Vous recevez ';
content += 'le multiplex <b>'+multiplex+'</b> compos&eacute; des '+nbChaines+' cha&icirc;nes suivantes :</p>';
content += tableChaines;
content +='<br />';
content +='<p>Le multiplex <b>'+multiplex+'</b> est &eacute;mis sur le <b>canal '+canal+'</b> de l\'&eacute;metteur <b>'+nom+'</b></p><p>que vous pouvez situer sur la carte gr&acirc;ce &agrave; l\'icone <a href="#" onclick="locateEmetteur_om(0); return false;"><img src="http://localhost/csa_svn/design/standard/images/csa/img/mini_emetteur.png" border="0"></a></p>';
content += '</div>';
}
else
{
content = '<div class="cadreGris">';
if (tabVarChar2.length>1)
content += 'Vous d&eacute;pendez de l\'&eacute;metteur <b>'+nom+'</b><br />qui devrait normalement &ecirc;tre allum&eacute; <b>au plus tard courant f&eacute;vrier 2011</b>.';
else
content += '<b>Cette zone n\'est pas couverte par un &eacute;metteur de diffusion num&eacute;rique.</b>';
content += '</div>';
}
return content;
}
function writeSection3Bis(varChar1, varChar2, chemin_imgcsa)
{
var theDateOfTheDay = getTheDateOfTheDay();
var dateDebutTNT = '2010-11-30';
var content ='';
var tabVarChar2 = varChar2.split('&&');
if (tabVarChar2.length>1)
{
var id = tabVarChar2[1];
var nom = tabVarChar2[2];
var numeroLigneExcel = tabVarChar2[3];
var phase = tabVarChar2[4];
var latitude = tabVarChar2[5];
var longitude = tabVarChar2[6];
var canal = tabVarChar2[7];
var dateAllumage = tabVarChar2[9];
var dateAllumageFormatee = convertDate2(dateAllumage);
}
if (tabVarChar2.length>1)
{
var tabVarChar1 = varChar1.split('&&');
var multiplex = tabVarChar1[2];
var tableChaines = '<center><table border=0><tr>';
var nbChaines = 0;
channels = new Array();
var j = 3;
while (j<tabVarChar1.length)
{
var idChaine = tabVarChar1[j];
var nomChaine = tabVarChar1[j+1];
var numChaine = tabVarChar1[j+2];
var urlChaine = initChannelUrl(idChaine);
var channel = new Array(idChaine, nomChaine, numChaine, urlChaine, j);
channels.push(channel);
tableChaines += '<td align="center" style="padding-left:8px; padding-right:7px" id="chaine'+j+'">';
if (urlChaine != '') tableChaines += '<a target="_blank" href="'+urlChaine+'" alt="'+nomChaine+'" title="'+nomChaine+'">';
tableChaines += '<img src="' + chemin_imgcsa + idChaine+'.gif" alt="'+nomChaine+'" title="'+nomChaine+', num&eacute;rotation de la chaine : '+numChaine+'" border=0>';
if (urlChaine != '') tableChaines += '</a>';
tableChaines += '</td>';
nbChaines++;
j = j + 3;
}
tableChaines += '</tr></table></center>';
content += '<div class="bg-grey" style="width:630px">';
if (phase==1)
{
if (theDateOfTheDay < dateDebutTNT)
content += '<p>Vous recevrez ';
else
content += '<p>Vous recevez ';
}
else
{
if (theDateOfTheDay < dateAllumageFormatee)
content += '<p>Vous recevrez ';
else
content += '<p>Vous recevez ';
}
content += 'le multiplex <b>'+multiplex+'</b> compos&eacute; des '+nbChaines+' cha&icirc;nes suivantes :</p>';
content += tableChaines;
if (receptionNumerique == 1)
content +='<p>Le multiplex <b>'+multiplex+'</b> est &eacute;mis sur le <b>canal '+canal+'</b> de l\'&eacute;metteur <b>'+nom+'</b><br />que vous pouvez situer sur la carte gr&acirc;ce &agrave; l\'icone <a href="#" onclick="locateEmetteur_om(0); return false;"><img src="' + chemin_imgcsa + 'mini_emetteur_allume.png" border="0"></a></p>';
else
{
content += '<p>Vous d&eacute;pendez de l\'&eacute;metteur <b>'+nom+'</b><br />qui devrait normalement &ecirc;tre allum&eacute; <b>';
if (phase == 1 || dateAllumage == '')
content += 'au plus tard courant f&eacute;vrier 2011';
else
content += '&agrave; partir du ' + dateAllumage;
content += '.</p><p>Vous pouvez situer cet &eacute;metteur sur la carte en cliquant sur l\'icone <a href="#" onclick="locateEmetteur_om(0); return false;"><img src="' + chemin_imgcsa + 'mini_emetteur_eteint.png" border="0"></a></p>';
}
content += '</div>';
}
else
{
content = '<div class="bg-grey" style="width:630px">';
content += '<p><b>Cette zone n\'est pas couverte par un &eacute;metteur de diffusion num&eacute;rique.</b></p>';
content += '</div>';
}
return content;
}
function writeSection4(varChar)
{
var tabVarChar = varChar.split('&&');
var id = tabVarChar[1];
var nom = tabVarChar[2];
var numeroLigneExcel = tabVarChar[3];
var phase = tabVarChar[4];
var latitude = tabVarChar[5];
var longitude = tabVarChar[6];
var canal = tabVarChar[7];
var idMultiplex = tabVarChar[8];
var dateAllume = tabVarChar[9];
var content = '';
return content;
}
function writeSection5(varChar)
{
var tabVarChar = varChar.split('&&');
receptionAnalogique = tabVarChar[1];
var content = '';
content += '<div class="bg-grey" style="width:630px">';
if (receptionAnalogique==0 || receptionAnalogique=="0<br /><br />")
content += '<h3>Vous ne b&eacute;n&eacute;ficiez pas de la couverture analogique.</h3>';
else
content += '<h3>Vous b&eacute;n&eacute;ficiez de la couverture analogique.</h3>';
content += '</div>';
return content;
}
function getTheDateOfTheDay2()
{
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var theDateOfTheDay = tmpJour + '/' + tmpMois + '/' + tmpDate.getFullYear();
return theDateOfTheDay;
}
function getTheDateOfTheDay()
{
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var theDateOfTheDay = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
return theDateOfTheDay;
}
function convertDate2(strDate)
{
var day = strDate.substring(0,2);
var month = strDate.substring(3,5);
var year = strDate.substring(6,10);
var theDateOfTheDay = year + '-' + month + '-' + day;
return theDateOfTheDay;
}
function convertDate(strDate)
{
var day = strDate.substring(0,2);
var month = strDate.substring(3,5)-1;
var year = strDate.substring(6,10);
var d = new Date();
d.setDate(day);
d.setMonth(month);
d.setFullYear(year);
return d;
}
function compareDates(date_1, date_2)
{
diff = date_1.getTime()-date_2.getTime();
return (diff==0?diff:diff/Math.abs(diff));
}
function getResult_om(lat, lng, chemin_imgcsa)
{
var debug = 0;
var listeEmetteurs = new Array();
var method         = "POST";
var filename       = "ajaxGetResult_om";
var data           = null;
if(window.XMLHttpRequest) // Firefox
{
xhr_object = new XMLHttpRequest();
}
else if(window.ActiveXObject)  // Internet Explorer
{
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
}
else // XMLHttpRequest non supporte par le navigateur
{
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
}
if(lat != "")
data = "lat=" + lat + "&lng=" + lng + "&cle=iMc5PxK";
if(debug != 0)
data += "&debug=1";
filename += "?"+data;
xhr_object.open(method, filename, true);
xhr_object.onreadystatechange = function(message)
{
if(xhr_object.readyState == 4)
{
document.getElementById('section1').innerHTML = '';
document.getElementById('section2').innerHTML = '';
document.getElementById('section3').innerHTML = '';
document.getElementById('section4').innerHTML = '';
document.getElementById('debug').innerHTML = '';
document.getElementById("traitementEnCours").style.display = 'block';
var response = xhr_object.responseText;
if (response == 'invalid_key')
{
document.getElementById("traitementEnCours").innerHTML = "<h2 style='color:#CC0000'><i>Cl&eacute; invalide</i></h2>";
}
else
{
var tabResponse = response.split('||');
for (var j=0; j<tabResponse.length; j++)
{
var section = tabResponse[j].charAt(0);
if (section==1)
{
var section1 = writeSection1(tabResponse[j]);
}
else if (section==2)
{
var section2 = writeSection2(tabResponse[j], tabResponse[j+2]);
}
else if (section==3)
{
var section3 = writeSection3Bis(tabResponse[j], tabResponse[j+1], chemin_imgcsa);
}
else if (section==4)
{
iMarkerEmetteurArray = setTabEmetteurs1(tabResponse[j], chemin_imgcsa);
infoWindowEmetteurArray = setTabEmetteurs2(tabResponse[j]);
var section4 = writeSection4(tabResponse[j]);
}
else if (section==5)
{
var section5 = writeSection5(tabResponse[j]);
}
}
setAllSpecListeners(chemin_imgcsa);
var home = new google.maps.LatLng(lat, lng);
infoWindowDomTomSpec = setAdresse_om(home);
if (iMarkerEmetteurArray.length > 0)
{
map.fitBounds(bounds);
zoomLevel = map.getZoom();
map.setZoom(zoomLevel-1);
}
else
{
map.setZoom(10);
map.setCenter(home);
}
document.getElementById("traitementEnCours").style.display = 'none';
document.getElementById('section2').innerHTML = section2;
document.getElementById('section3').innerHTML = section3;
document.getElementById('section5').innerHTML = section5;
if (debug==1)
document.getElementById('debug').innerHTML = "<h2>--- Debug ---</h2>"+response;
initChannelSimpleTips();
}
}
}
xhr_object.send(data);
return ;
}
function setTabEmetteurs1(varChar, chemin_imgcsa)
{
var tabVarChar = varChar.split('&&');
iMarkerEmetteurArrayT = new Array();
for (var i=1; i<tabVarChar.length; i=i+9)
{
var id = tabVarChar[i];
var nom = tabVarChar[i+1];
var numeroLigneExcel = tabVarChar[i+2];
var phase = tabVarChar[i+3];
var latitude = tabVarChar[i+4];
var longitude = tabVarChar[i+5];
var canal = tabVarChar[i+6];
var idMultiplex = tabVarChar[i+7];
var dateAllumage = tabVarChar[i+8];
iMarkerEmetteurArrayT.push(addiMarkerEmetteur_om(latitude, longitude, phase, dateAllumage, chemin_imgcsa));
}
return iMarkerEmetteurArrayT;
}
function setTabEmetteurs2(varChar)
{
var tabVarChar = varChar.split('&&');
infoWindowEmetteurArrayT = new Array();
for (var i=1; i<tabVarChar.length; i=i+9)
{
var id = tabVarChar[i];
var nom = tabVarChar[i+1];
var numeroLigneExcel = tabVarChar[i+2];
var phase = tabVarChar[i+3];
var latitude = tabVarChar[i+4];
var longitude = tabVarChar[i+5];
var canal = tabVarChar[i+6];
var idMultiplex = tabVarChar[i+7];
var dateAllumage = tabVarChar[i+8];
infoWindowEmetteurArrayT.push(addinfoWindowEmetteur_om(nom, canal, idMultiplex, dateAllumage));
}
return infoWindowEmetteurArrayT;
}
function initChannelUrl(id)
{
var url;
switch (id)
{
case '32' : url = 'http://guyane.rfo.fr'; break;
case '33' : url = 'http://www.acg.gf'; break;
case '34' : url = 'http://www.france24.com/fr/'; break;
case '35' : url = 'http://www.france2.fr'; break;
case '36' : url = 'http://www.france3.fr'; break;
case '37' : url = 'http://www.france4.fr'; break;
case '38' : url = 'http://www.france5.fr'; break;
case '39' : url = 'http://www.franceo.fr'; break;
case '40' : url = 'http://www.arte.tv/fr/'; break;
case '41' : url = 'http://guadeloupe.rfo.fr'; break;
case '42' : url = 'http://www.la-une-guadeloupe.com'; break;
case '43' : url = 'http://canal10-tv.com'; break;
case '44' : url = 'http://martinique.rfo.fr'; break;
case '45' : url = 'http://www.atvweb.fr'; break;
case '46' : url = 'http://kmttelevision.com/html/index.html'; break;
case '47' : url = 'http://reunion.rfo.fr'; break;
case '48' : url = 'http://www.antennereunion.fr'; break;
case '49' : url = 'http://www.telekreol.com'; break;
case '50' : url = 'http://mayotte.rfo.fr'; break;
case '51' : url = 'http://saintpierremiquelon.rfo.fr'; break;
case '52' : url = 'http://polynesie.rfo.fr'; break;
case '54' : url = 'http://nouvellecaledonie.rfo.fr'; break;
case '56' : url = 'http://wallisfutuna.rfo.fr'; break;
default : url = ''; break;
}
return url;
}
function initChannelSimpleTips()
{
if (receptionNumerique == 1)
{
var i = 0;
while (i<channels.length)
{
var theContent = '<div style="font-size:20px; padding-bottom:10px;">'+channels[i][1]+'</div>';
theContent += 'Num&eacute;rotation<br />de la cha&icirc;ne : '+channels[i][2];
if (channels[i][3] != '') theContent += '<div style="font-size:9px; padding-top:5px;"><a href="'+channels[i][3]+'" target="_blank">Acc&eacute;der au site de cette cha&icirc;ne ></a></div>';
$(function() {
$("#chaine"+channels[i][4]).simpletip({
content: theContent,
fixed: true,
position: 'top',
showEffect: 'fade',
hideEffect: 'fade'
});
});
i++;
}
}
}
function initSelectDomTom_om(tabDomTom, chemin_imgcsa)
{
var selectDomTom = "";
var listDomTom = "listDomTom";
selectDomTom += "<label>S&eacute;lectionnez un DOM/TOM :</label>";
selectDomTom += '<select class="jqTransform" name="selectDomTom" id="selectDomTom" onChange="setDomTomMap(this.value, 0, 0, \'' + chemin_imgcsa + '\');">';
selectDomTom += "<option value='-1'>Choisissez</option>";
for (var i=0; i<tabDomTom.length; i++)
{
selectDomTom += "<option value='"+i+"'>"+tabDomTom[i]['titre']+"</option>";
}
selectDomTom += "</select>";
document.getElementById(listDomTom).innerHTML = selectDomTom;
document.getElementById(listDomTom).innerHTML += "<br /><b>OU cliquez directement  sur la carte</b> sur une collectivit&eacute; d'Outre-mer.";
return false;
}
function initTabDomTom()
{
tabDomTom = new Array();
var tabGuadeloupe = new Array();
tabGuadeloupe['titre'] = 'Guadeloupe';
tabGuadeloupe['latitude'] = '16.263855';
tabGuadeloupe['longitude'] = '-61.560745';
tabGuadeloupe['lower_left_x'] = '-61.8442964201';
tabGuadeloupe['lower_left_y'] = '15.8043297247';
tabGuadeloupe['higher_left_x'] = '-60.9625311896';
tabGuadeloupe['higher_left_y'] = '16.5478767982';
tabGuadeloupe['zoom'] = 9;
tabDomTom.push(tabGuadeloupe);
var tabGuyane = new Array();
tabGuyane['titre'] = 'Guyane';
tabGuyane['latitude'] = '3.970025';
tabGuyane['longitude'] = '-53.163757';
tabGuyane['lower_left_x'] = '-54.4832477597';
tabGuyane['lower_left_y'] = '3.0270014732';
tabGuyane['higher_left_x'] = '-51.6110400657';
tabGuyane['higher_left_y'] = '5.7814072862';
tabGuyane['zoom'] = 7;
tabDomTom.push(tabGuyane);
var tabMartinique = new Array();
tabMartinique['titre'] = 'Martinique';
tabMartinique['latitude'] = '14.64026';
tabMartinique['longitude'] = '-60.992088';
tabMartinique['lower_left_x'] = '-61.4296419655';
tabMartinique['lower_left_y'] = '14.283930058';
tabMartinique['higher_left_x'] = '-60.631140685';
tabMartinique['higher_left_y'] = '15.0108243415';
tabMartinique['zoom'] = 10;
tabDomTom.push(tabMartinique);
var tabMayotte = new Array();
tabMayotte['titre'] = 'Mayotte';
tabMayotte['latitude'] = '-12.825661';
tabMayotte['longitude'] = '45.157127';
tabMayotte['lower_left_x'] = '44.9691923395';
tabMayotte['lower_left_y'] = '-13.0358034972';
tabMayotte['higher_left_x'] = '45.331390522';
tabMayotte['higher_left_y'] = '-12.6036635967';
tabMayotte['zoom'] = 10;
tabDomTom.push(tabMayotte);
var tabNouvelleCaledonie = new Array();
tabNouvelleCaledonie['titre'] = 'Nouvelle-Cal\351donie';
tabNouvelleCaledonie['latitude'] = '-21.298075';
tabNouvelleCaledonie['longitude'] = '165.381775';
tabNouvelleCaledonie['lower_left_x'] = '163.4800482338';
tabNouvelleCaledonie['lower_left_y'] = '-22.8073866463';
tabNouvelleCaledonie['higher_left_x'] = '167.8757448738';
tabNouvelleCaledonie['higher_left_y'] = '-19.4784752863';
tabNouvelleCaledonie['zoom'] = 7;
tabDomTom.push(tabNouvelleCaledonie);
var tabPolynesieFrancaiseTuamotu = new Array();
tabPolynesieFrancaiseTuamotu['titre'] = 'Polyn\351sie fran\347aise, Archipel des Tuamotu';
tabPolynesieFrancaiseTuamotu['latitude'] = '-18.040833';
tabPolynesieFrancaiseTuamotu['longitude'] = '-141.409444';
tabPolynesieFrancaiseTuamotu['lower_left_x'] = '-147.9558333333';
tabPolynesieFrancaiseTuamotu['lower_left_y'] = '-23.28';
tabPolynesieFrancaiseTuamotu['higher_left_x'] = '-140.6533333514';
tabPolynesieFrancaiseTuamotu['higher_left_y'] = '-14.3233333418';
tabPolynesieFrancaiseTuamotu['zoom'] = 7;
tabDomTom.push(tabPolynesieFrancaiseTuamotu);
var tabPolynesieFrancaiseIlesAustrales = new Array();
tabPolynesieFrancaiseIlesAustrales['titre'] = 'Polyn\351sie fran\347aise, Iles Australes';
tabPolynesieFrancaiseIlesAustrales['latitude'] = '-25.03982';
tabPolynesieFrancaiseIlesAustrales['longitude'] = '-148.868409';
tabPolynesieFrancaiseIlesAustrales['lower_left_x'] = '-152.9283333333';
tabPolynesieFrancaiseIlesAustrales['lower_left_y'] = '-27.6933333333';
tabPolynesieFrancaiseIlesAustrales['higher_left_x'] = '-144.1141666801';
tabPolynesieFrancaiseIlesAustrales['higher_left_y'] = '-22.5233333435';
tabPolynesieFrancaiseIlesAustrales['zoom'] = 6;
tabDomTom.push(tabPolynesieFrancaiseIlesAustrales);
var tabPolynesieFrancaiseIlesMarquises = new Array();
tabPolynesieFrancaiseIlesMarquises['titre'] = 'Polyn\351sie fran\347aise, Iles Marquises';
tabPolynesieFrancaiseIlesMarquises['latitude'] = '-9.208933';
tabPolynesieFrancaiseIlesMarquises['longitude'] = '-139.653626';
tabPolynesieFrancaiseIlesMarquises['lower_left_x'] = '-140.2689921414';
tabPolynesieFrancaiseIlesMarquises['lower_left_y'] = '-10.5742525286';
tabPolynesieFrancaiseIlesMarquises['higher_left_x'] = '-138.5949296494';
tabPolynesieFrancaiseIlesMarquises['higher_left_y'] = '-8.7640135866';
tabPolynesieFrancaiseIlesMarquises['zoom'] = 7;
tabDomTom.push(tabPolynesieFrancaiseIlesMarquises);
var tabPolynesieFrancaiseIlesDuVent = new Array();
tabPolynesieFrancaiseIlesDuVent['titre'] = 'Polyn\351sie fran\347aise, Iles du Vent';
tabPolynesieFrancaiseIlesDuVent['latitude'] = '-17.637217';
tabPolynesieFrancaiseIlesDuVent['longitude'] = '-149.475403';
tabPolynesieFrancaiseIlesDuVent['lower_left_x'] = '-150.6608333333';
tabPolynesieFrancaiseIlesDuVent['lower_left_y'] = '-17.8908333333';
tabPolynesieFrancaiseIlesDuVent['higher_left_x'] = '-149.1150000323';
tabPolynesieFrancaiseIlesDuVent['higher_left_y'] = '-17.4700000168';
tabPolynesieFrancaiseIlesDuVent['zoom'] = 8;
tabDomTom.push(tabPolynesieFrancaiseIlesDuVent);
var tabPolynesieFrancaiseIlesSousLeVent = new Array();
tabPolynesieFrancaiseIlesSousLeVent['titre'] = 'Polyn\351sie fran\347aise, Iles Sous-le-vent';
tabPolynesieFrancaiseIlesSousLeVent['latitude'] = '-18.040833';
tabPolynesieFrancaiseIlesSousLeVent['longitude'] = '-141.409444';
tabPolynesieFrancaiseIlesSousLeVent['lower_left_x'] = '-152.3058333333';
tabPolynesieFrancaiseIlesSousLeVent['lower_left_y'] = '-16.9333333333';
tabPolynesieFrancaiseIlesSousLeVent['higher_left_x'] = '-150.9325000549';
tabPolynesieFrancaiseIlesSousLeVent['higher_left_y'] = '-16.4058333544';
tabPolynesieFrancaiseIlesSousLeVent['zoom'] = 7;
tabDomTom.push(tabPolynesieFrancaiseIlesSousLeVent);
var tabReunion = new Array();
tabReunion['titre'] = ' La R\351union';
tabReunion['latitude'] = '-21.130237';
tabReunion['longitude'] = '55.52742';
tabReunion['lower_left_x'] = '55.1755857017';
tabReunion['lower_left_y'] = '-21.423053016';
tabReunion['higher_left_x'] = '55.8637041977';
tabReunion['higher_left_y'] = '-20.843536776';
tabReunion['zoom'] = 9;
tabDomTom.push(tabReunion);
var tabStMartinStBart = new Array();
tabStMartinStBart['titre'] = 'St Martin - St Barth\351l\351my';
tabStMartinStBart['latitude'] = '17.986113';
tabStMartinStBart['longitude'] = '-62.945595';
tabStMartinStBart['lower_left_x'] = '-63.1834050441';
tabStMartinStBart['lower_left_y'] = '17.824806126';
tabStMartinStBart['higher_left_x'] = '-61.9572301322';
tabStMartinStBart['higher_left_y'] = '18.9831846205';
tabStMartinStBart['zoom'] = 9;
tabDomTom.push(tabStMartinStBart);
var tabStPierreEtMiquelon = new Array();
tabStPierreEtMiquelon['titre'] = 'St-Pierre-et-Miquelon';
tabStPierreEtMiquelon['latitude'] = '46.942106';
tabStPierreEtMiquelon['longitude'] = '-56.32988';
tabStPierreEtMiquelon['lower_left_x'] = '-56.4882956493';
tabStPierreEtMiquelon['lower_left_y'] = '46.7256231627';
tabStPierreEtMiquelon['higher_left_x'] = '-56.0554981973';
tabStPierreEtMiquelon['higher_left_y'] = '47.1620423507';
tabStPierreEtMiquelon['zoom'] = 9;
tabDomTom.push(tabStPierreEtMiquelon);
var tabFutuna = new Array();
tabFutuna['titre'] = 'Wallis & Futuna, Futuna';
tabFutuna['latitude'] = '-14.300549';
tabFutuna['longitude'] = '-178.093586';
tabFutuna['lower_left_x'] = '-178.1849874097';
tabFutuna['lower_left_y'] = '-14.313894006';
tabFutuna['higher_left_x'] = '-178.0518870937';
tabFutuna['higher_left_y'] = '-14.24005068';
tabFutuna['zoom'] = 11;
tabDomTom.push(tabFutuna);
var tabWallis = new Array();
tabWallis['titre'] = 'Wallis & Futuna, Wallis';
tabWallis['latitude'] = '-13.287965';
tabWallis['longitude'] = '-176.208057';
tabWallis['lower_left_x'] = '-176.2551951666';
tabWallis['lower_left_y'] = '-13.3539527518';
tabWallis['higher_left_x'] = '-176.1564259066';
tabWallis['higher_left_y'] = '-13.2135010518';
tabWallis['zoom'] = 11;
tabDomTom.push(tabWallis);
return tabDomTom;
}
function findDomTom(lat, lng)
{
var id = -1;
for (var i=0; i<tabDomTom.length; i++)
{
var lngOk = new Boolean(parseFloat(lng) > parseFloat(tabDomTom[i]['lower_left_x']) && parseFloat(lng) < parseFloat(tabDomTom[i]['higher_left_x']));
var latOk = new Boolean (parseFloat(lat) > parseFloat(tabDomTom[i]['lower_left_y']) && parseFloat(lat) < parseFloat(tabDomTom[i]['higher_left_y']));
if (lngOk==true && latOk==true)
id = i;
var debug = "i : " + i + "\n";
debug += "lng : " + lng + "\n";
debug += "lat : " + lat + "\n";
debug += "lower_left_x : " + tabDomTom[i]['lower_left_x'] + "\n";
debug += "higher_left_x : " + tabDomTom[i]['higher_left_x'] + "\n";
debug += "lower_left_y : " + tabDomTom[i]['lower_left_y'] + "\n";
debug += "higher_left_y : " + tabDomTom[i]['higher_left_y'] + "\n";
debug += "lngOk : " + lngOk + "\n";
debug += "latOk : " + latOk + "\n";
debug += "id : " + id + "\n";
}
return id;
}
function findDomTom_mv2(lat, lng, tabDomTom)
{
var id = -1;
for (var i=0; i<tabDomTom.length; i++)
{
var lngOk = new Boolean(parseFloat(lng) > parseFloat(tabDomTom[i]['lower_left_x']) && parseFloat(lng) < parseFloat(tabDomTom[i]['higher_left_x']));
var latOk = new Boolean (parseFloat(lat) > parseFloat(tabDomTom[i]['lower_left_y']) && parseFloat(lat) < parseFloat(tabDomTom[i]['higher_left_y']));
if (lngOk==true && latOk==true)
id = i;
var debug = "i : " + i + "\n";
debug += "lng : " + lng + "\n";
debug += "lat : " + lat + "\n";
debug += "lower_left_x : " + tabDomTom[i]['lower_left_x'] + "\n";
debug += "higher_left_x : " + tabDomTom[i]['higher_left_x'] + "\n";
debug += "lower_left_y : " + tabDomTom[i]['lower_left_y'] + "\n";
debug += "higher_left_y : " + tabDomTom[i]['higher_left_y'] + "\n";
debug += "lngOk : " + lngOk + "\n";
debug += "latOk : " + latOk + "\n";
debug += "id : " + id + "\n";
}
return id;
}
var infoWindowDomTomSpec;
var infoWindowEmetteurArray;
var iMarkerEmetteurArray;
var iMarkerDomTomSpec;
var iMarkerDomTomArray;
var infoWindowDomTomArray;
function initialize_om(getLat, getLng, chemin_imgcsa)
{
var latLng = new google.maps.LatLng(35.7807369, 3.09685);
var method = "POST";
var optionsCarte = {
zoom: 1,
center: latLng,
draggable: false,
navigationControl: false,
streetViewControl: false,
scaleControl: true,
disableDoubleClickZoom: true,
scrollwheel:false,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
map = new google.maps.Map(document.getElementById("mapCanvas"), optionsCarte);
var tabDomTom = new Array();
tabDomTom = initTabDomTom(); // tableau des coordonnées des 15 DOM TOM
initSelectDomTom_om(tabDomTom, chemin_imgcsa); // construit le SELECT html du formulaire
var i = -1;
$("#divRecherche0").hide('fast');
document.getElementById("mapLegend").style.display = 'none';
document.getElementById("traitementEnCours").style.display = 'none';
if (method == 'GET')
{
var i = findDomTom(getLat, getLng);
if (i!=-1)
{
setDomTomMap(i);
document.getElementById('selectDomTom').value = i;
}
}
var infoWindowDomTomSpec = null;
var infoWindowEmetteurArray = Array();
if (i == -1)
{
var iMarkerDomTomArray = setMarkerDomTomOnMap1(tabDomTom);
var infoWindowDomTomArray = setMarkerDomTomOnMap2(tabDomTom);
iMarkerMetropole = setMarkerMetropoleOnMap();
infoWindowMetropole = setinfoWindowMetropole();
setAllMetropoleListeners(iMarkerMetropole, infoWindowMetropole);
setAllListenersDomTom(iMarkerDomTomArray, infoWindowDomTomArray, chemin_imgcsa);
}
if (method == 'GET' && i != -1)
{
var new_pos = new google.maps.LatLng(getLat, getLng);
clearMap_om();
bounds = null;
bounds = new google.maps.LatLngBounds();
iMarkerDomTomSpec = new google.maps.Marker({
position: new_pos,
map: map,
icon: 'http://localhost/csa_svn/design/standard/images/csa/img/iMarkerHome.png',
draggable: true
});
bounds.extend(new_pos);
getResult_om(getLat, getLng);
}
}
function setDomTomMap(id, iMarkerDomTomArray, infoWindowDomTomArray, chemin_imgcsa)
{
var tabDomTom = new Array();
tabDomTom = initTabDomTom();
clearMap_om(iMarkerDomTomArray, infoWindowDomTomArray);
bounds = null;
bounds = new google.maps.LatLngBounds();
if (id != -1)
{
$("#divRecherche0").show('fast');
map.setOptions({navigationControl: true, disableDoubleClickZoom: false, scrollwheel:true, streetViewControl: true, draggable: true});
addDraggableiMarkerDomTom(tabDomTom[id], bounds, chemin_imgcsa);
map.setZoom(tabDomTom[id]['zoom']);
map.setCenter(new google.maps.LatLng(tabDomTom[id]['latitude'], tabDomTom[id]['longitude']), 5);
document.getElementById("mapLegend").style.display = 'block';
}
else
{
$("#divRecherche0").hide('fast');
}
}
function setMarkerMetropoleOnMap()
{
var metropole = new google.maps.LatLng(46.7807369, 3.09685);
iMarkerMetropole = new google.maps.Marker({
position: metropole,
map: map
});
return iMarkerMetropole;
}
function setMarkerDomTomOnMap1(tabDomTom)
{
var iMarkerDomTomArray = new Array();
for (var i=0; i<tabDomTom.length; i++)
{
iMarkerDomTomArray.push(addiMarkerDomTom(tabDomTom[i]));
}
return iMarkerDomTomArray;
}
function setMarkerDomTomOnMap2(tabDomTom)
{
var infoWindowDomTomArray = new Array();
for (var i=0; i<tabDomTom.length; i++)
{
infoWindowDomTomArray.push(addinfoWindowDomTom(tabDomTom[i]['titre']));
}
return infoWindowDomTomArray;
}
function addiMarkerEmetteur_om(lat, lng, phase, dateAllumage, chemin_imgcsa)
{
var emetteur = new google.maps.LatLng(lat, lng);
var icon;
if (dateAllumage == '' && phase == 1)
eteintOuAllume = 'eteint';
else
{
var dateFormatee = convertDate(dateAllumage);
var dateJour = getTheDateOfTheDay2();
var dateJourFormatee = convertDate(dateJour);
var situationDate = compareDates(dateFormatee, dateJourFormatee);
if (situationDate<=0)
eteintOuAllume = 'allume';
else
eteintOuAllume = 'eteint';
}
iMarkerEmetteur = new google.maps.Marker({
position: emetteur,
map: map,
icon: chemin_imgcsa + 'emetteur_'+eteintOuAllume+'.png'
});
bounds.extend(emetteur);
return iMarkerEmetteur;
}
function addinfoWindowEmetteur_om(nom,canal,idMultiplex, dateLancement)
{
if (idMultiplex == 7)
var multiplex = "ROM 1";
if (dateLancement == '')
var dateAllumage = "Au plus tard fin f&eacute;vrier 2011";
else
var dateAllumage = dateLancement;
var contentString = '<span style="font-size:14px;font-weight:bold">'+nom+'</span><br />';
contentString += 'Multiplex : <b>'+multiplex+'</b> - Canal : <b>'+canal+'</b><br />';
contentString += 'Date d\'allumage : <b>'+dateAllumage+'</b>';
var emetteurInfoWindow = new google.maps.InfoWindow({
content: contentString
});
return emetteurInfoWindow;
}
function setAllSpecListeners(chemin_imgcsa)
{
setiMarkerDomTomSpecListener(chemin_imgcsa);
setAllListenersEmetteurClick_om();
}
function setAllListenersEmetteurClick_om()
{
for (i in iMarkerEmetteurArray)
{
setListenerEmetteurClick_om(i);
}
}
function setListenerEmetteurClick_om(i)
{
google.maps.event.addListener(iMarkerEmetteurArray[i], 'click', function() {
infoWindowDomTomSpec.close();
for (j in iMarkerEmetteurArray)
{
infoWindowEmetteurArray[j].close();
}
infoWindowEmetteurArray[i].open(map, iMarkerEmetteurArray[i]);
});
}
function clearMap_om(iMarkerDomTomArray, infoWindowDomTomArray)
{
if (typeof bounds != "undefined")
{
bounds = null;
bounds = new google.maps.LatLngBounds();
}
if (typeof iMarkerDomTomSpec != "undefined")
iMarkerDomTomSpec.setMap(null);
if (typeof iMarkerHome != "undefined")
iMarkerHome.setMap(null);
for (i in iMarkerDomTomArray)
{
iMarkerDomTomArray[i].setMap(null);
}
iMarkerDomTomArray = new Array();
for (i in infoWindowDomTomArray)
{
infoWindowDomTomArray[i].close();
}
infoWindowDomTomArray = new Array();
for (i in iMarkerEmetteurArray)
{
iMarkerEmetteurArray[i].setMap(null);
}
iMarkerEmetteurArray = new Array();
for (i in infoWindowEmetteurArray)
{
infoWindowEmetteurArray[i].close();
}
infoWindowEmetteurArray = new Array();
if (typeof infoWindowDomTomSpec!= "undefined")
infoWindowDomTomSpec.close();
document.getElementById("adr").value = '';
document.getElementById("ville").value = '';
document.getElementById("section1").innerHTML = "";
document.getElementById("section2").innerHTML = "";
document.getElementById("section3").innerHTML = "";
document.getElementById("section4").innerHTML = "";
document.getElementById("section5").innerHTML = "";
document.getElementById("debug").innerHTML = "";
}
function addiMarkerDomTom(domTom)
{
var pos = new google.maps.LatLng(domTom['latitude'], domTom['longitude']);
iMarkerDomTom = new google.maps.Marker({
position: pos,
map: map
});
return iMarkerDomTom;
}
function addinfoWindowDomTom(nomDomTom)
{
infoWindowDomTom = new InfoBubble({
map: map,
content: '<div class="phoneytext">'+nomDomTom+'</div>',
position: new google.maps.LatLng(-35, 151),
shadowStyle: 1,
padding: 0,
backgroundColor: 'rgb(57,57,57)',
borderRadius: 4,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
backgroundClassName: 'phoney',
arrowStyle: 2
});
return infoWindowDomTom;
}
function setinfoWindowDomTomSpec(titre)
{
infoWindowDomTomSpec = new InfoBubble({
map: map,
content: '<div class="phoneytext">'+titre+'</div>',
shadowStyle: 1,
padding: 0,
backgroundColor: 'rgb(57,57,57)',
borderRadius: 4,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
backgroundClassName: 'phoney',
arrowStyle: 2
});
return infoWindowDomTomSpec;
}
function addDraggableiMarkerDomTom(domTom, bounds, chemin_imgcsa)
{
var domTomPos = new google.maps.LatLng(domTom['latitude'], domTom['longitude']);
iMarkerDomTomSpec = new google.maps.Marker({
position: domTomPos,
icon: chemin_imgcsa + 'iMarkerHome.png',
map: map,
draggable: true
});
infoWindowDomTomSpec = setinfoWindowDomTomSpec(domTom['titre']);
setiMarkerDomTomSpecListener(chemin_imgcsa);
infoWindowDomTomSpec.open(map, iMarkerDomTomSpec);
bounds.extend(domTomPos);
}
function setListenerDomTomClick(i, iMarkerDomTomArray, infoWindowDomTomArray, chemin_imgcsa)
{
google.maps.event.addListener(iMarkerDomTomArray[i], 'click', function() {
setDomTomMap(i, iMarkerDomTomArray, infoWindowDomTomArray, chemin_imgcsa);
document.getElementById('selectDomTom').value = i;
});
}
function setListenerDomTomOnMouseOver(iMarkerDomTom, infoWindowDomTom)
{
google.maps.event.addListener(iMarkerDomTom, 'mouseover', function() {
infoWindowDomTom.open(map, iMarkerDomTom);
});
}
function setListenerDomTomOnMouseOut(iMarkerDomTom, infoWindowDomTom)
{
google.maps.event.addListener(iMarkerDomTom, 'mouseout', function() {
infoWindowDomTom.close();
});
}
function setAllListenersDomTom(iMarkerDomTomArray, infoWindowDomTomArray, chemin_imgcsa)
{
for (i in iMarkerDomTomArray)
{
setListenerDomTomClick(i, iMarkerDomTomArray, infoWindowDomTomArray, chemin_imgcsa);
setListenerDomTomOnMouseOver(iMarkerDomTomArray[i], infoWindowDomTomArray[i]);
setListenerDomTomOnMouseOut(iMarkerDomTomArray[i], infoWindowDomTomArray[i]);
}
}
function setiMarkerDomTomSpecListener(chemin_imgcsa)
{
var geocoder = new google.maps.Geocoder();
google.maps.event.addListener(iMarkerDomTomSpec, 'click', function()
{
if (!infoWindowDomTomSpec.isOpen())
infoWindowDomTomSpec.open(map, iMarkerDomTomSpec);
else
infoWindowDomTomSpec.close();
for (i in infoWindowEmetteurArray)
{
infoWindowEmetteurArray[i].close();
}
});
google.maps.event.addListener(iMarkerDomTomSpec, 'dragstart', function() {
if (infoWindowDomTomSpec)
infoWindowDomTomSpec.close();
});
google.maps.event.addListener(iMarkerDomTomSpec, 'dragend', function() {
var new_pos = iMarkerDomTomSpec.getPosition();
clearMap_om(iMarkerDomTomArray, infoWindowDomTomArray);
bounds = null;
bounds = new google.maps.LatLngBounds();
iMarkerDomTomSpec = new google.maps.Marker({
position: new_pos,
map: map,
icon: chemin_imgcsa + 'iMarkerHome.png',
draggable: true
});
bounds.extend(new_pos);
geocoder.geocode({'latLng': new_pos}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK)
{
var adresse = results[0].formatted_address;
var tabAdresse = adresse.split(",");
if (tabAdresse.length > 2)
{
var adresse_precise = tabAdresse[0];
var cp_ville = tabAdresse[1];
var pays = tabAdresse[2];
}
else
{
var adresse_precise = '';
var cp_ville = tabAdresse[0];
var pays = tabAdresse[1];
}
document.getElementById("adr").value = adresse_precise;
document.getElementById("ville").value = cp_ville + ', ' + pays;
}
else
{
;// alert("Ce lieu n'a pu etre geolocalise");
}
getResult_om(new_pos.lat(), new_pos.lng(), chemin_imgcsa);
});
});
}
function setAdresse_om(position)
{
var contentAdr = '';
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': position}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK)
{
var adresse = results[0].formatted_address;
var tabAdresse = adresse.split(",");
if (tabAdresse.length > 2)
{
var adresse_precise = tabAdresse[0];
var cp_ville = tabAdresse[1];
var pays = tabAdresse[2];
}
else
{
var adresse_precise = '';
var cp_ville = tabAdresse[0];
var pays = tabAdresse[1];
}
if (adresse_precise != '')
contentAdr = adresse_precise + ', ';
contentAdr += cp_ville + ', ' + pays;
document.getElementById("adr").value = adresse_precise;
document.getElementById("ville").value = cp_ville + ', ' + pays;
infoWindowDomTomSpec = setinfoWindowDomTomSpec(contentAdr);
infoWindowDomTomSpec.open(map, iMarkerDomTomSpec);
contentAdresse = contentAdr;
return infoWindowDomTomSpec;
}
});
}
function locateHome_om()
{
infoWindowDomTomSpec.close();
for (j=0; j < iMarkerEmetteurArray.length; j++)
{
infoWindowEmetteurArray[j].close();
}
infoWindowDomTomSpec.open(map, iMarkerDomTomSpec);
var iMarkerDomTomSpecPosition = iMarkerDomTomSpec.getPosition();
map.setCenter(iMarkerDomTomSpecPosition);
map.fitBounds(bounds);
}
function locateEmetteur_om(i)
{
infoWindowDomTomSpec.close();
for (j=0; j<iMarkerEmetteurArray.length; j++)
{
infoWindowEmetteurArray[j].close();
}
infoWindowEmetteurArray[i].open(map, iMarkerEmetteurArray[i]);
jQuery.scrollTo('#divRecherche0', 500, {});
}
function setAllMetropoleListeners(iMarkerMetropole, infoWindowMetropole)
{
setListenerMetropoleOnMouseOver(iMarkerMetropole, infoWindowMetropole);
setListenerMetropoleOnMouseOut(iMarkerMetropole, infoWindowMetropole);
setListenerMetropoleClick(iMarkerMetropole);
}
function setListenerMetropoleOnMouseOver(iMarkerMetropole, infoWindowMetropole)
{
google.maps.event.addListener(iMarkerMetropole, 'mouseover', function() {
infoWindowMetropole.open(map, iMarkerMetropole);
});
}
function setListenerMetropoleOnMouseOut(iMarkerMetropole, infoWindowMetropole)
{
google.maps.event.addListener(iMarkerMetropole, 'mouseout', function() {
infoWindowMetropole.close();
});
}
function setListenerMetropoleClick(iMarkerMetropole)
{
google.maps.event.addListener(iMarkerMetropole, 'click', function() {
window.location.replace('television_couverture');
});
}
function setinfoWindowMetropole()
{
infoWindowMetropole = new InfoBubble({
map: map,
content: '<div class="phoneytext">France M\351tropolitaine</div>',
position: new google.maps.LatLng(-35, 151),
shadowStyle: 1,
padding: 0,
backgroundColor: 'rgb(57,57,57)',
borderRadius: 4,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
backgroundClassName: 'phoney',
arrowStyle: 2
});
return infoWindowMetropole;
}
var methode='GET';
var bounds = '';
var emetteurInfoWindowTabArray = new Array();
var emetteurPassageInfoWindowTabArray = new Array();
var homeInfoWindow;
var iMarkerEmetteurArray = new Array();
var iMarkerEmetteurPassageArray = new Array();
var map;
function initialize_m(getLat, getLng, chemin_imgcsa)
{
var latLng = new google.maps.LatLng(46.7807369, 3.09685);
var optionsCarte = {
zoom: 5,
center: latLng,
navigationControl: true,
scaleControl: true,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
map = new google.maps.Map(document.getElementById("mapCanvas"), optionsCarte);
if (getLat && getLng)
getResult(1*getLat, 1*getLng, 'notScroll', map, chemin_imgcsa);
}
function putHomeMarker_m(lat, lng, map)
{
var home = new google.maps.LatLng(lat, lng);
iMarkerHome = new google.maps.Marker({
position: home,
map: map,
title: "",
contenuInfoBulle: "",
icon: 'http://localhost/csa_svn/extension/csa/design/csa/images/imgcsa/home.png',
draggable: true
});
document.getElementById("deplace").style.display = 'block';
}
function putHomeMarker_mv2(lat, lng, chemin_imgcsa)
{
var home = new google.maps.LatLng(lat, lng);
iMarkerHome = new google.maps.Marker({
position: home,
map: map,
title: "",
contenuInfoBulle: "",
icon: chemin_imgcsa + 'home.png',
draggable: true
});
document.getElementById("deplace").style.display = 'block';
if (!bounds) bounds = new google.maps.LatLngBounds();
bounds.extend(home);
return new Array(bounds, iMarkerHome);
}
function addiMarkerEmetteur(lat, lng, boundsp, chemin_imgcsa, mapp)
{
var emetteur = new google.maps.LatLng(lat, lng);
iMarkerEmetteur = new google.maps.Marker({
position: emetteur,
map: map,
icon: chemin_imgcsa + 'emetteur.png'
});
iMarkerEmetteurArray.push(iMarkerEmetteur);
if (!bounds) bounds = new google.maps.LatLngBounds();
bounds.extend(emetteur);
}
function addiMarkerEmetteurPassage(lat, lng, bounds, chemin_imgcsa)
{
var emetteurPassage = new google.maps.LatLng(lat, lng);
iMarkerEmetteurPassage = new google.maps.Marker({
position: emetteurPassage,
map: map,
icon: chemin_imgcsa+'emetteur_eteint.png'
});
iMarkerEmetteurPassageArray.push(iMarkerEmetteurPassage);
bounds.extend(emetteurPassage);
}
function putPasDeCouvNumMarker(lat, lng, map, chemin_imgcsa)
{
var pasDeCouvNum = new google.maps.LatLng(lat-0.03, lng);
iMarkerPasDeCouvNum = new google.maps.Marker({
position: pasDeCouvNum,
map: map,
icon: chemin_imgcsa + 'pasDeCouvNumTrouvee.png'
});
}
function addEmetteurInfoWindowTab(titre, multiplex, canal)
{
var emetteurInfoWindowTab = new InfoBubble({
maxWidth: 350,
maxHeight: 90
});
var tabMultiplex = multiplex.split(',');
var tabCanal = canal.split(',');
var chaines = "";
var couleurChainesPayantes = "#9C0176";
var couleurChainesGratuites = "#202080";
for (j=0; j < tabMultiplex.length; j++)
{
if (trim(tabMultiplex[j]) == 'R1')
chaines = "France 2, France 3, France 5, Arte, LCP / Public S&eacute;nat, Cha&icirc;ne locale ou France &Ocirc; ou France 3 bis";
else if (trim(tabMultiplex[j]) == 'R2')
chaines = "I-T&eacute;l&eacute;, BFM TV, Direct 8, Gulli, Direct Star, France 4";
else if (trim(tabMultiplex[j]) == 'R3')
{
chaines = "<font color='"+couleurChainesPayantes+"'>Canal+ HD*</font>, <font color='"+couleurChainesPayantes+"'>Canal+ Cin&eacute;ma*</font>, <font color='"+couleurChainesPayantes+"'>Canal+ Sport*</font>, <font color='"+couleurChainesPayantes+"'>Plan&egrave;te*</font>, <font color='"+couleurChainesPayantes+"'>TPS Star*</font>";
chaines += "<br /><i><font color='"+couleurChainesPayantes+"'>* Ces cha&icirc;nes sont payantes.</font></i>";
}
else if (trim(tabMultiplex[j]) == 'R4')
{
chaines = "M6, W9, NT1, <font color='"+couleurChainesPayantes+"'>Paris Premi&egrave;re*</font>, Arte HD";
chaines += "<br /><i><font color='"+couleurChainesPayantes+"'>* Cette cha&icirc;ne est payante.</font></i>";
}
else if (trim(tabMultiplex[j]) == 'R5')
chaines = "TF1 HD, France 2 HD, M6 HD";
else if (trim(tabMultiplex[j]) == 'R6')
{
chaines = "TF1, <font color='"+couleurChainesPayantes+"'>LCI*</font>, <font color='"+couleurChainesPayantes+"'>Eurosport*</font>, NRJ 12, TMC, <font color='"+couleurChainesPayantes+"'>TF6*</font>";
chaines += "<br /><i><font color='"+couleurChainesPayantes+"'>* Ces cha&icirc;nes sont payantes.</font></i>";
}
else if (trim(tabMultiplex[j]) == 'R15')
{
var chainesR15 = "BFM Business Paris, IDF 1, NRJ Paris, Demain IDF, BDM TV, Cinaps TV, T&eacute;l&eacute; Bocal";
var canalR15 = tabCanal[j];
}
var div = document.createElement('DIV');
div.innerHTML = '<font color="'+couleurChainesGratuites+'"><b>' + titre + '</b></font><br />';
div.innerHTML += '<font color="'+couleurChainesGratuites+'" size=-1><u>Canal</u> : ' + tabCanal[j] + '</font><br />';
div.innerHTML += '<font color="'+couleurChainesGratuites+'" size=-1><u>Cha&icirc;nes</u> : ' + chaines + '</font></font>';
if (trim(tabMultiplex[j]) != 'R15')
emetteurInfoWindowTab.addTab(tabMultiplex[j], div);
}
if (chainesR15 && chainesR15 != "")
{
var div = document.createElement('DIV');
div.innerHTML = '<font color="'+couleurChainesGratuites+'"><b>' + titre + '</b></font><br />';
div.innerHTML += '<font color="'+couleurChainesGratuites+'" size=-1><u>Canal</u> : ' + canalR15 + '</font><br />';
div.innerHTML += '<font color="'+couleurChainesGratuites+'" size=-1><u>Cha&icirc;nes</u> : ' + chainesR15 + '</font></font>';
emetteurInfoWindowTab.addTab('Multi7', div);
chainesR15 = "";
canalR15 = "";
}
emetteurInfoWindowTabArray.push(emetteurInfoWindowTab);
}
function addEmetteurPassageInfoWindowTab(titre, multiplex, canal, date_passage_tout_numerique)
{
var emetteurPassageInfoWindowTab = new InfoBubble({
maxWidth: 350,
maxHeight: 90
});
var tabMultiplex = multiplex.split(',');
var tabCanal = canal.split(',');
var chaines = "";
var couleurChainesPayantes = "#9C0176";
var couleurChainesGratuites = "#202080";
for (j=0; j < tabMultiplex.length; j++)
{
if (trim(tabMultiplex[j]) == '1')
chaines = "France 2, France 3, France 5, Arte, LCP / Public S&eacute;nat, Cha&icirc;ne locale ou France &Ocirc; ou France 3 bis";
else if (trim(tabMultiplex[j]) == '2')
chaines = "I-T&eacute;l&eacute;, BFM TV, Direct 8, Gulli, Direct Star, France 4";
else if (trim(tabMultiplex[j]) == '3')
{
chaines = "<font color='"+couleurChainesPayantes+"'>Canal+ HD*</font>, <font color='"+couleurChainesPayantes+"'>Canal+ Cin&eacute;ma*</font>, <font color='"+couleurChainesPayantes+"'>Canal+ Sport*</font>, <font color='"+couleurChainesPayantes+"'>Plan&egrave;te*</font>, <font color='"+couleurChainesPayantes+"'>TPS Star*</font>";
chaines += "<br /><i><font color='"+couleurChainesPayantes+"'>* Ces cha&icirc;nes sont payantes.</font></i>";
}
else if (trim(tabMultiplex[j]) == '4')
{
chaines = "M6, W9, NT1, <font color='"+couleurChainesPayantes+"'>Paris Premi&egrave;re*</font>, Arte HD";
chaines += "<br /><i><font color='"+couleurChainesPayantes+"'>* Cette cha&icirc;ne est payante.</font></i>";
}
else if (trim(tabMultiplex[j]) == '5')
{
chaines = "TF1 HD, France 2 HD, M6 HD";
}
else if (trim(tabMultiplex[j]) == '6')
{
chaines = "TF1, <font color='"+couleurChainesPayantes+"'>LCI*</font>, <font color='"+couleurChainesPayantes+"'>Eurosport*</font>, NRJ 12, TMC, <font color='"+couleurChainesPayantes+"'>TF6*</font>";
chaines += "<br /><i><font color='"+couleurChainesPayantes+"'>* Ces cha&icirc;nes sont payantes.</font></i>";
}
var div = document.createElement('DIV');
div.innerHTML = '<font color="'+couleurChainesGratuites+'"><b>' + titre + '</b></font><br />';
if (chaines != '')
{
div.innerHTML += '<font color="'+couleurChainesGratuites+'" size=-1><u>Canal</u> : ' + tabCanal[j] + '</font><br />';
div.innerHTML += '<font color="'+couleurChainesGratuites+'" size=-1><u>Cha&icirc;nes</u> : ' + chaines + '</font><br />';
}
div.innerHTML += '<br /><font color="#CC3300" size=-1><u>Date d\'allumage</u> : ' + date_passage_tout_numerique + '</font><br />';
if (trim(tabMultiplex[j]) != '')
emetteurPassageInfoWindowTab.addTab('R'+trim(tabMultiplex[j]), div);
else
emetteurPassageInfoWindowTab.addTab('Couverture num&eacute;rique &agrave; venir', div);
}
emetteurPassageInfoWindowTabArray.push(emetteurPassageInfoWindowTab);
}
function setAdresse(position, iMarkerHome, map)
{
var contentAdr = '';
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': position}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK)
{
var adresse = results[0].formatted_address;
var tabAdresse = adresse.split(",");
if (tabAdresse.length > 2)
{
var adresse_precise = tabAdresse[0];
var cp_ville = tabAdresse[1];
var pays = tabAdresse[2];
}
else
{
var adresse_precise = '';
var cp_ville = tabAdresse[0];
var pays = tabAdresse[1];
}
if (adresse_precise != '')
contentAdr = adresse_precise + ', ';
contentAdr += cp_ville + ', ' + pays;
document.getElementById("adr").value = adresse_precise;
document.getElementById("ville").value = cp_ville + ', ' + pays;
homeInfoWindow = new InfoBubble({
map: map,
content: '<div class="phoneytext">'+contentAdr+'</div>',
position: new google.maps.LatLng(-35, 151),
shadowStyle: 1,
padding: 0,
backgroundColor: 'rgb(57,57,57)',
borderRadius: 4,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
backgroundClassName: 'phoney',
arrowStyle: 2
});
homeInfoWindow.open(map, iMarkerHome);
contentAdresse = contentAdr;
}
});
}
function clearMap()
{
if (typeof bounds != "undefined")
{
bounds = null;
bounds = new google.maps.LatLngBounds();
}
if (typeof iMarkerHome != "undefined")
iMarkerHome.setMap(null);
if (typeof iMarkerPasDeCouvNum != "undefined")
iMarkerPasDeCouvNum.setMap(null);
for (i in iMarkerEmetteurArray)
{
iMarkerEmetteurArray[i].setMap(null);
}
iMarkerEmetteurArray = new Array();
for (i in iMarkerEmetteurPassageArray)
{
iMarkerEmetteurPassageArray[i].setMap(null);
}
iMarkerEmetteurPassageArray = new Array();
for (i in emetteurInfoWindowTabArray)
{
emetteurInfoWindowTabArray[i].close();
}
emetteurInfoWindowTabArray = new Array();
for (i in emetteurPassageInfoWindowTabArray)
{
emetteurPassageInfoWindowTabArray[i].close();
}
emetteurPassageInfoWindowTabArray = new Array();
if (typeof homeInfoWindow != "undefined")
homeInfoWindow.close();
}
function locateEmetteur(i)
{
homeInfoWindow.close();
for (j=0; j<iMarkerEmetteurArray.length; j++)
{
emetteurInfoWindowTabArray[j].close();
}
emetteurInfoWindowTabArray[i].open(map, iMarkerEmetteurArray[i]);
jQuery.scrollTo('#mapCanvas', 500, {});
}
function locateEmetteurPassage(i)
{
homeInfoWindow.close();
for (i in iMarkerEmetteurArray)
{
emetteurInfoWindowTabArray[i].close();
}
for (i in iMarkerEmetteurPassageArray)
{
emetteurPassageInfoWindowTabArray[i].close();
}
emetteurPassageInfoWindowTabArray[i].open(map, iMarkerEmetteurPassageArray[i]);
jQuery.scrollTo('#divRecherche', 500, {});
}
function locateHome()
{
homeInfoWindow.close();
for (i in iMarkerEmetteurArray)
{
emetteurInfoWindowTabArray[i].close();
}
for (i in iMarkerEmetteurPassageArray)
{
emetteurPassageInfoWindowTabArray[i].close();
}
homeInfoWindow.open(map, iMarkerHome);
var iMarkerHomePosition = iMarkerHome.getPosition();
map.setCenter(iMarkerHomePosition);
map.fitBounds(bounds);
jQuery.scrollTo('#divRecherche', 500, {});
}
function setAllListeners(iMarkerHome, map, chemin_imgcsa)
{
setListenerHomeClick(iMarkerHome, map);
setListenerHomeDrag(iMarkerHome, map, chemin_imgcsa);
setAllListenersEmetteurClick();
}
function setListenerHomeClick(iMarkerHome)
{
google.maps.event.addListener(iMarkerHome, 'click', function() {
if (!homeInfoWindow.isOpen())
{
homeInfoWindow.open(map, iMarkerHome);
}
else
{
homeInfoWindow.close();
}
for (i in iMarkerEmetteurArray)
{
emetteurInfoWindowTabArray[i].close();
}
for (i in iMarkerEmetteurPassageArray)
{
emetteurPassageInfoWindowTabArray[i].close();
}
});
}
function setListenerEmetteurClick(i)
{
google.maps.event.addListener(iMarkerEmetteurArray[i], 'click', function() {
if (homeInfoWindow)
homeInfoWindow.close();
for (j in iMarkerEmetteurArray)
{
if (emetteurInfoWindowTabArray[j])
emetteurInfoWindowTabArray[j].close();
}
for (j in iMarkerEmetteurPassageArray)
{
if (emetteurPassageInfoWindowTabArray[j])
emetteurPassageInfoWindowTabArray[j].close();
}
emetteurInfoWindowTabArray[i].open(map, iMarkerEmetteurArray[i]);
});
}
function setListenerEmetteurPassageClick(i)
{
google.maps.event.addListener(iMarkerEmetteurPassageArray[i], 'click', function() {
if (homeInfoWindow)
homeInfoWindow.close();
for (j in iMarkerEmetteurArray)
{
if (emetteurInfoWindowTabArray[j])
emetteurInfoWindowTabArray[j].close();
}
for (j in iMarkerEmetteurPassageArray)
{
if (emetteurPassageInfoWindowTabArray[j])
emetteurPassageInfoWindowTabArray[j].close();
}
emetteurPassageInfoWindowTabArray[i].open(map, iMarkerEmetteurPassageArray[i]);
});
}
function setAllListenersEmetteurClick()
{
for (i in iMarkerEmetteurArray)
{
setListenerEmetteurClick(i);
}
for (i in iMarkerEmetteurPassageArray)
{
setListenerEmetteurPassageClick(i);
}
}
function setListenerHomeDrag(iMarkerHome, map, chemin_imgcsa)
{
google.maps.event.addListener(iMarkerHome, 'dragstart', function() {
homeInfoWindow.close();
if (emetteurInfoWindowTabArray.length > 0)
{
for (i in emetteurInfoWindowTabArray)
{
emetteurInfoWindowTabArray[i].close();
}
}
});
google.maps.event.addListener(iMarkerHome, 'dragend', function() {
var new_pos = iMarkerHome.getPosition();
clearMap();
iMarkerHome.setMap(null);
emetteurInfoWindowTabArray = new Array();
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': new_pos}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK)
{
var adresse = results[0].formatted_address;
var tabAdresse = adresse.split(",");
if (tabAdresse.length > 2)
{
var adresse_precise = tabAdresse[0];
var cp_ville = tabAdresse[1];
var pays = tabAdresse[2];
}
else
{
var adresse_precise = '';
var cp_ville = tabAdresse[0];
var pays = tabAdresse[1];
}
document.getElementById("adr").value = adresse_precise;
document.getElementById("ville").value = cp_ville + ', ' + pays;
map.setCenter(new_pos);
getResult(new_pos.lat(), new_pos.lng(), 'noScroll', map, chemin_imgcsa);
}
});
});
}
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
(function($){function Simpletip(elem,conf){var self=this;elem=jQuery(elem);var tooltip=jQuery(document.createElement('div')).addClass(conf.baseClass).addClass((conf.fixed)?conf.fixedClass:'').addClass((conf.persistent)?conf.persistentClass:'').html(conf.content).appendTo(elem);if(!conf.hidden)tooltip.show();else tooltip.hide();if(!conf.persistent){elem.hover(function(event){self.show(event)},function(){self.hide()});if(!conf.fixed){elem.mousemove(function(event){if(tooltip.css('display')!=='none')self.updatePos(event);});};}else
{elem.click(function(event){if(event.target===elem.get(0)){if(tooltip.css('display')!=='none')self.hide();else
self.show();};});jQuery(window).mousedown(function(event){if(tooltip.css('display')!=='none'){var check=(conf.focus)?jQuery(event.target).parents('.tooltip').andSelf().filter(function(){return this===tooltip.get(0)}).length:0;if(check===0)self.hide();};});};jQuery.extend(self,{getVersion:function(){return[1,2,0];},getParent:function(){return elem;},getTooltip:function(){return tooltip;},getPos:function(){return tooltip.offset();},setPos:function(posX,posY){var elemPos=elem.offset();if(typeof posX=='string')posX=parseInt(posX)+elemPos.left;if(typeof posY=='string')posY=parseInt(posY)+elemPos.top;tooltip.css({left:posX,top:posY});return self;},show:function(event){conf.onBeforeShow.call(self);self.updatePos((conf.fixed)?null:event);switch(conf.showEffect){case'fade':tooltip.fadeIn(conf.showTime);break;case'slide':tooltip.slideDown(conf.showTime,self.updatePos);break;case'custom':conf.showCustom.call(tooltip,conf.showTime);break;default:case'none':tooltip.show();break;};tooltip.addClass(conf.activeClass);conf.onShow.call(self);return self;},hide:function(){conf.onBeforeHide.call(self);switch(conf.hideEffect){case'fade':tooltip.fadeOut(conf.hideTime);break;case'slide':tooltip.slideUp(conf.hideTime);break;case'custom':conf.hideCustom.call(tooltip,conf.hideTime);break;default:case'none':tooltip.hide();break;};tooltip.removeClass(conf.activeClass);conf.onHide.call(self);return self;},update:function(content){tooltip.html(content);conf.content=content;return self;},load:function(uri,data){conf.beforeContentLoad.call(self);tooltip.load(uri,data,function(){conf.onContentLoad.call(self);});return self;},boundryCheck:function(posX,posY){var newX=posX+tooltip.outerWidth();var newY=posY+tooltip.outerHeight();var windowWidth=jQuery(window).width()+jQuery(window).scrollLeft();var windowHeight=jQuery(window).height()+jQuery(window).scrollTop();return[(newX>=windowWidth),(newY>=windowHeight)];},updatePos:function(event){var tooltipWidth=tooltip.outerWidth();var tooltipHeight=tooltip.outerHeight();if(!event&&conf.fixed){if(conf.position.constructor==Array){posX=parseInt(conf.position[0]);posY=parseInt(conf.position[1]);}else if(jQuery(conf.position).attr('nodeType')===1){var offset=jQuery(conf.position).offset();posX=offset.left;posY=offset.top;}else
{var elemPos=elem.offset();var elemWidth=elem.outerWidth();var elemHeight=elem.outerHeight();switch(conf.position){case'top':var posX=elemPos.left-(tooltipWidth/2)+(elemWidth/2);var posY=elemPos.top-tooltipHeight;break;case'bottom':var posX=elemPos.left-(tooltipWidth/2)+(elemWidth/2);var posY=elemPos.top+elemHeight;break;case'left':var posX=elemPos.left-tooltipWidth;var posY=elemPos.top-(tooltipHeight/2)+(elemHeight/2);break;case'right':var posX=elemPos.left+elemWidth;var posY=elemPos.top-(tooltipHeight/2)+(elemHeight/2);break;default:case'default':var posX=(elemWidth/2)+elemPos.left+20;var posY=elemPos.top;break;};};}else
{var posX=event.pageX;var posY=event.pageY;};if(typeof conf.position!='object'){posX=posX+conf.offset[0];posY=posY+conf.offset[1];if(conf.boundryCheck){var overflow=self.boundryCheck(posX,posY);if(overflow[0])posX=posX-(tooltipWidth/2)-(2*conf.offset[0]);if(overflow[1])posY=posY-(tooltipHeight/2)-(2*conf.offset[1]);}}else
{if(typeof conf.position[0]=="string")posX=String(posX);if(typeof conf.position[1]=="string")posY=String(posY);};self.setPos(posX,posY);return self;}});};jQuery.fn.simpletip=function(conf){var api=jQuery(this).eq(typeof conf=='number'?conf:0).data("simpletip");if(api)return api;var defaultConf={content:'A simple tooltip',persistent:false,focus:false,hidden:true,position:'default',offset:[0,0],boundryCheck:true,fixed:true,showEffect:'fade',showTime:150,showCustom:null,hideEffect:'fade',hideTime:150,hideCustom:null,baseClass:'tooltip',activeClass:'active',fixedClass:'fixed',persistentClass:'persistent',focusClass:'focus',onBeforeShow:function(){},onShow:function(){},onBeforeHide:function(){},onHide:function(){},beforeContentLoad:function(){},onContentLoad:function(){}};jQuery.extend(defaultConf,conf);this.each(function(){var el=new Simpletip(jQuery(this),defaultConf);jQuery(this).data("simpletip",el);});return this;};})();
var clientGeocoder;
function startSearch_outremerv1(chemin_imgcsa)
{
var adr     = document.getElementById('adr').value;
var ville   = document.getElementById('ville').value;
var domtomId  = document.getElementById('selectDomTom').value;
var domtom  = tabDomTom[domtomId]['titre'];
var content = "";
if (ville == "") // Si le champ ville n'est pas renseigné, initialisation de la carte par défaut
{
;// Message d'erreur
}
else // Sinon, on lance la géolocalisation
{
clearMap();
geocodage_outremerv1(adr,ville,domtom, chemin_imgcsa);
}
return false;
}
function showAddress_outremerv1(response)
{
if (response || response.Status.code == 200)
{
var place = response.Placemark[0];
var tabAdresse = place.address.split(", ");
if (tabAdresse.length > 2)
{
var adresse_precise = tabAdresse[0];
var cp_ville = tabAdresse[1];
var pays = tabAdresse[2];
}
else
{
var adresse_precise = '';
var cp_ville = tabAdresse[0];
var pays = tabAdresse[1];
}
contentAdresse = '';
if (adresse_precise != '')
contentAdresse = adresse_precise + ', ';
contentAdresse += cp_ville + ', ' + pays;
document.getElementById("adr").value = adresse_precise;
document.getElementById("ville").value = cp_ville + ', ' + pays;
} else {
;
}
}
function geocodage_outremerv1(adr, ville, domtom, chemin_imgcsa)
{
var adr_togeocode = adr + ' ' + ville + ', ' + domtom;
clientGeocoder = new GClientGeocoder();
clientGeocoder.setBaseCountryCode('fr');
clientGeocoder.getLatLng(adr_togeocode, function (coord)
{
if(coord)
{
var domTomSpecPos = new google.maps.LatLng(coord.y, coord.x);
iMarkerDomTomSpec = new google.maps.Marker({
position: domTomSpecPos,
map: map,
icon: chemin_imgcsa + 'iMarkerHome.png',
draggable: true
});
map.setCenter(domTomSpecPos);
bounds.extend(domTomSpecPos);
clientGeocoder.getLocations(adr_togeocode, showAddress_outremerv1);
getResult_om(coord.y, coord.x, chemin_imgcsa);
}
else
{
alert(adr_togeocode + " : ce lieu n'a pu etre geolocalise");
}
});
}
function roll(obj){
if (obj.style.backgroundColor == 'white')
obj.style.backgroundColor = '#fae5f5';
}
function unroll(obj){
if (obj.style.backgroundColor == 'rgb(250, 229, 245)' || obj.style.backgroundColor == '#fae5f5')
obj.style.backgroundColor = 'white';
}
function select(obj,nb,total,region){
for (var i = 1; i < total; i++) {
if(i == nb)
{document.getElementById(i).style.backgroundColor = 'pink';}
else
{document.getElementById(i).style.backgroundColor = 'white';}
}
if(region==986) // Gestion du zoom et du centrage sur la carte pour Wallis et Futuna
{
if(nb==1) // Wallis
{
var lat = -13.287965;
var lng = -176.208057;
var newZoom = 11;
}
else if(nb==2) // Futuna
{
var lat = -14.300549;
var lng = -178.093586;
var newZoom = 11;
}
}
else if(region==987) // Gestion du zoom et du centrage sur la carte pour La Polynésie
{
if(nb==1) //Australes
{
var lat = -25.03982;
var lng = -148.868409;
var newZoom = 6;
}
else if(nb==2) //Iles du Vent
{
var lat = -17.637217;
var lng = -149.475403;
var newZoom = 8;
}
else if(nb==3) //Iles sous le Vent
{
var lat = -18.040833;
var lng = -141.409444;
var newZoom = 7;
}
else if(nb==4) //Marquises
{
var lat = -9.208933;
var lng = -139.653626;
var newZoom = 7;
}
else if(nb==5) //Tuamotu
{
var lat = -18.040833;
var lng = -141.409444;
var newZoom = 7;
}
}
else if(region==977) // Gestion du zoom et du centrage sur la carte pour StBart&StMartin
{
if(nb==1) //St-Bart
{
var lat = 17.9;
var lng = -62.8333;
var newZoom = 12;
}
else if(nb==2) //St-Martin
{
var lat = 18.0667;
var lng = -63.0667;
var newZoom = 12;
}
}
var latLng = new google.maps.LatLng(lat, lng);
map.setCenter(latLng); // Centrage
map.setZoom(newZoom); // Réglage du zoom
}
function InfoBubble(opt_options) {
this.extend(InfoBubble, google.maps.OverlayView);
this.tabs_ = [];
this.activeTab_ = null;
this.baseZIndex_ = 100;
this.isOpen_ = false;
var options = opt_options || {};
if (options['backgroundColor'] == undefined) {
options['backgroundColor'] = this.BACKGROUND_COLOR_;
}
if (options['borderColor'] == undefined) {
options['borderColor'] = this.BORDER_COLOR_;
}
if (options['borderRadius'] == undefined) {
options['borderRadius'] = this.BORDER_RADIUS_;
}
if (options['borderWidth'] == undefined) {
options['borderWidth'] = this.BORDER_WIDTH_;
}
if (options['padding'] == undefined) {
options['padding'] = this.PADDING_;
}
if (options['arrowPosition'] == undefined) {
options['arrowPosition'] = this.ARROW_POSITION_;
}
if (options['disableAutoPan'] == undefined) {
options['disableAutoPan'] = false;
}
if (options['disableAnimation'] == undefined) {
options['disableAnimation'] = false;
}
if (options['minWidth'] == undefined) {
options['minWidth'] = this.MIN_WIDTH_;
}
if (options['shadowStyle'] == undefined) {
options['shadowStyle'] = this.SHADOW_STYLE_;
}
if (options['arrowSize'] == undefined) {
options['arrowSize'] = this.ARROW_SIZE_;
}
if (options['arrowStyle'] == undefined) {
options['arrowStyle'] = this.ARROW_STYLE_;
}
this.buildDom_();
this.setValues(options);
}
window['InfoBubble'] = InfoBubble;
InfoBubble.prototype.ARROW_SIZE_ = 15;
InfoBubble.prototype.ARROW_STYLE_ = 0;
InfoBubble.prototype.SHADOW_STYLE_ = 1;
InfoBubble.prototype.MIN_WIDTH_ = 50;
InfoBubble.prototype.ARROW_POSITION_ = 50;
InfoBubble.prototype.PADDING_ = 10;
InfoBubble.prototype.BORDER_WIDTH_ = 1;
InfoBubble.prototype.BORDER_COLOR_ = '#ccc';
InfoBubble.prototype.BORDER_RADIUS_ = 10;
InfoBubble.prototype.BACKGROUND_COLOR_ = '#fff';
InfoBubble.prototype.extend = function(obj1, obj2) {
return (function(object) {
for (var property in object.prototype) {
this.prototype[property] = object.prototype[property];
}
return this;
}).apply(obj1, [obj2]);
};
InfoBubble.prototype.buildDom_ = function() {
var bubble = this.bubble_ = document.createElement('DIV');
bubble.style['position'] = 'absolute';
bubble.style['zIndex'] = this.baseZIndex_;
var tabsContainer = this.tabsContainer_ = document.createElement('DIV');
tabsContainer.style['position'] = 'relative';
var close = this.close_ = document.createElement('IMG');
close.style['position'] = 'absolute';
close.style['width'] = this.px(12);
close.style['height'] = this.px(12);
close.style['border'] = 0;
close.style['zIndex'] = this.baseZIndex_ + 1;
close.style['cursor'] = 'pointer';
close.src = 'http://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif';
var that = this;
google.maps.event.addDomListener(close, 'click', function() {
that.close();
google.maps.event.trigger(that, 'closeclick');
});
var contentContainer = this.contentContainer_ = document.createElement('DIV');
contentContainer.style['overflowX'] = 'auto';
contentContainer.style['overflowY'] = 'auto';
contentContainer.style['cursor'] = 'default';
contentContainer.style['clear'] = 'both';
contentContainer.style['position'] = 'relative';
var content = this.content_ = document.createElement('DIV');
contentContainer.appendChild(content);
var arrow = this.arrow_ = document.createElement('DIV');
arrow.style['position'] = 'relative';
var arrowOuter = this.arrowOuter_ = document.createElement('DIV');
var arrowInner = this.arrowInner_ = document.createElement('DIV');
var arrowSize = this.getArrowSize_();
arrowOuter.style['position'] = arrowInner.style['position'] = 'absolute';
arrowOuter.style['left'] = arrowInner.style['left'] = '50%';
arrowOuter.style['height'] = arrowInner.style['height'] = '0';
arrowOuter.style['width'] = arrowInner.style['width'] = '0';
arrowOuter.style['marginLeft'] = this.px(-arrowSize);
arrowOuter.style['borderWidth'] = this.px(arrowSize);
arrowOuter.style['borderBottomWidth'] = 0;
var bubbleShadow = this.bubbleShadow_ = document.createElement('DIV');
bubbleShadow.style['position'] = 'absolute';
bubble.style['display'] = bubbleShadow.style['display'] = 'none';
bubble.appendChild(this.tabsContainer_);
bubble.appendChild(close);
bubble.appendChild(contentContainer);
arrow.appendChild(arrowOuter);
arrow.appendChild(arrowInner);
bubble.appendChild(arrow);
var stylesheet = document.createElement('style');
stylesheet.setAttribute('type', 'text/css');
this.animationName_ = '_ibani_' + Math.round(Math.random() * 10000);
var css = '.' + this.animationName_ + '{-webkit-animation-name:' +
this.animationName_ + ';-webkit-animation-duration:0.5s;' +
'-webkit-animation-iteration-count:1;}' +
'@-webkit-keyframes ' + this.animationName_ + ' {from {' +
'-webkit-transform: scale(0)}50% {-webkit-transform: scale(1.2)}90% ' +
'{-webkit-transform: scale(0.95)}to {-webkit-transform: scale(1)}}';
stylesheet.textContent = css;
document.getElementsByTagName('head')[0].appendChild(stylesheet);
};
InfoBubble.prototype.setBackgroundClassName = function(className) {
this.set('backgroundClassName', className);
};
InfoBubble.prototype['setBackgroundClassName'] =
InfoBubble.prototype.setBackgroundClassName;
InfoBubble.prototype.backgroundClassName_changed = function() {
this.content_.className = this.get('backgroundClassName');
};
InfoBubble.prototype['backgroundClassName_changed'] =
InfoBubble.prototype.backgroundClassName_changed;
InfoBubble.prototype.setTabClassName = function(className) {
this.set('tabClassName', className);
};
InfoBubble.prototype['setTabClassName'] =
InfoBubble.prototype.setTabClassName;
InfoBubble.prototype.tabClassName_changed = function() {
this.updateTabStyles_();
};
InfoBubble.prototype['tabClassName_changed'] =
InfoBubble.prototype.tabClassName_changed;
InfoBubble.prototype.getArrowStyle_ = function() {
return parseInt(this.get('arrowStyle'), 10) || 0;
};
InfoBubble.prototype.setArrowStyle = function(style) {
this.set('arrowStyle', style);
};
InfoBubble.prototype['setArrowStyle'] =
InfoBubble.prototype.setArrowStyle;
InfoBubble.prototype.arrowStyle_changed = function() {
this.arrowSize_changed();
};
InfoBubble.prototype['arrowStyle_changed'] =
InfoBubble.prototype.arrowStyle_changed;
InfoBubble.prototype.getArrowSize_ = function() {
return parseInt(this.get('arrowSize'), 10) || 0;
};
InfoBubble.prototype.setArrowSize = function(size) {
this.set('arrowSize', size);
};
InfoBubble.prototype['setArrowSize'] =
InfoBubble.prototype.setArrowSize;
InfoBubble.prototype.arrowSize_changed = function() {
this.borderWidth_changed();
};
InfoBubble.prototype['arrowSize_changed'] =
InfoBubble.prototype.arrowSize_changed;
InfoBubble.prototype.setArrowPosition = function(pos) {
this.set('arrowPosition', pos);
};
InfoBubble.prototype['setArrowPosition'] =
InfoBubble.prototype.setArrowPosition;
InfoBubble.prototype.getArrowPosition_ = function() {
return parseInt(this.get('arrowPosition'), 10) || 0;
};
InfoBubble.prototype.arrowPosition_changed = function() {
var pos = this.getArrowPosition_();
this.arrowOuter_.style['left'] = this.arrowInner_.style['left'] = pos + '%';
this.redraw_();
};
InfoBubble.prototype['arrowPosition_changed'] =
InfoBubble.prototype.arrowPosition_changed;
InfoBubble.prototype.setZIndex = function(zIndex) {
this.set('zIndex', zIndex);
};
InfoBubble.prototype['setZIndex'] = InfoBubble.prototype.setZIndex;
InfoBubble.prototype.getZIndex = function() {
return parseInt(this.get('zIndex'), 10) || this.baseZIndex_;
};
InfoBubble.prototype.zIndex_changed = function() {
var zIndex = this.getZIndex_();
this.bubble_.style['zIndex'] = this.baseZIndex_ = zIndex;
this.close_.style['zIndex'] = zIndex_ + 1;
};
InfoBubble.prototype['zIndex_changed'] = InfoBubble.prototype.zIndex_changed;
InfoBubble.prototype.setShadowStyle = function(shadowStyle) {
this.set('shadowStyle', shadowStyle);
};
InfoBubble.prototype['setShadowStyle'] = InfoBubble.prototype.setShadowStyle;
InfoBubble.prototype.getShadowStyle_ = function() {
return parseInt(this.get('shadowStyle'), 10) || 0;
};
InfoBubble.prototype.shadowStyle_changed = function() {
var shadowStyle = this.getShadowStyle_();
var display = '';
var shadow = '';
var backgroundColor = '';
switch (shadowStyle) {
case 0:
display = 'none';
break;
case 1:
shadow = '40px 15px 10px rgba(33,33,33,0.3)';
backgroundColor = 'transparent';
break;
case 2:
shadow = '0 0 2px rgba(33,33,33,0.3)';
backgroundColor = 'rgba(33,33,33,0.35)';
break;
}
this.bubbleShadow_.style['boxShadow'] =
this.bubbleShadow_.style['webkitBoxShadow'] =
this.bubbleShadow_.style['MozBoxShadow'] = shadow;
this.bubbleShadow_.style['backgroundColor'] = backgroundColor;
if (this.isOpen_) {
this.bubbleShadow_.style['display'] = display;
this.draw();
}
};
InfoBubble.prototype['shadowStyle_changed'] =
InfoBubble.prototype.shadowStyle_changed;
InfoBubble.prototype.showCloseButton = function() {
this.set('hideCloseButton', false);
};
InfoBubble.prototype['showCloseButton'] = InfoBubble.prototype.showCloseButton;
InfoBubble.prototype.hideCloseButton = function() {
this.set('hideCloseButton', true);
};
InfoBubble.prototype['hideCloseButton'] = InfoBubble.prototype.hideCloseButton;
InfoBubble.prototype.hideCloseButton_changed = function() {
this.close_.style['display'] = this.get('hideCloseButton') ? 'none' : '';
};
InfoBubble.prototype['hideCloseButton_changed'] =
InfoBubble.prototype.hideCloseButton_changed;
InfoBubble.prototype.setBackgroundColor = function(color) {
if (color) {
this.set('backgroundColor', color);
}
};
InfoBubble.prototype['setBackgroundColor'] =
InfoBubble.prototype.setBackgroundColor;
InfoBubble.prototype.backgroundColor_changed = function() {
var backgroundColor = this.get('backgroundColor');
this.contentContainer_.style['backgroundColor'] = backgroundColor;
this.arrowInner_.style['borderColor'] = backgroundColor +
' transparent transparent';
this.updateTabStyles_();
};
InfoBubble.prototype['backgroundColor_changed'] =
InfoBubble.prototype.backgroundColor_changed;
InfoBubble.prototype.setBorderColor = function(color) {
if (color) {
this.set('borderColor', color);
}
};
InfoBubble.prototype['setBorderColor'] = InfoBubble.prototype.setBorderColor;
InfoBubble.prototype.borderColor_changed = function() {
var borderColor = this.get('borderColor');
var contentContainer = this.contentContainer_;
var arrowOuter = this.arrowOuter_;
contentContainer.style['borderColor'] = borderColor;
arrowOuter.style['borderColor'] = borderColor +
' transparent transparent';
contentContainer.style['borderStyle'] =
arrowOuter.style['borderStyle'] =
this.arrowInner_.style['borderStyle'] = 'solid';
this.updateTabStyles_();
};
InfoBubble.prototype['borderColor_changed'] =
InfoBubble.prototype.borderColor_changed;
InfoBubble.prototype.setBorderRadius = function(radius) {
this.set('borderRadius', radius);
};
InfoBubble.prototype['setBorderRadius'] = InfoBubble.prototype.setBorderRadius;
InfoBubble.prototype.getBorderRadius_ = function() {
return parseInt(this.get('borderRadius'), 10) || 0;
};
InfoBubble.prototype.borderRadius_changed = function() {
var borderRadius = this.getBorderRadius_();
var borderWidth = this.getBorderWidth_();
this.contentContainer_.style['borderRadius'] =
this.contentContainer_.style['MozBorderRadius'] =
this.contentContainer_.style['webkitBorderRadius'] =
this.bubbleShadow_.style['borderRadius'] =
this.bubbleShadow_.style['MozBorderRadius'] =
this.bubbleShadow_.style['webkitBorderRadius'] = this.px(borderRadius);
this.tabsContainer_.style['paddingLeft'] =
this.tabsContainer_.style['paddingRight'] =
this.px(borderRadius + borderWidth);
this.redraw_();
};
InfoBubble.prototype['borderRadius_changed'] =
InfoBubble.prototype.borderRadius_changed;
InfoBubble.prototype.getBorderWidth_ = function() {
return parseInt(this.get('borderWidth'), 10) || 0;
};
InfoBubble.prototype.setBorderWidth = function(width) {
this.set('borderWidth', width);
};
InfoBubble.prototype['setBorderWidth'] = InfoBubble.prototype.setBorderWidth;
InfoBubble.prototype.borderWidth_changed = function() {
var borderWidth = this.getBorderWidth_();
this.contentContainer_.style['borderWidth'] = this.px(borderWidth);
this.tabsContainer_.style['top'] = this.px(borderWidth);
this.updateArrowStyle_();
this.updateTabStyles_();
this.borderRadius_changed();
this.redraw_();
};
InfoBubble.prototype['borderWidth_changed'] =
InfoBubble.prototype.borderWidth_changed;
InfoBubble.prototype.updateArrowStyle_ = function() {
var borderWidth = this.getBorderWidth_();
var arrowSize = this.getArrowSize_();
var arrowStyle = this.getArrowStyle_();
var arrowOuterSizePx = this.px(arrowSize);
var arrowInnerSizePx = this.px(Math.max(0, arrowSize - borderWidth));
var outer = this.arrowOuter_;
var inner = this.arrowInner_;
this.arrow_.style['marginTop'] = this.px(-borderWidth);
outer.style['borderTopWidth'] = arrowOuterSizePx;
inner.style['borderTopWidth'] = arrowInnerSizePx;
if (arrowStyle == 0 || arrowStyle == 1) {
outer.style['borderLeftWidth'] = arrowOuterSizePx;
inner.style['borderLeftWidth'] = arrowInnerSizePx;
} else {
outer.style['borderLeftWidth'] = inner.style['borderLeftWidth'] = 0;
}
if (arrowStyle == 0 || arrowStyle == 2) {
outer.style['borderRightWidth'] = arrowOuterSizePx;
inner.style['borderRightWidth'] = arrowInnerSizePx;
} else {
outer.style['borderRightWidth'] = inner.style['borderRightWidth'] = 0;
}
if (arrowStyle < 2) {
outer.style['marginLeft'] = this.px(-(arrowSize));
inner.style['marginLeft'] = this.px(-(arrowSize - borderWidth));
} else {
outer.style['marginLeft'] = inner.style['marginLeft'] = 0;
}
if (borderWidth == 0) {
outer.style['display'] = 'none';
} else {
outer.style['display'] = '';
}
};
InfoBubble.prototype.setPadding = function(padding) {
this.set('padding', padding);
};
InfoBubble.prototype['setPadding'] = InfoBubble.prototype.setPadding;
InfoBubble.prototype.getPadding_ = function() {
return parseInt(this.get('padding'), 10) || 0;
};
InfoBubble.prototype.padding_changed = function() {
var padding = this.getPadding_();
this.contentContainer_.style['padding'] = this.px(padding);
this.updateTabStyles_();
this.redraw_();
};
InfoBubble.prototype['padding_changed'] = InfoBubble.prototype.padding_changed;
InfoBubble.prototype.px = function(num) {
if (num) {
return num + 'px';
}
return num;
};
InfoBubble.prototype.addEvents_ = function() {
var events = ['mousedown', 'mousemove', 'mouseover', 'mouseout', 'mouseup',
'mousewheel', 'DOMMouseScroll', 'touchstart', 'touchend', 'touchmove',
'dblclick', 'contextmenu'];
var bubble = this.bubble_;
this.listeners_ = [];
for (var i = 0, event; event = events[i]; i++) {
this.listeners_.push(
google.maps.event.addDomListener(bubble, event, function(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
})
);
}
};
InfoBubble.prototype.onAdd = function() {
if (!this.bubble_) {
this.buildDom_();
}
this.addEvents_();
var panes = this.getPanes();
if (panes) {
panes.floatPane.appendChild(this.bubble_);
panes.floatShadow.appendChild(this.bubbleShadow_);
}
};
InfoBubble.prototype['onAdd'] = InfoBubble.prototype.onAdd;
InfoBubble.prototype.draw = function() {
var projection = this.getProjection();
if (!projection) {
return;
}
var latLng = (this.get('position'));
if (!latLng) {
this.close();
return;
}
var tabHeight = 0;
if (this.activeTab_) {
tabHeight = this.activeTab_.offsetHeight;
}
var anchorHeight = this.getAnchorHeight_();
var arrowSize = this.getArrowSize_();
var arrowPosition = this.getArrowPosition_();
arrowPosition = arrowPosition / 100;
var pos = projection.fromLatLngToDivPixel(latLng);
var width = this.contentContainer_.offsetWidth;
var height = this.bubble_.offsetHeight;
if (!width) {
return;
}
var top = pos.y - (height + arrowSize) - 5;
if (anchorHeight) {
top -= anchorHeight;
}
var left = pos.x - (width * arrowPosition);
this.bubble_.style['top'] = this.px(top);
this.bubble_.style['left'] = this.px(left);
var shadowStyle = parseInt(this.get('shadowStyle'), 10);
switch (shadowStyle) {
case 1:
this.bubbleShadow_.style['top'] = this.px(top + tabHeight - 1);
this.bubbleShadow_.style['left'] = this.px(left);
this.bubbleShadow_.style['width'] = this.px(width);
this.bubbleShadow_.style['height'] =
this.px(this.contentContainer_.offsetHeight - arrowSize);
break;
case 2:
width = width * 0.8;
if (anchorHeight) {
this.bubbleShadow_.style['top'] = this.px(pos.y);
} else {
this.bubbleShadow_.style['top'] = this.px(pos.y + arrowSize);
}
this.bubbleShadow_.style['left'] = this.px(pos.x - width * arrowPosition);
this.bubbleShadow_.style['width'] = this.px(width);
this.bubbleShadow_.style['height'] = this.px(2);
break;
}
};
InfoBubble.prototype['draw'] = InfoBubble.prototype.draw;
InfoBubble.prototype.onRemove = function() {
if (this.bubble_ && this.bubble_.parentNode) {
this.bubble_.parentNode.removeChild(this.bubble_);
}
if (this.bubbleShadow_ && this.bubbleShadow_.parentNode) {
this.bubbleShadow_.parentNode.removeChild(this.bubbleShadow_);
}
for (var i = 0, listener; listener = this.listeners_[i]; i++) {
google.maps.event.removeListener(listener);
}
};
InfoBubble.prototype['onRemove'] = InfoBubble.prototype.onRemove;
InfoBubble.prototype.isOpen = function() {
return this.isOpen_;
};
InfoBubble.prototype['isOpen'] = InfoBubble.prototype.isOpen;
InfoBubble.prototype.close = function() {
if (this.bubble_) {
this.bubble_.style['display'] = 'none';
this.bubble_.className =
this.bubble_.className.replace(this.animationName_, '');
}
if (this.bubbleShadow_) {
this.bubbleShadow_.style['display'] = 'none';
this.bubbleShadow_.className =
this.bubbleShadow_.className.replace(this.animationName_, '');
}
this.isOpen_ = false;
};
InfoBubble.prototype['close'] = InfoBubble.prototype.close;
InfoBubble.prototype.open = function(opt_map, opt_anchor) {
if (opt_map) {
this.setMap(opt_map);
}
if (opt_anchor) {
this.set('anchor', opt_anchor);
this.bindTo('position', opt_anchor);
}
this.bubble_.style['display'] = this.bubbleShadow_.style['display'] = '';
var animation = !!!this.get('disableAnimation');
if (animation) {
this.bubble_.className += ' ' + this.animationName_;
this.bubbleShadow_.className += ' ' + this.animationName_;
}
this.redraw_();
this.isOpen_ = true;
var pan = !!!this.get('disableAutoPan');
if (pan) {
var that = this;
window.setTimeout(function() {
that.panToView();
}, 200);
}
};
InfoBubble.prototype['open'] = InfoBubble.prototype.open;
InfoBubble.prototype.setPosition = function(position) {
if (position) {
this.set('position', position);
}
};
InfoBubble.prototype['setPosition'] = InfoBubble.prototype.setPosition;
InfoBubble.prototype.getPosition = function() {
return (this.get('position'));
};
InfoBubble.prototype['getPosition'] = InfoBubble.prototype.getPosition;
InfoBubble.prototype.position_changed = function() {
this.draw();
};
InfoBubble.prototype['position_changed'] =
InfoBubble.prototype.position_changed;
InfoBubble.prototype.panToView = function() {
var projection = this.getProjection();
if (!projection) {
return;
}
if (!this.bubble_) {
return;
}
var anchorHeight = this.getAnchorHeight_();
var height = this.bubble_.offsetHeight + anchorHeight;
var map = this.get('map');
var mapDiv = map.getDiv();
var mapHeight = mapDiv.offsetHeight;
var latLng = this.getPosition();
var centerPos = projection.fromLatLngToContainerPixel(map.getCenter());
var pos = projection.fromLatLngToContainerPixel(latLng);
var spaceTop = centerPos.y - height;
var spaceBottom = mapHeight - centerPos.y;
var needsTop = spaceTop < 0;
var deltaY = 0;
if (needsTop) {
spaceTop *= -1;
deltaY = (spaceTop + spaceBottom) / 2;
}
pos.y -= deltaY;
latLng = projection.fromContainerPixelToLatLng(pos);
if (map.getCenter() != latLng) {
map.panTo(latLng);
}
};
InfoBubble.prototype['panToView'] = InfoBubble.prototype.panToView;
InfoBubble.prototype.htmlToDocumentFragment_ = function(htmlString) {
htmlString = htmlString.replace(/^\s*([\S\s]*)\b\s*$/, '$1');
var tempDiv = document.createElement('DIV');
tempDiv.innerHTML = htmlString;
if (tempDiv.childNodes.length == 1) {
return (tempDiv.removeChild(tempDiv.firstChild));
} else {
var fragment = document.createDocumentFragment();
while (tempDiv.firstChild) {
fragment.appendChild(tempDiv.firstChild);
}
return fragment;
}
};
InfoBubble.prototype.removeChildren_ = function(node) {
if (!node) {
return;
}
var child;
while (child = node.firstChild) {
node.removeChild(child);
}
};
InfoBubble.prototype.setContent = function(content) {
this.set('content', content);
};
InfoBubble.prototype['setContent'] = InfoBubble.prototype.setContent;
InfoBubble.prototype.getContent = function() {
return (this.get('content'));
};
InfoBubble.prototype['getContent'] = InfoBubble.prototype.getContent;
InfoBubble.prototype.content_changed = function() {
if (!this.content_) {
return;
}
this.removeChildren_(this.content_);
var content = this.getContent();
if (content) {
if (typeof content == 'string') {
content = this.htmlToDocumentFragment_(content);
}
this.content_.appendChild(content);
var that = this;
var images = this.content_.getElementsByTagName('IMG');
for (var i = 0, image; image = images[i]; i++) {
google.maps.event.addDomListener(image, 'load', function() {
that.imageLoaded_();
});
}
google.maps.event.trigger(this, 'domready');
}
this.redraw_();
};
InfoBubble.prototype['content_changed'] =
InfoBubble.prototype.content_changed;
InfoBubble.prototype.imageLoaded_ = function() {
var pan = !!!this.get('disableAutoPan');
this.redraw_();
if (pan && (this.tabs_.length == 0 || this.activeTab_.index == 0)) {
this.panToView();
}
};
InfoBubble.prototype.updateTabStyles_ = function() {
if (this.tabs_ && this.tabs_.length) {
for (var i = 0, tab; tab = this.tabs_[i]; i++) {
this.setTabStyle_(tab.tab);
}
this.activeTab_.style['zIndex'] = this.baseZIndex_;
var borderWidth = this.getBorderWidth_();
var padding = this.getPadding_() / 2;
this.activeTab_.style['borderBottomWidth'] = 0;
this.activeTab_.style['paddingBottom'] = this.px(padding + borderWidth);
}
};
InfoBubble.prototype.setTabStyle_ = function(tab) {
var backgroundColor = this.get('backgroundColor');
var borderColor = this.get('borderColor');
var borderRadius = this.getBorderRadius_();
var borderWidth = this.getBorderWidth_();
var padding = this.getPadding_();
var marginRight = this.px(-(Math.max(padding, borderRadius)));
var borderRadiusPx = this.px(borderRadius);
var index = this.baseZIndex_;
if (tab.index) {
index -= tab.index;
}
var styles = {
'cssFloat': 'left',
'position': 'relative',
'cursor': 'pointer',
'backgroundColor': backgroundColor,
'border': this.px(borderWidth) + ' solid ' + borderColor,
'padding': this.px(padding / 2) + ' ' + this.px(padding),
'marginRight': marginRight,
'color': '#202080',
'borderRadiusTopLeft': borderRadiusPx,
'MozBorderRadiusTopleft': borderRadiusPx,
'webkitBorderTopLeftRadius': borderRadiusPx,
'borderRadiusTopRight': borderRadiusPx,
'MozBorderRadiusTopright': borderRadiusPx,
'webkitBorderTopRightRadius': borderRadiusPx,
'zIndex': index,
'display': 'inline'
};
for (var style in styles) {
tab.style[style] = styles[style];
}
var className = this.get('tabClassName');
if (className != undefined) {
tab.className += ' ' + className;
}
};
InfoBubble.prototype.addTabActions_ = function(tab) {
var that = this;
tab.listener_ = google.maps.event.addDomListener(tab, 'click', function() {
that.setTabActive_(this);
});
};
InfoBubble.prototype.setTabActive = function(index) {
var tab = this.tabs_[index - 1];
if (tab) {
this.setTabActive_(tab.tab);
}
};
InfoBubble.prototype['setTabActive'] = InfoBubble.prototype.setTabActive;
InfoBubble.prototype.setTabActive_ = function(tab) {
if (!tab) {
this.setContent('');
return;
}
var padding = this.getPadding_() / 2;
var borderWidth = this.getBorderWidth_();
if (this.activeTab_) {
var activeTab = this.activeTab_;
activeTab.style['zIndex'] = this.baseZIndex_ - activeTab.index;
activeTab.style['paddingBottom'] = this.px(padding);
activeTab.style['borderBottomWidth'] = this.px(borderWidth);
}
tab.style['zIndex'] = this.baseZIndex_;
tab.style['borderBottomWidth'] = 0;
tab.style['marginBottomWidth'] = '-10px';
tab.style['paddingBottom'] = this.px(padding + borderWidth);
this.setContent(this.tabs_[tab.index].content);
this.activeTab_ = tab;
this.redraw_();
};
InfoBubble.prototype.setMaxWidth = function(width) {
this.set('maxWidth', width);
};
InfoBubble.prototype['setMaxWidth'] = InfoBubble.prototype.setMaxWidth;
InfoBubble.prototype.maxWidth_changed = function() {
this.redraw_();
};
InfoBubble.prototype['maxWidth_changed'] =
InfoBubble.prototype.maxWidth_changed;
InfoBubble.prototype.setMaxHeight = function(height) {
this.set('maxHeight', height);
};
InfoBubble.prototype['setMaxHeight'] = InfoBubble.prototype.setMaxHeight;
InfoBubble.prototype.maxHeight_changed = function() {
this.redraw_();
};
InfoBubble.prototype['maxHeight_changed'] =
InfoBubble.prototype.maxHeight_changed;
InfoBubble.prototype.setMinWidth = function(width) {
this.set('minWidth', width);
};
InfoBubble.prototype['setMinWidth'] = InfoBubble.prototype.setMinWidth;
InfoBubble.prototype.minWidth_changed = function() {
this.redraw_();
};
InfoBubble.prototype['minWidth_changed'] =
InfoBubble.prototype.minWidth_changed;
InfoBubble.prototype.setMinHeight = function(height) {
this.set('minHeight', height);
};
InfoBubble.prototype['setMinHeight'] = InfoBubble.prototype.setMinHeight;
InfoBubble.prototype.minHeight_changed = function() {
this.redraw_();
};
InfoBubble.prototype['minHeight_changed'] =
InfoBubble.prototype.minHeight_changed;
InfoBubble.prototype.addTab = function(label, content) {
var tab = document.createElement('DIV');
tab.innerHTML = label;
this.setTabStyle_(tab);
this.addTabActions_(tab);
this.tabsContainer_.appendChild(tab);
this.tabs_.push({
label: label,
content: content,
tab: tab
});
tab.index = this.tabs_.length - 1;
tab.style['zIndex'] = this.baseZIndex_ - tab.index;
if (!this.activeTab_) {
this.setTabActive_(tab);
}
tab.className = tab.className + ' ' + this.animationName_;
this.redraw_();
};
InfoBubble.prototype['addTab'] = InfoBubble.prototype.addTab;
InfoBubble.prototype.removeTab = function(index) {
if (!this.tabs_.length || index < 0 || index >= this.tabs_.length) {
return;
}
var tab = this.tabs_[index];
tab.tab.parentNode.removeChild(tab.tab);
google.maps.event.removeListener(tab.tab.listener_);
this.tabs_.splice(index, 1);
delete tab;
for (var i = 0, t; t = this.tabs_[i]; i++) {
t.tab.index = i;
}
if (tab.tab == this.activeTab_) {
if (this.tabs_[index]) {
this.activeTab_ = this.tabs_[index].tab;
} else if (this.tabs_[index - 1]) {
this.activeTab_ = this.tabs_[index - 1].tab;
} else {
this.activeTab_ = undefined;
}
this.setTabActive_(this.activeTab_);
}
this.redraw_();
};
InfoBubble.prototype['removeTab'] = InfoBubble.prototype.removeTab;
InfoBubble.prototype.getElementSize_ = function(element, opt_maxWidth,
opt_maxHeight) {
var sizer = document.createElement('DIV');
sizer.style['display'] = 'inline';
sizer.style['position'] = 'absolute';
sizer.style['visibility'] = 'hidden';
if (typeof element == 'string') {
sizer.innerHTML = element;
} else {
sizer.appendChild(element.cloneNode(true));
}
document.body.appendChild(sizer);
var size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
if (opt_maxWidth && size.width > opt_maxWidth) {
sizer.style['width'] = this.px(opt_maxWidth);
size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
}
if (opt_maxHeight && size.height > opt_maxHeight) {
sizer.style['height'] = this.px(opt_maxHeight);
size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
}
document.body.removeChild(sizer);
delete sizer;
return size;
};
InfoBubble.prototype.redraw_ = function() {
this.figureOutSize_();
this.positionCloseButton_();
this.draw();
};
InfoBubble.prototype.figureOutSize_ = function() {
var map = this.get('map');
if (!map) {
return;
}
var padding = this.getPadding_();
var borderWidth = this.getBorderWidth_();
var borderRadius = this.getBorderRadius_();
var arrowSize = this.getArrowSize_();
var mapDiv = map.getDiv();
var gutter = arrowSize * 2;
var mapWidth = mapDiv.offsetWidth - gutter;
var mapHeight = mapDiv.offsetHeight - gutter - this.getAnchorHeight_();
var tabHeight = 0;
var width = (this.get('minWidth') || 0);
var height = (this.get('minHeight') || 0);
var maxWidth = (this.get('maxWidth') || 0);
var maxHeight = (this.get('maxHeight') || 0);
maxWidth = Math.min(mapWidth, maxWidth);
maxHeight = Math.min(mapHeight, maxHeight);
var tabWidth = 0;
if (this.tabs_.length) {
for (var i = 0, tab; tab = this.tabs_[i]; i++) {
var tabSize = this.getElementSize_(tab.tab, maxWidth, maxHeight);
var contentSize = this.getElementSize_(tab.content, maxWidth, maxHeight);
if (width < tabSize.width) {
width = tabSize.width;
}
tabWidth += tabSize.width;
if (height < tabSize.height) {
height = tabSize.height;
}
if (tabSize.height > tabHeight) {
tabHeight = tabSize.height;
}
if (width < contentSize.width) {
width = contentSize.width;
}
if (height < contentSize.height) {
height = contentSize.height;
}
}
} else {
var content = (this.get('content'));
if (typeof content == 'string') {
content = this.htmlToDocumentFragment_(content);
}
if (content) {
var contentSize = this.getElementSize_(content, maxWidth, maxHeight);
if (width < contentSize.width) {
width = contentSize.width;
}
if (height < contentSize.height) {
height = contentSize.height;
}
}
}
if (maxWidth) {
width = Math.min(width, maxWidth);
}
if (maxHeight) {
height = Math.min(height, maxHeight);
}
width = Math.max(width, tabWidth);
if (width == tabWidth) {
width = width + 2 * padding;
}
arrowSize = arrowSize * 2;
width = Math.max(width, arrowSize);
if (width > mapWidth) {
width = mapWidth;
}
if (height > mapHeight) {
height = mapHeight - tabHeight;
}
if (this.tabsContainer_) {
this.tabHeight_ = tabHeight;
this.tabsContainer_.style['width'] = this.px(tabWidth);
}
this.contentContainer_.style['width'] = this.px(width);
this.contentContainer_.style['height'] = this.px(height);
};
InfoBubble.prototype.getAnchorHeight_ = function() {
var anchorHeight = 0;
var anchor = this.get('anchor');
if (anchor) {
if (!anchorHeight && anchor.height) {
anchorHeight = anchor.height;
}
if (!anchorHeight) {
anchorHeight = 34;
}
}
return anchorHeight;
};
InfoBubble.prototype.positionCloseButton_ = function() {
var br = this.getBorderRadius_();
var bw = this.getBorderWidth_();
var right = 2;
var top = 2;
if (this.tabs_.length && this.tabHeight_) {
top += this.tabHeight_;
}
top += bw;
right += bw;
var c = this.contentContainer_;
if (c && c.clientHeight < c.scrollHeight) {
right += 15;
}
this.close_.style['right'] = this.px(right);
this.close_.style['top'] = this.px(top);
};
var region;
function writePassageToutNumerique(tab)
{
var content = '';
var chaine, date_prevu, date_effective, display;
var chaine_temp = '';
var recep_analog = 'non';
for(var i=0; i<tab.length-1 && recep_analog == 'non'; i+=6 )
{
date_prevu = tab[i+3];
chaine = tab[i+2];
if (chaine == 'France 2')
{
var tabtemp = date_prevu.split(":");
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth()+1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var testDate = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
recep_analog = (testDate >= tab[i+4]) ? 'fin' : 'oui';
region = tab[i+1];
chaine = tab[i+2];
date_prevu = tab[i+3];
date_effective = tab[i+4];
display = tab[i+5];
}
}
var tabtemp = date_prevu.split(":");
var date_prevu_clean = tabtemp[0];
var tabtemp = date_effective.split(":");
var date_effective_clean = tabtemp[0];
var recep_canal = 'non';
for(var j=0; j<tab.length-1 && recep_canal == 'non'; j+=6 )
{
chaine = tab[j+2];
if (chaine == 'Canal +' && tout_numerique == false)
{
var date_prevu_canal = tab[j+3];
var tabtemp = date_prevu_canal.split(":");
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var testDate = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
if (testDate >= tab[j+4])
{
recep_canal = 'fin';
break;
}
else
{
recep_canal = 'oui';
break;
}
}
}
if (recep_canal != 'non')
{
region_canal = tab[j+1];
display_canal = tab[j+5];
var tabtemp_canal = date_prevu_canal.split(":");
var date_prevu_canal_clean = tabtemp_canal[0];
}
date_passage_tout_numerique = date_prevu_clean;
content += '<h3 class="h3-inner">Passage au tout num&eacute;rique</h3>';
if(recep_analog == 'oui')
{
content += "<p>La r&eacute;gion <b>"+ region +"</b> passera au tout num&eacute;rique &agrave; compter du&nbsp;:"+date_prevu_clean+"</p>";
content += "<p>Les cha&icirc;nes analogiques ne seront plus diffus&eacute;es dans cette r&eacute;gion &agrave; compter de cette date.</p>";
}
else if (recep_analog == 'fin')
{
content += "<p>La r&eacute;gion <b>"+region +"</b> est pass&eacute;e au tout num&eacute;rique depuis le : </p><div style='text-align:center;margin-top:-8px;margin-bottom:10px;font-size:150%;text-decoration:underline;'>"+date_prevu_clean+"</div>";
content += "<p>Les cha&icirc;nes analogiques ne sont plus diffus&eacute;es dans cette r&eacute;gion depuis cette date.</p>";
tout_numerique = true;
}
if (recep_canal != 'non')
{
if(recep_canal == 'oui' && date_prevu_clean != date_prevu_canal_clean)
{
content += "Concernant Canal +, vous &ecirc;tes en principe couvert par un &eacute;metteur situ&eacute; dans cette zone de r&eacute;ception r&eacute;gionale&nbsp;: <b>"+ region_canal +"</b><br />";
content += "Date d'arr&ecirc;t de diffusion de Canal + en analogique de cette zone&nbsp;:<br /><u>"+date_prevu_canal_clean+"</u>";
}
else if (recep_analog != 'fin' && recep_canal == 'fin' && date_prevu_clean != date_prevu_canal_clean)
{
content += "La diffusion de Canal+ est pass&eacute;e au tout num&eacute;rique sur la zone <b>"+region+"</b> depuis le <u>"+date_prevu_canal_clean+"</u>.";
}
}
if (recep_analog == 'non' && recep_canal == 'non')
{
content += "<div style=\"padding:3px\">Vous ne recevez aucune cha&icirc;nes analogiques</div>";
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
}
return content;
}
function writeCouvertureAnalogiqueNormale(tab)
{
var content = "";
content += '<h3 class="h3-inner">Votre couverture analogique</h3>';
if (tout_numerique == false)
content += "<span style='font-weight:bold;text-decoration:underline;'>Cha&icirc;nes analogiques nationales</span> (que vous receviez d&eacute;j&agrave; avant le d&eacute;ploiement de la TNT) :<br/><br/>";
else
content += "<span style='font-weight:bold;text-decoration:underline;'>Cha&icirc;nes analogiques nationales</span> (que vous receviez avant le passage au tout num&eacute;rique)&nbsp;:<br/><br/>";
content += "<span style='font-weight:bold;'>R&eacute;ception normale : </span>";
var chaine;
var display;
var old_chaine = '';
var content_tmp = '';
for(var i=0; i<tab.length-1; i++ )
{
chaine = tab[i+1];
display = tab[i+2];
var tabtemp = chaine.split(":");
if(display == 'ok')
{
listeChainesOk.push(tabtemp[0]);
if (tabtemp[0] != old_chaine)
{
if (tabtemp[0] == 'France 2')
{
content_tmp += 'TF1, France 2, France 3';
content_tmp += ', ';
}
else if (tabtemp[0] != 'TF1' && tabtemp[0] != 'France 3')
{
content_tmp += tabtemp[0];
content_tmp += ', ';
}
}
}
old_chaine = tabtemp[0];
i+= 2;
}
if (content_tmp != '')
{
couvertureAnalogiqueNormaleChecked = 1;
content_tmp = content_tmp.substr(0,content_tmp.length-2) + '.';
content += content_tmp;
if (content_brouillage != '')
{
encapsulateContentBrouillage();
content += content_brouillage;
}
couv_analog = true;
return content;
}
else
{
return '';
}
}
function writeCouvertureAnalogiqueMoyenne(tab)
{
var content = '';
if (couv_analog == false)
{
content += '<hr/>';
if (tout_numerique == false) content += "<span style='font-weight:bold;text-decoration:underline;'>Cha&icirc;nes analogiques nationales</span> (que vous receviez d&eacute;j&agrave; avant le d&eacute;ploiement de la TNT)&nbsp;:</br></br>";
else content += "<span style='font-weight:bold;text-decoration:underline;'>Cha&icirc;nes analogiques nationales</span> (que vous receviez avant le passage au tout num&eacute;rique)&nbsp;:</br></br>";
}
content += "<span style='font-weight:bold;'>R&eacute;ception moyenne : </span>";
var chaine;
var old_chaine = '';
var suite = false;
var display;
var content_tmp = '';
for(var i=0; i<tab.length-1; i++ )
{
chaine = tab[i+1];
display = tab[i+2];
var tabtemp = chaine.split(":");
if (tabtemp[0] != old_chaine)
{
if(display == 'ok')
{
var test_listeChaines = listeChainesOk.join(",");
if (test_listeChaines.indexOf(tabtemp[0]) == -1)
{
if (tabtemp[0] == 'France 2')
{
content_tmp += 'TF1, France 2, France 3';
content_tmp += ", ";
}
else if (tabtemp[0] != 'TF1' && tabtemp[0] != 'France 3')
{
content_tmp += tabtemp[0];
content_tmp += ", ";
}
}
}
else
{
content_tmp += "<span style=color:red>, " + tabtemp[0] + "</span>";
}
}
i += 2;
old_chaine = tabtemp[0];
}
if (content_tmp != '')
{
couvertureAnalogiqueMoyenneChecked = 1;
content_tmp = content_tmp.substr(0,content_tmp.length -2) + '.';
return content += content_tmp + "";
}
else
{
return '';
}
}
function writeCouvertureNumeriquePassage(tab, chemin_imgcsa)
{
var content = '';
if(!tout_numerique)
{
if (contentCouvertureNumerique == '')
{
contentCouvertureNumerique = '<h3 class="h3-inner">Votre couverture num&eacute;rique actuelle</h3>';
contentCouvertureNumerique += "<p>Aucune couverture num&eacute;rique &agrave; ce jour.</p>";
}
content += "<p>Votre couverture apr&egrave;s le passage au tout num&eacute;rique</p>";
var nationaleOuRegionale = tab[1];
for(var x=1 ; x < (listeTypeEmetteur.length - 2) ; x++) {
var muxType = listeTypeEmetteur[x].split(":");
if (muxType[1] == 2) nationaleOuRegionale = 1;
}
tabEmetteursPassage = cleanListeEmetteursPassage(tab);
if (tabEmetteursPassage && tabEmetteursPassage.length > 0)
var nbEmetteurs = tabEmetteursPassage.length;
else
var nbEmetteurs = 0;
var lNbEmetteurs = "";
if (nbEmetteurs > 1)
lNbEmetteurs = "les ";
else
lNbEmetteurs = "l'";
var sNbEmetteurs = "";
if (nbEmetteurs > 1)
sNbEmetteurs = "s";
if (nationaleOuRegionale == 2)
{
if (tabEmetteurs.length==0)
{
content += "A compter du <b><u>" + date_passage_tout_numerique + "</u></b> vous pourrez recevoir la t&eacute;l&eacute;vision num&eacute;rique depuis "+lNbEmetteurs+"&eacute;metteur"+sNbEmetteurs+" suivant"+sNbEmetteurs+" :<br /><br />";
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
for(var i=0; i<tabEmetteursPassage.length; i++)
{
var tabMultiplex = tabEmetteursPassage[i]['Rx'].split(", ");
var tabCanal = tabEmetteursPassage[i]['canal'].split(", ");
var nbMultiplex = tabMultiplex.length;
if (nbMultiplex > 1)
{
var sNbMultiplex = "s";
var wNbMultiplex = nbMultiplex;
}
else
{
var sNbMultiplex = "";
var wNbMultiplex = "";
}
if (detailsEmetteursPassage)
{
for(var l=0; l<detailsEmetteursPassage.length; l++)
{
if (tabEmetteursPassage[i]['titre'] == detailsEmetteursPassage[l]['titre'] && tabEmetteursPassage[i]['longitude'] == detailsEmetteursPassage[l]['lng'] && tabEmetteursPassage[i]['latitude'] == detailsEmetteursPassage[l]['lat'])
{
var tmpRxOriginal = tabEmetteursPassage[i]['Rx'].split(',');
var tabMuxNonUtilises = new Array();
for (var m=0; m<detailsEmetteursPassage[l]['tabMux'].length; m++)
{
var muxDejaUtilise = 0;
for(var n=0; n<tmpRxOriginal.length; n++)
{
if(muxDejaUtilise == 0)
{
if ('R'+trim(tmpRxOriginal[n]) == trim(detailsEmetteursPassage[l]['tabMux'][m]['mux']))
{
muxDejaUtilise = 1;
}
}
}
if (muxDejaUtilise == 0)
{
var tabMux = new Array();
tabMux['mux'] = detailsEmetteursPassage[l]['tabMux'][m]['mux'];
tabMux['canal'] = detailsEmetteursPassage[l]['tabMux'][m]['canal'];
tabMuxNonUtilises.push(tabMux);
}
}
}
}
}
var contentListeMux = writeListeMuxComplementaires2(tabMuxNonUtilises, compteurListeMuxComplementaire);
content += "<tr>";
content += "<td width=80% style='padding-left:0px'>";
content += "> L'&eacute;metteur de <b>"+tabEmetteursPassage[i]['titre']+"</b>";
if (contentListeMux != '')
{
content += "<span style='color:#FF4848'>";
for (var l=0; l<compteurListeMuxComplementaire; l++)
content += '*';
compteurListeMuxComplementaire++;
content += "</span>";
}
content += " :" ;
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
var k=0;
for(var j=0; j<tabMultiplex.length; j++)
{
if(k%2==0)
content += "<tr>";
content += "<td style='padding-left:20px'>";
var canal = "canal "+tabCanal[j];
content += "> Le multiplex <b>R"+tabMultiplex[j]+"</b> sur le "+canal;
content += "</td>";
k++;
if(k%2==0)
content += "</tr>";
}
if(k%2==1)
content += "<td>&nbsp;</td></tr>";
content += "</table>";
if (contentListeMux != '')
content += contentListeMux;
content += "</td>";
content += "<td nowrap='nowrap' align='center' style='vertical-align:bottom'>";
content += "<a href='#' onclick=\"locateEmetteurPassage("+i+"); return false;\">"
content += "<img src='"+chemin_imgcsa+"emetteur_eteint.png' border=0><br />"
content += "Localiser cet &eacute;metteur<br />sur la carte";
content += "</a>";
content += "</td>";
content += "</tr>";
if (i != nbEmetteurs-1)
content +="<tr><td colspan='2'><img src='"+ chemin_imgcsa +"couvNumSeparateur.png'></td></tr>";
}
content += "</table>";
content +="<br /><div id='divCouvNumeriqueLegende'>Pour chaque multiplex de la TNT, l'&eacute;metteur susceptible de permettre la meilleure r&eacute;ception est indiqu&eacute;. N&eacute;anmoins, afin d'&eacute;viter des travaux d'installation inutiles, n'h&eacute;sitez pas &agrave; vous renseigner aupr&egrave;s d'un professionnel agr&eacute;&eacute;.</div>";
}
else
{
content += "A compter du <b><u>" + date_passage_tout_numerique + "</u></b> vous pourrez recevoir la t&eacute;l&eacute;vision num&eacute;rique depuis "+lNbEmetteurs+"&eacute;metteur"+sNbEmetteurs+" suivant"+sNbEmetteurs+" :<br /><br />";
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
var tabMultiplexPrecFull = new Array();
var tabCanalPrecFull = new Array();
for(var i=0; i<tabEmetteurs.length; i++)
{
tabMultiplexPrecFull = tabMultiplexPrecFull.concat(tabEmetteurs[i]['Rx'].split(", "));
tabCanalPrecFull = tabCanalPrecFull. concat(tabEmetteurs[i]['canal'].split(", "));
}
var tabMultiplexFull = new Array();
var tabCanalFull = new Array();
if (tabEmetteursPassage)
{
for(var i=0; i<tabEmetteursPassage.length; i++)
{
tabMultiplexFull = tabMultiplexFull.concat(tabEmetteursPassage[i]['Rx'].split(", "));
tabCanalFull = tabCanalFull.concat(tabEmetteursPassage[i]['canal'].split(", "));
}
var notificationRescan = false;
for(var i=0; i<tabEmetteursPassage.length; i++)
{
var tabMultiplex = tabEmetteursPassage[i]['Rx'].split(", ");
var nbMultiplex = tabMultiplex.length;
var tabCanal = tabEmetteursPassage[i]['canal'].split(", ");
if (nbMultiplex > 1)
{
var sNbMultiplex = "s";
var wNbMultiplex = nbMultiplex;
}
else
{
var sNbMultiplex = "";
var wNbMultiplex = "";
}
if (detailsEmetteursPassage)
{
for(var l=0; l<detailsEmetteursPassage.length; l++)
{
if (tabEmetteursPassage[i]['titre'] == detailsEmetteursPassage[l]['titre'] && tabEmetteursPassage[i]['longitude'] == detailsEmetteursPassage[l]['lng'] && tabEmetteursPassage[i]['latitude'] == detailsEmetteursPassage[l]['lat'])
{
var tmpRxOriginal = tabEmetteursPassage[i]['Rx'].split(',');
var tabMuxNonUtilises = new Array();
for (var m=0; m<detailsEmetteursPassage[l]['tabMux'].length; m++)
{
var muxDejaUtilise = 0;
for(var n=0; n<tmpRxOriginal.length; n++)
{
if(muxDejaUtilise == 0)
{
if ('R'+trim(tmpRxOriginal[n]) == trim(detailsEmetteursPassage[l]['tabMux'][m]['mux']))
{
muxDejaUtilise = 1;
}
}
}
if (muxDejaUtilise == 0)
{
var tabMux = new Array();
tabMux['mux'] = detailsEmetteursPassage[l]['tabMux'][m]['mux'];
tabMux['canal'] = detailsEmetteursPassage[l]['tabMux'][m]['canal'];
tabMuxNonUtilises.push(tabMux);
}
}
}
}
var contentListeMux = writeListeMuxComplementaires2(tabMuxNonUtilises, compteurListeMuxComplementaire);
}
}
content += "<tr>";
content += "<td width=80% style='padding-left:0px'>";
content += "> L'&eacute;metteur de <b>"+tabEmetteursPassage[i]['titre']+"</b>";
if (contentListeMux != '')
{
content += "<span style='color:#FF4848'>";
for (var l=0; l<compteurListeMuxComplementaire; l++)
content += '*';
compteurListeMuxComplementaire++;
content += "</span>";
}
content += " :" ;
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
var k=0;
for(var j=0; j<tabMultiplex.length; j++)
{
var nouveauMultiplex = true;
if (tabMultiplex[j] == 15)
document.getElementById("R15ListeChaines").style.display = 'block';
if(j%2==0)
content += "<tr>";
content += "<td style='padding-left:20px'>";
for (var k=0; k<tabMultiplexPrecFull.length; k++)
{
if (tabMultiplexPrecFull[k]=='R'+tabMultiplex[j])
{
nouveauMultiplex = false;
if(tabCanal[j]!=tabCanalPrecFull[k])
{
var canal = "<span style='color:#FF4848;'><u>canal "+tabCanalFull[k]+"</u> *</span>";
notificationRescan = true;
break;
}
else
var canal = "canal "+tabCanal[j];
}
}
var nomMultiplex = (tabMultiplex[j]==15)?"Multi7":"R"+tabMultiplex[j];
if (nouveauMultiplex === true)
{
content += "> Le multiplex <span style='color:#FF4848;'><u>"+nomMultiplex+"</u></span> sur le <span style='color:#FF4848;'><u>canal "+tabCanal[j]+"</u> *</span>";
}
else
content += "> Le multiplex <b>"+nomMultiplex+"</b> sur le "+canal;
content += "</td>";
if(j%2==1)
content += "</tr>";
}
if(j%2==1)
content += "<td>&nbsp;</td></tr>";
content += "</table>";
if (contentListeMux != '')
content += contentListeMux;
content += "</td>";
content += "</tr>";
if (i != nbEmetteurs-1)
content +="<tr><td colspan='2'><img src='"+ chemin_imgcsa +"couvNumSeparateur.png'></td></tr>";
}
content += "</table>";
if (notificationRescan)
content += "<br /><div id='divCouvNumeriqueRescan'><span style='color:#FF4848;'>*</span> Au " + date_passage_tout_numerique + " vous devrez effectuer une nouvelle recherche et m&eacute;morisation des programmes pour recevoir de nouveau ce(s) multiplex.</div>";
content +="<br /><div id='divCouvNumeriqueLegende'>Pour chaque multiplex de la TNT, l'&eacute;metteur susceptible de permettre la meilleure r&eacute;ception est indiqu&eacute;. N&eacute;anmoins, afin d'&eacute;viter des travaux d'installation inutiles, n'h&eacute;sitez pas &agrave; vous renseigner aupr&egrave;s d'un professionnel agr&eacute;&eacute;.</div>";
}
}
else if (nationaleOuRegionale == 1)
{
if (tab.length > 3)
{
content += "A compter du <b><u>" + date_passage_tout_numerique + "</u></b> vous pourrez recevoir la t&eacute;l&eacute;vision num&eacute;rique depuis "+lNbEmetteurs+"&eacute;metteur"+sNbEmetteurs+" suivant"+sNbEmetteurs+" :<br /><br />";
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
for(var i=0; i<tabEmetteursPassage.length; i++)
{
content += "<tr>";
content += "<td width=80% style='padding-left:0px'>";
content += "> L'&eacute;metteur de <b>"+tabEmetteursPassage[i]['titre']+"</b>." ;
content += "</td>";
if (tabEmetteurs.length ==0)
{
content += "<td nowrap='nowrap' align='center' style='vertical-align:bottom'>";
content += "<a href='#' onclick=\"locateEmetteurPassage("+i+"); return false;\">"
content += "<img src='"+chemin_imgcsa+"emetteur_eteint.png' border=0><br />"
content += "Localiser cet &eacute;metteur<br />sur la carte";
content += "</a>";
content += "</td>";
}
content += "</tr>";
if (i != nbEmetteurs-1)
content +="<tr><td colspan='2'><img src='"+ chemin_imgcsa +"couvNumSeparateur.png'></td></tr>";
content += "</table>";
content +="<br /><div id='divCouvNumeriqueLegende'>Pour chaque multiplex de la TNT, l'&eacute;metteur susceptible de permettre la meilleure r&eacute;ception est indiqu&eacute;. N&eacute;anmoins, afin d'&eacute;viter des travaux d'installation inutiles, n'h&eacute;sitez pas &agrave; vous renseigner aupr&egrave;s d'un professionnel agr&eacute;&eacute;.</div>";
}
}
else
{
content += "Vous ne serez pas couvert par la TNT.";
content += "<br /><br />";
content += "<center>";
content += "<a href='http://www.tousaunumerique.fr/aides/' alt='tousaunumerique.fr'><img src='"+chemin_imgcsa+"tousaunumerique.png' title='tousaunumerique.fr' border=0></a>";
content += "<br /><br />";
content += "<a href='http://www.tousaunumerique.fr/aides/' alt='tousaunumerique.fr'>Nous allons vous aider !</a>";
content += "</center>";
}
}
}
if (contentCouvertureNumerique)
contentCouvertureNumerique+=content;
else
contentCouvertureNumerique=content;
}
function writeCouvertureNumerique(tab, chemin_imgcsa)
{
var content = '';
tabEmetteurs = cleanListeEmetteurs(tab);
var nbEmetteurs = tabEmetteurs.length;
if (nbEmetteurs > 0)
{
var lNbEmetteurs = "";
if (nbEmetteurs > 1)
lNbEmetteurs = "les ";
else
lNbEmetteurs = "l'";
var sNbEmetteurs = "";
if (nbEmetteurs > 1)
sNbEmetteurs = "s";
content += '<h3 class="h3-inner">Votre couverture num&eacute;rique actuelle';
if (date_maj_plan_transitoire &&  date_maj_plan_transitoire != '')
content += "(donn&eacute;es mises &agrave; jour le "+date_maj_plan_transitoire+")";
content += "</h3>";
content += "<p>Vous pouvez recevoir la t&eacute;l&eacute;vision num&eacute;rique depuis "+lNbEmetteurs+"&eacute;metteur"+sNbEmetteurs+" suivant"+sNbEmetteurs+" :</p>";
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
for(var i=0; i<tabEmetteurs.length; i++)
{
var tabMultiplex = tabEmetteurs[i]['Rx'].split(", ");
var tabCanal = tabEmetteurs[i]['canal'].split(", ");
var nbMultiplex = tabMultiplex.length;
if (detailsEmetteurs)
{
for(var l=0; l<detailsEmetteurs.length; l++)
{
if (tabEmetteurs[i]['titre'] == detailsEmetteurs[l]['titre'] && tabEmetteurs[i]['longitude'] == detailsEmetteurs[l]['lng'] && tabEmetteurs[i]['latitude'] == detailsEmetteurs[l]['lat'])
{
var tmpRxOriginal = tabEmetteurs[i]['Rx'].split(',');
var tabMuxNonUtilises = new Array();
for (var m=0; m<detailsEmetteurs[l]['tabMux'].length; m++)
{
var muxDejaUtilise = 0;
for(var n=0; n<tmpRxOriginal.length; n++)
{
if(muxDejaUtilise == 0)
{
if (trim(tmpRxOriginal[n]) == trim(detailsEmetteurs[l]['tabMux'][m]['mux']))
{
muxDejaUtilise = 1;
}
}
}
if (muxDejaUtilise == 0)
{
var tabMux = new Array();
tabMux['mux'] = detailsEmetteurs[l]['tabMux'][m]['mux'];
tabMux['canal'] = detailsEmetteurs[l]['tabMux'][m]['canal'];
tabMuxNonUtilises.push(tabMux);
}
}
}
}
}
var contentListeMux = writeListeMuxComplementaires2(tabMuxNonUtilises, compteurListeMuxComplementaire);
if (nbMultiplex > 1)
{
var sNbMultiplex = "s";
var wNbMultiplex = nbMultiplex;
}
else
{
var sNbMultiplex = "";
var wNbMultiplex = "";
}
content += "<tr>";
content += "<td width=80% style='padding-left:0px;border-right:0px;'>";
content += "> L'&eacute;metteur de <b>"+tabEmetteurs[i]['titre']+"</b> ";
if (contentListeMux != '')
{
content += "<span style='color:#FF4848'>";
for (var l=0; l<compteurListeMuxComplementaire; l++)
content += '*';
compteurListeMuxComplementaire++;
content += "</span>";
}
content += " :" ;
content += "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
var k=0;
for(var j=0; j<tabMultiplex.length; j++)
{
if (tabMultiplex[j] == 'R15')
var contentR15 = "> Le multiplex <b>Multi7</b> sur le <u>canal "+tabCanal[j]+"</u>";
else
{
if(k%2==0)
content += "<tr>";
content += "<td style='padding-left:20px;border-right:0px;'>";
content += "> Le multiplex <b>"+tabMultiplex[j]+"</b> sur le <u>canal "+tabCanal[j]+"</u>";
content += "</td>";
k++;
if(k%2==0)
content += "</tr>";
}
}
if (contentR15 && contentR15!='')
{
document.getElementById("R15ListeChaines").style.display = 'block';
if(k%2==0)
content += "<tr>";
content += "<td style='padding-left:20px;border-right:0px;'>";
content += contentR15;
content += "</td>";
k++;
if(k%2==0)
content += "</tr>";
contentR15 = '';
}
if(k%2==1)
content += '<td style="border-right:0px;">&nbsp;</td></tr>';
content += "</table>";
if (contentListeMux != '')
content += contentListeMux;
content += "</td>";
content += "<td nowrap='nowrap' align='center' style='vertical-align:middle;border-right:0px;'>";
content += "<a href='#' onclick=\"locateEmetteur("+i+"); return false;\">"
content += "<img src='"+chemin_imgcsa+"emetteur.png' border=0><br />"
content += "Localiser cet &eacute;metteur<br />sur la carte";
content += "</a>";
content += "</td>";
content += "</tr>";
if (i != nbEmetteurs-1)
content +="<tr><td colspan='2' style='border-right:0px;'><img src='"+ chemin_imgcsa +"couvNumSeparateur.png'></td></tr>";
}
content += "</table>";
content +="<br /><div id='divCouvNumeriqueLegende'>Pour chaque multiplex de la TNT, l'&eacute;metteur susceptible de permettre la meilleure r&eacute;ception est indiqu&eacute;. N&eacute;anmoins, afin d'&eacute;viter des travaux d'installation inutiles, n'h&eacute;sitez pas &agrave; vous renseigner aupr&egrave;s d'un professionnel agr&eacute;&eacute;.</div>";
}
else
{
content += '<h3 class="h3-inner">Votre couverture num&eacute;rique actuelle</h3>';
content += '<p>Aucune couverture num&eacute;rique &agrave; ce jour.</p>';
}
return content;
}
function writeListeMuxComplementaires(tab)
{
var content = '';
alert('writeListeMuxComplementaires');
if (tab && tab.length>0)
{
var s = (tab.length>1)?'s':'';
content += "<br /><div style='padding-left:20px'><i>Cet &eacute;metteur diffuse &eacute;galement le" + s + " multiplex suivant" + s + " :<br />&nbsp;&nbsp;&nbsp;>&nbsp;";
var z = 0;
for (var o=0; o<tab.length; o++)
{
if (tab[o]['mux'] == "R15")
var contentR15 = " Multi7 (canal " + tab[o]['canal'] + ")";
else
{
if (z != 0) content += ", ";
content += tab[o]['mux'] + " (canal " + tab[o]['canal'] + ") ";
z++;
}
}
if (contentR15 && contentR15 != "")
{
if (s != '') content += ' et ';
content += contentR15;
contentR15 = '';
}
content += '</i></div>';
}
else
{
content += '';
}
return content;
}
function writeListeMuxComplementaires2(tab, nbList)
{
var content = '';
if (tab && tab.length>0)
{
var s = (tab.length>1)?'s':'';
content += "<br />";
content += "<div style='padding-left:20px; color:#FF4848'>";
for (var x=0; x<nbList; x++)
content += "*";
content += " : cet &eacute;metteur diffuse &eacute;galement le" + s + " multiplex ";
var z = 0;
for (var o=0; o<tab.length; o++)
{
if (tab[o]['mux'] == "R15") {
if (region == 'Ile-de-France')
var contentR15 = " Multi7";
else
var contentR15 = " R15 (une ou plusieurs cha&icirc;nes locales)";
}
else
{
if (z != 0) content += ", ";
content += " " + tab[o]['mux'];
z++;
}
}
if (contentR15 && contentR15 != "")
{
if (s != '') content += ' et ';
content += contentR15;
contentR15 = '';
}
content += '</i></div>';
}
else
{
content += '';
}
return content;
}
function writeTableauEmetteurs_mv2(tabEmetteurs)
{
var content = '';
content += "Pour localiser l'adresse de d&eacute;part sur la carte, <a href=\"#\" onclick=\"locateHome(); return false;\">cliquez ici</a><br /><br />";
content += "<table border=1 width=100%>";
content += "<tr>";
content += "<td>";
content += "<b>Emetteur</b>";
content += "</td>";
content += "<td>";
content += "<b>Longitude</b>";
content += "</td>";
content += "<td>";
content += "<b>Latitude</b>";
content += "</td>";
content += "<td>";
content += "<b>Multiplex</b>";
content += "</td>";
content += "<td>";
content += "<b>Canal(aux)</b>";
content += "</td>";
content += "<td>";
content += "<b>Carte</b>";
content += "</td>";
content += "</tr>";
for(var i=0; i<tabEmetteurs.length; i++)
{
content += "<tr>";
content += "<td>" + tabEmetteurs[i]['titre'] + "</td>";
content += "<td>" + tabEmetteurs[i]['longitude'] + "</td>";
content += "<td>" + tabEmetteurs[i]['latitude'] + "</td>";
content += "<td>" + tabEmetteurs[i]['Rx'] + "</td>";
content += "<td>" + tabEmetteurs[i]['canal'] + "</td>";
content += "<td align='center'><a href=\"#\" onclick=\"locateEmetteur(" + i + "); return false;\">Situer</a></td>";
content += "</tr>";
}
content += "</table>";
return content;
}
function writePasDeCouvertureNumerique()
{
var content = '';
content += '<h3 class="h3-inner">Votre couverture num&eacute;rique</h3>';
content += "<p>Aucune couverture num&eacute;rique sur cette zone &agrave; ce jour.</p>";
return content;
}
function writePasDeCouvertureAnalogique()
{
var content = '';
content += '<h3 class="h3-inner">Votre couverture analogique</h3>';
content += "<p>Aucune couverture analogique sur cette zone.</p>";
return content;
}
function writeCouvertureBrouillage()
{
var content = "";
cleanArrBrouillage();
if (cleanArrBrouil && cleanArrBrouil.length > 0)
{
for(i in cleanArrBrouil)
{
var theDate = getTheDateOfTheDay();
var risquer = '';
var aPartirDepuis = '';
if (cleanArrBrouil[i]['date_prevu'] > theDate)
{
risquer = "risquera";
aPartirDepuis = '&agrave; partir du';
}
else
{
risquer = "risque";
aPartirDepuis = 'depuis le';
}
var legerement = (cleanArrBrouil[i]['puissance']==0)?"l&eacute;g&egrave;rement ":" ";
var date_prevu = cleanArrBrouil[i]['date_prevu'].substr(6,2) + "/" + cleanArrBrouil[i]['date_prevu'].substr(4,2) + "/" + cleanArrBrouil[i]['date_prevu'].substr(0,4);
content += "Si vous d&eacute;pendez de l'&eacute;metteur de <b>"+cleanArrBrouil[i]['region']+ "</b>, la r&eacute;ception analogique de <b>" + cleanArrBrouil[i]['chaine'] + "</b> " + risquer + " d'&ecirc;tre " + legerement + "perturb&eacute;e " + aPartirDepuis + ' <b>' + date_prevu + '</b>.<br /><br />';
}
}
if (content != "")
content_brouillage = content;
}
function encapsulateContentBrouillage()
{
if (content_brouillage != '')
{
var tmp = content_brouillage;
content_brouillage = "<br /><div style=\"background-color:#FFF;font-size:0.9em;margin:3px 1px;border:1px solid #A71;padding-left:10px;padding-right:10px;padding-top:5px;padding-bottom:5px;-moz-border-radius:10px;-webkit-border-radius:10px;color:#512C01;\">";
content_brouillage += tmp;
content_brouillage += "N'h&eacute;sitez pas &agrave; passer au num&eacute;rique.";
content_brouillage += "</div>";
}
}
function convertDateToString(theDate)
{
var tabDate = theDate.split('-');
var jour, mois, annee;
jour = tabDate[2];
switch(tabDate[1])
{
case '01' : mois = "Janvier"; break;
case '02' : mois = "F&eacute;vrier"; break;
case '03' : mois = "Mars"; break;
case '04' : mois = "Avril"; break;
case '05' : mois = "Mai"; break;
case '06' : mois = "Juin"; break;
case '07' : mois = "Juillet"; break;
case '08' : mois = "Ao&ucirc;t"; break;
case '9'  : mois = "Septembre"; break;
case '10' : mois = "Octobre"; break;
case '11' : mois = "Novembre"; break;
case '12' : mois = "D&eacute;cembre"; break;
}
annee = tabDate[0];
return jour + ' ' + mois + ' ' + annee;
}
var clientGeocoder;
function startSearch_mv2(chemin_imgcsa)
{
var adr     = document.getElementById('adr').value;
var ville   = document.getElementById('ville').value;
var content = "";
document.getElementById("required").innerHTML = "";
if (ville == "") // Si le champ ville n'est pas renseigné, initialisation de la carte par défaut
{
document.getElementById("required").innerHTML = "<img src='"+chemin_imgcsa+"warning.png'> La zone ville est obligatoire";
}
else // Sinon, on lance la géolocalisation
{
document.getElementById("required").innerHTML = "<img src='"+chemin_imgcsa+"loader.gif'> Recherche en cours, veuillez patienter quelques secondes...";
if ((adr=="") && (ville=="13000"))
ville = "13001";
else if ((adr=="") && (ville=="69000"))
ville = "69001";
else if ((adr=="") && (ville=="75000"))
ville = "75001";
if (!isNaN(ville) && ville.length == 4)
ville = "0" + ville;
emetteurInfoWindowTabArray = new Array();
geocodage_mv2(adr,ville,chemin_imgcsa);
}
return false;
}
function showAddress_mv2(response)
{
if (response || response.Status.code == 200)
{
var place = response.Placemark[0];
var tabAdresse = place.address.split(", ");
if (tabAdresse.length > 2)
{
var adresse_precise = tabAdresse[0];
var cp_ville = tabAdresse[1];
var pays = tabAdresse[2];
}
else
{
var adresse_precise = '';
var cp_ville = tabAdresse[0];
var pays = tabAdresse[1];
}
contentAdresse = '';
if (adresse_precise != '')
contentAdresse = adresse_precise + ', ';
contentAdresse += cp_ville + ', ' + pays;
homeInfoWindow.open(map, iMarkerHome);
document.getElementById("adr").value = adresse_precise;
document.getElementById("ville").value = cp_ville + ', ' + pays;
} else {
contentAdresse = 'Impossible de localiser cette adresse<br />Erreur : ' + response.Status.code;
}
}
function geocodage_mv2(adr, ville, chemin_imgcsa)
{
var adr_togeocode = adr + ' ' + ville;
clientGeocoder = new GClientGeocoder();
clientGeocoder.setBaseCountryCode('fr');
clientGeocoder.getLatLng(adr_togeocode, function (coord)
{
if(coord)
{
tabDomTom = initTabDomTom(); // tableau des coordonnées des 15 DOM TOM
var i = findDomTom(coord.y, coord.x, tabDomTom);
if (i > -1)
window.location.replace("ma_tnt_outremer?lat="+coord.y+"&lng="+coord.x);
initialize_m(coord.y, coord.x, chemin_imgcsa);
}
else
{
var content = "Impossible de trouver ce lieu !";
document.getElementById("required").innerHTML = content;
}
});
}
var listeChainesOk;
var date_passage_effet;
var couv_analog;
var content_brouillage = '';
var arrChaine = new Array('','TF1','France 2','France 3 ','Canal +','France5/Arte','M6');
var arrBrouil = new Array();
var arrLocales = new Array();
var nbrBrouil;
var presentation = 'clean';
var couvertureAnalogiqueNormaleChecked = 0;
var couvertureAnalogiqueMoyenneChecked = 0;
var tabEmetteurs;
var listeTypeEmetteur;
function getResult(lat, longe, scrollOrNot, map, chemin_imgcsa)
{
var debug = 0;
contentPassageToutNumerique = '';
contentCouvertureAnalogique = '';
contentCouvertureNumerique = '';
contentCouvertureNumeriquePassage = '';
couvertureAnalogiqueNormaleChecked = 0;
couvertureAnalogiqueMoyenneChecked = 0;
date_maj_plan_transitoire = '';
compteurListeMuxComplementaire = 2;
tout_numerique = false;
couv_analog = false;
content_brouillage = '';
arrBrouil = new Array();
listeChainesOk = new Array();
date_passage_effet = '';
tabEmetteurs = new Array();
tabEmetteursPassage = new Array();
document.getElementById("couverture").style.display = 'block';
document.getElementById("couverture").innerHTML = '<img src="'+chemin_imgcsa+'loader.gif"> Traitement en cours, veuillez patienter quelques secondes...<br />&nbsp;';
document.getElementById("divContainerResultats").style.display = 'none';
if (document.getElementById("debug"))
{
document.getElementById("debug").style.display = 'none';
document.getElementById("debug").innerHTML = "<center><h1>---------------------- DEBUG ----------------------</h1></center><ul><li><a href='#coordonnees'><span>1. Coordonn&eacute;es</span></a></li><li><a href='#requete'><span>2. Requ&ecirc;te</span></a></li><li><a href='#traitement'><span>3. Traitements</span></a></li><li><a href='#flux'><span>4. Flux envoy&eacute;</span></a></li><li><a href='#passage'><span>5. Passage</span></a></li></ul>";
}
var listeEmetteurs = new Array();
var method         = "POST";
var pos = self.location.pathname.indexOf("csatvnumerique");
var filename  = self.location.pathname.substr(0,pos) + "csatvnumerique/ajaxGetResult_mv2";
var data           = null;
if(window.XMLHttpRequest) // Firefox
{
xhr_object = new XMLHttpRequest();
}
else if(window.ActiveXObject)  // Internet Explorer
{
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
}
else // XMLHttpRequest non supporte par le navigateur
{
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
}
if(lat != "")
data = "lat=" + lat + "&lng=" + longe + "&cle=iMc5PxK";
if (debug == 1)
data += "&debug=1";
filename += "?"+data;
xhr_object.open(method, filename, true);
xhr_object.onreadystatechange = function(message)
{
if(xhr_object.readyState == 4)
{
if (xhr_object.responseText == 'cle_invalide')
{
document.getElementById("required").innerHTML = "";
document.getElementById("couverture").innerHTML  = "<h2 style='color:#CC0000'><i>Cl&eacute; invalide</i></h2>";
}
else
{
var tmp = xhr_object.responseText.split("#");
var content = "";
var chaines_tnt = "";
document.getElementById("couverture").innerHTML = '';
if(xhr_object.responseText != '#0')
{
var localisationEmetteurs = 0;
var noEmetteursTransitoires = 0;
if (presentation == "debug" || presentation == "all")
document.getElementById("couverture").innerHTML = tmp;
for(var i=0; i<tmp.length; i++)
{
var tmp2 = tmp[i].split('||');
if (tmp2[0] == 10)
{
detailsEmetteurs = recupDetailsEmetteurs(tmp2);
}
if (tmp2[0] == 11)
{
detailsEmetteursPassage = recupDetailsEmetteursPassage(tmp2);
}
if (tmp2[0] == 12) {
listeTypeEmetteur = tmp2;
}
}
var bounds = new google.maps.LatLngBounds();
for(var i=0; i<tmp.length; i++)
{
content += writeResult(tmp[i], chemin_imgcsa);
var tmp2 = tmp[i].split('||');
if (tmp2[0] == 8)
{
tmp[i] = "||" + tmp[i];
var result = tmp[i].split("<br/>");
for(var i=0; i<tabEmetteurs.length; i++)
{
addiMarkerEmetteur(tabEmetteurs[i]['latitude'], tabEmetteurs[i]['longitude'], bounds, chemin_imgcsa, map);
addEmetteurInfoWindowTab(tabEmetteurs[i]['titre'], tabEmetteurs[i]['Rx'], tabEmetteurs[i]['canal']);
}
localisationEmetteurs = 1;
noEmetteursTransitoires = 1;
}
if (tmp2[0] == 9 && noEmetteursTransitoires == 0)
{
tmp[i] = "||" + tmp[i];
var result = tmp[i].split("<br/>");
if (tabEmetteursPassage)
{
for(var i=0; i<tabEmetteursPassage.length; i++)
{
addiMarkerEmetteurPassage(tabEmetteursPassage[i]['latitude'], tabEmetteursPassage[i]['longitude'],bounds, chemin_imgcsa);
addEmetteurPassageInfoWindowTab(tabEmetteursPassage[i]['titre'], tabEmetteursPassage[i]['Rx'], tabEmetteursPassage[i]['canal'], date_passage_tout_numerique);
}
localisationEmetteurs = 1;
}
}
}
var retour = putHomeMarker_mv2(lat,longe, chemin_imgcsa);
var bounds = retour[0];
var iMarkerHome = retour[1];
setAllListeners(iMarkerHome, map, chemin_imgcsa);
if (tabEmetteurs.length == 0)
{
if (tabEmetteursPassage)
{
if (tabEmetteursPassage.length == 0)
{
contentCouvertureNumerique = writePasDeCouvertureNumerique();
putPasDeCouvNumMarker(lat,longe, map, chemin_imgcsa);
}
}
else
{
contentCouvertureNumerique = writePasDeCouvertureNumerique();
putPasDeCouvNumMarker(lat,longe, map, chemin_imgcsa);
}
}
var home = new google.maps.LatLng(lat, longe);
setAdresse(home, iMarkerHome, map);
map.fitBounds(bounds);
if (localisationEmetteurs == 0)
{
map.setZoom(10);
}
else
{
zoomLevel = map.getZoom();
map.setZoom(zoomLevel-1);
}
document.getElementById("required").innerHTML = "";
presentationResult();
if($("#contentPassageToutNumerique").height() > $("#contentCouvertureAnalogique").height())
$("#contentCouvertureAnalogique").height($("#contentPassageToutNumerique").height());
else
$("#contentPassageToutNumerique").height($("#contentCouvertureAnalogique").height());
if (debug ==1)
{
if (document.getElementById("debug")) {
document.getElementById("debug").style.display = 'block';
document.getElementById('debug').innerHTML += tmp;
jQuery("#debug").tabs();
jQuery.scrollTo('#debug', 1000, {});
}
}
else
{
if (scrollOrNot == "scroll")
{
jQuery.scrollTo('#divRecherche', 1000, {});
}
}
}
}
}
}
xhr_object.send(data);
return ;
}
function presentationResult()
{
if (presentation == "clean" || presentation == "all")
{
document.getElementById("divPassageToutNumerique").innerHTML = "<div id='contentPassageToutNumerique'>"+contentPassageToutNumerique+"</div>";
document.getElementById("divCouvAnalogique").innerHTML = "<div id='contentCouvertureAnalogique'>"+contentCouvertureAnalogique+"</div>";
document.getElementById("divCouvNumerique").innerHTML = contentCouvertureNumerique;
document.getElementById("divContainerResultats").style.display = 'block';
if (document.getElementById("divRetourSearchForm"))
document.getElementById("divRetourSearchForm").style.display = 'block';
}
}
function writeResult(tab, chemin_imgcsa)
{
var content = '';
var tabtemp = tab.split("||");
if(tabtemp.length > 0)
{
if(tabtemp[0] == 1)
{
contentPassageToutNumerique = writePassageToutNumerique(tabtemp);
}
else if(tabtemp[0] == 2 && couvertureAnalogiqueNormaleChecked != 1)
{
writeCouvertureBrouillage();
contentCouvertureAnalogique = writeCouvertureAnalogiqueNormale(tabtemp);
}
else if(tabtemp[0] == 3 && couvertureAnalogiqueMoyenneChecked != 1)
{
if(contentCouvertureAnalogique)
{
contentCouvertureAnalogique += writeCouvertureAnalogiqueMoyenne(tabtemp);
}
else
{
contentCouvertureAnalogique = "<div id='divCouvAnalogiqueTitre'>Votre couverture analogique</div><br />";
contentCouvertureAnalogique += writeCouvertureAnalogiqueMoyenne(tabtemp);
}
}
else if(tabtemp[0] == 4)
{
defineMajPlanTransitoire(tabtemp);
}
else if(tabtemp[0] == 7 && tout_numerique == false)
{
buildArrBrouillage(tabtemp);
}
else if(tabtemp[0] == 8)
{
contentCouvertureNumerique = writeCouvertureNumerique(tabtemp, chemin_imgcsa);
}
else if(tabtemp[0] == 9)
{
contentCouvertureNumeriquePassage = writeCouvertureNumeriquePassage(tabtemp, chemin_imgcsa);
}
}
if (contentCouvertureAnalogique == '')
{
contentCouvertureAnalogique += writePasDeCouvertureAnalogique();
}
return content;
}
function UnEmetteur(un_type_emetteur, une_ligne_excel, un_canal, une_description, une_longitude, une_latitude, un_multiplex)
{
this.un_type_emetteur   = un_type_emetteur;
this.une_ligne_excel    = une_ligne_excel;
this.un_canal           = un_canal;
this.une_description    = une_description;
this.une_longitude      = une_longitude;
this.une_latitude       = une_latitude;
this.un_multiplex       = un_multiplex;
}
function cleanListeEmetteursPassage(tabTemp)
{
for(var i=0; i<tabTemp.length-1; i=i+7)
{
titre       = tabTemp[i+4];
longitude   = tabTemp[i+5];
latitude    = tabTemp[i+6];
rx          = tabTemp[i+8];
canal       = tabTemp[i+3];
if (titre != undefined && longitude != undefined && latitude != undefined && rx != undefined)
{
if (i == 0)
{
var multiplex           = new Array();
multiplex['titre']      = titre;
multiplex['longitude']  = longitude;
multiplex['latitude']   = latitude;
multiplex['Rx']         = stripTags(rx);
multiplex['canal']      = stripTags(canal);
var tabEmetteurs = new Array(multiplex);
}
else
{
var emetteurExistant = -1;
for(var j=0; j<tabEmetteurs.length; j++)
{
var debug = "";
debug += "Multiplex : " + stripTags(rx) + " - Canal : " + canal + "\n\n";
debug += "Titre : " + titre + " - Long : " + longitude + " - Lat : " + latitude + "\n\n";
debug += "LE.titre : " + tabEmetteurs[j]['titre'] + " - LE.long : " + tabEmetteurs[j]['longitude'] + " - LE.lat : " + tabEmetteurs[j]['latitude'] + " - LE.length : " + tabEmetteurs.length + "\n\n";
debug += "I : " + i + " - J : " + j;
if ((number_format(tabEmetteurs[j]['longitude'], 2) == number_format(longitude, 2)) && (number_format(tabEmetteurs[j]['latitude'], 2) == number_format(latitude, 2)))
{
emetteurExistant = j;
break;
}
}
if (emetteurExistant != -1)
{
if (tabEmetteurs[j]['Rx'] == '')
tabEmetteurs[j]['Rx'] = stripTags(rx);
else
tabEmetteurs[j]['Rx'] += ", " + stripTags(rx);
if (tabEmetteurs[j]['canal'] == '')
tabEmetteurs[j]['canal'] = canal;
else
tabEmetteurs[j]['canal'] += ", " + canal;
}
else
{
var multiplex = new Array();
multiplex['titre']      = titre;
multiplex['longitude']  = longitude;
multiplex['latitude']   = latitude;
multiplex['Rx']         = stripTags(rx);
multiplex['canal']      = canal;
tabEmetteurs.push(multiplex);
}
}
}
}
return tabEmetteurs;
}
function cleanListeEmetteurs(tabTemp)
{
for(var i=0; i<tabTemp.length-1; i=i+8)
{
titre       = tabTemp[i+3];
longitude   = tabTemp[i+4];
latitude    = tabTemp[i+5];
rx          = tabTemp[i+7];
canal       = tabTemp[i+2];
if (titre != undefined && longitude != undefined && latitude != undefined && rx != undefined)
{
if (i == 0)
{
var multiplex           = new Array();
multiplex['titre']      = titre;
multiplex['longitude']  = longitude;
multiplex['latitude']   = latitude;
multiplex['Rx']         = stripTags(rx);
multiplex['canal']      = stripTags(canal);
var tabEmetteurs = new Array(multiplex);
}
else
{
var emetteurExistant = -1;
for(var j=0; j<tabEmetteurs.length; j++)
{
var debug = "";
debug += "Multiplex : " + stripTags(rx) + " - Canal : " + canal + "\n\n";
debug += "Titre : " + titre + " - Long : " + longitude + " - Lat : " + latitude + "\n\n";
debug += "LE.titre : " + tabEmetteurs[j]['titre'] + " - LE.long : " + tabEmetteurs[j]['longitude'] + " - LE.lat : " + tabEmetteurs[j]['latitude'] + " - LE.length : " + tabEmetteurs.length + "\n\n";
debug += "I : " + i + " - J : " + j;
if ((number_format(tabEmetteurs[j]['longitude'], 2) == number_format(longitude, 2)) && (number_format(tabEmetteurs[j]['latitude'], 2) == number_format(latitude, 2)))
{
emetteurExistant = j;
break;
}
}
if (emetteurExistant != -1)
{
if (tabEmetteurs[j]['Rx'] == '')
tabEmetteurs[j]['Rx'] = stripTags(rx);
else
tabEmetteurs[j]['Rx'] += ", " + stripTags(rx);
if (tabEmetteurs[j]['canal'] == '')
tabEmetteurs[j]['canal'] = canal;
else
tabEmetteurs[j]['canal'] += ", " + canal;
}
else
{
var multiplex = new Array();
multiplex['titre']      = titre;
multiplex['longitude']  = longitude;
multiplex['latitude']   = latitude;
multiplex['Rx']         = stripTags(rx);
multiplex['canal']      = canal;
tabEmetteurs.push(multiplex);
}
}
}
}
return tabEmetteurs;
}
function buildArrBrouillage(tab)
{
var region;
var chaine;
var valeur;
var regionTNT;
var multiplex;
var date_prevu;
arrBrouil = new Array();
nbrBrouil = 0;
for( var i=0 ; i<tab.length-1 ; i++ )
{
region          = tab[i+1];
chaine          = tab[i+2];
valeur   		= tab[i+3];
regionTNT		= tab[i+4];
multiplex 		= tab[i+5];
date_prevu 		= tab[i+6];
display 		= tab[i+7];
if (valeur > -99 && valeur < 0)
{
arrBrouil[i] = new Array(region,chaine,valeur,regionTNT,multiplex,date_prevu);
nbrBrouil++;
}
i+=7;
}
}
function cleanArrBrouillage()
{
if (arrBrouil.length > 0)
{
arrBrouil = arrBrouil.sort(sortStringNoCase);
var debut = true;
for(i in arrBrouil)
{
region 	   = arrBrouil[i][0];
chaine 	   = arrBrouil[i][1];
valeur 	   = arrBrouil[i][2];
regionTNT  = arrBrouil[i][3];
multiplex  = arrBrouil[i][4];
date_prevu = arrBrouil[i][5];
suivant    = parseInt(i) + 1;
puissanceBrouillage = (valeur > -6)?0:1; // Puissance Brouillage : 0 -> Légèrement, 1 -> Normalement
if (suivant<nbrBrouil)
{
if (region == arrBrouil[suivant][0] && chaine == arrBrouil[suivant][1])
continue;
}
if (debut)
{
var brouillage = new Array();
brouillage['region'] = region;
brouillage['chaine'] = arrChaine[chaine];
brouillage['date_prevu'] = date_prevu;
brouillage['puissance'] = puissanceBrouillage;
var debug = "";
debug += "Region : " + region + " - Chaine : " + chaine + " - Date prevue : " + date_prevu + " Puissance brouillage : " + puissanceBrouillage + "\n\n";
var tabBrouillages = new Array(brouillage);
debut = false;
}
else
{
var brouillageExistant = -1;
for(var j=0; j<tabBrouillages.length; j++)
{
var debug = "";
debug += "Region : " + region + " - Chaine : " + chaine + " - Date prevue : " + date_prevu + "- Puissance brouillage : " + puissanceBrouillage + "\n\n";
debug += "TabBrouillage -> Region : " + tabBrouillages[j]['region'] + " - Chaine : " + tabBrouillages[j]['chaine'] + " - date prevue : " + tabBrouillages[j]['date_prevu'] + " - Puissance brouillage : " + tabBrouillages[j]['puissance'] + " - Taille du tableau : " + tabBrouillages.length + "\n\n";
debug += "I : " + i + " - J : " + j;
if ((tabBrouillages[j]['region'] == region) && (tabBrouillages[j]['date_prevu'] == date_prevu) && tabBrouillages[j]['puissance'] == puissanceBrouillage)
{
brouillageExistant = j;
break;
}
}
if (brouillageExistant != -1)
{
if (tabBrouillages[j]['chaine'] == '')
tabBrouillages[j]['chaine'] = arrChaine[chaine];
else
tabBrouillages[j]['chaine'] += ", " + arrChaine[chaine];
}
else
{
var brouillage = new Array();
brouillage['region'] = region;
brouillage['chaine'] = arrChaine[chaine];
brouillage['date_prevu'] = date_prevu;
brouillage['puissance'] = puissanceBrouillage;
tabBrouillages.push(brouillage);
}
}
}
}
cleanArrBrouil = tabBrouillages;
}
function haversineFormula(p1, p2)
{
var R = 6371; // Earth's mean radius in km
var dLat  = p2.lat - p1.lat;
var dLong = p2.lon - p1.lon;
var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(p1.lat) * Math.cos(p2.lat) * Math.sin(dLong/2) * Math.sin(dLong/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;
return d;
}
function writeFinCouverture(tab)
{
var content = '';
var region;
var chaine;
var chaine_temp = '';
var date_prevu;
var date_technique;
var display;
var recep_analog = 'non';
for(var i=0; i<tab.length-1 && recep_analog == 'non'; i+=6 )
{
date_prevu = tab[i+3];
chaine = tab[i+2];
if (chaine == 'France 2')
{
var tabtemp = date_prevu.split(":");
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var testDate = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
if (testDate >= tab[i+4])
{
recep_analog = 'fin';
break;
} else
{
recep_analog = 'oui';
break;
}
}
}
region = tab[i+1];
chaine = tab[i+2];
date_prevu = tab[i+3];
date_effective = tab[i+4];
display = tab[i+5];
if(recep_analog == 'oui')
{
var tabtemp = date_prevu.split(":");
content += "<div style=\"padding:3px\">Vous &ecirc;tes en principe couvert par un &eacute;metteur situ&eacute; dans cette zone de r&eacute;ception r&eacute;gionale&nbsp;: <b>"+ region +"</b></div>";
content += "<div style=\"padding:3px\">Date d'arr&ecirc;t de diffusion des cha&icirc;nes analogiques (hors Canal +) de cette zone&nbsp;: <u>"+ tabtemp[0] +"</u></div>";
date_passage_effet = tabtemp[0];
}
else if (recep_analog == 'fin')
{
content += "<div style=\"padding:3px\">La zone <b>" + tab[i+1] + "</b> est pass&eacute;e au tout num&eacute;rique depuis le <u>" + tabtemp[0] + "</u>.</div>";
tout_numerique = true;
}
var recep_canal = 'non';
for(var j=0; j<tab.length-1 && recep_canal == 'non'; j+=6 )
{
date_prevu = tab[j+3];
chaine = tab[j+2];
if (chaine == 'Canal +' && tout_numerique == false)
{
var tabtemp = date_prevu.split(":");
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var testDate = tmpDate.getFullYear() + '-' + tmpMois + '-' + tmpJour;
if (testDate >= tab[j+4])
{
recep_canal = 'fin';
break;
}
else
{
recep_canal = 'oui';
break;
}
}
}
if (recep_canal != 'non')
{
region = tab[j+1];
chaine = tab[j+2];
date_prevu = tab[j+3];
date_effective = tab[j+4];
display = tab[j+5];
var tabtemp = date_prevu.split(":");
if(recep_canal == 'oui')
{
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
content += "<div style=\"padding: 6px 3px\">Concernant Canal +, vous &ecirc;tes en principe couvert par un &eacute;metteur situ&eacute; dans cette zone de r&eacute;ception r&eacute;gionale&nbsp;: <b>"+ region +"</b></div>";
content += "<div style=\"padding:3px\">Date d'arr&ecirc;t de diffusion de Canal + en analogique de cette zone&nbsp;:<br /><u>"+ tabtemp[0] +"</u></div>";
}
else if ( recep_analog != 'fin' && recep_canal == 'fin')
{
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
content += "<div style=\"padding:3px\">La diffusion de Canal+ est pass&eacute;e au tout num&eacute;rique sur la zone <b>"+ region +"</b> depuis le <u>" + tabtemp[0] + "</u>.</div>";
}
}
if (recep_analog == 'non' && recep_canal == 'non')
{
content += "<div style=\"padding:3px\">Vous ne recevez aucune cha&icirc;nes analogiques</div>";
content += "<div style=\"margin: 6px 3px; border-top:1px solid #999999;\"></div>";
}
return content;
}
function getNumChaine(id)
{
var num;
switch(id)
{
case '1': num = '2'; break; // France 2
case '2': num = '3'; break; // France 3
case '3': num = '5'; break; // France 5
case '4': num = '7'; break; // Arte
case '5': num = '13'; break; // LCP / Public Sénat
case '6': num = 'De 20 &agrave; 23'; break; // Chaîne locale ou France Ô ou France 3 bis
case '7': num = '16'; break; // I-Télé
case '8': num = '15'; break; // BFM TV
case '9': num = '8'; break; // Direct 8
case '10': num = '18'; break; // Gulli
case '11': num = '17'; break; // Virgin 17
case '12': num = '14'; break; // France 4
case '13': num = '4'; break; // Canal+ HD
case '14': num = '33'; break; // Canal+ Cinéma
case '15': num = '32'; break; // Canal+ Sport
case '16': num = '35'; break; // Planète
case '17': num = '30'; break; // TPS Star
case '18': num = '6'; break; // M6
case '19': num = '9'; break; // W9
case '20': num = '11'; break; // NT1
case '21': num = '31'; break; // Paris Première
case '22': num = '5'; break; // Arte HD
case '23': num = '1'; break; // TF1 HD
case '24': num = '2'; break; // France 2 HD
case '25': num = '6'; break; // M6 HD
case '26': num = '1'; break; // TF1
case '27': num = '38'; break; // LCI
case '28': num = '39'; break; // Eurosport
case '29': num = '12'; break; // NRJ 12
case '30': num = '10'; break; // TMC
case '31': num = '36'; break; // TF6
default: num = ''; break;
}
return num;
}
function getTheDateOfTheDay()
{
var tmpDate = new Date();
var tmpMois = tmpDate.getMonth() +1;
var tmpJour = tmpDate.getDate();
tmpMois = tmpMois.toString();
if (tmpMois.length < 2)
tmpMois = '0' + tmpMois;
tmpJour = tmpJour.toString();
if (tmpJour.length < 2)
tmpJour = '0' + tmpJour;
var theDateOfTheDay = tmpDate.getFullYear() + tmpMois + tmpJour;
return theDateOfTheDay;
}
function goToTop()
{
jQuery.scrollTo('#NavigationInterne', 12000, {});
return false;
}
function goToMap()
{
jQuery.scrollTo('#mapCanvas', 600, {});
return false;
}
function goToSearchForm()
{
jQuery.scrollTo('#divRecherche', 1000, {});
return false;
}
function recupDetailsEmetteurs(tab)
{
var i=0;
var newTab = new Array();
while (i<tab.length)
{
if (tab[i] == 10)
{
var titre = tab[i+1];
var lat = tab[i+3];
var lng = tab[i+2];
var listeMux = tab[i+4];
var tabMux = new Array();
var tmp = tab[i+4].split(',');
for (var j=0; j<tmp.length; j++)
{
var tmp2 = tmp[j].split(':');
var mux = tmp2[0];
var canal = tmp2[1];
var tabTmp = new Array();
tabTmp['mux'] = mux;
tabTmp['canal'] = canal;
tabMux.push(tabTmp);
}
var tabTmp = new Array();
tabTmp['titre'] = titre;
tabTmp['lat'] = lat;
tabTmp['lng'] = lng;
tabTmp['tabMux'] = tabMux;
newTab.push(tabTmp);
}
i++;
}
return newTab;
}
function recupDetailsEmetteursPassage(tab)
{
var i=0;
var newTab = new Array();
while (i<tab.length)
{
if (tab[i] == 11)
{
var titre = tab[i+1];
var lat = tab[i+3];
var lng = tab[i+2];
var listeMux = tab[i+4];
var tabMux = new Array();
var tmp = tab[i+4].split(',');
for (var j=0; j<tmp.length; j++)
{
var tmp2 = tmp[j].split(':');
var mux = tmp2[0];
var canal = tmp2[1];
var tabTmp = new Array();
tabTmp['mux'] = mux;
tabTmp['canal'] = canal;
tabMux.push(tabTmp);
}
var tabTmp = new Array();
tabTmp['titre'] = titre;
tabTmp['lat'] = lat;
tabTmp['lng'] = lng;
tabTmp['tabMux'] = tabMux;
newTab.push(tabTmp);
}
i++;
}
return newTab;
}
function defineMajPlanTransitoire(tab)
{
if (!tout_numerique && (!date_maj_plan_transitoire || date_maj_plan_transitoire == ''))
{
var tabTmp = tab[1].split(':');
date_maj_plan_transitoire = tabTmp[2];
}
}
function stripTags(str)
{
var re = /<\S[^>]*>/g;
str = str.replace(re,"");
return str;
}
function number_format(number, decimals, dec_point, thousands_sep)
{
number = (number+'').replace(',', '').replace(' ', '');
var n = !isFinite(+number) ? 0 : +number,
prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
s = '',
toFixedFix = function (n, prec)
{
var k = Math.pow(10, prec);
return '' + Math.round(n * k) / k;
};
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
if (s[0].length > 3)
{
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
}
if ((s[1] || '').length < prec)
{
s[1] = s[1] || '';
s[1] += new Array(prec - s[1].length + 1).join('0');
}
return s.join(dec);
}
function trim (myString)
{
return myString.replace(/^\s+/g,'').replace(/\s+$/g,'');
}
function alignDiv_om(){
if (document.getElementById('multiplex_om')) {
var e = document.getElementById('multiplex_om');
var y_top = 550;
var Scroll = GetScrollPage_om();
if(Scroll.top > (y_top - 10) ){
y_ = y_top + (Scroll.top - y_top) + 10 ;
if (getPosY(document.getElementById('footer')) - y_ >= 550)
e.style.top = y_ + "px";
} else {
y_ = y_top + 30 ;
e.style.top = y_ + "px";
}
}
}
function GetScrollPage_om(){
var Left;
var Top;
var DocRef;
if(window.innerWidth){
with(window){
Left   = pageXOffset;
Top    = pageYOffset;
}
} else { // Cas Explorer a part
if(document.documentElement && document.documentElement.clientWidth)
DocRef = document.documentElement;
else
DocRef = document.body;
with( DocRef){
Left   = scrollLeft;
Top    = scrollTop;
}
}
return({top:Top, left:Left});
}
function alignDiv_zfr(){
if (document.getElementById('multiplex_zfr')) {
var e = document.getElementById('multiplex_zfr');
var y_top = 750;
var Scroll = GetScrollPage_zfr();
if(Scroll.top > (y_top - 10) ){
y_ = y_top + (Scroll.top - y_top) + 10 ;
if ((getPosY(document.getElementById('footer')) - y_) >= 600)
e.style.top = y_ + "px";
} else {
e.style.top = y_top + "px";
}
}
}
function getPosY(el) {
for (var lx=0, ly=0;
el != null;
lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent);
return ly;
}
function GetScrollPage_zfr(){
var Left;
var Top;
var DocRef;
if(window.innerWidth){
with(window){
Left   = pageXOffset;
Top    = pageYOffset;
}
} else { // Cas Explorer a part
if(document.documentElement && document.documentElement.clientWidth)
DocRef = document.documentElement;
else
DocRef = document.body;
with( DocRef){
Left   = scrollLeft;
Top    = scrollTop;
}
}
return({top:Top, left:Left});
}
function alignDiv_tvcouv(){
if (document.getElementById('block_couverture')) {
var e = document.getElementById('block_couverture');
var y_top = 410;
var Scroll = GetScrollPage_tvcouv();
if( Scroll.top > (y_top - 10) ) {
y_ = y_top + (Scroll.top - y_top) + 10 ;
if (getPosY(document.getElementById('footer')) - y_ >= 720)
e.style.top = y_ + "px";
} else {
e.style.top = y_top + "px";
}
}
}
function GetScrollPage_tvcouv(){
var Left;
var Top;
var DocRef;
if(window.innerWidth){
with(window){
Left   = pageXOffset;
Top    = pageYOffset;
}
} else { // Cas Explorer a part
if(document.documentElement && document.documentElement.clientWidth)
DocRef = document.documentElement;
else
DocRef = document.body;
with( DocRef){
Left   = scrollLeft;
Top    = scrollTop;
}
}
return({top:Top, left:Left});
}
function alignAllDiv() {
alignDiv_zfr();
alignDiv_om();
alignDiv_tvcouv();
}
window.onscroll = alignAllDiv;
function choixprop_tnt() {
for (var i=0; i<4; i++) {
var choix = document.getElementById('acc_tnt_' + i);
if(document.getElementsByName("mon_champ_tnt[]")[i].checked == true)
{
choix.style.display = "block";
}
else{choix.style.display = "none";}
}
}
function choixprop_adsl() {
for (var i=0; i<5; i++) {
var choix = document.getElementById('acc_adsl_' + i);
if(document.getElementsByName("mon_champ_adsl[]")[i].checked == true)
{
choix.style.display = "block";
}
else{choix.style.display = "none";}
}
}
function choixprop_sc() {
for (var i=0; i<5; i++) {
var choix = document.getElementById('acc_sc_' + i);
if(document.getElementsByName("mon_champ_sc[]")[i].checked == true)
{
choix.style.display = "block";
}
else{choix.style.display = "none";}
}
}
function maskColl(t,i,tag,affiche) {
var aColl = document.getElementsByTagName(tag);
for (var j=0; j<(aColl.length); j++){
if (aColl[j].headers && aColl[j].headers == t + (i + 2)) aColl[j].style.display = affiche;
}
}
function choixprop_dadsl() {
for (var i=0; i<5; i++) {
var monTH = document.getElementsByName('mon_champ_adsl[]')[i];
if(monTH.checked == true){
document.getElementById('t1' + (i + 2)).style.display = "table-cell";
maskColl('t1',i,'TH','table-cell');
maskColl('t1',i,'TD','table-cell');
} else {
document.getElementById('t1' + (i + 2)).style.display = "none";
maskColl('t1',i,'TH','none');
maskColl('t1',i,'TD','none');
}
}
}
function choixprop_dtnt() {
for (var i=0; i<2; i++) {
var monTH = document.getElementsByName('mon_champ_tnt[]')[i];
if(monTH.checked == true){
document.getElementById('t2' + (i + 2)).style.display = "table-cell";
maskColl('t2',i,'TH','table-cell');
maskColl('t2',i,'TD','table-cell');
} else {
document.getElementById('t2' + (i + 2)).style.display = "none";
maskColl('t2',i,'TH','none');
maskColl('t2',i,'TD','none');
}
}
}
function choixprop_dsat() {
for (var i=0; i<4; i++) {
var monTH = document.getElementsByName('mon_champ_sat[]')[i];
if(monTH.checked == true){
document.getElementById('t3' + (i + 2)).style.display = "table-cell";
maskColl('t3',i,'TH','table-cell');
maskColl('t3',i,'TD','table-cell');
} else {
document.getElementById('t3' + (i + 2)).style.display = "none";
maskColl('t3',i,'TH','none');
maskColl('t3',i,'TD','none');
}
}
}
function choixprop_sat__() {
var nb=0;
for (var i=0; i<4; i++) {
var choix = document.getElementById('dist_sat_' + i);
if(document.getElementsByName("mon_champ_sat[]")[i].checked == true)
{
nb = nb + 1;
var choix = document.getElementById('dist_sat_' + i);
choix.style.display = "block";
}
else{choix.style.display = "none";}
}
if (nb>0) {document.getElementById('dist_sat_chaines').style.display = "block";
document.getElementById('table_legende_sat').style.display = "block";}
else {document.getElementById('dist_sat_chaines').style.display = "none";
document.getElementById('table_legende_sat').style.display = "none";}
}
var tooltip2=function(){
var id = 'tt';
var top = 3;
var left = 3;
var maxw = 500;
var speed = 10;
var timer = 20;
var endalpha = 95;
var alpha = 0;
var tt,t,c,b,h;
var ie = document.all ? true : false;
return{
show:function(v,w){
if(tt == null){
tt = document.createElement('div');
tt.setAttribute('id',id);
t = document.createElement('div');
t.setAttribute('id',id + 'top');
c = document.createElement('div');
c.setAttribute('id',id + 'cont');
b = document.createElement('div');
b.setAttribute('id',id + 'bot');
tt.appendChild(t);
tt.appendChild(c);
tt.appendChild(b);
document.body.appendChild(tt);
tt.style.opacity = 0;
tt.style.filter = 'alpha(opacity=0)';
document.onmousemove = this.pos;
}<!-- show:function(v,w) -->
tt.style.display = 'block';
c.innerHTML = v;
tt.style.width = w ? w + 'px' : 'auto';
if(!w && ie){
t.style.display = 'none';
b.style.display = 'none';
tt.style.width = tt.offsetWidth;
t.style.display = 'block';
b.style.display = 'block';
}
if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
h = parseInt(tt.offsetHeight) + top;
clearInterval(tt.timer);
tt.timer = setInterval(function(){tooltip2.fade(1)},timer);
},
pos:function(e){
var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;
tt.style.top = (u - h) + 'px';
tt.style.left = (l + left) + 'px';
},
fade:function(d){
var a = alpha;
if((a != endalpha && d == 1) || (a != 0 && d == -1)){
var i = speed;
if(endalpha - a < speed && d == 1){
i = endalpha - a;
}else if(alpha < speed && d == -1){
i = a;
}
alpha = a + (i * d);
tt.style.opacity = alpha * .01;
tt.style.filter = 'alpha(opacity=' + alpha + ')';
}else{
clearInterval(tt.timer);
if(d == -1){tt.style.display = 'none'}
}
},
hide:function(){
clearInterval(tt.timer);
tt.timer = setInterval(function(){tooltip2.fade(-1)},timer);
}
};
}();
$(document).ready(function()
{
$(".faq-top-level .reponse, .faq-top-level .questions").hide();
$(".faq-top-level h3, .faq-top-level h2").click(function()
{
if ($(this).next().css("display") == "block")
{
$(this).removeClass("open");
}
else
{
$(this).addClass("open");
}
$(this).next().slideToggle();
});
query = document.location.href.split("#")[1];
if($('#faq_redirect').length > 0){
var queryOldSite = window.location.hash.replace('#', '');
$.get('/import/getid?oldid='+queryOldSite, function(data) {
query = data;
scrolltoNodeId(query);
});
}
else{
scrolltoNodeId(query);
}
});
function scrolltoNodeId(query){
if (/[0-9]+/.test(query))
{
$("#node_"+query).addClass("open");
$("#node_"+query).parent().prev().addClass("open");
$("#node_"+query).next().show();
$("#node_"+query).parent().show();
setTimeout(scrollEffetcif(query),300000);
}
}
function scrollEffetcif(query){
$.scrollTo('a[name='+query+']', 800);
}
$(function() {
if ($('a[name=search-result]').length) {
$.scrollTo('a[name=search-result]', 800);
}
$('.show-criteres').click(function() {
$(this).hide();
$(this).parent('li').parent('ul').find('li').css('display', 'block');
});
$('.block-excerpt .link-more').show().find('.show-more').show();
$('.block-excerpt .link-more a').click(function() {
var classLink = 'less';
if ($(this).hasClass('show-less')) {
classLink = 'more';
}
$(this).hide();
$(this).parent('.link-more').next('.synopsis').slideToggle();
$(this).parent('.link-more').find('.show-' + classLink).show();
return false;
});
$('.block-excerpt .synopsis').hide();
});
function afsTreeToggle(element) {
if (("" + element.className).match(/tree-node-closed$/)) {
element.className = ("" + element.className)
.replace(/tree-node-closed$/, 'tree-node-opened');
}
else {
element.className = ("" + element.className)
.replace(/tree-node-opened$/, 'tree-node-closed');
}
}

