//jcarousellite_1.0.1.min.js
(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var b=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var c=$(this),ul=$("ul",c),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var f=$("li",ul),itemLength=f.size(),curr=o.start;c.css("visibility","visible");f.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});c.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var g=o.vertical?height(f):width(f);var h=g*itemLength;var j=g*v;f.css({width:f.width(),height:f.height()});ul.css(sizeCss,h+"px").css(animCss,-(curr*g));c.css(sizeCss,j+"px");if(o.btnPrev)$(o.btnPrev).click(function(){return go(curr-o.scroll)});if(o.btnNext)$(o.btnNext).click(function(){return go(curr+o.scroll)});if(o.btnGo)$.each(o.btnGo,function(i,a){$(a).click(function(){return go(o.circular?o.visible+i:i)})});if(o.mouseWheel&&c.mousewheel)c.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});if(o.auto)setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return f.slice(curr).slice(0,v)};function go(a){if(!b){if(o.beforeStart)o.beforeStart.call(this,vis());if(o.circular){if(a<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*g)+"px");curr=a==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else if(a>=itemLength-v+1){ul.css(animCss,-((v)*g)+"px");curr=a==itemLength-v+1?v+1:v+o.scroll}else curr=a}else{if(a<0||a>itemLength-v)return;else curr=a}b=true;ul.animate(animCss=="left"?{left:-(curr*g)}:{top:-(curr*g)},o.speed,o.easing,function(){if(o.afterEnd)o.afterEnd.call(this,vis());b=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(a,b){return parseInt($.css(a[0],b))||0};function width(a){return a[0].offsetWidth+css(a,'marginLeft')+css(a,'marginRight')};function height(a){return a[0].offsetHeight+css(a,'marginTop')+css(a,'marginBottom')}})(jQuery);
//jquery.mousewheel.min.js
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);
//jquery.newsticker.pack.js
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(1($){$.9.D=$.9.g=1(b){b=b||p;i=1(a){j(a);a.4=$("r",a);a.4.q(":o(0)").l().C();a.5=0;h(a)};h=1(a){a.m=t(1(){f(a)},b)};j=1(a){s(a.m)};8=1(a){a.3=7};d=1(a){a.3=c};f=1(a){e(a.3)6;a.3=7;$(a.4[a.5]).n("k",1(){$(2).l();a.5=++a.5%(a.4.B());$(a.4[a.5]).z("k",1(){a.3=c})})};2.y(1(){e(2.x.w()!="A")6;i(2)}).v("g").u(1(){8(2)},1(){d(2)});6 2}})(E);',41,41,'|function|this|pause|items|currentitem|return|true|pauseTicker|fn|||false|resumeTicker|if|doTick|newsticker|startTicker|initTicker|stopTicker|slow|hide|tickfn|fadeOut|eq|4000|not|li|clearInterval|setInterval|hover|addClass|toLowerCase|nodeName|each|fadeIn|ul|size|end|newsTicker|jQuery'.split('|'),0,{}))
//jquery.cookie.js
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};
//jw Player 5.8
if (typeof jwplayer == "undefined") { var jwplayer = function (b) { if (jwplayer.api) { return jwplayer.api.selectPlayer(b) } }; var $jw = jwplayer; jwplayer.version = "5.8.2011 (Licensed version)"; jwplayer.vid = document.createElement("video"); jwplayer.audio = document.createElement("audio"); jwplayer.source = document.createElement("source"); (function (c) { c.utils = function () { }; c.utils.typeOf = function (a) { var b = typeof a; if (b === "object") { if (a) { if (a instanceof Array) { b = "array" } } else { b = "null" } } return b }; c.utils.extend = function () { var f = c.utils.extend["arguments"]; if (f.length > 1) { for (var a = 1; a < f.length; a++) { for (var b in f[a]) { f[0][b] = f[a][b] } } return f[0] } return null }; c.utils.clone = function (a) { var h; var g = c.utils.clone["arguments"]; if (g.length == 1) { switch (c.utils.typeOf(g[0])) { case "object": h = {}; for (var b in g[0]) { h[b] = c.utils.clone(g[0][b]) } break; case "array": h = []; for (var b in g[0]) { h[b] = c.utils.clone(g[0][b]) } break; default: return g[0]; break } } return h }; c.utils.extension = function (a) { if (!a) { return "" } a = a.substring(a.lastIndexOf("/") + 1, a.length); a = a.split("?")[0]; if (a.lastIndexOf(".") > -1) { return a.substr(a.lastIndexOf(".") + 1, a.length).toLowerCase() } return }; c.utils.html = function (b, a) { b.innerHTML = a }; c.utils.wrap = function (b, a) { if (b.parentNode) { b.parentNode.replaceChild(a, b) } a.appendChild(b) }; c.utils.ajax = function (a, b, k) { var h; if (window.XMLHttpRequest) { h = new XMLHttpRequest() } else { h = new ActiveXObject("Microsoft.XMLHTTP") } h.onreadystatechange = function () { if (h.readyState === 4) { if (h.status === 200) { if (b) { if (!c.utils.exists(h.responseXML)) { try { if (window.DOMParser) { var f = (new DOMParser()).parseFromString(h.responseText, "text/xml"); if (f) { h = c.utils.extend({}, h, { responseXML: f }) } } else { f = new ActiveXObject("Microsoft.XMLDOM"); f.async = "false"; f.loadXML(h.responseText); h = c.utils.extend({}, h, { responseXML: f }) } } catch (e) { if (k) { k(a) } } } b(h) } } else { if (k) { k(a) } } } }; try { h.open("GET", a, true); h.send(null) } catch (j) { if (k) { k(a) } } return h }; c.utils.load = function (b, a, f) { b.onreadystatechange = function () { if (b.readyState === 4) { if (b.status === 200) { if (a) { a() } } else { if (f) { f() } } } } }; c.utils.find = function (a, b) { return a.getElementsByTagName(b) }; c.utils.append = function (b, a) { b.appendChild(a) }; c.utils.isIE = function () { return ((! +"\v1") || (typeof window.ActiveXObject != "undefined")) }; c.utils.userAgentMatch = function (a) { var b = navigator.userAgent.toLowerCase(); return (b.match(a) !== null) }; c.utils.isIOS = function () { return c.utils.userAgentMatch(/iP(hone|ad|od)/i) }; c.utils.isIPad = function () { return c.utils.userAgentMatch(/iPad/i) }; c.utils.isIPod = function () { return c.utils.userAgentMatch(/iP(hone|od)/i) }; c.utils.isAndroid = function () { return c.utils.userAgentMatch(/android/i) }; c.utils.isLegacyAndroid = function () { return c.utils.userAgentMatch(/android 2.[012]/i) }; c.utils.isBlackberry = function () { return c.utils.userAgentMatch(/blackberry/i) }; c.utils.isMobile = function () { return c.utils.isIOS() }; c.utils.getFirstPlaylistItemFromConfig = function (f) { var b = {}; var a; if (f.playlist && f.playlist.length) { a = f.playlist[0] } else { a = f } b.file = a.file; b.levels = a.levels; b.streamer = a.streamer; b.playlistfile = a.playlistfile; b.provider = a.provider; if (!b.provider) { if (b.file && (b.file.toLowerCase().indexOf("youtube.com") > -1 || b.file.toLowerCase().indexOf("youtu.be") > -1)) { b.provider = "youtube" } if (b.streamer && b.streamer.toLowerCase().indexOf("rtmp://") == 0) { b.provider = "rtmp" } if (a.type) { b.provider = a.type.toLowerCase() } } if (b.provider == "audio") { b.provider = "sound" } return b }; c.utils.getOuterHTML = function (b) { if (b.outerHTML) { return b.outerHTML } else { try { return new XMLSerializer().serializeToString(b) } catch (a) { return "" } } }; c.utils.setOuterHTML = function (b, h) { if (b.outerHTML) { b.outerHTML = h } else { var a = document.createElement("div"); a.innerHTML = h; var k = document.createRange(); k.selectNodeContents(a); var j = k.extractContents(); b.parentNode.insertBefore(j, b); b.parentNode.removeChild(b) } }; c.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 (a) { } } return false }; c.utils.getPluginName = function (a) { if (a.lastIndexOf("/") >= 0) { a = a.substring(a.lastIndexOf("/") + 1, a.length) } if (a.lastIndexOf("-") >= 0) { a = a.substring(0, a.lastIndexOf("-")) } if (a.lastIndexOf(".swf") >= 0) { a = a.substring(0, a.lastIndexOf(".swf")) } if (a.lastIndexOf(".js") >= 0) { a = a.substring(0, a.lastIndexOf(".js")) } return a }; c.utils.getPluginVersion = function (a) { if (a.lastIndexOf("-") >= 0) { if (a.lastIndexOf(".js") >= 0) { return a.substring(a.lastIndexOf("-") + 1, a.lastIndexOf(".js")) } else { if (a.lastIndexOf(".swf") >= 0) { return a.substring(a.lastIndexOf("-") + 1, a.lastIndexOf(".swf")) } else { return a.substring(a.lastIndexOf("-") + 1) } } } return "" }; c.utils.getAbsolutePath = function (b, l) { if (!c.utils.exists(l)) { l = document.location.href } if (!c.utils.exists(b)) { return undefined } if (d(b)) { return b } var a = l.substring(0, l.indexOf("://") + 3); var m = l.substring(a.length, l.indexOf("/", a.length + 1)); var p; if (b.indexOf("/") === 0) { p = b.split("/") } else { var o = l.split("?")[0]; o = o.substring(a.length + m.length + 1, o.lastIndexOf("/")); p = o.split("/").concat(b.split("/")) } var q = []; for (var n = 0; n < p.length; n++) { if (!p[n] || !c.utils.exists(p[n]) || p[n] == ".") { continue } else { if (p[n] == "..") { q.pop() } else { q.push(p[n]) } } } return a + m + "/" + q.join("/") }; function d(b) { if (!c.utils.exists(b)) { return } var a = b.indexOf("://"); var f = b.indexOf("?"); return (a > 0 && (f < 0 || (f > a))) } c.utils.pluginPathType = { ABSOLUTE: "ABSOLUTE", RELATIVE: "RELATIVE", CDN: "CDN" }; c.utils.getPluginPathType = function (g) { if (typeof g != "string") { return } g = g.split("?")[0]; var b = g.indexOf("://"); if (b > 0) { return c.utils.pluginPathType.ABSOLUTE } var h = g.indexOf("/"); var a = c.utils.extension(g); if (b < 0 && h < 0 && (!a || !isNaN(a))) { return c.utils.pluginPathType.CDN } return c.utils.pluginPathType.RELATIVE }; c.utils.mapEmpty = function (b) { for (var a in b) { return false } return true }; c.utils.mapLength = function (b) { var f = 0; for (var a in b) { f++ } return f }; c.utils.log = function (a, b) { if (typeof console != "undefined" && typeof console.log != "undefined") { if (b) { console.log(a, b) } else { console.log(a) } } }; c.utils.css = function (j, a, k) { if (c.utils.exists(j)) { for (var h in a) { try { if (typeof a[h] === "undefined") { continue } else { if (typeof a[h] == "number" && !(h == "zIndex" || h == "opacity")) { if (isNaN(a[h])) { continue } if (h.match(/color/i)) { a[h] = "#" + c.utils.strings.pad(a[h].toString(16), 6) } else { a[h] = Math.ceil(a[h]) + "px" } } } j.style[h] = a[h] } catch (b) { } } } }; c.utils.isYouTube = function (a) { return (a.indexOf("youtube.com") > -1 || a.indexOf("youtu.be") > -1) }; c.utils.transform = function (k, l, m, b, a) { if (!c.utils.exists(l)) { l = 1 } if (!c.utils.exists(m)) { m = 1 } if (!c.utils.exists(b)) { b = 0 } if (!c.utils.exists(a)) { a = 0 } if (l == 1 && m == 1 && b == 0 && a == 0) { k.style.webkitTransform = ""; k.style.MozTransform = ""; k.style.OTransform = "" } else { var j = "scale(" + l + "," + m + ") translate(" + b + "px," + a + "px)"; k.style.webkitTransform = j; k.style.MozTransform = j; k.style.OTransform = j } }; c.utils.stretch = function (u, a, b, x, r, w) { if (typeof b == "undefined" || typeof x == "undefined" || typeof r == "undefined" || typeof w == "undefined") { return } var z = b / r; var y = x / w; var s = 0; var t = 0; var A = {}; if (a.parentElement) { a.parentElement.style.overflow = "hidden" } c.utils.transform(a); switch (u.toUpperCase()) { case c.utils.stretching.NONE: A.width = r; A.height = w; A.top = (x - A.height) / 2; A.left = (b - A.width) / 2; break; case c.utils.stretching.UNIFORM: if (z > y) { A.width = r * y; A.height = w * y } else { A.width = r * z; A.height = w * z } A.top = (x - A.height) / 2; A.left = (b - A.width) / 2; break; case c.utils.stretching.FILL: if (z > y) { A.width = r * z; A.height = w * z } else { A.width = r * y; A.height = w * y } A.top = (x - A.height) / 2; A.left = (b - A.width) / 2; break; case c.utils.stretching.EXACTFIT: A.width = r; A.height = w; var q = Math.round((r / 2) * (1 - 1 / z)); var v = Math.round((w / 2) * (1 - 1 / y)); c.utils.transform(a, z, y, q, v); A.top = A.left = 0; break; default: break } c.utils.css(a, A) }; c.utils.stretching = { NONE: "NONE", FILL: "FILL", UNIFORM: "UNIFORM", EXACTFIT: "EXACTFIT" }; c.utils.deepReplaceKeyName = function (a, k, m) { switch (c.utils.typeOf(a)) { case "array": for (var b = 0; b < a.length; b++) { a[b] = c.utils.deepReplaceKeyName(a[b], k, m) } break; case "object": for (var j in a) { var l = j.replace(new RegExp(k, "g"), m); a[l] = c.utils.deepReplaceKeyName(a[j], k, m); if (j != l) { delete a[j] } } break } return a }; c.utils.isInArray = function (a, b) { if (!(a) || !(a instanceof Array)) { return false } for (var f = 0; f < a.length; f++) { if (b === a[f]) { return true } } return false }; c.utils.exists = function (a) { switch (typeof (a)) { case "string": return (a.length > 0); break; case "object": return (a !== null); case "undefined": return false } return true }; c.utils.empty = function (a) { if (typeof a.hasChildNodes == "function") { while (a.hasChildNodes()) { a.removeChild(a.firstChild) } } }; c.utils.parseDimension = function (a) { if (typeof a == "string") { if (a === "") { return 0 } else { if (a.lastIndexOf("%") > -1) { return a } else { return parseInt(a.replace("px", ""), 10) } } } return a }; c.utils.getDimensions = function (a) { if (a && a.style) { return { x: c.utils.parseDimension(a.style.left), y: c.utils.parseDimension(a.style.top), width: c.utils.parseDimension(a.style.width), height: c.utils.parseDimension(a.style.height)} } else { return {} } }; c.utils.getElementWidth = function (a) { if (!a) { return null } else { if (a == document.body) { return c.utils.parentNode(a).clientWidth } else { if (a.clientWidth > 0) { return a.clientWidth } else { if (a.style) { return c.utils.parseDimension(a.style.width) } else { return null } } } } }; c.utils.getElementHeight = function (a) { if (!a) { return null } else { if (a == document.body) { return c.utils.parentNode(a).clientHeight } else { if (a.clientHeight > 0) { return a.clientHeight } else { if (a.style) { return c.utils.parseDimension(a.style.height) } else { return null } } } } }; c.utils.timeFormat = function (a) { str = "00:00"; if (a > 0) { str = Math.floor(a / 60) < 10 ? "0" + Math.floor(a / 60) + ":" : Math.floor(a / 60) + ":"; str += Math.floor(a % 60) < 10 ? "0" + Math.floor(a % 60) : Math.floor(a % 60) } return str }; c.utils.useNativeFullscreen = function () { return (navigator && navigator.vendor && navigator.vendor.indexOf("Apple") == 0) }; c.utils.parentNode = function (a) { if (!a) { return docuemnt.body } else { if (a.parentNode) { return a.parentNode } else { if (a.parentElement) { return a.parentElement } else { return a } } } }; c.utils.getBoundingClientRect = function (a) { if (typeof a.getBoundingClientRect == "function") { return a.getBoundingClientRect() } else { return { left: a.offsetLeft + document.body.scrollLeft, top: a.offsetTop + document.body.scrollTop, width: a.offsetWidth, height: a.offsetHeight} } } })(jwplayer); (function (b) { b.events = function () { }; b.events.COMPLETE = "COMPLETE"; b.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 (d) { var c = {}; d.utils.animations = function () { }; d.utils.animations.transform = function (b, a) { b.style.webkitTransform = a; b.style.MozTransform = a; b.style.OTransform = a; b.style.msTransform = a }; d.utils.animations.transformOrigin = function (b, a) { b.style.webkitTransformOrigin = a; b.style.MozTransformOrigin = a; b.style.OTransformOrigin = a; b.style.msTransformOrigin = a }; d.utils.animations.rotate = function (b, a) { d.utils.animations.transform(b, ["rotate(", a, "deg)"].join("")) }; d.utils.cancelAnimation = function (a) { delete c[a.id] }; d.utils.fadeTo = function (a, r, s, o, p, t) { if (c[a.id] != t && d.utils.exists(t)) { return } if (a.style.opacity == r) { return } var u = new Date().getTime(); if (t > u) { setTimeout(function () { d.utils.fadeTo(a, r, s, o, 0, t) }, t - u) } if (a.style.display == "none") { a.style.display = "block" } if (!d.utils.exists(o)) { o = a.style.opacity === "" ? 1 : a.style.opacity } if (a.style.opacity == r && a.style.opacity !== "" && d.utils.exists(t)) { if (r === 0) { a.style.display = "none" } return } if (!d.utils.exists(t)) { t = u; c[a.id] = t } if (!d.utils.exists(p)) { p = 0 } var n = (s > 0) ? ((u - t) / (s * 1000)) : 0; n = n > 1 ? 1 : n; var b = r - o; var q = o + (n * b); if (q > 1) { q = 1 } else { if (q < 0) { q = 0 } } a.style.opacity = q; if (p > 0) { c[a.id] = t + p * 1000; d.utils.fadeTo(a, r, s, o, 0, c[a.id]); return } setTimeout(function () { d.utils.fadeTo(a, r, s, o, 0, t) }, 10) } })(jwplayer); (function (b) { b.utils.arrays = function () { }; b.utils.arrays.indexOf = function (f, e) { for (var a = 0; a < f.length; a++) { if (f[a] == e) { return a } } return -1 }; b.utils.arrays.remove = function (f, e) { var a = b.utils.arrays.indexOf(f, e); if (a > -1) { f.splice(a, 1) } } })(jwplayer); (function (b) { b.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 (o) { o.utils.mediaparser = function () { }; var m = { 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 n = {}; o.utils.mediaparser.parseMedia = function (a) { return p(a) }; function q(a, b) { if (!o.utils.exists(b)) { b = m[a] } else { o.utils.extend(b, m[a]) } return b } function p(f, d) { if (n[f.tagName.toLowerCase()] && !o.utils.exists(d)) { return n[f.tagName.toLowerCase()](f) } else { d = q("element", d); var e = {}; for (var c in d) { if (c != "length") { var a = f.getAttribute(c); if (o.utils.exists(a)) { e[d[c]] = a } } } var b = f.style["#background-color"]; if (b && !(b == "transparent" || b == "rgba(0, 0, 0, 0)")) { e.screencolor = b } return e } } function l(f, c) { c = q("media", c); var b = []; var d = o.utils.selectors("source", f); for (var a in d) { if (!isNaN(a)) { b.push(k(d[a])) } } var e = p(f, c); if (o.utils.exists(e.file)) { b[0] = { file: e.file} } e.levels = b; return e } function k(a, b) { b = q("source", b); var c = p(a, b); c.width = c.width ? c.width : 0; c.bitrate = c.bitrate ? c.bitrate : 0; return c } function j(a, b) { b = q("video", b); var c = l(a, b); return c } n.media = l; n.audio = l; n.source = k; n.video = j })(jwplayer); (function (b) { b.utils.loaderstatus = { NEW: "NEW", LOADING: "LOADING", ERROR: "ERROR", COMPLETE: "COMPLETE" }; b.utils.scriptloader = function (f) { var e = b.utils.loaderstatus.NEW; var a = new b.events.eventdispatcher(); b.utils.extend(this, a); this.load = function () { if (e == b.utils.loaderstatus.NEW) { e = b.utils.loaderstatus.LOADING; var c = document.createElement("script"); c.onload = function (d) { e = b.utils.loaderstatus.COMPLETE; a.sendEvent(b.events.COMPLETE) }; c.onerror = function (d) { e = b.utils.loaderstatus.ERROR; a.sendEvent(b.events.ERROR) }; c.onreadystatechange = function () { if (c.readyState == "loaded" || c.readyState == "complete") { e = b.utils.loaderstatus.COMPLETE; a.sendEvent(b.events.COMPLETE) } }; document.getElementsByTagName("head")[0].appendChild(c); c.src = f } }; this.getStatus = function () { return e } } })(jwplayer); (function (b) { b.utils.selectors = function (a, f) { if (!b.utils.exists(f)) { f = document } a = b.utils.strings.trim(a); var h = a.charAt(0); if (h == "#") { return f.getElementById(a.substr(1)) } else { if (h == ".") { if (f.getElementsByClassName) { return f.getElementsByClassName(a.substr(1)) } else { return b.utils.selectors.getElementsByTagAndClass("*", a.substr(1)) } } else { if (a.indexOf(".") > 0) { var g = a.split("."); return b.utils.selectors.getElementsByTagAndClass(g[0], g[1]) } else { return f.getElementsByTagName(a) } } } return null }; b.utils.selectors.getElementsByTagAndClass = function (o, l, m) { var k = []; if (!b.utils.exists(m)) { m = document } var n = m.getElementsByTagName(o); for (var p = 0; p < n.length; p++) { if (b.utils.exists(n[p].className)) { var q = n[p].className.split(" "); for (var a = 0; a < q.length; a++) { if (q[a] == l) { k.push(n[p]) } } } } return k } })(jwplayer); (function (b) { b.utils.strings = function () { }; b.utils.strings.trim = function (a) { return a.replace(/^\s*/, "").replace(/\s*$/, "") }; b.utils.strings.pad = function (f, e, a) { if (!a) { a = "0" } while (f.length < e) { f = a + f } return f }; b.utils.strings.serialize = function (a) { if (a == null) { return null } else { if (a == "true") { return true } else { if (a == "false") { return false } else { if (isNaN(Number(a)) || a.length > 5 || a.length == 0) { return a } else { return Number(a) } } } } }; b.utils.strings.seconds = function (e) { e = e.replace(",", "."); var a = e.split(":"); var f = 0; if (e.substr(-1) == "s") { f = Number(e.substr(0, e.length - 1)) } else { if (e.substr(-1) == "m") { f = Number(e.substr(0, e.length - 1)) * 60 } else { if (e.substr(-1) == "h") { f = Number(e.substr(0, e.length - 1)) * 3600 } else { if (a.length > 1) { f = Number(a[a.length - 1]); f += Number(a[a.length - 2]) * 60; if (a.length == 3) { f += Number(a[a.length - 3]) * 3600 } } else { f = Number(e) } } } } return f }; b.utils.strings.xmlAttribute = function (a, f) { for (var e = 0; e < a.attributes.length; e++) { if (a.attributes[e].name && a.attributes[e].name.toLowerCase() == f.toLowerCase()) { return a.attributes[e].value.toString() } } return "" }; b.utils.strings.jsonToString = function (l) { var j = j || {}; if (j && j.stringify) { return j.stringify(l) } var o = typeof (l); if (o != "object" || l === null) { if (o == "string") { l = '"' + l.replace(/"/g, '\\"') + '"' } else { return String(l) } } else { var k = [], a = (l && l.constructor == Array); for (var n in l) { var m = l[n]; switch (typeof (m)) { case "string": m = '"' + m.replace(/"/g, '\\"') + '"'; break; case "object": if (b.utils.exists(m)) { m = b.utils.strings.jsonToString(m) } break } if (a) { if (typeof (m) != "function") { k.push(String(m)) } } else { if (typeof (m) != "function") { k.push('"' + n + '":' + String(m)) } } } if (a) { return "[" + String(k) + "]" } else { return "{" + String(k) + "}" } } } })(jwplayer); (function (k) { var j = new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/); k.utils.typechecker = function (a, b) { b = !k.utils.exists(b) ? f(a) : b; return h(a, b) }; function f(b) { var a = ["true", "false", "t", "f"]; if (a.toString().indexOf(b.toLowerCase().replace(" ", "")) >= 0) { return "boolean" } else { if (j.test(b)) { return "color" } else { if (!isNaN(parseInt(b, 10)) && parseInt(b, 10).toString().length == b.length) { return "integer" } else { if (!isNaN(parseFloat(b)) && parseFloat(b).toString().length == b.length) { return "float" } } } } return "string" } function h(a, b) { if (!k.utils.exists(b)) { return a } switch (b) { case "color": if (a.length > 0) { return g(a) } return null; case "integer": return parseInt(a, 10); case "float": return parseFloat(a); case "boolean": if (a.toLowerCase() == "true") { return true } else { if (a == "1") { return true } } return false } return a } function g(a) { switch (a.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: a = a.replace(/(#|0x)?([0-9A-F]{3,6})$/gi, "$2"); if (a.length == 3) { a = a.charAt(0) + a.charAt(0) + a.charAt(1) + a.charAt(1) + a.charAt(2) + a.charAt(2) } return parseInt(a, 16) } return parseInt("000000", 16) } })(jwplayer); (function (b) { b.utils.parsers = function () { }; b.utils.parsers.localName = function (a) { if (!a) { return "" } else { if (a.localName) { return a.localName } else { if (a.baseName) { return a.baseName } else { return "" } } } }; b.utils.parsers.textContent = function (a) { if (!a) { return "" } else { if (a.textContent) { return a.textContent } else { if (a.text) { return a.text } else { return "" } } } } })(jwplayer); (function (b) { b.utils.parsers.jwparser = function () { }; b.utils.parsers.jwparser.PREFIX = "jwplayer"; b.utils.parsers.jwparser.parseEntry = function (f, e) { for (var a = 0; a < f.childNodes.length; a++) { if (f.childNodes[a].prefix == b.utils.parsers.jwparser.PREFIX) { e[b.utils.parsers.localName(f.childNodes[a])] = b.utils.strings.serialize(b.utils.parsers.textContent(f.childNodes[a])) } if (!e.file && String(e.link).toLowerCase().indexOf("youtube") > -1) { e.file = e.link } } return e }; b.utils.parsers.jwparser.getProvider = function (d) { if (d.type) { return d.type } else { if (d.file.indexOf("youtube.com/w") > -1 || d.file.indexOf("youtube.com/v") > -1 || d.file.indexOf("youtu.be/") > -1) { return "youtube" } else { if (d.streamer && d.streamer.indexOf("rtmp") == 0) { return "rtmp" } else { if (d.streamer && d.streamer.indexOf("http") == 0) { return "http" } else { var a = b.utils.strings.extension(d.file); if (extensions.hasOwnProperty(a)) { return extensions[a] } } } } } return "" } })(jwplayer); (function (b) { b.utils.parsers.mediaparser = function () { }; b.utils.parsers.mediaparser.PREFIX = "media"; b.utils.parsers.mediaparser.parseGroup = function (j, g) { var h = false; for (var k = 0; k < j.childNodes.length; k++) { if (j.childNodes[k].prefix == b.utils.parsers.mediaparser.PREFIX) { if (!b.utils.parsers.localName(j.childNodes[k])) { continue } switch (b.utils.parsers.localName(j.childNodes[k]).toLowerCase()) { case "content": if (!h) { g.file = b.utils.strings.xmlAttribute(j.childNodes[k], "url") } if (b.utils.strings.xmlAttribute(j.childNodes[k], "duration")) { g.duration = b.utils.strings.seconds(b.utils.strings.xmlAttribute(j.childNodes[k], "duration")) } if (b.utils.strings.xmlAttribute(j.childNodes[k], "start")) { g.start = b.utils.strings.seconds(b.utils.strings.xmlAttribute(j.childNodes[k], "start")) } if (j.childNodes[k].childNodes && j.childNodes[k].childNodes.length > 0) { g = b.utils.parsers.mediaparser.parseGroup(j.childNodes[k], g) } if (b.utils.strings.xmlAttribute(j.childNodes[k], "width") || b.utils.strings.xmlAttribute(j.childNodes[k], "bitrate") || b.utils.strings.xmlAttribute(j.childNodes[k], "url")) { if (!g.levels) { g.levels = [] } g.levels.push({ width: b.utils.strings.xmlAttribute(j.childNodes[k], "width"), bitrate: b.utils.strings.xmlAttribute(j.childNodes[k], "bitrate"), file: b.utils.strings.xmlAttribute(j.childNodes[k], "url") }) } break; case "title": g.title = b.utils.parsers.textContent(j.childNodes[k]); break; case "description": g.description = b.utils.parsers.textContent(j.childNodes[k]); break; case "keywords": g.tags = b.utils.parsers.textContent(j.childNodes[k]); break; case "thumbnail": g.image = b.utils.strings.xmlAttribute(j.childNodes[k], "url"); break; case "credit": g.author = b.utils.parsers.textContent(j.childNodes[k]); break; case "player": var a = j.childNodes[k].url; if (a.indexOf("youtube.com") >= 0 || a.indexOf("youtu.be") >= 0) { h = true; g.file = b.utils.strings.xmlAttribute(j.childNodes[k], "url") } break; case "group": b.utils.parsers.mediaparser.parseGroup(j.childNodes[k], g); break } } } return g } })(jwplayer); (function (c) { c.utils.parsers.rssparser = function () { }; c.utils.parsers.rssparser.parse = function (a) { var h = []; for (var b = 0; b < a.childNodes.length; b++) { if (c.utils.parsers.localName(a.childNodes[b]).toLowerCase() == "channel") { for (var g = 0; g < a.childNodes[b].childNodes.length; g++) { if (c.utils.parsers.localName(a.childNodes[b].childNodes[g]).toLowerCase() == "item") { h.push(d(a.childNodes[b].childNodes[g])) } } } } return h }; function d(b) { var a = {}; for (var f = 0; f < b.childNodes.length; f++) { if (!c.utils.parsers.localName(b.childNodes[f])) { continue } switch (c.utils.parsers.localName(b.childNodes[f]).toLowerCase()) { case "enclosure": a.file = c.utils.strings.xmlAttribute(b.childNodes[f], "url"); break; case "title": a.title = c.utils.parsers.textContent(b.childNodes[f]); break; case "pubdate": a.date = c.utils.parsers.textContent(b.childNodes[f]); break; case "description": a.description = c.utils.parsers.textContent(b.childNodes[f]); break; case "link": a.link = c.utils.parsers.textContent(b.childNodes[f]); break; case "category": if (a.tags) { a.tags += c.utils.parsers.textContent(b.childNodes[f]) } else { a.tags = c.utils.parsers.textContent(b.childNodes[f]) } break } } a = c.utils.parsers.mediaparser.parseGroup(b, a); a = c.utils.parsers.jwparser.parseEntry(b, a); return new c.html5.playlistitem(a) } })(jwplayer); (function (e) { var f = {}; var d = {}; e.plugins = function () { }; e.plugins.loadPlugins = function (a, b) { d[a] = new e.plugins.pluginloader(new e.plugins.model(f), b); return d[a] }; e.plugins.registerPlugin = function (a, c, j) { var k = e.utils.getPluginName(a); if (f[k]) { f[k].registerPlugin(a, c, j) } else { e.utils.log("A plugin (" + a + ") was registered with the player that was not loaded. Please check your configuration."); for (var b in d) { d[b].pluginFailed() } } } })(jwplayer); (function (b) { b.plugins.model = function (a) { this.addPlugin = function (f) { var e = b.utils.getPluginName(f); if (!a[e]) { a[e] = new b.plugins.plugin(f) } return a[e] } } })(jwplayer); (function (b) { b.plugins.pluginmodes = { FLASH: "FLASH", JAVASCRIPT: "JAVASCRIPT", HYBRID: "HYBRID" }; b.plugins.plugin = function (u) { var s = "http://lp.longtailvideo.com"; var n = b.utils.loaderstatus.NEW; var m; var o; var a; var t = new b.events.eventdispatcher(); b.utils.extend(this, t); function r() { switch (b.utils.getPluginPathType(u)) { case b.utils.pluginPathType.ABSOLUTE: return u; case b.utils.pluginPathType.RELATIVE: return b.utils.getAbsolutePath(u, window.location.href); case b.utils.pluginPathType.CDN: var d = b.utils.getPluginName(u); var e = b.utils.getPluginVersion(u); var c = (window.location.href.indexOf("https://") == 0) ? s.replace("http://", "https://secure") : s; return c + "/" + b.version.split(".")[0] + "/" + d + "/" + d + (e !== "" ? ("-" + e) : "") + ".js" } } function p(c) { a = setTimeout(function () { n = b.utils.loaderstatus.COMPLETE; t.sendEvent(b.events.COMPLETE) }, 1000) } function q(c) { n = b.utils.loaderstatus.ERROR; t.sendEvent(b.events.ERROR) } this.load = function () { if (n == b.utils.loaderstatus.NEW) { if (u.lastIndexOf(".swf") > 0) { m = u; n = b.utils.loaderstatus.COMPLETE; t.sendEvent(b.events.COMPLETE); return } n = b.utils.loaderstatus.LOADING; var c = new b.utils.scriptloader(r()); c.addEventListener(b.events.COMPLETE, p); c.addEventListener(b.events.ERROR, q); c.load() } }; this.registerPlugin = function (d, e, c) { if (a) { clearTimeout(a); a = undefined } if (e && c) { m = c; o = e } else { if (typeof e == "string") { m = e } else { if (typeof e == "function") { o = e } else { if (!e && !c) { m = d } } } } n = b.utils.loaderstatus.COMPLETE; t.sendEvent(b.events.COMPLETE) }; this.getStatus = function () { return n }; this.getPluginName = function () { return b.utils.getPluginName(u) }; this.getFlashPath = function () { if (m) { switch (b.utils.getPluginPathType(m)) { case b.utils.pluginPathType.ABSOLUTE: return m; case b.utils.pluginPathType.RELATIVE: if (u.lastIndexOf(".swf") > 0) { return b.utils.getAbsolutePath(m, window.location.href) } return b.utils.getAbsolutePath(m, r()); case b.utils.pluginPathType.CDN: if (m.indexOf("-") > -1) { return m + "h" } return m + "-h" } } return null }; this.getJS = function () { return o }; this.getPluginmode = function () { if (typeof m != "undefined" && typeof o != "undefined") { return b.plugins.pluginmodes.HYBRID } else { if (typeof m != "undefined") { return b.plugins.pluginmodes.FLASH } else { if (typeof o != "undefined") { return b.plugins.pluginmodes.JAVASCRIPT } } } }; this.getNewInstance = function (e, c, d) { return new o(e, c, d) }; this.getURL = function () { return u } } })(jwplayer); (function (b) { b.plugins.pluginloader = function (m, p) { var n = {}; var a = b.utils.loaderstatus.NEW; var q = false; var s = false; var r = new b.events.eventdispatcher(); b.utils.extend(this, r); function o() { if (!s) { s = true; a = b.utils.loaderstatus.COMPLETE; r.sendEvent(b.events.COMPLETE) } } function l() { if (!s) { var c = 0; for (plugin in n) { var d = n[plugin].getStatus(); if (d == b.utils.loaderstatus.LOADING || d == b.utils.loaderstatus.NEW) { c++ } } if (c == 0) { o() } } } this.setupPlugins = function (k, d, e) { var c = { length: 0, plugins: {} }; var h = { length: 0, plugins: {} }; for (var j in n) { var g = n[j].getPluginName(); if (n[j].getFlashPath()) { c.plugins[n[j].getFlashPath()] = d.plugins[j]; c.plugins[n[j].getFlashPath()].pluginmode = n[j].getPluginmode(); c.length++ } if (n[j].getJS()) { var f = document.createElement("div"); f.id = k.id + "_" + g; f.style.position = "absolute"; f.style.zIndex = h.length + 10; h.plugins[g] = n[j].getNewInstance(k, d.plugins[j], f); h.length++; if (typeof h.plugins[g].resize != "undefined") { k.onReady(e(h.plugins[g], f, true)); k.onResize(e(h.plugins[g], f)) } } } k.plugins = h.plugins; return c }; this.load = function () { a = b.utils.loaderstatus.LOADING; q = true; for (var c in p) { if (b.utils.exists(c)) { n[c] = m.addPlugin(c); n[c].addEventListener(b.events.COMPLETE, l); n[c].addEventListener(b.events.ERROR, l) } } for (c in n) { n[c].load() } q = false; l() }; this.pluginFailed = function () { o() }; this.getStatus = function () { return a } } })(jwplayer); (function (c) { var d = []; c.api = function (E) { this.container = E; this.id = E.id; var v = {}; var G = {}; var b = {}; var F = []; var A = undefined; var x = false; var z = []; var t = c.utils.getOuterHTML(E); var a = {}; var y = {}; this.getBuffer = function () { return this.callInternal("jwGetBuffer") }; this.getContainer = function () { return this.container }; function D(e, f) { return function (k, j, h, g) { if (e.renderingMode == "flash" || e.renderingMode == "html5") { var l; if (j) { y[k] = j; l = "jwplayer('" + e.id + "').callback('" + k + "')" } else { if (!j && y[k]) { delete y[k] } } A.jwDockSetButton(k, l, h, g) } return f } } this.getPlugin = function (g) { var e = this; var f = {}; if (g == "dock") { return c.utils.extend(f, { setButton: D(e, f), show: function () { e.callInternal("jwDockShow"); return f }, hide: function () { e.callInternal("jwDockHide"); return f }, onShow: function (h) { e.componentListener("dock", c.api.events.JWPLAYER_COMPONENT_SHOW, h); return f }, onHide: function (h) { e.componentListener("dock", c.api.events.JWPLAYER_COMPONENT_HIDE, h); return f } }) } else { if (g == "controlbar") { return c.utils.extend(f, { show: function () { e.callInternal("jwControlbarShow"); return f }, hide: function () { e.callInternal("jwControlbarHide"); return f }, onShow: function (h) { e.componentListener("controlbar", c.api.events.JWPLAYER_COMPONENT_SHOW, h); return f }, onHide: function (h) { e.componentListener("controlbar", c.api.events.JWPLAYER_COMPONENT_HIDE, h); return f } }) } else { if (g == "display") { return c.utils.extend(f, { show: function () { e.callInternal("jwDisplayShow"); return f }, hide: function () { e.callInternal("jwDisplayHide"); return f }, onShow: function (h) { e.componentListener("display", c.api.events.JWPLAYER_COMPONENT_SHOW, h); return f }, onHide: function (h) { e.componentListener("display", c.api.events.JWPLAYER_COMPONENT_HIDE, h); return f } }) } else { return this.plugins[g] } } } }; this.callback = function (e) { if (y[e]) { return y[e]() } }; 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 e = this.callInternal("jwGetPlaylist"); if (this.renderingMode == "flash") { c.utils.deepReplaceKeyName(e, "__dot__", ".") } for (var f = 0; f < e.length; f++) { if (!c.utils.exists(e[f].index)) { e[f].index = f } } return e }; this.getPlaylistItem = function (e) { if (!c.utils.exists(e)) { e = this.getCurrentItem() } return this.getPlaylist()[e] }; 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 (e) { if (!c.utils.exists(e)) { this.callInternal("jwSetFullscreen", !this.callInternal("jwGetFullscreen")) } else { this.callInternal("jwSetFullscreen", e) } return this }; this.setMute = function (e) { if (!c.utils.exists(e)) { this.callInternal("jwSetMute", !this.callInternal("jwGetMute")) } else { this.callInternal("jwSetMute", e) } return this }; this.lock = function () { return this }; this.unlock = function () { return this }; this.load = function (e) { this.callInternal("jwLoad", e); return this }; this.playlistItem = function (e) { this.callInternal("jwPlaylistItem", e); return this }; this.playlistPrev = function () { this.callInternal("jwPlaylistPrev"); return this }; this.playlistNext = function () { this.callInternal("jwPlaylistNext"); return this }; this.resize = function (f, g) { if (this.renderingMode == "html5") { A.jwResize(f, g) } else { this.container.width = f; this.container.height = g; var e = document.getElementById(this.id + "_wrapper"); if (e) { e.style.width = f + "px"; e.style.height = g + "px" } } return this }; this.play = function (e) { if (typeof e == "undefined") { e = this.getState(); if (e == c.api.events.state.PLAYING || e == c.api.events.state.BUFFERING) { this.callInternal("jwPause") } else { this.callInternal("jwPlay") } } else { this.callInternal("jwPlay", e) } return this }; this.pause = function (e) { if (typeof e == "undefined") { e = this.getState(); if (e == c.api.events.state.PLAYING || e == c.api.events.state.BUFFERING) { this.callInternal("jwPause") } else { this.callInternal("jwPlay") } } else { this.callInternal("jwPause", e) } return this }; this.stop = function () { this.callInternal("jwStop"); return this }; this.seek = function (e) { this.callInternal("jwSeek", e); return this }; this.setVolume = function (e) { this.callInternal("jwSetVolume", e); return this }; this.onBufferChange = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_BUFFER, e) }; this.onBufferFull = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_BUFFER_FULL, e) }; this.onError = function (e) { return this.eventListener(c.api.events.JWPLAYER_ERROR, e) }; this.onFullscreen = function (e) { return this.eventListener(c.api.events.JWPLAYER_FULLSCREEN, e) }; this.onMeta = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_META, e) }; this.onMute = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_MUTE, e) }; this.onPlaylist = function (e) { return this.eventListener(c.api.events.JWPLAYER_PLAYLIST_LOADED, e) }; this.onPlaylistItem = function (e) { return this.eventListener(c.api.events.JWPLAYER_PLAYLIST_ITEM, e) }; this.onReady = function (e) { return this.eventListener(c.api.events.API_READY, e) }; this.onResize = function (e) { return this.eventListener(c.api.events.JWPLAYER_RESIZE, e) }; this.onComplete = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_COMPLETE, e) }; this.onSeek = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_SEEK, e) }; this.onTime = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_TIME, e) }; this.onVolume = function (e) { return this.eventListener(c.api.events.JWPLAYER_MEDIA_VOLUME, e) }; this.onBuffer = function (e) { return this.stateListener(c.api.events.state.BUFFERING, e) }; this.onPause = function (e) { return this.stateListener(c.api.events.state.PAUSED, e) }; this.onPlay = function (e) { return this.stateListener(c.api.events.state.PLAYING, e) }; this.onIdle = function (e) { return this.stateListener(c.api.events.state.IDLE, e) }; this.remove = function () { v = {}; z = []; if (c.utils.getOuterHTML(this.container) != t) { c.api.destroyPlayer(this.id, t) } }; this.setup = function (f) { if (c.embed) { var g = this.id; this.remove(); var e = c(g); e.config = f; return new c.embed(e) } return this }; this.registerPlugin = function (e, f, g) { c.plugins.registerPlugin(e, f, g) }; this.setPlayer = function (f, e) { A = f; this.renderingMode = e }; this.stateListener = function (f, e) { if (!G[f]) { G[f] = []; this.eventListener(c.api.events.JWPLAYER_PLAYER_STATE, B(f)) } G[f].push(e); return this }; this.detachMedia = function () { if (this.renderingMode == "html5") { return this.callInternal("jwDetachMedia") } }; this.attachMedia = function () { if (this.renderingMode == "html5") { return this.callInternal("jwAttachMedia") } }; function B(e) { return function (h) { var j = h.newstate, f = h.oldstate; if (j == e) { var g = G[j]; if (g) { for (var k = 0; k < g.length; k++) { if (typeof g[k] == "function") { g[k].call(this, { oldstate: f, newstate: j }) } } } } } } this.componentListener = function (g, f, e) { if (!b[g]) { b[g] = {} } if (!b[g][f]) { b[g][f] = []; this.eventListener(f, w(g, f)) } b[g][f].push(e); return this }; function w(f, e) { return function (h) { if (f == h.component) { var j = b[f][e]; if (j) { for (var g = 0; g < j.length; g++) { if (typeof j[g] == "function") { j[g].call(this, h) } } } } } } this.addInternalListener = function (f, e) { f.jwAddEventListener(e, 'function(dat) { jwplayer("' + this.id + '").dispatchEvent("' + e + '", dat); }') }; this.eventListener = function (f, e) { if (!v[f]) { v[f] = []; if (A && x) { this.addInternalListener(A, f) } } v[f].push(e); return this }; this.dispatchEvent = function (e) { if (v[e]) { var f = C(e, arguments[1]); for (var g = 0; g < v[e].length; g++) { if (typeof v[e][g] == "function") { v[e][g].call(this, f) } } } }; function C(g, j) { var e = c.utils.extend({}, j); if (g == c.api.events.JWPLAYER_FULLSCREEN && !e.fullscreen) { e.fullscreen = e.message == "true" ? true : false; delete e.message } else { if (typeof e.data == "object") { e = c.utils.extend(e, e.data); delete e.data } } var h = ["position", "duration", "offset"]; for (var f in h) { if (e[h[f]]) { e[h[f]] = Math.round(e[h[f]] * 1000) / 1000 } } return e } this.callInternal = function (e, f) { if (x) { if (typeof A != "undefined" && typeof A[e] == "function") { if (c.utils.exists(f)) { return (A[e])(f) } else { return (A[e])() } } return null } else { z.push({ method: e, parameters: f }) } }; this.playerReady = function (e) { x = true; if (!A) { this.setPlayer(document.getElementById(e.id)) } this.container = document.getElementById(this.id); for (var g in v) { this.addInternalListener(A, g) } this.eventListener(c.api.events.JWPLAYER_PLAYLIST_ITEM, function (h) { a = {} }); this.eventListener(c.api.events.JWPLAYER_MEDIA_META, function (h) { c.utils.extend(a, h.metadata) }); this.dispatchEvent(c.api.events.API_READY); while (z.length > 0) { var f = z.shift(); this.callInternal(f.method, f.parameters) } }; this.getItemMeta = function () { return a }; this.getCurrentItem = function () { return this.callInternal("jwGetPlaylistIndex") }; function u(g, e, f) { var j = []; if (!e) { e = 0 } if (!f) { f = g.length - 1 } for (var h = e; h <= f; h++) { j.push(g[h]) } return j } return this }; c.api.selectPlayer = function (b) { var f; if (!c.utils.exists(b)) { b = 0 } if (b.nodeType) { f = b } else { if (typeof b == "string") { f = document.getElementById(b) } } if (f) { var a = c.api.playerById(f.id); if (a) { return a } else { return c.api.addPlayer(new c.api(f)) } } else { if (typeof b == "number") { return c.getPlayers()[b] } } return null }; c.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" }; c.api.events.state = { BUFFERING: "BUFFERING", IDLE: "IDLE", PAUSED: "PAUSED", PLAYING: "PLAYING" }; c.api.playerById = function (a) { for (var b = 0; b < d.length; b++) { if (d[b].id == a) { return d[b] } } return null }; c.api.addPlayer = function (b) { for (var a = 0; a < d.length; a++) { if (d[a] == b) { return b } } d.push(b); return b }; c.api.destroyPlayer = function (k, n) { var l = -1; for (var a = 0; a < d.length; a++) { if (d[a].id == k) { l = a; continue } } if (l >= 0) { var o = document.getElementById(d[l].id); if (document.getElementById(d[l].id + "_wrapper")) { o = document.getElementById(d[l].id + "_wrapper") } if (o) { if (n) { c.utils.setOuterHTML(o, n) } else { var b = document.createElement("div"); var m = o.id; if (o.id.indexOf("_wrapper") == o.id.length - 8) { newID = o.id.substring(0, o.id.length - 8) } b.setAttribute("id", m); o.parentNode.replaceChild(b, o) } } d.splice(l, 1) } return null }; c.getPlayers = function () { return d.slice(0) } })(jwplayer); var _userPlayerReady = (typeof playerReady == "function") ? playerReady : undefined; playerReady = function (c) { var d = jwplayer.api.playerById(c.id); if (d) { d.playerReady(c) } else { jwplayer.api.selectPlayer(c.id).playerReady(c) } if (_userPlayerReady) { _userPlayerReady.call(this, c) } }; (function (e) { var f = e.utils; e.embed = function (c) { var a = { width: 400, height: 300, components: { controlbar: { position: "over"}} }; var l = f.mediaparser.parseMedia(c.container); var m = new e.embed.config(f.extend(a, l, c.config), this); var b = e.plugins.loadPlugins(c.id, m.plugins); function o(j, g) { for (var h in g) { if (typeof j[h] == "function") { (j[h]).call(j, g[h]) } } } function n() { if (b.getStatus() == f.loaderstatus.COMPLETE) { for (var u = 0; u < m.modes.length; u++) { if (m.modes[u].type && e.embed[m.modes[u].type]) { var j = m.modes[u].config; var x = m; if (j) { x = f.extend(f.clone(m), j); var y = ["file", "levels", "playlist"]; for (var v = 0; v < y.length; v++) { var h = y[v]; if (f.exists(j[h])) { for (var w = 0; w < y.length; w++) { if (w != v) { var k = y[w]; if (f.exists(x[k]) && !f.exists(j[k])) { delete x[k] } } } } } } var g = new e.embed[m.modes[u].type](document.getElementById(c.id), m.modes[u], x, b, c); if (g.supportsConfig()) { g.embed(); o(c, m.events); return c } } } f.log("No suitable players found"); new e.embed.logo(f.extend({ hide: true }, m.components.logo), "none", c.id) } } b.addEventListener(e.events.COMPLETE, n); b.addEventListener(e.events.ERROR, n); b.load(); return c }; function d() { if (!document.body) { return setTimeout(d, 15) } var c = f.selectors.getElementsByTagAndClass("video", "jwplayer"); for (var b = 0; b < c.length; b++) { var a = c[b]; if (a.id == "") { a.id = "jwplayer_" + Math.round(Math.random() * 100000) } e(a.id).setup({}) } } d() })(jwplayer); (function (o) { function l() { return [{ type: "flash", src: "/jwplayer/player.swf" }, { type: "html5" }, { type: "download"}] } var s = { players: "modes", autoplay: "autostart" }; function r(d) { var a = d.toLowerCase(); var b = ["left", "right", "top", "bottom"]; for (var c = 0; c < b.length; c++) { if (a == b[c]) { return true } } return false } function q(a) { var b = false; b = (a instanceof Array) || (typeof a == "object" && !a.position && !a.size); return b } function k(a) { if (typeof a == "string") { if (parseInt(a).toString() == a || a.toLowerCase().indexOf("px") > -1) { return parseInt(a) } } return a } var m = ["playlist", "dock", "controlbar", "logo", "display"]; function n(c) { var e = {}; switch (o.utils.typeOf(c.plugins)) { case "object": for (var a in c.plugins) { e[o.utils.getPluginName(a)] = a } break; case "string": var d = c.plugins.split(","); for (var b = 0; b < d.length; b++) { e[o.utils.getPluginName(d[b])] = d[b] } break } return e } function p(e, f, a, c) { if (o.utils.typeOf(e[f]) != "object") { e[f] = {} } var b = e[f][a]; if (o.utils.typeOf(b) != "object") { e[f][a] = b = {} } if (c) { if (f == "plugins") { var d = o.utils.getPluginName(a); b[c] = e[d + "." + c]; delete e[d + "." + c] } else { b[c] = e[a + "." + c]; delete e[a + "." + c] } } } o.embed.deserialize = function (b) { var a = n(b); for (var c in a) { p(b, "plugins", a[c]) } for (var d in b) { if (d.indexOf(".") > -1) { var e = d.split("."); var f = e[0]; var d = e[1]; if (o.utils.isInArray(m, f)) { p(b, "components", f, d) } else { if (a[f]) { p(b, "plugins", a[f], d) } } } } return b }; o.embed.config = function (h, j) { var v = o.utils.extend({}, h); var a; if (q(v.playlist)) { a = v.playlist; delete v.playlist } v = o.embed.deserialize(v); v.height = k(v.height); v.width = k(v.width); if (typeof v.plugins == "string") { var g = v.plugins.split(","); if (typeof v.plugins != "object") { v.plugins = {} } for (var c = 0; c < g.length; c++) { var b = o.utils.getPluginName(g[c]); if (typeof v[b] == "object") { v.plugins[g[c]] = v[b]; delete v[b] } else { v.plugins[g[c]] = {} } } } for (var w = 0; w < m.length; w++) { var d = m[w]; if (o.utils.exists(v[d])) { if (typeof v[d] != "object") { if (!v.components[d]) { v.components[d] = {} } if (d == "logo") { v.components[d].file = v[d] } else { v.components[d].position = v[d] } delete v[d] } else { if (!v.components[d]) { v.components[d] = {} } o.utils.extend(v.components[d], v[d]); delete v[d] } } if (typeof v[d + "size"] != "undefined") { if (!v.components[d]) { v.components[d] = {} } v.components[d].size = v[d + "size"]; delete v[d + "size"] } } if (typeof v.icons != "undefined") { if (!v.components.display) { v.components.display = {} } v.components.display.icons = v.icons; delete v.icons } for (var e in s) { if (v[e]) { if (!v[s[e]]) { v[s[e]] = v[e] } delete v[e] } } var f; if (v.flashplayer && !v.modes) { f = l(); f[0].src = v.flashplayer; delete v.flashplayer } else { if (v.modes) { if (typeof v.modes == "string") { f = l(); f[0].src = v.modes } else { if (v.modes instanceof Array) { f = v.modes } else { if (typeof v.modes == "object" && v.modes.type) { f = [v.modes] } } } delete v.modes } else { f = l() } } v.modes = f; if (a) { v.playlist = a } return v } })(jwplayer); (function (b) { b.embed.download = function (m, h, a, l, j) { this.embed = function () { var x = b.utils.extend({}, a); var d = {}; var y = a.width ? a.width : 480; if (typeof y != "number") { y = parseInt(y, 10) } var v = a.height ? a.height : 320; if (typeof v != "number") { v = parseInt(v, 10) } var A, f, g; var C = {}; if (a.playlist && a.playlist.length) { C.file = a.playlist[0].file; f = a.playlist[0].image; C.levels = a.playlist[0].levels } else { C.file = a.file; f = a.image; C.levels = a.levels } if (C.file) { A = C.file } else { if (C.levels && C.levels.length) { A = C.levels[0].file } } g = A ? "pointer" : "auto"; var w = { display: { style: { cursor: g, width: y, height: v, backgroundColor: "#000", position: "relative", textDecoration: "none", border: "none", display: "block"} }, display_icon: { style: { cursor: g, position: "absolute", display: A ? "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: g, position: "absolute", display: A ? "block" : "none", top: ((v - 50) / 2), left: ((y - 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: y, height: v, display: f ? "block" : "none", position: "absolute", cursor: g, left: 0, top: 0, margin: 0, padding: 0, textDecoration: "none", zIndex: 1, border: "none"}} }; var z = function (p, n, q) { var o = document.createElement(p); if (q) { o.id = q } else { o.id = m.id + "_jwplayer_" + n } b.utils.css(o, w[n].style); return o }; d.display = z("a", "display", m.id); if (A) { d.display.setAttribute("href", b.utils.getAbsolutePath(A)) } d.display_image = z("img", "display_image"); d.display_image.setAttribute("alt", "Click to download..."); if (f) { d.display_image.setAttribute("src", b.utils.getAbsolutePath(f)) } if (true) { d.display_icon = z("div", "display_icon"); d.display_iconBackground = z("div", "display_iconBackground"); d.display.appendChild(d.display_image); d.display_iconBackground.appendChild(d.display_icon); d.display.appendChild(d.display_iconBackground) } _css = b.utils.css; _hide = function (n) { _css(n, { display: "none" }) }; function c(n) { _imageWidth = d.display_image.naturalWidth; _imageHeight = d.display_image.naturalHeight; B() } function B() { b.utils.stretch(b.utils.stretching.UNIFORM, d.display_image, y, v, _imageWidth, _imageHeight) } d.display_image.onerror = function (n) { _hide(d.display_image) }; d.display_image.onload = c; m.parentNode.replaceChild(d.display, m); var e = (a.plugins && a.plugins.logo) ? a.plugins.logo : {}; d.display.appendChild(new b.embed.logo(a.components.logo, "download", m.id)); j.container = document.getElementById(j.id); j.setPlayer(d.display, "download") }; this.supportsConfig = function () { if (a) { var c = b.utils.getFirstPlaylistItemFromConfig(a); if (typeof c.file == "undefined" && typeof c.levels == "undefined") { return true } else { if (c.file) { return k(c.file, c.provider, c.playlistfile) } else { if (c.levels && c.levels.length) { for (var d = 0; d < c.levels.length; d++) { if (c.levels[d].file && k(c.levels[d].file, c.provider, c.playlistfile)) { return true } } } } } } else { return true } }; function k(f, d, g) { if (g) { return false } var e = ["image", "sound", "youtube", "http"]; if (d && (e.toString().indexOf(d) > -1)) { return true } if (!d || (d && d == "video")) { var c = b.utils.extension(f); if (c && b.utils.extensionmap[c]) { return true } } return false } } })(jwplayer); (function (b) { b.embed.flash = function (s, r, n, t, p) { function a(e, f, d) { var c = document.createElement("param"); c.setAttribute("name", f); c.setAttribute("value", d); e.appendChild(c) } function o(d, c, e) { return function (h) { if (e) { document.getElementById(p.id + "_wrapper").appendChild(c) } var f = document.getElementById(p.id).getPluginConfig("display"); d.resize(f.width, f.height); var g = { left: f.x, top: f.y }; b.utils.css(c, g) } } function u(e) { if (!e) { return {} } var c = {}; for (var f in e) { var g = e[f]; for (var d in g) { c[f + "." + d] = g[d] } } return c } function q(e, f) { if (e[f]) { var c = e[f]; for (var g in c) { var h = c[g]; if (typeof h == "string") { if (!e[g]) { e[g] = h } } else { for (var d in h) { if (!e[g + "." + d]) { e[g + "." + d] = h[d] } } } } delete e[f] } } function w(f) { if (!f) { return {} } var c = {}, d = []; for (var j in f) { var g = b.utils.getPluginName(j); var h = f[j]; d.push(j); for (var e in h) { c[g + "." + e] = h[e] } } c.plugins = d.join(","); return c } function v(c) { var e = c.netstreambasepath ? "" : "netstreambasepath=" + encodeURIComponent(window.location.href.split("#")[0]) + "&"; for (var d in c) { if (typeof (c[d]) == "object") { e += d + "=" + encodeURIComponent("[[JSON]]" + b.utils.strings.jsonToString(c[d])) + "&" } else { e += d + "=" + encodeURIComponent(c[d]) + "&" } } return e.substring(0, e.length - 1) } this.embed = function () { n.id = p.id; var h; var d = b.utils.extend({}, n); var g = d.width; var k = d.height; if (s.id + "_wrapper" == s.parentNode.id) { h = document.getElementById(s.id + "_wrapper") } else { h = document.createElement("div"); h.id = s.id + "_wrapper"; b.utils.wrap(s, h); b.utils.css(h, { position: "relative", width: g, height: k }) } var f = t.setupPlugins(p, d, o); if (f.length > 0) { b.utils.extend(d, w(f.plugins)) } else { delete d.plugins } var c = ["height", "width", "modes", "events"]; for (var m = 0; m < c.length; m++) { delete d[c[m]] } var e = "opaque"; if (d.wmode) { e = d.wmode } q(d, "components"); q(d, "providers"); if (typeof d["dock.position"] != "undefined") { if (d["dock.position"].toString().toLowerCase() == "false") { d.dock = d["dock.position"]; delete d["dock.position"] } } var j = "#000000"; var z; if (b.utils.isIE()) { var l = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="' + j + '" width="100%" height="100%" id="' + s.id + '" name="' + s.id + '" tabindex=0"">'; l += '<param name="movie" value="' + r.src + '">'; l += '<param name="allowfullscreen" value="true">'; l += '<param name="allowscriptaccess" value="always">'; l += '<param name="seamlesstabbing" value="true">'; l += '<param name="wmode" value="' + e + '">'; l += '<param name="flashvars" value="' + v(d) + '">'; l += "</object>"; b.utils.setOuterHTML(s, l); z = document.getElementById(s.id) } else { var A = document.createElement("object"); A.setAttribute("type", "application/x-shockwave-flash"); A.setAttribute("data", r.src); A.setAttribute("width", "100%"); A.setAttribute("height", "100%"); A.setAttribute("bgcolor", "#000000"); A.setAttribute("id", s.id); A.setAttribute("name", s.id); A.setAttribute("tabindex", 0); a(A, "allowfullscreen", "true"); a(A, "allowscriptaccess", "always"); a(A, "seamlesstabbing", "true"); a(A, "wmode", e); a(A, "flashvars", v(d)); s.parentNode.replaceChild(A, s); z = A } p.container = z; p.setPlayer(z, "flash") }; this.supportsConfig = function () { if (b.utils.hasFlash()) { if (n) { var c = b.utils.getFirstPlaylistItemFromConfig(n); if (typeof c.file == "undefined" && typeof c.levels == "undefined") { return true } else { if (c.file) { return flashCanPlay(c.file, c.provider) } else { if (c.levels && c.levels.length) { for (var d = 0; d < c.levels.length; d++) { if (c.levels[d].file && flashCanPlay(c.levels[d].file, c.provider)) { return true } } } } } } else { return true } } return false }; flashCanPlay = function (f, d) { var e = ["video", "http", "sound", "image"]; if (d && (e.toString().indexOf(d < 0))) { return true } var c = b.utils.extension(f); if (!c) { return true } if (b.utils.exists(b.utils.extensionmap[c]) && !b.utils.exists(b.utils.extensionmap[c].flash)) { return false } return true } } })(jwplayer); (function (b) { b.embed.html5 = function (m, h, a, l, j) { function k(d, c, e) { return function (g) { var f = document.getElementById(m.id + "_displayarea"); if (e) { f.appendChild(c) } d.resize(f.clientWidth, f.clientHeight); c.left = f.style.left; c.top = f.style.top } } this.embed = function () { if (b.html5) { l.setupPlugins(j, a, k); m.innerHTML = ""; var e = b.utils.extend({ screencolor: "0x000000" }, a); var f = ["plugins", "modes", "events"]; for (var d = 0; d < f.length; d++) { delete e[f[d]] } if (e.levels && !e.sources) { e.sources = a.levels } if (e.skin && e.skin.toLowerCase().indexOf(".zip") > 0) { e.skin = e.skin.replace(/\.zip/i, ".xml") } var c = new (b.html5(m)).setup(e); j.container = document.getElementById(j.id); j.setPlayer(c, "html5") } else { return null } }; this.supportsConfig = function () { if (!!b.vid.canPlayType) { if (a) { var c = b.utils.getFirstPlaylistItemFromConfig(a); if (typeof c.file == "undefined" && typeof c.levels == "undefined") { return true } else { if (c.file) { return html5CanPlay(b.vid, c.file, c.provider, c.playlistfile) } else { if (c.levels && c.levels.length) { for (var d = 0; d < c.levels.length; d++) { if (c.levels[d].file && html5CanPlay(b.vid, c.levels[d].file, c.provider, c.playlistfile)) { return true } } } } } } else { return true } } return false }; html5CanPlay = function (e, f, d, g) { if (g) { return false } if (d && d == "youtube") { return true } if (d && d != "video" && d != "http" && d != "sound") { return false } var c = b.utils.extension(f); if (!b.utils.exists(c) || !b.utils.exists(b.utils.extensionmap[c])) { return true } if (!b.utils.exists(b.utils.extensionmap[c].html5)) { return false } if (b.utils.isLegacyAndroid() && c.match(/m4v|mp4/)) { return true } return browserCanPlay(e, b.utils.extensionmap[c].html5) }; browserCanPlay = function (c, d) { if (!d) { return true } if (c.canPlayType(d)) { return true } else { if (d == "audio/mp3" && navigator.userAgent.match(/safari/i)) { return c.canPlayType("audio/mpeg") } else { return false } } } } })(jwplayer); (function (b) { b.embed.logo = function (s, t, A) { var v = { prefix: "http://l.longtailvideo.com/" + t + "/", file: "", link: "", margin: 8, out: 0.5, over: 1, timeout: 5, hide: false, position: "bottom-left" }; _css = b.utils.css; var C; var w; u(); function u() { q(); B(); y() } function q() { if (v.prefix) { var c = b.version.split(/\W/).splice(0, 2).join("/"); if (v.prefix.indexOf(c) < 0) { v.prefix += c + "/" } } w = b.utils.extend({}, v, s) } function a() { var c = { border: "none", textDecoration: "none", position: "absolute", cursor: "pointer", zIndex: 10 }; c.display = w.hide ? "none" : "block"; var d = w.position.toLowerCase().split("-"); for (var e in d) { c[d[e]] = w.margin } return c } function B() { C = document.createElement("img"); C.id = A + "_jwplayer_logo"; C.style.display = "none"; C.onload = function (c) { _css(C, a()); z() }; if (!w.file) { return } if (w.file.indexOf("http://") === 0) { C.src = w.file } else { C.src = w.prefix + w.file } } if (!w.file) { return } function y() { if (w.link) { C.onmouseover = x; C.onmouseout = z; C.onclick = r } else { this.mouseEnabled = false } } function r(c) { if (typeof c != "undefined") { c.preventDefault(); c.stopPropagation() } if (w.link) { window.open(w.link, "_blank") } return } function z(c) { if (w.link) { C.style.opacity = w.out } return } function x(c) { if (w.hide) { C.style.opacity = w.over } return } return C } })(jwplayer); (function (b) { b.html5 = function (a) { var d = a; this.setup = function (c) { b.utils.extend(this, new b.html5.api(d, c)); return this }; return this } })(jwplayer); (function (e) { var f = e.utils; var d = f.css; e.html5.view = function (R, T, ah) { var J = R; var aa = T; var b = ah; var c; var ag; var L; var P; var I; var X; var O; var V = false; var U, Y; function W() { c = document.createElement("div"); c.id = aa.id; c.className = aa.className; _videowrapper = document.createElement("div"); _videowrapper.id = c.id + "_video_wrapper"; aa.id = c.id + "_video"; d(c, { position: "relative", height: b.height, width: b.width, padding: 0, backgroundColor: g(), zIndex: 0 }); function g() { if (J.skin.getComponentSettings("display") && J.skin.getComponentSettings("display").backgroundcolor) { return J.skin.getComponentSettings("display").backgroundcolor } return parseInt("000000", 16) } d(aa, { width: "100%", height: "100%", top: 0, left: 0, zIndex: 1, margin: "auto", display: "block" }); d(_videowrapper, { overflow: "hidden", position: "absolute", top: 0, left: 0, bottom: 0, right: 0 }); f.wrap(aa, c); f.wrap(aa, _videowrapper); P = document.createElement("div"); P.id = c.id + "_displayarea"; c.appendChild(P) } function ad() { for (var h = 0; h < b.plugins.order.length; h++) { var g = b.plugins.order[h]; if (f.exists(b.plugins.object[g].getDisplayElement)) { b.plugins.object[g].height = f.parseDimension(b.plugins.object[g].getDisplayElement().style.height); b.plugins.object[g].width = f.parseDimension(b.plugins.object[g].getDisplayElement().style.width); b.plugins.config[g].currentPosition = b.plugins.config[g].position } } K() } function ab(g) { d(P, { display: (b.getMedia() && b.getMedia().hasChrome() && g.newstate != e.api.events.state.IDLE) ? "none" : "block" }) } function K(j) { var g = b.getMedia() ? b.getMedia().getDisplayElement() : null; if (f.exists(g)) { if (O != g) { if (O && O.parentNode) { O.parentNode.replaceChild(g, O) } O = g } for (var k = 0; k < b.plugins.order.length; k++) { var h = b.plugins.order[k]; if (f.exists(b.plugins.object[h].getDisplayElement)) { b.plugins.config[h].currentPosition = b.plugins.config[h].position } } } ae(b.width, b.height) } this.setup = function () { if (b && b.getMedia()) { aa = b.getMedia().getDisplayElement() } W(); ad(); J.jwAddEventListener(e.api.events.JWPLAYER_PLAYER_STATE, ab); J.jwAddEventListener(e.api.events.JWPLAYER_MEDIA_LOADED, K); J.jwAddEventListener(e.api.events.JWPLAYER_MEDIA_META, function () { a() }); var g; if (f.exists(window.onresize)) { g = window.onresize } window.onresize = function (k) { if (f.exists(g)) { try { g(k) } catch (h) { } } if (J.jwGetFullscreen()) { if (!S()) { var j = f.getBoundingClientRect(document.body); b.width = Math.abs(j.left) + Math.abs(j.right); b.height = window.innerHeight; ae(b.width, b.height) } } else { ae(b.width, b.height) } } }; function af(g) { switch (g.keyCode) { case 27: if (J.jwGetFullscreen()) { J.jwSetFullscreen(false) } break; case 32: if (J.jwGetState() != e.api.events.state.IDLE && J.jwGetState() != e.api.events.state.PAUSED) { J.jwPause() } else { J.jwPlay() } break } } function ae(g, k) { if (c.style.display == "none") { return } var h = [].concat(b.plugins.order); h.reverse(); I = h.length + 2; if (S()) { try { if (b.fullscreen && !b.getMedia().getDisplayElement().webkitDisplayingFullscreen) { b.fullscreen = false } } catch (m) { } } if (!b.fullscreen) { ag = g; L = k; if (typeof g == "string" && g.indexOf("%") > 0) { ag = f.getElementWidth(f.parentNode(c)) * parseInt(g.replace("%"), "") / 100 } else { ag = g } if (typeof k == "string" && k.indexOf("%") > 0) { L = f.getElementHeight(f.parentNode(c)) * parseInt(k.replace("%"), "") / 100 } else { L = k } d(P, { top: 0, bottom: 0, left: 0, right: 0, width: ag, height: L, position: "absolute" }); d(c, { height: L, width: ag }); var j = Z(N, h); if (j.length > 0) { I += j.length; var l = j.indexOf("playlist"), n = j.indexOf("controlbar"); if (l >= 0 && n >= 0) { j[l] = j.splice(n, 1, j[l])[0] } Z(ac, j, true) } U = f.getElementWidth(P); Y = f.getElementHeight(P) } else { if (!S()) { Z(M, h, true) } } a() } function Z(h, m, l) { var k = []; for (var n = 0; n < m.length; n++) { var j = m[n]; if (f.exists(b.plugins.object[j].getDisplayElement)) { if (b.plugins.config[j].currentPosition != e.html5.view.positions.NONE) { var p = h(j, I--); if (!p) { k.push(j) } else { var o = p.width; var g = p.height; if (l) { delete p.width; delete p.height } d(b.plugins.object[j].getDisplayElement(), p); b.plugins.object[j].resize(o, g) } } else { d(b.plugins.object[j].getDisplayElement(), { display: "none" }) } } } return k } function N(h, g) { if (f.exists(b.plugins.object[h].getDisplayElement)) { if (b.plugins.config[h].position && Q(b.plugins.config[h].position)) { if (!f.exists(b.plugins.object[h].getDisplayElement().parentNode)) { c.appendChild(b.plugins.object[h].getDisplayElement()) } var j = ai(h); j.zIndex = g; return j } } return false } function ac(h, g) { if (!f.exists(b.plugins.object[h].getDisplayElement().parentNode)) { P.appendChild(b.plugins.object[h].getDisplayElement()) } return { position: "absolute", width: (f.getElementWidth(P) - f.parseDimension(P.style.left) - f.parseDimension(P.style.right)), height: (f.getElementHeight(P) - f.parseDimension(P.style.top) - f.parseDimension(P.style.bottom)), zIndex: g} } function M(h, g) { return { position: "fixed", width: b.width, height: b.height, zIndex: g} } function a() { if (!f.exists(b.getMedia())) { return } P.style.position = "absolute"; var g = b.getMedia().getDisplayElement(); if (g && g.tagName.toLowerCase() == "video") { g.style.position = "absolute"; if (g.parentNode) { g.parentNode.style.left = P.style.left; g.parentNode.style.top = P.style.top } if (b.fullscreen && J.jwGetStretching() == e.utils.stretching.EXACTFIT && !f.isMobile()) { var j = document.createElement("div"); f.stretch(e.utils.stretching.UNIFORM, j, f.getElementWidth(P), f.getElementHeight(P), U, Y); f.stretch(e.utils.stretching.EXACTFIT, g, f.parseDimension(j.style.width), f.parseDimension(j.style.height), g.videoWidth ? g.videoWidth : 400, g.videoHeight ? g.videoHeight : 300); d(g, { left: j.style.left, top: j.style.top }) } else { f.stretch(J.jwGetStretching(), g, f.getElementWidth(P), f.getElementHeight(P), g.videoWidth ? g.videoWidth : 400, g.videoHeight ? g.videoHeight : 300) } } else { var h = b.plugins.object.display.getDisplayElement(); if (h) { b.getMedia().resize(f.parseDimension(h.style.width), f.parseDimension(h.style.height)) } else { b.getMedia().resize(f.parseDimension(P.style.width), f.parseDimension(P.style.height)) } } } function ai(h) { var g = { position: "absolute", margin: 0, padding: 0, top: null }; var j = b.plugins.config[h].currentPosition.toLowerCase(); switch (j.toUpperCase()) { case e.html5.view.positions.TOP: g.top = f.parseDimension(P.style.top); g.left = f.parseDimension(P.style.left); g.width = f.getElementWidth(P) - f.parseDimension(P.style.left) - f.parseDimension(P.style.right); g.height = b.plugins.object[h].height; P.style[j] = f.parseDimension(P.style[j]) + b.plugins.object[h].height + "px"; P.style.height = f.getElementHeight(P) - g.height + "px"; break; case e.html5.view.positions.RIGHT: g.top = f.parseDimension(P.style.top); g.right = f.parseDimension(P.style.right); g.width = b.plugins.object[h].width; g.height = f.getElementHeight(P) - f.parseDimension(P.style.top) - f.parseDimension(P.style.bottom); P.style.width = f.getElementWidth(P) - g.width + "px"; break; case e.html5.view.positions.BOTTOM: g.bottom = f.parseDimension(P.style.bottom); g.left = f.parseDimension(P.style.left); g.width = f.getElementWidth(P) - f.parseDimension(P.style.left) - f.parseDimension(P.style.right); g.height = b.plugins.object[h].height; P.style.height = f.getElementHeight(P) - g.height + "px"; break; case e.html5.view.positions.LEFT: g.top = f.parseDimension(P.style.top); g.left = f.parseDimension(P.style.left); g.width = b.plugins.object[h].width; g.height = f.getElementHeight(P) - f.parseDimension(P.style.top) - f.parseDimension(P.style.bottom); P.style[j] = f.parseDimension(P.style[j]) + b.plugins.object[h].width + "px"; P.style.width = f.getElementWidth(P) - g.width + "px"; break; default: break } return g } this.resize = ae; this.fullscreen = function (g) { var l; try { l = b.getMedia().getDisplayElement() } catch (m) { } if (S() && l && l.webkitSupportsFullscreen) { if (g && !l.webkitDisplayingFullscreen) { try { f.transform(l); l.webkitEnterFullscreen() } catch (h) { } } else { if (!g) { a(); if (l.webkitDisplayingFullscreen) { try { l.webkitExitFullscreen() } catch (h) { } } } } V = false } else { if (g) { document.onkeydown = af; clearInterval(X); var j = f.getBoundingClientRect(document.body); b.width = Math.abs(j.left) + Math.abs(j.right); b.height = window.innerHeight; var k = { position: "fixed", width: "100%", height: "100%", top: 0, left: 0, zIndex: 2147483000 }; d(c, k); k.zIndex = 1; if (b.getMedia() && b.getMedia().getDisplayElement()) { d(b.getMedia().getDisplayElement(), k) } k.zIndex = 2; d(P, k); V = true } else { document.onkeydown = ""; b.width = ag; b.height = L; d(c, { position: "relative", height: b.height, width: b.width, zIndex: 0 }); V = false } ae(b.width, b.height) } }; function Q(g) { return ([e.html5.view.positions.TOP, e.html5.view.positions.RIGHT, e.html5.view.positions.BOTTOM, e.html5.view.positions.LEFT].toString().indexOf(g.toUpperCase()) > -1) } function S() { if (J.jwGetState() != e.api.events.state.IDLE && !V && (b.getMedia() && b.getMedia().getDisplayElement() && b.getMedia().getDisplayElement().webkitSupportsFullscreen) && f.useNativeFullscreen()) { return true } return false } }; e.html5.view.positions = { TOP: "TOP", RIGHT: "RIGHT", BOTTOM: "BOTTOM", LEFT: "LEFT", OVER: "OVER", NONE: "NONE"} })(jwplayer); (function (d) { var c = { backgroundcolor: "", margin: 10, font: "Arial,sans-serif", fontsize: 10, fontcolor: parseInt("000000", 16), fontstyle: "normal", fontweight: "bold", buttoncolor: parseInt("ffffff", 16), position: d.html5.view.positions.BOTTOM, idlehide: false, hideplaylistcontrols: 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 = d.utils; _css = _utils.css; _hide = function (a) { _css(a, { display: "none" }) }; _show = function (a) { _css(a, { display: "block" }) }; d.html5.controlbar = function (ba, am) { window.controlbar = this; var bb = ba; var aP = _utils.extend({}, c, bb.skin.getComponentSettings("controlbar"), am); if (aP.position == d.html5.view.positions.NONE || typeof d.html5.view.positions[aP.position] == "undefined") { return } if (_utils.mapLength(bb.skin.getComponentLayout("controlbar")) > 0) { aP.layout = bb.skin.getComponentLayout("controlbar") } var aM; var au; var aO; var aN; var a0 = "none"; var be; var bc; var aL; var bf; var bg; var aX; var at = {}; var a6 = false; var bj = {}; var aU; var bd = false; var a7; var bi; var ap = false; var aJ = false; var aH; var a = new d.html5.eventdispatcher(); _utils.extend(this, a); function aB() { if (!aU) { aU = bb.skin.getSkinElement("controlbar", "background"); if (!aU) { aU = { width: 0, height: 0, src: null} } } return aU } function aw() { aO = 0; aN = 0; au = 0; if (!a6) { var e = { height: aB().height, backgroundColor: aP.backgroundcolor }; aM = document.createElement("div"); aM.id = bb.id + "_jwplayer_controlbar"; _css(aM, e) } var f = (bb.skin.getSkinElement("controlbar", "capLeft")); var g = (bb.skin.getSkinElement("controlbar", "capRight")); if (f) { aY("capLeft", "left", false, aM) } aT("background", aM, { position: "absolute", height: aB().height, left: (f ? f.width : 0), zIndex: 0 }, "img"); if (aB().src) { at.background.src = aB().src } aT("elements", aM, { position: "relative", height: aB().height, zIndex: 1 }); if (g) { aY("capRight", "right", false, aM) } } this.getDisplayElement = function () { return aM }; this.resize = function (e, g) { ar(); _utils.cancelAnimation(aM); bg = e; aX = g; if (aJ != bb.jwGetFullscreen()) { aJ = bb.jwGetFullscreen(); bi = undefined } var f = aZ(); aC({ id: bb.id, duration: aL, position: bc }); a1({ id: bb.id, bufferPercent: bf }); return f }; this.show = function () { if (bd) { bd = false; _show(aM); ao() } }; this.hide = function () { if (!bd) { bd = true; _hide(aM); aR() } }; function a5() { var f = ["timeSlider", "volumeSlider", "timeSliderRail", "volumeSliderRail"]; for (var e in f) { var g = f[e]; if (typeof at[g] != "undefined") { bj[g] = _utils.getBoundingClientRect(at[g]) } } } var bh; function b(e) { if (bd) { return } clearTimeout(a7); if (aP.position == d.html5.view.positions.OVER || bb.jwGetFullscreen()) { switch (bb.jwGetState()) { case d.api.events.state.PAUSED: case d.api.events.state.IDLE: if (aM && aM.style.opacity < 1 && (!aP.idlehide || _utils.exists(e))) { bh = false; setTimeout(function () { if (!bh) { an() } }, 100) } if (aP.idlehide) { a7 = setTimeout(function () { aV() }, 2000) } break; default: bh = true; if (e) { an() } a7 = setTimeout(function () { aV() }, 2000); break } } else { an() } } function aV() { if (!bd) { aR(); if (aM.style.opacity == 1) { _utils.cancelAnimation(aM); _utils.fadeTo(aM, 0, 0.1, 1, 0) } } } function an() { if (!bd) { ao(); if (aM.style.opacity == 0) { _utils.cancelAnimation(aM); _utils.fadeTo(aM, 1, 0.1, 0, 0) } } } function aF(e) { return function () { if (ap && bi != e) { bi = e; a.sendEvent(e, { component: "controlbar", boundingRect: av() }) } } } var ao = aF(d.api.events.JWPLAYER_COMPONENT_SHOW); var aR = aF(d.api.events.JWPLAYER_COMPONENT_HIDE); function av() { if (aP.position == d.html5.view.positions.OVER || bb.jwGetFullscreen()) { return _utils.getDimensions(aM) } else { return { x: 0, y: 0, width: 0, height: 0} } } function aT(e, f, g, j) { var h; if (!a6) { if (!j) { j = "div" } h = document.createElement(j); at[e] = h; h.id = aM.id + "_" + e; f.appendChild(h) } else { h = document.getElementById(aM.id + "_" + e) } if (_utils.exists(g)) { _css(h, g) } return h } function ax() { if (bb.jwGetHeight() <= 40) { aP.layout = _utils.clone(aP.layout); for (var e = 0; e < aP.layout.left.elements.length; e++) { if (aP.layout.left.elements[e].name == "fullscreen") { aP.layout.left.elements.splice(e, 1) } } for (e = 0; e < aP.layout.right.elements.length; e++) { if (aP.layout.right.elements[e].name == "fullscreen") { aP.layout.right.elements.splice(e, 1) } } a8() } aA(aP.layout.left); aA(aP.layout.center); aA(aP.layout.right) } function aA(f, j) { var e = f.position == "right" ? "right" : "left"; var g = _utils.extend([], f.elements); if (_utils.exists(j)) { g.reverse() } var f = aT(f.position + "Group", at.elements, { "float": "left", styleFloat: "left", cssFloat: "left", height: "100%" }); for (var h = 0; h < g.length; h++) { aQ(g[h], e, f) } } function az() { return au++ } function aQ(k, h, f) { var l, n, m, o, e; if (!f) { f = at.elements } if (k.type == "divider") { aY("divider" + az(), h, true, f, undefined, k.width, k.element); return } switch (k.name) { case "play": aY("playButton", h, false, f); aY("pauseButton", h, true, f); aq("playButton", "jwPlay"); aq("pauseButton", "jwPause"); break; case "prev": aY("prevButton", h, true, f); aq("prevButton", "jwPlaylistPrev"); break; case "stop": aY("stopButton", h, true, f); aq("stopButton", "jwStop"); break; case "next": aY("nextButton", h, true, f); aq("nextButton", "jwPlaylistNext"); break; case "elapsed": aY("elapsedText", h, true, f); break; case "time": n = !_utils.exists(bb.skin.getSkinElement("controlbar", "timeSliderCapLeft")) ? 0 : bb.skin.getSkinElement("controlbar", "timeSliderCapLeft").width; m = !_utils.exists(bb.skin.getSkinElement("controlbar", "timeSliderCapRight")) ? 0 : bb.skin.getSkinElement("controlbar", "timeSliderCapRight").width; l = h == "left" ? n : m; e = { height: aB().height, position: "relative", "float": "left", styleFloat: "left", cssFloat: "left" }; var j = aT("timeSlider", f, e); aY("timeSliderCapLeft", h, true, j, "relative"); aY("timeSliderRail", h, false, j, "relative"); aY("timeSliderBuffer", h, false, j, "absolute"); aY("timeSliderProgress", h, false, j, "absolute"); aY("timeSliderThumb", h, false, j, "absolute"); aY("timeSliderCapRight", h, true, j, "relative"); aW("time"); break; case "fullscreen": aY("fullscreenButton", h, false, f); aY("normalscreenButton", h, true, f); aq("fullscreenButton", "jwSetFullscreen", true); aq("normalscreenButton", "jwSetFullscreen", false); break; case "volume": n = !_utils.exists(bb.skin.getSkinElement("controlbar", "volumeSliderCapLeft")) ? 0 : bb.skin.getSkinElement("controlbar", "volumeSliderCapLeft").width; m = !_utils.exists(bb.skin.getSkinElement("controlbar", "volumeSliderCapRight")) ? 0 : bb.skin.getSkinElement("controlbar", "volumeSliderCapRight").width; l = h == "left" ? n : m; o = bb.skin.getSkinElement("controlbar", "volumeSliderRail").width + n + m; e = { height: aB().height, position: "relative", width: o, "float": "left", styleFloat: "left", cssFloat: "left" }; var g = aT("volumeSlider", f, e); aY("volumeSliderCapLeft", h, false, g, "relative"); aY("volumeSliderRail", h, false, g, "relative"); aY("volumeSliderProgress", h, false, g, "absolute"); aY("volumeSliderThumb", h, false, g, "absolute"); aY("volumeSliderCapRight", h, false, g, "relative"); aW("volume"); break; case "mute": aY("muteButton", h, false, f); aY("unmuteButton", h, true, f); aq("muteButton", "jwSetMute", true); aq("unmuteButton", "jwSetMute", false); break; case "duration": aY("durationText", h, true, f); break } } function aY(m, j, o, f, l, p, n) { if (_utils.exists(bb.skin.getSkinElement("controlbar", m)) || m.indexOf("Text") > 0 || m.indexOf("divider") === 0) { var k = { height: "100%", position: l ? l : "relative", display: "block", "float": "left", styleFloat: "left", cssFloat: "left" }; if ((m.indexOf("next") === 0 || m.indexOf("prev") === 0) && (bb.jwGetPlaylist().length < 2 || aP.hideplaylistcontrols)) { o = false; k.display = "none" } var e; if (m.indexOf("Text") > 0) { m.innerhtml = "00:00"; k.font = aP.fontsize + "px/" + (aB().height + 1) + "px " + aP.font; k.color = aP.fontcolor; k.textAlign = "center"; k.fontWeight = aP.fontweight; k.fontStyle = aP.fontstyle; k.cursor = "default"; e = 14 + 3 * aP.fontsize } else { if (m.indexOf("divider") === 0) { if (p) { if (!isNaN(parseInt(p))) { e = parseInt(p) } } else { if (n) { var h = bb.skin.getSkinElement("controlbar", n); if (h) { k.background = "url(" + h.src + ") repeat-x center left"; e = h.width } } else { k.background = "url(" + bb.skin.getSkinElement("controlbar", "divider").src + ") repeat-x center left"; e = bb.skin.getSkinElement("controlbar", "divider").width } } } else { k.background = "url(" + bb.skin.getSkinElement("controlbar", m).src + ") repeat-x center left"; e = bb.skin.getSkinElement("controlbar", m).width } } if (j == "left") { if (o) { aO += e } } else { if (j == "right") { if (o) { aN += e } } } if (_utils.typeOf(f) == "undefined") { f = at.elements } k.width = e; if (a6) { _css(at[m], k) } else { var g = aT(m, f, k); if (_utils.exists(bb.skin.getSkinElement("controlbar", m + "Over"))) { g.onmouseover = function (q) { g.style.backgroundImage = ["url(", bb.skin.getSkinElement("controlbar", m + "Over").src, ")"].join("") }; g.onmouseout = function (q) { g.style.backgroundImage = ["url(", bb.skin.getSkinElement("controlbar", m).src, ")"].join("") } } if (m.indexOf("divider") == 0) { g.setAttribute("class", "divider") } } } } function aK() { bb.jwAddEventListener(d.api.events.JWPLAYER_PLAYLIST_LOADED, aS); bb.jwAddEventListener(d.api.events.JWPLAYER_PLAYLIST_ITEM, a3); bb.jwAddEventListener(d.api.events.JWPLAYER_MEDIA_BUFFER, a1); bb.jwAddEventListener(d.api.events.JWPLAYER_PLAYER_STATE, a4); bb.jwAddEventListener(d.api.events.JWPLAYER_MEDIA_TIME, aC); bb.jwAddEventListener(d.api.events.JWPLAYER_MEDIA_MUTE, aD); bb.jwAddEventListener(d.api.events.JWPLAYER_MEDIA_VOLUME, a9); bb.jwAddEventListener(d.api.events.JWPLAYER_MEDIA_COMPLETE, ay) } function aS() { if (!aP.hideplaylistcontrols) { if (bb.jwGetPlaylist().length > 1) { _show(at.nextButton); _show(at.prevButton) } else { _hide(at.nextButton); _hide(at.prevButton) } aZ(); aI() } } function a3(e) { aL = bb.jwGetPlaylist()[e.index].duration; aC({ id: bb.id, duration: aL, position: 0 }); a1({ id: bb.id, bufferProgress: 0 }) } function aI() { aC({ id: bb.id, duration: bb.jwGetDuration(), position: 0 }); a1({ id: bb.id, bufferProgress: 0 }); aD({ id: bb.id, mute: bb.jwGetMute() }); a4({ id: bb.id, newstate: d.api.events.state.IDLE }); a9({ id: bb.id, volume: bb.jwGetVolume() }) } function aq(f, e, g) { if (a6) { return } if (_utils.exists(bb.skin.getSkinElement("controlbar", f))) { var h = at[f]; if (_utils.exists(h)) { _css(h, { cursor: "pointer" }); if (e == "fullscreen") { h.onmouseup = function (j) { j.stopPropagation(); bb.jwSetFullscreen(!bb.jwGetFullscreen()) } } else { h.onmouseup = function (j) { j.stopPropagation(); if (_utils.exists(g)) { bb[e](g) } else { bb[e]() } } } } } } function aW(f) { if (a6) { return } var e = at[f + "Slider"]; _css(at.elements, { cursor: "pointer" }); _css(e, { cursor: "pointer" }); e.onmousedown = function (g) { a0 = f }; e.onmouseup = function (g) { g.stopPropagation(); aE(g.pageX) }; e.onmousemove = function (h) { if (a0 == "time") { be = true; var g = h.pageX - bj[f + "Slider"].left - window.pageXOffset; _css(at[a0 + "SliderThumb"], { left: g }) } } } function aE(g) { be = false; var h; if (a0 == "time") { h = g - bj.timeSliderRail.left + window.pageXOffset; var e = h / bj.timeSliderRail.width * aL; if (e < 0) { e = 0 } else { if (e > aL) { e = aL - 3 } } if (bb.jwGetState() == d.api.events.state.PAUSED || bb.jwGetState() == d.api.events.state.IDLE) { bb.jwPlay() } bb.jwSeek(e) } else { if (a0 == "volume") { h = g - bj.volumeSliderRail.left - window.pageXOffset; var f = Math.round(h / bj.volumeSliderRail.width * 100); if (f < 0) { f = 0 } else { if (f > 100) { f = 100 } } if (bb.jwGetMute()) { bb.jwSetMute(false) } bb.jwSetVolume(f) } } a0 = "none" } function a1(g) { if (_utils.exists(g.bufferPercent)) { bf = g.bufferPercent } if (bj.timeSliderRail) { var e = bb.skin.getSkinElement("controlbar", "timeSliderCapLeft"); var f = bj.timeSliderRail.width; var h = isNaN(Math.round(f * bf / 100)) ? 0 : Math.round(f * bf / 100); _css(at.timeSliderBuffer, { width: h, left: e ? e.width : 0 }) } } function aD(e) { if (e.mute) { _hide(at.muteButton); _show(at.unmuteButton); _hide(at.volumeSliderProgress) } else { _show(at.muteButton); _hide(at.unmuteButton); _show(at.volumeSliderProgress) } } function a4(e) { if (e.newstate == d.api.events.state.BUFFERING || e.newstate == d.api.events.state.PLAYING) { _show(at.pauseButton); _hide(at.playButton) } else { _hide(at.pauseButton); _show(at.playButton) } b(); if (e.newstate == d.api.events.state.IDLE) { _hide(at.timeSliderBuffer); _hide(at.timeSliderProgress); _hide(at.timeSliderThumb); aC({ id: bb.id, duration: bb.jwGetDuration(), position: 0 }) } else { _show(at.timeSliderBuffer); if (e.newstate != d.api.events.state.BUFFERING) { _show(at.timeSliderProgress); _show(at.timeSliderThumb) } } } function ay(e) { a1({ bufferPercent: 0 }); aC(_utils.extend(e, { position: 0, duration: aL })) } function aC(g) { if (_utils.exists(g.position)) { bc = g.position } if (_utils.exists(g.duration)) { aL = g.duration } var j = (bc === aL === 0) ? 0 : bc / aL; var e = bj.timeSliderRail; if (e) { var k = isNaN(Math.round(e.width * j)) ? 0 : Math.round(e.width * j); var f = bb.skin.getSkinElement("controlbar", "timeSliderCapLeft"); var h = k + (f ? f.width : 0); if (at.timeSliderProgress) { _css(at.timeSliderProgress, { width: k, left: f ? f.width : 0 }); if (!be) { if (at.timeSliderThumb) { at.timeSliderThumb.style.left = h + "px" } } } } if (at.durationText) { at.durationText.innerHTML = _utils.timeFormat(aL) } if (at.elapsedText) { at.elapsedText.innerHTML = _utils.timeFormat(bc) } } function a8() { var k = at.elements.childNodes; var e, g; for (var h = 0; h < k.length; h++) { var f = k[h].childNodes; for (var j in f) { if (isNaN(parseInt(j, 10))) { continue } if (f[j].id.indexOf(aM.id + "_divider") === 0 && g && g.id.indexOf(aM.id + "_divider") === 0 && f[j].style.backgroundImage == g.style.backgroundImage) { f[j].style.display = "none" } else { if (f[j].id.indexOf(aM.id + "_divider") === 0 && e && e.style.display != "none") { f[j].style.display = "block" } } if (f[j].style.display != "none") { g = f[j] } e = f[j] } } } function aG() { if (bb.jwGetFullscreen()) { _show(at.normalscreenButton); _hide(at.fullscreenButton) } else { _hide(at.normalscreenButton); _show(at.fullscreenButton) } if (bb.jwGetState() == d.api.events.state.BUFFERING || bb.jwGetState() == d.api.events.state.PLAYING) { _show(at.pauseButton); _hide(at.playButton) } else { _hide(at.pauseButton); _show(at.playButton) } if (bb.jwGetMute() == true) { _hide(at.muteButton); _show(at.unmuteButton) } else { _show(at.muteButton); _hide(at.unmuteButton) } } function aZ() { a8(); aG(); var m = { width: bg }; var e = { "float": "left", styleFloat: "left", cssFloat: "left" }; if (aP.position == d.html5.view.positions.OVER || bb.jwGetFullscreen()) { m.left = aP.margin; m.width -= 2 * aP.margin; m.top = aX - aB().height - aP.margin; m.height = aB().height } var k = bb.skin.getSkinElement("controlbar", "capLeft"); var g = bb.skin.getSkinElement("controlbar", "capRight"); e.width = m.width - (k ? k.width : 0) - (g ? g.width : 0); var l = _utils.getBoundingClientRect(at.leftGroup).width; var h = _utils.getBoundingClientRect(at.rightGroup).width; var j = e.width - l - h; var n = j; var o = bb.skin.getSkinElement("controlbar", "timeSliderCapLeft"); var f = bb.skin.getSkinElement("controlbar", "timeSliderCapRight"); if (_utils.exists(o)) { n -= o.width } if (_utils.exists(f)) { n -= f.width } at.timeSlider.style.width = j + "px"; at.timeSliderRail.style.width = n + "px"; _css(aM, m); _css(at.elements, e); _css(at.background, e); a5(); return m } function a9(f) { if (_utils.exists(at.volumeSliderRail)) { var j = isNaN(f.volume / 100) ? 1 : f.volume / 100; var h = _utils.parseDimension(at.volumeSliderRail.style.width); var l = isNaN(Math.round(h * j)) ? 0 : Math.round(h * j); var e = _utils.parseDimension(at.volumeSliderRail.style.right); var k = (!_utils.exists(bb.skin.getSkinElement("controlbar", "volumeSliderCapLeft"))) ? 0 : bb.skin.getSkinElement("controlbar", "volumeSliderCapLeft").width; _css(at.volumeSliderProgress, { width: l, left: k }); if (at.volumeSliderThumb) { var g = (l - Math.round(_utils.parseDimension(at.volumeSliderThumb.style.width) / 2)); g = Math.min(Math.max(g, 0), h - _utils.parseDimension(at.volumeSliderThumb.style.width)); _css(at.volumeSliderThumb, { left: g }) } if (_utils.exists(at.volumeSliderCapLeft)) { _css(at.volumeSliderCapLeft, { left: 0 }) } } } function ar() { aH = document.getElementById(bb.id); aH.addEventListener("mousemove", b) } function a2() { aw(); ax(); a5(); a6 = true; aK(); aP.idlehide = (aP.idlehide.toString().toLowerCase() == "true"); if (aP.position == d.html5.view.positions.OVER && aP.idlehide) { aM.style.opacity = 0; ap = true } else { aM.style.opacity = 1; setTimeout((function () { ap = true; ao() }), 1) } ar(); aI() } a2(); return this } })(jwplayer); (function (d) { var e = ["width", "height", "state", "playlist", "item", "position", "buffer", "duration", "volume", "mute", "fullscreen"]; var f = d.utils; d.html5.controller = function (ap, U, ay, aw) { var aq = ap; var at = ay; var av = aw; var af = U; var S = true; var Y = -1; var ad = f.exists(at.config.debug) && (at.config.debug.toString().toLowerCase() == "console"); var R = new d.html5.eventdispatcher(af.id, ad); f.extend(this, R); var ab = []; var an = false; function T(g) { if (an) { R.sendEvent(g.type, g) } else { ab.push(g) } } function al(j) { if (!an) { an = true; R.sendEvent(d.api.events.JWPLAYER_READY, j); if (d.utils.exists(window.playerReady)) { playerReady(j) } if (d.utils.exists(window[ay.config.playerReady])) { window[ay.config.playerReady](j) } while (ab.length > 0) { var g = ab.shift(); R.sendEvent(g.type, g) } if (ay.config.autostart && !d.utils.isIOS()) { Q() } while (ag.length > 0) { var h = ag.shift(); ac(h.method, h.arguments) } } } at.addGlobalListener(T); at.addEventListener(d.api.events.JWPLAYER_MEDIA_BUFFER_FULL, function () { at.getMedia().play() }); at.addEventListener(d.api.events.JWPLAYER_MEDIA_TIME, function (g) { if (g.position >= at.playlist[at.item].start && Y >= 0) { at.playlist[at.item].start = Y; Y = -1 } }); at.addEventListener(d.api.events.JWPLAYER_MEDIA_COMPLETE, function (g) { setTimeout(aa, 25) }); at.addEventListener(d.api.events.JWPLAYER_PLAYLIST_LOADED, Q); at.addEventListener(d.api.events.JWPLAYER_FULLSCREEN, ao); function Z() { try { ai(at.item); if (at.playlist[at.item].levels[0].file.length > 0) { if (S || at.state == d.api.events.state.IDLE) { at.getMedia().load(at.playlist[at.item]); S = false } else { if (at.state == d.api.events.state.PAUSED) { at.getMedia().play() } } } return true } catch (g) { R.sendEvent(d.api.events.JWPLAYER_ERROR, g) } return false } function az() { try { if (at.playlist[at.item].levels[0].file.length > 0) { switch (at.state) { case d.api.events.state.PLAYING: case d.api.events.state.BUFFERING: if (at.getMedia()) { at.getMedia().pause() } break } } return true } catch (g) { R.sendEvent(d.api.events.JWPLAYER_ERROR, g) } return false } function ae(h) { try { if (at.playlist[at.item].levels[0].file.length > 0) { if (typeof h != "number") { h = parseFloat(h) } switch (at.state) { case d.api.events.state.IDLE: if (Y < 0) { Y = at.playlist[at.item].start; at.playlist[at.item].start = h } Z(); break; case d.api.events.state.PLAYING: case d.api.events.state.PAUSED: case d.api.events.state.BUFFERING: at.seek(h); break } } return true } catch (g) { R.sendEvent(d.api.events.JWPLAYER_ERROR, g) } return false } function ah(h) { if (!f.exists(h)) { h = true } try { if (at.getMedia()) { at.getMedia().stop(h) } return true } catch (g) { R.sendEvent(d.api.events.JWPLAYER_ERROR, g) } return false } function au() { try { if (at.playlist[at.item].levels[0].file.length > 0) { if (at.config.shuffle) { ai(a()) } else { if (at.item + 1 == at.playlist.length) { ai(0) } else { ai(at.item + 1) } } } if (at.state != d.api.events.state.IDLE) { var g = at.state; at.state = d.api.events.state.IDLE; R.sendEvent(d.api.events.JWPLAYER_PLAYER_STATE, { oldstate: g, newstate: d.api.events.state.IDLE }) } Z(); return true } catch (h) { R.sendEvent(d.api.events.JWPLAYER_ERROR, h) } return false } function W() { try { if (at.playlist[at.item].levels[0].file.length > 0) { if (at.config.shuffle) { ai(a()) } else { if (at.item === 0) { ai(at.playlist.length - 1) } else { ai(at.item - 1) } } } if (at.state != d.api.events.state.IDLE) { var g = at.state; at.state = d.api.events.state.IDLE; R.sendEvent(d.api.events.JWPLAYER_PLAYER_STATE, { oldstate: g, newstate: d.api.events.state.IDLE }) } Z(); return true } catch (h) { R.sendEvent(d.api.events.JWPLAYER_ERROR, h) } return false } function a() { var g = null; if (at.playlist.length > 1) { while (!f.exists(g)) { g = Math.floor(Math.random() * at.playlist.length); if (g == at.item) { g = null } } } else { g = 0 } return g } function X(h) { if (!at.playlist || !at.playlist[h]) { return false } try { if (at.playlist[h].levels[0].file.length > 0) { var g = at.state; if (g !== d.api.events.state.IDLE) { if (at.playlist[at.item].provider == at.playlist[h].provider) { ah(false) } else { ah() } } ai(h); Z() } return true } catch (j) { R.sendEvent(d.api.events.JWPLAYER_ERROR, j) } return false } function ai(g) { if (!at.playlist[g]) { return } at.setActiveMediaProvider(at.playlist[g]); if (at.item != g) { at.item = g; S = true; R.sendEvent(d.api.events.JWPLAYER_PLAYLIST_ITEM, { index: g }) } } function ax(h) { try { ai(at.item); var g = at.getMedia(); switch (typeof (h)) { case "number": g.volume(h); break; case "string": g.volume(parseInt(h, 10)); break } return true } catch (j) { R.sendEvent(d.api.events.JWPLAYER_ERROR, j) } return false } function am(h) { try { ai(at.item); var g = at.getMedia(); if (typeof h == "undefined") { g.mute(!at.mute) } else { if (h.toString().toLowerCase() == "true") { g.mute(true) } else { g.mute(false) } } return true } catch (j) { R.sendEvent(d.api.events.JWPLAYER_ERROR, j) } return false } function V(h, j) { try { at.width = h; at.height = j; av.resize(h, j); R.sendEvent(d.api.events.JWPLAYER_RESIZE, { width: at.width, height: at.height }); return true } catch (g) { R.sendEvent(d.api.events.JWPLAYER_ERROR, g) } return false } function aj(g) { try { if (typeof g == "undefined") { g = !at.fullscreen } if (g != at.fullscreen) { if (g.toString().toLowerCase() == "true") { at.fullscreen = true; av.fullscreen(true); R.sendEvent(d.api.events.JWPLAYER_FULLSCREEN, { fullscreen: true }) } else { at.fullscreen = false; av.fullscreen(false); R.sendEvent(d.api.events.JWPLAYER_FULLSCREEN, { fullscreen: false }) } R.sendEvent(d.api.events.JWPLAYER_RESIZE, { width: at.width, height: at.height }) } return true } catch (h) { R.sendEvent(d.api.events.JWPLAYER_ERROR, h) } return false } function b(h) { try { ah(); at.loadPlaylist(h); if (at.playlist[at.item].provider) { ai(at.item); if (at.config.autostart.toString().toLowerCase() == "true") { Z() } return true } else { return false } } catch (g) { R.sendEvent(d.api.events.JWPLAYER_ERROR, g) } return false } function Q(g) { ai(at.playlist[at.item]); if (at.config.autostart.toString().toLowerCase() == "true") { Z() } } function ao(g) { aj(g.fullscreen) } function ak() { try { return at.getMedia().detachMedia() } catch (g) { return null } } function ar() { try { return at.getMedia().attachMedia() } catch (g) { return null } } d.html5.controller.repeatoptions = { LIST: "LIST", ALWAYS: "ALWAYS", SINGLE: "SINGLE", NONE: "NONE" }; function aa() { switch (at.config.repeat.toUpperCase()) { case d.html5.controller.repeatoptions.SINGLE: Z(); break; case d.html5.controller.repeatoptions.ALWAYS: if (at.item == at.playlist.length - 1 && !at.config.shuffle) { X(0) } else { au() } break; case d.html5.controller.repeatoptions.LIST: if (at.item == at.playlist.length - 1 && !at.config.shuffle) { ah(); ai(0) } else { au() } break; default: ah(); break } } var ag = []; function c(g) { return function () { if (an) { ac(g, arguments) } else { ag.push({ method: g, arguments: arguments }) } } } function ac(g, h) { var j = []; for (i = 0; i < h.length; i++) { j.push(h[i]) } g.apply(this, j) } this.play = c(Z); this.pause = c(az); this.seek = c(ae); this.stop = c(ah); this.next = c(au); this.prev = c(W); this.item = c(X); this.setVolume = c(ax); this.setMute = c(am); this.resize = c(V); this.setFullscreen = c(aj); this.load = c(b); this.playerReady = al; this.detachMedia = ak; this.attachMedia = ar } })(jwplayer); (function (b) { b.html5.defaultSkin = function () { this.text = '<?xml version="1.0" ?><skin author="LongTail Video" name="Five" version="1.1"><components><component name="controlbar"><settings><setting name="margin" value="20"/><setting name="fontsize" value="11"/><setting name="fontcolor" value="0x000000"/></settings><layout><group position="left"><button name="play"/><divider name="divider"/><button name="prev"/><divider name="divider"/><button name="next"/><divider name="divider"/><text name="elapsed"/></group><group position="center"><slider name="time"/></group><group position="right"><text name="duration"/><divider name="divider"/><button name="blank"/><divider name="divider"/><button name="mute"/><slider name="volume"/><divider name="divider"/><button name="fullscreen"/></group></layout><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAIAAABvFaqvAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAElJREFUOI3t1LERACAMQlFgGvcfxNIhHMK4gsUvUviOmgtNsiAZkBSEKxKEnCYkkQrJn/YwbUNiSDDYRZaQRDaShv+oX9GBZEIuK+8hXVLs+/YAAAAASUVORK5CYII="/><element name="blankButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAYCAYAAAAyJzegAAAAFElEQVQYV2P8//8/AzpgHBUc7oIAGZdH0RjKN8EAAAAASUVORK5CYII="/><element name="capLeft" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAQElEQVQIWz3LsRGAMADDQJ0XB5bMINABZ9GENGrszxhjT2WLSqxEJG2JQrTMdV2q5LpOAvyRaVmsi7WdeZ/7+AAaOTq7BVrfOQAAAABJRU5ErkJggg=="/><element name="capRight" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAQElEQVQIWz3LsRGAMADDQJ0XB5bMINABZ9GENGrszxhjT2WLSqxEJG2JQrTMdV2q5LpOAvyRaVmsi7WdeZ/7+AAaOTq7BVrfOQAAAABJRU5ErkJggg=="/><element name="divider" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUCB0FwcENgEAAw7Aq+893g8APUILNOQcbFRktVGqUVFRkWNz3xTa2sUaLNUosKlRUvvf5AdbWOTtzmzyWAAAAAElFTkSuQmCC"/><element name="playButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAANUlEQVR42u2RsQkAAAjD/NTTPaW6dXLrINJA1kBpGPMAjDWmOgp1HFQXx+b1KOefO4oxY57R73YnVYCQUCQAAAAASUVORK5CYII="/><element name="pauseButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAIUlEQVQ4jWNgGAWjYOiD/0gYG3/U0FFDB4Oho2AUDAYAAEwiL9HrpdMVAAAAAElFTkSuQmCC"/><element name="prevButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAQklEQVQ4y2NgGAWjYOiD/1AMA/JAfB5NjCJD/YH4PRaLyDa0H4lNNUP/DxlD59PCUBCIp3ZEwYA+NZLUKBgFgwEAAN+HLX9sB8u8AAAAAElFTkSuQmCC"/><element name="nextButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAQElEQVQ4y2NgGAWjYOiD/0B8Hojl0cT+U2ooCL8HYn9qGwrD/bQw9P+QMXQ+tSMqnpoRBUpS+tRMUqNgFAwGAADxZy1/mHvFnAAAAABJRU5ErkJggg=="/><element name="timeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAOElEQVRIDe3BwQkAIRADwAhhw/nU/kWwUK+KPITMABFh19Y+F0acY8CJvX9wYpXgRElwolSIiMf9ZWEDhtwurFsAAAAASUVORK5CYII="/><element name="timeSliderBuffer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAN0lEQVRIDe3BwQkAMQwDMBcc55mRe9zi7RR+FCwBEWG39vcfGHFm4MTuhhMlwYlVBSdKhYh43AW/LQMKm1spzwAAAABJRU5ErkJggg=="/><element name="timeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAIElEQVRIiWNgGAWjYBTQBfynMR61YCRYMApGwSigMQAAiVWPcbq6UkIAAAAASUVORK5CYII="/><element name="timeSliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAYCAYAAAA/OUfnAAAAO0lEQVQYlWP4//8/Awwz0JgDBP/BeN6Cxf/hnI2btiI4u/fsQ3AOHjqK4Jw4eQbBOX/hEoKDYjSd/AMA4cS4mfLsorgAAAAASUVORK5CYII="/><element name="muteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAJklEQVQ4y2NgGAUjDcwH4v/kaPxPikZkxcNVI9mBQ5XoGAWDFwAAsKAXKQQmfbUAAAAASUVORK5CYII="/><element name="unmuteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAMklEQVQ4y2NgGAWDHPyntub5xBr6Hwv/Pzk2/yfVG/8psRFE25Oq8T+tQnsIaB4FVAcAi2YVysVY52AAAAAASUVORK5CYII="/><element name="volumeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYAgMAAACdGdVrAAAACVBMVEUAAACmpqampqbBXAu8AAAAAnRSTlMAgJsrThgAAAArSURBVAhbY2AgErBAyA4I2QEhOyBkB4TsYOhAoaCCUCUwDTDtMMNgRuMHAFB5FoGH5T0UAAAAAElFTkSuQmCC"/><element name="volumeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYAgMAAACdGdVrAAAACVBMVEUAAAAAAAAAAACDY+nAAAAAAnRSTlMAgJsrThgAAAArSURBVAhbY2AgErBAyA4I2QEhOyBkB4TsYOhAoaCCUCUwDTDtMMNgRuMHAFB5FoGH5T0UAAAAAElFTkSuQmCC"/><element name="volumeSliderCapRight" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAYCAYAAAAyJzegAAAAFElEQVQYV2P8//8/AzpgHBUc7oIAGZdH0RjKN8EAAAAASUVORK5CYII="/><element name="fullscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAQklEQVRIiWNgGAWjYMiD/0iYFDmSLbDHImdPLQtgBpEiR7Zl2NijAA5oEkT/0Whi5UiyAJ8BVMsHNMtoo2AUDAIAAGdcIN3IDNXoAAAAAElFTkSuQmCC"/><element name="normalscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAP0lEQVRIx2NgGAWjYMiD/1RSQ5QB/wmIUWzJfzx8qhj+n4DYCAY0DyJ7PBbYU8sHMEvwiZFtODXUjIJRMJgBACpWIN2ZxdPTAAAAAElFTkSuQmCC"/></elements></component><component name="display"><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAQMAAAAk8RryAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlOZpuml+rYAAAASSURBVBhXY2AYJuA/GBwY6jQAyDyoK8QcL4QAAAAASUVORK5CYII="/><element name="playIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiUlEQVR42u3XSw2AMBREURwgAQlIQAISKgUpSEFKJeCg5b0E0kWBTVcD9ySTsL0Jn9IBAAAA+K2UUrBlW/Rr5ZDoIeeuoFkxJD9ss03aIXXQqB9SttoG7ZA6qNcOKdttiwcJh9RB+iFl4SshkRBuLR72+9cvH0SOKI2HRo7x/Fi1/uoCAAAAwLsD8ki99IlO2dQAAAAASUVORK5CYII="/><element name="muteIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAVUlEQVR42u3WMQrAIAxAUW/g/SdvGmvpoOBeSHgPsjj5QTANAACARCJilIhYM0tEvJM+Ik3Id9E957kQIb+F3OdCPC0hPkQriqWx9hp/x/QGAABQyAPLB22VGrpLDgAAAABJRU5ErkJggg=="/><element name="errorIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAA/0lEQVR42u2U0QmEMBAF7cASLMESUoIlpARLSCkpwRJSgiWkhOvAXD4WsgRkyaG5DbyB+Yvg8KITAAAAAAAYk+u61mwk15EjPtlEfihmqIiZR1Qx80ghjgdUuiHXGHSVsoag0x6x8DUoyjD5KovmEJ9NTDMRPIT0mtdIUkjlonuNohO+Ha99DTmkuGgKCTcvebAzx82ZoCWC3/3aIMWSRucaxcjORSFY4xpFdjYJGp1rFGcyCYZ/RVh6AUnfcNZ2zih3/mGj1jVCdiNDwyrq1rA/xMdeEXvDVdnYc1vDc3uPkDObXrlaxbNHSOohQhr/WOeLEWfWTgAAAAAAADzNF9sHJ7PJ57MlAAAAAElFTkSuQmCC"/><element name="bufferIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAACBklEQVR42u3Zv0sCYRzH8USTzOsHHEWGkC1HgaDgkktGDjUYtDQ01RDSljQ1BLU02+rk1NTm2NLq4Nx/0L/h9fnCd3j4cnZe1/U8xiO8h3uurufF0/3COd/3/0UWYiEWYiEWYiGJQ+J8xuPxKhXjEMZANinjIZhkGuVRNioE4wVURo4JkHm0xKWmhRAc1bh1EyCUw5BcBIjHiApKa4CErko6DEJwuRo6IRKzyJD8FJAyI3Zp2zRImiBcRhlfo5RtlxCcE3CcDNpGrhYIT2IhAJKilO0VRmzJ32fAMTpBTS0QMfGwlcuKMRftE0DJ0wCJdcOsCkBdXP3Mh9CEFUBTPS9mDZJBG6io4aqVzMdCokCw9H3kT6j/C/9iDdSeUMNC7DkyyxAs/Rk6Qss8FPWRZgdVtUH4DjxEn1zxh+/zj1wHlf4MQhNGrwqA6sY40U8JonRJwEQh+AO3AvCG6gHv4U7IY4krxkroWoAOkoQMGfCBrgIm+YBGqPENpIJ66CJg3x66Y0gnSUidAEEnNr9jjLiWMn5DiWP0OC/oAsCgkq43xBdGDMQr7YASP/vEkHvdl1+JOCcEV5sC4hGEOzTlPuKgd0b0xD4JkRcOgnRRTjdErkYhAsQVq6IdUuPJtmk7BCL3t/h88cx91pKQkI/pkDx6pmYTIjEoxiHsN1YWYiEWYiEWknhflZ5IErA5nr8AAAAASUVORK5CYII="/></elements></component><component name="dock"><settings><setting name="fontcolor" value="0xffffff"/></settings><elements><element name="button" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAQMAAAAk8RryAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlOZpuml+rYAAAASSURBVBhXY2AYJuA/GBwY6jQAyDyoK8QcL4QAAAAASUVORK5CYII="/></elements></component><component name="playlist"><settings><setting name="backgroundcolor" value="0xe8e8e8"/></settings><elements><element name="item" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUaN7t2MENwCAMBEEe9N8wSKYC/D8YV7CyJoRkVtVImxkZPQInMxoP0XiIxkM0HsGbjjSNBx544IEHHnjggUe/6UQeey0PIh7XTftGxKPj4eXCtLsHHh+ZxkO0Iw8PR55Ni8ZD9Hu/EAoP0dc5RRg9qeRjVF8AAAAASUVORK5CYII="/><element name="sliderCapTop" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAHCAYAAADnCQYGAAAAFUlEQVQokWP8//8/A7UB46ihI9hQAKt6FPPXhVGHAAAAAElFTkSuQmCC"/><element name="sliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAUCAYAAABiS3YzAAAAKElEQVQ4y2P4//8/Az68bNmy/+iYkB6GUUNHDR01dNTQUUNHDaXcUABUDOKhcxnsSwAAAABJRU5ErkJggg=="/><element name="sliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAUCAYAAABiS3YzAAAAJUlEQVQ4T2P4//8/Ay4MBP9xYbz6Rg0dNXTU0FFDRw0dNZRyQwHH4NBa7GJsXAAAAABJRU5ErkJggg=="/><element name="sliderCapBottom" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAHCAYAAADnCQYGAAAAFUlEQVQokWP8//8/A7UB46ihI9hQAKt6FPPXhVGHAAAAAElFTkSuQmCC"/></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 (b) { _utils = b.utils; _css = _utils.css; _hide = function (a) { _css(a, { display: "none" }) }; _show = function (a) { _css(a, { display: "block" }) }; b.html5.display = function (aB, ad) { var aC = { icons: true, showmute: false }; var a = _utils.extend({}, aC, ad); var aD = aB; var T = {}; var aG; var aq; var an; var V; var at; var ab; var aj; var aa = !_utils.exists(aD.skin.getComponentSettings("display").bufferrotation) ? 15 : parseInt(aD.skin.getComponentSettings("display").bufferrotation, 10); var av = !_utils.exists(aD.skin.getComponentSettings("display").bufferinterval) ? 100 : parseInt(aD.skin.getComponentSettings("display").bufferinterval, 10); var ak = -1; var ar = ""; var Z = true; var aH; var aE = false; var ay = false; var ao, X; var ac = new b.html5.eventdispatcher(); _utils.extend(this, ac); var ag = { display: { style: { cursor: "pointer", top: 0, left: 0, overflow: "hidden" }, click: az }, display_icon: { style: { cursor: "pointer", position: "absolute", top: ((aD.skin.getSkinElement("display", "background").height - aD.skin.getSkinElement("display", "playIcon").height) / 2), left: ((aD.skin.getSkinElement("display", "background").width - aD.skin.getSkinElement("display", "playIcon").width) / 2), border: 0, margin: 0, padding: 0, zIndex: 3, display: "none"} }, display_iconBackground: { style: { cursor: "pointer", position: "absolute", top: ((aq - aD.skin.getSkinElement("display", "background").height) / 2), left: ((aG - aD.skin.getSkinElement("display", "background").width) / 2), border: 0, backgroundImage: (["url(", aD.skin.getSkinElement("display", "background").src, ")"]).join(""), width: aD.skin.getSkinElement("display", "background").width, height: aD.skin.getSkinElement("display", "background").height, margin: 0, padding: 0, zIndex: 2, display: "none"} }, display_image: { style: { display: "none", width: aG, height: aq, 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}} }; aD.jwAddEventListener(b.api.events.JWPLAYER_PLAYER_STATE, ax); aD.jwAddEventListener(b.api.events.JWPLAYER_MEDIA_MUTE, ax); aD.jwAddEventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM, ax); aD.jwAddEventListener(b.api.events.JWPLAYER_ERROR, aw); Y(); function Y() { T.display = ah("div", "display"); T.display_text = ah("div", "display_text"); T.display.appendChild(T.display_text); T.display_image = ah("img", "display_image"); T.display_image.onerror = function (c) { _hide(T.display_image) }; T.display_image.onload = al; T.display_icon = ah("div", "display_icon"); T.display_iconBackground = ah("div", "display_iconBackground"); T.display.appendChild(T.display_image); T.display_iconBackground.appendChild(T.display_icon); T.display.appendChild(T.display_iconBackground); aF(); setTimeout((function () { ay = true; if (a.icons.toString() == "true") { ae() } }), 1) } this.getDisplayElement = function () { return T.display }; this.resize = function (c, d) { _css(T.display, { width: c, height: d }); _css(T.display_text, { width: (c - 10), top: ((d - _utils.getBoundingClientRect(T.display_text).height) / 2) }); _css(T.display_iconBackground, { top: ((d - aD.skin.getSkinElement("display", "background").height) / 2), left: ((c - aD.skin.getSkinElement("display", "background").width) / 2) }); if (aG != c || aq != d) { aG = c; aq = d; aH = undefined; ae() } if (!aD.jwGetFullscreen()) { ao = c; X = d } aI(); ax({}) }; this.show = function () { if (aE) { aE = false; au(aD.jwGetState()) } }; this.hide = function () { if (!aE) { ai(); aE = true } }; function al(c) { an = T.display_image.naturalWidth; V = T.display_image.naturalHeight; aI() } function aI() { if (aD.jwGetFullscreen() && aD.jwGetStretching() == b.utils.stretching.EXACTFIT) { var c = document.createElement("div"); _utils.stretch(b.utils.stretching.UNIFORM, c, aG, aq, ao, X); _utils.stretch(b.utils.stretching.EXACTFIT, T.display_image, _utils.parseDimension(c.style.width), _utils.parseDimension(c.style.height), an, V); _css(T.display_image, { left: c.style.left, top: c.style.top }) } else { _utils.stretch(aD.jwGetStretching(), T.display_image, aG, aq, an, V) } } function ah(e, c) { var d = document.createElement(e); d.id = aD.id + "_jwplayer_" + c; _css(d, ag[c].style); return d } function aF() { for (var c in T) { if (_utils.exists(ag[c].click)) { T[c].onclick = ag[c].click } } } function az(c) { if (typeof c.preventDefault != "undefined") { c.preventDefault() } else { c.returnValue = false } if (aD.jwGetState() != b.api.events.state.PLAYING) { aD.jwPlay() } else { aD.jwPause() } } function U(c) { if (aj) { ai(); return } T.display_icon.style.backgroundImage = (["url(", aD.skin.getSkinElement("display", c).src, ")"]).join(""); _css(T.display_icon, { width: aD.skin.getSkinElement("display", c).width, height: aD.skin.getSkinElement("display", c).height, top: (aD.skin.getSkinElement("display", "background").height - aD.skin.getSkinElement("display", c).height) / 2, left: (aD.skin.getSkinElement("display", "background").width - aD.skin.getSkinElement("display", c).width) / 2 }); aJ(); if (_utils.exists(aD.skin.getSkinElement("display", c + "Over"))) { T.display_icon.onmouseover = function (d) { T.display_icon.style.backgroundImage = ["url(", aD.skin.getSkinElement("display", c + "Over").src, ")"].join("") }; T.display_icon.onmouseout = function (d) { T.display_icon.style.backgroundImage = ["url(", aD.skin.getSkinElement("display", c).src, ")"].join("") } } else { T.display_icon.onmouseover = null; T.display_icon.onmouseout = null } } function ai() { if (a.icons.toString() == "true") { _hide(T.display_icon); _hide(T.display_iconBackground); W() } } function aJ() { if (!aE && a.icons.toString() == "true") { _show(T.display_icon); _show(T.display_iconBackground); ae() } } function aw(c) { aj = true; ai(); T.display_text.innerHTML = c.message; _show(T.display_text); T.display_text.style.top = ((aq - _utils.getBoundingClientRect(T.display_text).height) / 2) + "px" } function af() { T.display_image.style.display = "none" } function ax(d) { if ((d.type == b.api.events.JWPLAYER_PLAYER_STATE || d.type == b.api.events.JWPLAYER_PLAYLIST_ITEM) && aj) { aj = false; _hide(T.display_text) } var c = aD.jwGetState(); if (c == ar) { return } ar = c; if (ak >= 0) { clearTimeout(ak) } if (Z || aD.jwGetState() == b.api.events.state.PLAYING || aD.jwGetState() == b.api.events.state.PAUSED) { au(aD.jwGetState()) } else { ak = setTimeout(aA(aD.jwGetState()), 500) } } function aA(c) { return (function () { au(c) }) } function au(c) { if (_utils.exists(ab)) { clearInterval(ab); ab = null; _utils.animations.rotate(T.display_icon, 0) } switch (c) { case b.api.events.state.BUFFERING: if (_utils.isMobile()) { af(); ai() } else { if (aD.jwGetPlaylist()[aD.jwGetItem()].provider == "sound") { ap() } at = 0; ab = setInterval(function () { at += aa; _utils.animations.rotate(T.display_icon, at % 360) }, av); U("bufferIcon"); Z = true } break; case b.api.events.state.PAUSED: if (!_utils.isMobile()) { if (aD.jwGetPlaylist()[aD.jwGetItem()].provider != "sound") { _css(T.display_image, { background: "transparent no-repeat center center" }) } U("playIcon"); Z = true } break; case b.api.events.state.IDLE: if (aD.jwGetPlaylist()[aD.jwGetItem()] && aD.jwGetPlaylist()[aD.jwGetItem()].image) { ap() } else { af() } U("playIcon"); Z = true; break; default: if (aD.jwGetPlaylist()[aD.jwGetItem()] && aD.jwGetPlaylist()[aD.jwGetItem()].provider == "sound") { if (_utils.isMobile()) { af(); Z = false } else { ap() } } else { af(); Z = false } if (aD.jwGetMute() && a.showmute) { U("muteIcon") } else { ai() } break } ak = -1 } function ap() { if (aD.jwGetPlaylist()[aD.jwGetItem()] && aD.jwGetPlaylist()[aD.jwGetItem()].image) { _css(T.display_image, { display: "block" }); T.display_image.src = _utils.getAbsolutePath(aD.jwGetPlaylist()[aD.jwGetItem()].image) } } function am(c) { return function () { if (!ay) { return } if (!aE && aH != c) { aH = c; ac.sendEvent(c, { component: "display", boundingRect: _utils.getDimensions(T.display_iconBackground) }) } } } var ae = am(b.api.events.JWPLAYER_COMPONENT_SHOW); var W = am(b.api.events.JWPLAYER_COMPONENT_HIDE); return this } })(jwplayer); (function (e) { var f = e.utils; var d = f.css; e.html5.dock = function (H, P) { function G() { return { align: e.html5.view.positions.RIGHT} } var W = f.extend({}, G(), P); if (W.align == "FALSE") { return } var aa = {}; var a = []; var Z; var L; var ac = false; var Q = false; var ab = { x: 0, y: 0, width: 0, height: 0 }; var b; var V; var c; var X = new e.html5.eventdispatcher(); f.extend(this, X); var R = document.createElement("div"); R.id = H.id + "_jwplayer_dock"; R.style.opacity = 1; U(); H.jwAddEventListener(e.api.events.JWPLAYER_PLAYER_STATE, T); this.getDisplayElement = function () { return R }; this.setButton = function (g, k, j, h) { if (!k && aa[g]) { f.arrays.remove(a, g); R.removeChild(aa[g].div); delete aa[g] } else { if (k) { if (!aa[g]) { aa[g] = {} } aa[g].handler = k; aa[g].outGraphic = j; aa[g].overGraphic = h; if (!aa[g].div) { a.push(g); aa[g].div = document.createElement("div"); aa[g].div.style.position = "relative"; R.appendChild(aa[g].div); aa[g].div.appendChild(document.createElement("img")); aa[g].div.childNodes[0].style.position = "absolute"; aa[g].div.childNodes[0].style.left = 0; aa[g].div.childNodes[0].style.top = 0; aa[g].div.childNodes[0].style.zIndex = 10; aa[g].div.childNodes[0].style.cursor = "pointer"; aa[g].div.appendChild(document.createElement("img")); aa[g].div.childNodes[1].style.position = "absolute"; aa[g].div.childNodes[1].style.left = 0; aa[g].div.childNodes[1].style.top = 0; if (H.skin.getSkinElement("dock", "button")) { aa[g].div.childNodes[1].src = H.skin.getSkinElement("dock", "button").src } aa[g].div.childNodes[1].style.zIndex = 9; aa[g].div.childNodes[1].style.cursor = "pointer"; aa[g].div.onmouseover = function () { if (aa[g].overGraphic) { aa[g].div.childNodes[0].src = aa[g].overGraphic } if (H.skin.getSkinElement("dock", "buttonOver")) { aa[g].div.childNodes[1].src = H.skin.getSkinElement("dock", "buttonOver").src } }; aa[g].div.onmouseout = function () { if (aa[g].outGraphic) { aa[g].div.childNodes[0].src = aa[g].outGraphic } if (H.skin.getSkinElement("dock", "button")) { aa[g].div.childNodes[1].src = H.skin.getSkinElement("dock", "button").src } }; if (H.skin.getSkinElement("dock", "button")) { aa[g].div.childNodes[1].src = H.skin.getSkinElement("dock", "button").src } } if (aa[g].outGraphic) { aa[g].div.childNodes[0].src = aa[g].outGraphic } else { if (aa[g].overGraphic) { aa[g].div.childNodes[0].src = aa[g].overGraphic } } if (k) { aa[g].div.onclick = function (l) { l.preventDefault(); e(H.id).callback(g); if (aa[g].overGraphic) { aa[g].div.childNodes[0].src = aa[g].overGraphic } if (H.skin.getSkinElement("dock", "button")) { aa[g].div.childNodes[1].src = H.skin.getSkinElement("dock", "button").src } } } } } Y(Z, L) }; function N(g) { } function Y(u, h) { U(); if (a.length > 0) { var t = 10; var j = t; var m = -1; var l = H.skin.getSkinElement("dock", "button").height; var n = H.skin.getSkinElement("dock", "button").width; var p = u - n - t; var k, q; if (W.align == e.html5.view.positions.LEFT) { m = 1; p = t } for (var s = 0; s < a.length; s++) { var g = Math.floor(j / h); if ((j + l + t) > ((g + 1) * h)) { j = ((g + 1) * h) + t; g = Math.floor(j / h) } var r = aa[a[s]].div; r.style.top = (j % h) + "px"; r.style.left = (p + (H.skin.getSkinElement("dock", "button").width + t) * g * m) + "px"; var o = { x: f.parseDimension(r.style.left), y: f.parseDimension(r.style.top), width: n, height: l }; if (!k || (o.x <= k.x && o.y <= k.y)) { k = o } if (!q || (o.x >= q.x && o.y >= q.y)) { q = o } j += H.skin.getSkinElement("dock", "button").height + t } ab = { x: k.x, y: k.y, width: q.x - k.x + q.width, height: k.y - q.y + q.height} } if (Q != H.jwGetFullscreen() || Z != u || L != h) { Z = u; L = h; Q = H.jwGetFullscreen(); b = undefined; setTimeout(O, 1) } } function ae(g) { return function () { if (!ac && b != g && a.length > 0) { b = g; X.sendEvent(g, { component: "dock", boundingRect: ab }) } } } function T(g) { if (f.isMobile()) { if (g.newstate == e.api.events.state.IDLE) { I() } else { ad() } } else { S() } } function S(g) { if (ac) { return } clearTimeout(c); if (P.position == e.html5.view.positions.OVER || H.jwGetFullscreen()) { switch (H.jwGetState()) { case e.api.events.state.PAUSED: case e.api.events.state.IDLE: if (R && R.style.opacity < 1 && (!P.idlehide || f.exists(g))) { M() } if (P.idlehide) { c = setTimeout(function () { K() }, 2000) } break; default: if (f.exists(g)) { M() } c = setTimeout(function () { K() }, 2000); break } } else { M() } } var O = ae(e.api.events.JWPLAYER_COMPONENT_SHOW); var J = ae(e.api.events.JWPLAYER_COMPONENT_HIDE); this.resize = Y; var I = function () { d(R, { display: "block" }); if (ac) { ac = false; O() } }; var ad = function () { d(R, { display: "none" }); if (!ac) { J(); ac = true } }; function K() { if (!ac) { J(); if (R.style.opacity == 1) { f.cancelAnimation(R); f.fadeTo(R, 0, 0.1, 1, 0) } } } function M() { if (!ac) { O(); if (R.style.opacity == 0) { f.cancelAnimation(R); f.fadeTo(R, 1, 0.1, 0, 0) } } } function U() { V = document.getElementById(H.id); V.addEventListener("mousemove", S) } this.hide = ad; this.show = I; return this } })(jwplayer); (function (b) { b.html5.eventdispatcher = function (e, a) { var f = new b.events.eventdispatcher(a); b.utils.extend(this, f); this.sendEvent = function (d, c) { if (!b.utils.exists(c)) { c = {} } b.utils.extend(c, { id: e, version: b.version, type: d }); f.sendEvent(d, c) } } })(jwplayer); (function (d) { var c = { prefix: "", file: "", link: "", margin: 8, out: 0.5, over: 1, timeout: 5, hide: true, position: "bottom-left" }; _css = d.utils.css; d.html5.logo = function (A, w) { var x = A; var a; var J; var b; var F = false; G(); function G() { z(); x.jwAddEventListener(d.api.events.JWPLAYER_PLAYER_STATE, E); K(); C() } function z() { if (c.prefix) { var f = A.version.split(/\W/).splice(0, 2).join("/"); if (c.prefix.indexOf(f) < 0) { c.prefix += f + "/" } } if (w.position == d.html5.view.positions.OVER) { w.position = c.position } try { if (window.location.href.indexOf("https") == 0) { c.prefix = c.prefix.replace("http://l.longtailvideo.com", "https://securel.longtailvideo.com") } } catch (e) { } J = d.utils.extend({}, c, w) } function K() { b = document.createElement("img"); b.id = x.id + "_jwplayer_logo"; b.style.display = "none"; b.onload = function (e) { _css(b, D()); y() }; if (!J.file) { return } if (J.file.indexOf("/") >= 0) { b.src = J.file } else { b.src = J.prefix + J.file } } if (!J.file) { return } this.resize = function (e, f) { }; this.getDisplayElement = function () { return b }; function C() { if (J.link) { b.onmouseover = H; b.onmouseout = y; b.onclick = v } else { this.mouseEnabled = false } } function v(e) { if (typeof e != "undefined") { e.stopPropagation() } if (!F) { return } x.jwPause(); x.jwSetFullscreen(false); if (J.link) { window.open(J.link, "_top") } return } function y(e) { if (J.link && F) { b.style.opacity = J.out } return } function H(e) { if (F) { b.style.opacity = J.over } return } function D() { var e = { textDecoration: "none", position: "absolute", cursor: "pointer" }; e.display = (J.hide.toString() == "true" && !F) ? "none" : "block"; var f = J.position.toLowerCase().split("-"); for (var g in f) { e[f[g]] = J.margin } return e } function B() { if (J.hide.toString() == "true") { b.style.display = "block"; b.style.opacity = 0; d.utils.fadeTo(b, J.out, 0.1, parseFloat(b.style.opacity)); a = setTimeout(function () { I() }, J.timeout * 1000) } F = true } function I() { F = false; if (J.hide.toString() == "true") { d.utils.fadeTo(b, 0, 0.1, parseFloat(b.style.opacity)) } } function E(e) { if (e.newstate == d.api.events.state.BUFFERING) { clearTimeout(a); B() } } return this } })(jwplayer); (function (f) { var j = { ended: f.api.events.state.IDLE, playing: f.api.events.state.PLAYING, pause: f.api.events.state.PAUSED, buffering: f.api.events.state.BUFFERING }; var h = f.utils; var k = h.css; var g = h.isMobile(); f.html5.mediavideo = function (al, T) { var V = { abort: ae, canplay: ai, canplaythrough: ai, durationchange: b, emptied: ae, ended: ai, error: O, loadeddata: b, loadedmetadata: b, loadstart: ai, pause: ai, play: ae, playing: ai, progress: e, ratechange: ae, seeked: ai, seeking: ai, stalled: ai, suspend: ai, timeupdate: P, volumechange: W, waiting: ai, canshowcurrentframe: ae, dataunavailable: ae, empty: ae, load: Y, loadedfirstframe: ae, webkitfullscreenchange: ak }; var aj = new f.html5.eventdispatcher(); h.extend(this, aj); var ad = al, ah = T, ag, S, U, af, an, a = false, aa = false, R, ab, Z; ac(); this.load = function (n, m) { if (typeof m == "undefined") { m = true } if (!aa) { return } af = n; h.empty(ag); Z = 0; if (n.levels && n.levels.length > 0) { if (n.levels.length == 1) { ag.src = n.levels[0].file } else { ao(n.levels); if (ag.src) { ag.removeAttribute("src") } for (var o = 0; o < n.levels.length; o++) { var l = ag.ownerDocument.createElement("source"); l.src = n.levels[o].file; ag.appendChild(l); Z++ } } } else { ag.src = n.file } if (g) { if (n.image) { ag.poster = n.image } ag.style.display = "block"; setTimeout(function () { ag.setAttribute("controls", "controls") }, 100) } R = ab = U = false; ad.buffer = 0; if (!h.exists(n.start)) { n.start = 0 } ad.duration = n.duration; aj.sendEvent(f.api.events.JWPLAYER_MEDIA_LOADED); if ((!g && n.levels.length == 1) || !a) { ag.load() } a = false; if (m) { N(f.api.events.state.BUFFERING); aj.sendEvent(f.api.events.JWPLAYER_MEDIA_BUFFER, { bufferPercent: 0 }); this.play() } }; this.play = function () { if (!aa) { return } if (S != f.api.events.state.PLAYING) { Q(); if (ab) { N(f.api.events.state.PLAYING) } else { N(f.api.events.state.BUFFERING) } ag.play() } }; this.pause = function () { if (!aa) { return } ag.pause(); N(f.api.events.state.PAUSED) }; this.seek = function (l) { if (!aa) { return } if (!(ad.duration <= 0 || isNaN(ad.duration)) && !(ad.position <= 0 || isNaN(ad.position))) { ag.currentTime = l; ag.play() } }; _stop = this.stop = function (n) { if (!aa) { return } if (!h.exists(n)) { n = true } am(); if (n) { ag.style.display = "none"; ab = false; var m = navigator.userAgent; if (m.match(/chrome/i)) { ag.src = undefined } else { if (m.match(/safari/i) || m.match(/firefox/i)) { ag.removeAttribute("src") } else { ag.src = "" } } ag.removeAttribute("controls"); ag.removeAttribute("poster"); h.empty(ag); ag.load(); a = true; if (ag.webkitSupportsFullscreen) { try { ag.webkitExitFullscreen() } catch (l) { } } } N(f.api.events.state.IDLE) }; this.fullscreen = function (l) { if (l === true) { this.resize("100%", "100%") } else { this.resize(ad.config.width, ad.config.height) } }; this.resize = function (l, m) { }; this.volume = function (l) { if (!g) { ag.volume = l / 100 } }; this.mute = function (l) { if (!g) { ag.muted = l } }; this.getDisplayElement = function () { return ag }; this.hasChrome = function () { return g }; this.detachMedia = function () { aa = false; return this.getDisplayElement() }; this.attachMedia = function () { aa = true }; function X(l, m) { return function (n) { if (aa && h.exists(n.target.parentNode)) { m(n) } } } function ac() { ag = document.createElement("video"); S = f.api.events.state.IDLE; for (var l in V) { ag.addEventListener(l, X(l, V[l]), true) } aa = true; ag.setAttribute("x-webkit-airplay", "allow"); if (ah.parentNode) { ah.parentNode.replaceChild(ag, ah) } if (!ag.id) { ag.id = ah.id } ag.volume = ad.volume / 100 } function N(m) { if (m == f.api.events.state.PAUSED && S == f.api.events.state.IDLE) { return } if (S != m) { var l = S; ad.state = S = m; aj.sendEvent(f.api.events.JWPLAYER_PLAYER_STATE, { oldstate: l, newstate: m }) } } function ae(l) { } function W(m) { var l = Math.round(ag.volume * 100); if (l != ad.volume) { ad.volume = l; aj.sendEvent(f.api.events.JWPLAYER_MEDIA_VOLUME, { volume: ad.volume }) } if (ag.muted != ad.mute) { ad.mute = ag.muted; aj.sendEvent(f.api.events.JWPLAYER_MEDIA_MUTE, { mute: ad.mute }) } } function e(l) { var m; if (h.exists(l) && l.lengthComputable && l.total) { m = l.loaded / l.total * 100 } else { if (h.exists(ag.buffered) && (ag.buffered.length > 0)) { var n = ag.buffered.length - 1; if (n >= 0) { m = ag.buffered.end(n) / ag.duration * 100 } } } if (ab === false && S == f.api.events.state.BUFFERING) { aj.sendEvent(f.api.events.JWPLAYER_MEDIA_BUFFER_FULL); ab = true } if (!R) { if (m == 100) { R = true } if (h.exists(m) && (m > ad.buffer)) { ad.buffer = Math.round(m); aj.sendEvent(f.api.events.JWPLAYER_MEDIA_BUFFER, { bufferPercent: Math.round(m) }) } } } function P(l) { if (h.exists(l) && h.exists(l.target)) { if (!isNaN(l.target.duration) && (isNaN(ad.duration) || ad.duration < 1)) { if (l.target.duration == Infinity) { ad.duration = 0 } else { ad.duration = Math.round(l.target.duration * 10) / 10 } } if (!U && ag.readyState > 0) { ag.style.display = "block"; N(f.api.events.state.PLAYING) } if (S == f.api.events.state.PLAYING) { if (!U && ag.readyState > 0) { U = true; try { if (ag.currentTime < af.start) { ag.currentTime = af.start } } catch (m) { } ag.volume = ad.volume / 100; ag.muted = ad.mute } ad.position = ad.duration > 0 ? (Math.round(l.target.currentTime * 10) / 10) : 0; aj.sendEvent(f.api.events.JWPLAYER_MEDIA_TIME, { position: ad.position, duration: ad.duration }); if (ad.position >= ad.duration && (ad.position > 0 || ad.duration > 0)) { c() } } } e(l) } function Y(l) { } function ai(l) { if (j[l.type]) { if (l.type == "ended") { c() } else { N(j[l.type]) } } } function b(m) { var n = Math.round(m.target.duration * 10) / 10; var l = { height: m.target.videoHeight, width: m.target.videoWidth, duration: n }; if ((ad.duration < n || isNaN(ad.duration)) && m.target.duration != Infinity) { ad.duration = n } aj.sendEvent(f.api.events.JWPLAYER_MEDIA_META, { metadata: l }) } function O(l) { if (S == f.api.events.state.IDLE) { return } var m = "There was an error: "; if ((l.target.error && l.target.tagName.toLowerCase() == "video") || l.target.parentNode.error && l.target.parentNode.tagName.toLowerCase() == "video") { var n = !h.exists(l.target.error) ? l.target.parentNode.error : l.target.error; switch (n.code) { case n.MEDIA_ERR_ABORTED: m = "You aborted the video playback: "; break; case n.MEDIA_ERR_NETWORK: m = "A network error caused the video download to fail part-way: "; break; case n.MEDIA_ERR_DECODE: m = "The video playback was aborted due to a corruption problem or because the video used features your browser did not support: "; break; case n.MEDIA_ERR_SRC_NOT_SUPPORTED: m = "The video could not be loaded, either because the server or network failed or because the format is not supported: "; break; default: m = "An unknown error occurred: "; break } } else { if (l.target.tagName.toLowerCase() == "source") { Z--; if (Z > 0) { return } m = "The video could not be loaded, either because the server or network failed or because the format is not supported: " } else { h.log("An unknown error occurred.  Continuing..."); return } } _stop(false); m += d(); _error = true; aj.sendEvent(f.api.events.JWPLAYER_ERROR, { message: m }); return } function d() { var m = ""; for (var n in af.levels) { var o = af.levels[n]; var l = ah.ownerDocument.createElement("source"); m += f.utils.getAbsolutePath(o.file); if (n < (af.levels.length - 1)) { m += ", " } } return m } function Q() { if (!h.exists(an)) { an = setInterval(function () { e() }, 100) } } function am() { clearInterval(an); an = null } function c() { if (S != f.api.events.state.IDLE) { _stop(false); aj.sendEvent(f.api.events.JWPLAYER_MEDIA_COMPLETE) } } function ak(l) { if (h.exists(ag.webkitDisplayingFullscreen)) { if (ad.fullscreen && !ag.webkitDisplayingFullscreen) { aj.sendEvent(f.api.events.JWPLAYER_FULLSCREEN, { fullscreen: false }) } } } function ao(m) { if (m.length > 0 && h.isIOS()) { if (h.extension(m[0].file) != "mp4") { var o = -1; for (var n = 1; n < m.length; n++) { if (h.extension(m[n].file) == "mp4") { o = n; break } } if (o > -1) { var l = m.splice(o, 1)[0]; m.unshift(l) } } } } } })(jwplayer); (function (e) { var f = { ended: e.api.events.state.IDLE, playing: e.api.events.state.PLAYING, pause: e.api.events.state.PAUSED, buffering: e.api.events.state.BUFFERING }; var d = e.utils.css; e.html5.mediayoutube = function (r, v) { var u = new e.html5.eventdispatcher(); e.utils.extend(this, u); var p = r; var s = document.getElementById(v.id); var t = e.api.events.state.IDLE; var b, c; function q(h) { if (t != h) { var g = t; p.state = h; t = h; u.sendEvent(e.api.events.JWPLAYER_PLAYER_STATE, { oldstate: g, newstate: h }) } } this.getDisplayElement = this.detachMedia = function () { return s }; this.attachMedia = function () { }; this.play = function () { if (t == e.api.events.state.IDLE) { u.sendEvent(e.api.events.JWPLAYER_MEDIA_BUFFER, { bufferPercent: 100 }); u.sendEvent(e.api.events.JWPLAYER_MEDIA_BUFFER_FULL); q(e.api.events.state.PLAYING) } else { if (t == e.api.events.state.PAUSED) { q(e.api.events.state.PLAYING) } } }; this.pause = function () { q(e.api.events.state.PAUSED) }; this.seek = function (g) { }; this.stop = function (g) { if (!_utils.exists(g)) { g = true } p.position = 0; q(e.api.events.state.IDLE); if (g) { d(s, { display: "none" }) } }; this.volume = function (g) { p.volume = g; u.sendEvent(e.api.events.JWPLAYER_MEDIA_VOLUME, { volume: Math.round(g) }) }; this.mute = function (g) { s.muted = g; p.mute = g; u.sendEvent(e.api.events.JWPLAYER_MEDIA_MUTE, { mute: g }) }; this.resize = function (g, h) { if (g * h > 0 && b) { b.width = c.width = g; b.height = c.height = h } }; this.fullscreen = function (g) { if (g === true) { this.resize("100%", "100%") } else { this.resize(p.config.width, p.config.height) } }; this.load = function (g) { a(g); d(b, { display: "block" }); q(e.api.events.state.BUFFERING); u.sendEvent(e.api.events.JWPLAYER_MEDIA_BUFFER, { bufferPercent: 0 }); u.sendEvent(e.api.events.JWPLAYER_MEDIA_LOADED); this.play() }; this.hasChrome = function () { return (t != e.api.events.state.IDLE) }; function a(g) { var k = g.levels[0].file; k = ["http://www.youtube.com/v/", w(k), "&amp;hl=en_US&amp;fs=1&autoplay=1"].join(""); b = document.createElement("object"); b.id = s.id; b.style.position = "absolute"; var h = { movie: k, allowfullscreen: "true", allowscriptaccess: "always" }; for (var n in h) { var j = document.createElement("param"); j.name = n; j.value = h[n]; b.appendChild(j) } c = document.createElement("embed"); b.appendChild(c); var m = { src: k, type: "application/x-shockwave-flash", allowfullscreen: "true", allowscriptaccess: "always", width: b.width, height: b.height }; for (var l in m) { c.setAttribute(l, m[l]) } b.appendChild(c); b.style.zIndex = 2147483000; if (s != b && s.parentNode) { s.parentNode.replaceChild(b, s) } s = b } function w(j) { var k = j.split(/\?|\#\!/); var g = ""; for (var h = 0; h < k.length; h++) { if (k[h].substr(0, 2) == "v=") { g = k[h].substr(2) } } if (g == "") { if (j.indexOf("/v/") >= 0) { g = j.substr(j.indexOf("/v/") + 3) } else { if (j.indexOf("youtu.be") >= 0) { g = j.substr(j.indexOf("youtu.be/") + 9) } else { g = j } } } if (g.indexOf("?") > -1) { g = g.substr(0, g.indexOf("?")) } if (g.indexOf("&") > -1) { g = g.substr(0, g.indexOf("&")) } return g } this.embed = c; 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.isMobile()) { 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] } } var playlistVisible = false; 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 { if (pluginName == "playlist") { playlistVisible = true } _model.plugins.config[pluginName].position = _model.plugins.config[pluginName].position.toString().toUpperCase() } } if (_model.plugins.config.controlbar && playlistVisible) { _model.plugins.config.controlbar.hideplaylistcontrols = true } 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 } if (typeof _model.plugins.config.dock.idlehide == "undefined") { try { _model.plugins.config.dock.idlehide = _model.plugins.config.controlbar.idlehide } catch (e) { } } } 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 } _model.position = 0; _model.duration = _model.playlist.length > 0 ? _model.playlist[_model.item].duration : 0; _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: config = { file: input }; break } _model.playlist = new jwplayer.html5.playlist(config); _model.item = _model.config.item >= 0 ? _model.config.item : 0; if (!_model.playlist[_model.item].provider) { _loadExternal(_model.playlist[_model.item].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 (b) { b.html5.playlist = function (a) { var e = []; if (a.playlist && a.playlist instanceof Array && a.playlist.length > 0) { for (var f in a.playlist) { if (!isNaN(parseInt(f))) { e.push(new b.html5.playlistitem(a.playlist[f])) } } } else { e.push(new b.html5.playlistitem(a)) } return e } })(jwplayer); (function (e) { var f = { size: 180, position: e.html5.view.positions.NONE, itemheight: 60, thumbs: true, fontcolor: "#000000", overcolor: "", activecolor: "", backgroundcolor: "#f8f8f8", font: "_sans", fontsize: "", fontstyle: "", fontweight: "" }; var d = { _sans: "Arial, Helvetica, sans-serif", _serif: "Times, Times New Roman, serif", _typewriter: "Courier New, Courier, monospace" }; _utils = e.utils; _css = _utils.css; _hide = function (a) { _css(a, { display: "none" }) }; _show = function (a) { _css(a, { display: "block" }) }; e.html5.playlistcomponent = function (J, K) { var D = J; var X = e.utils.extend({}, f, D.skin.getComponentSettings("playlist"), K); if (X.position == e.html5.view.positions.NONE || typeof e.html5.view.positions[X.position] == "undefined") { return } var c; var R; var I; var Y; var V; var W; var S = -1; var U = { background: undefined, item: undefined, itemOver: undefined, itemImage: undefined, itemActive: undefined }; this.getDisplayElement = function () { return c }; this.resize = function (g, j) { R = g; I = j; if (D.jwGetFullscreen()) { _hide(c) } else { var h = { display: "block", width: R, height: I }; _css(c, h) } }; this.show = function () { _show(c) }; this.hide = function () { _hide(c) }; function T() { c = document.createElement("div"); c.id = D.id + "_jwplayer_playlistcomponent"; c.style.overflow = "hidden"; switch (X.position) { case e.html5.view.positions.RIGHT: case e.html5.view.positions.LEFT: c.style.width = X.size + "px"; break; case e.html5.view.positions.TOP: case e.html5.view.positions.BOTTOM: c.style.height = X.size + "px"; break } M(); if (U.item) { X.itemheight = U.item.height } c.style.backgroundColor = "#C6C6C6"; D.jwAddEventListener(e.api.events.JWPLAYER_PLAYLIST_LOADED, H); D.jwAddEventListener(e.api.events.JWPLAYER_PLAYLIST_ITEM, F); D.jwAddEventListener(e.api.events.JWPLAYER_PLAYER_STATE, Q) } function N() { var g = document.createElement("ul"); _css(g, { width: c.style.width, minWidth: c.style.width, height: c.style.height, backgroundColor: X.backgroundcolor, backgroundImage: U.background ? "url(" + U.background.src + ")" : "", color: X.fontcolor, listStyle: "none", margin: 0, padding: 0, fontFamily: d[X.font] ? d[X.font] : d._sans, fontSize: (X.fontsize ? X.fontsize : 11) + "px", fontStyle: X.fontstyle, fontWeight: X.fontweight, overflowY: "auto" }); return g } function b(g) { return function () { var k = W.getElementsByClassName("item")[g]; var j = X.fontcolor; var h = U.item ? "url(" + U.item.src + ")" : ""; if (g == D.jwGetPlaylistIndex()) { if (X.activecolor !== "") { j = X.activecolor } if (U.itemActive) { h = "url(" + U.itemActive.src + ")" } } _css(k, { color: X.overcolor !== "" ? X.overcolor : j, backgroundImage: U.itemOver ? "url(" + U.itemOver.src + ")" : h }) } } function O(g) { return function () { var k = W.getElementsByClassName("item")[g]; var j = X.fontcolor; var h = U.item ? "url(" + U.item.src + ")" : ""; if (g == D.jwGetPlaylistIndex()) { if (X.activecolor !== "") { j = X.activecolor } if (U.itemActive) { h = "url(" + U.itemActive.src + ")" } } _css(k, { color: j, backgroundImage: h }) } } function L(p) { var h = Y[p]; var j = document.createElement("li"); j.className = "item"; _css(j, { height: X.itemheight, display: "block", cursor: "pointer", backgroundImage: U.item ? "url(" + U.item.src + ")" : "", backgroundSize: "100% " + X.itemheight + "px" }); j.onmouseover = b(p); j.onmouseout = O(p); var o = document.createElement("div"); var s = new Image(); var n = 0; var m = 0; var l = 0; if (E() && (h.image || h["playlist.image"] || U.itemImage)) { s.className = "image"; if (U.itemImage) { n = (X.itemheight - U.itemImage.height) / 2; m = U.itemImage.width; l = U.itemImage.height } else { m = X.itemheight * 4 / 3; l = X.itemheight } _css(o, { height: l, width: m, "float": "left", styleFloat: "left", cssFloat: "left", margin: "0 5px 0 0", background: "black", overflow: "hidden", margin: n + "px", position: "relative" }); _css(s, { position: "relative" }); o.appendChild(s); s.onload = function () { e.utils.stretch(e.utils.stretching.FILL, s, m, l, this.naturalWidth, this.naturalHeight) }; if (h["playlist.image"]) { s.src = h["playlist.image"] } else { if (h.image) { s.src = h.image } else { if (U.itemImage) { s.src = U.itemImage.src } } } j.appendChild(o) } var t = R - m - n * 2; if (I < X.itemheight * Y.length) { t -= 15 } var g = document.createElement("div"); _css(g, { position: "relative", height: "100%", overflow: "hidden" }); var r = document.createElement("span"); if (h.duration > 0) { r.className = "duration"; _css(r, { fontSize: (X.fontsize ? X.fontsize : 11) + "px", fontWeight: (X.fontweight ? X.fontweight : "bold"), width: "40px", height: X.fontsize ? X.fontsize + 10 : 20, lineHeight: 24, "float": "right", styleFloat: "right", cssFloat: "right" }); r.innerHTML = _utils.timeFormat(h.duration); g.appendChild(r) } var k = document.createElement("span"); k.className = "title"; _css(k, { padding: "5px 5px 0 " + (n ? 0 : "5px"), height: X.fontsize ? X.fontsize + 10 : 20, lineHeight: X.fontsize ? X.fontsize + 10 : 20, overflow: "hidden", "float": "left", styleFloat: "left", cssFloat: "left", width: ((h.duration > 0) ? t - 50 : t) - 10 + "px", fontSize: (X.fontsize ? X.fontsize : 13) + "px", fontWeight: (X.fontweight ? X.fontweight : "bold") }); k.innerHTML = h ? h.title : ""; g.appendChild(k); if (h.description) { var q = document.createElement("span"); q.className = "description"; _css(q, { display: "block", "float": "left", styleFloat: "left", cssFloat: "left", margin: 0, paddingLeft: k.style.paddingLeft, paddingRight: k.style.paddingRight, lineHeight: (X.fontsize ? X.fontsize + 4 : 16) + "px", overflow: "hidden", position: "relative" }); q.innerHTML = h.description; g.appendChild(q) } j.appendChild(g); return j } function H(j) { c.innerHTML = ""; Y = D.jwGetPlaylist(); if (!Y) { return } items = []; W = N(); for (var h = 0; h < Y.length; h++) { var k = L(h); k.onclick = a(h); W.appendChild(k); items.push(k) } S = D.jwGetPlaylistIndex(); O(S)(); c.appendChild(W); if (_utils.isIOS() && window.iScroll) { W.style.height = X.itemheight * Y.length + "px"; var g = new iScroll(c.id) } } function a(g) { return function () { D.jwPlaylistItem(g); D.jwPlay(true) } } function P() { W.scrollTop = D.jwGetPlaylistIndex() * X.itemheight } function E() { return X.thumbs.toString().toLowerCase() == "true" } function F(g) { if (S >= 0) { O(S)(); S = g.index } O(g.index)(); P() } function Q() { if (X.position == e.html5.view.positions.OVER) { switch (D.jwGetState()) { case e.api.events.state.IDLE: _show(c); break; default: _hide(c); break } } } function M() { for (var g in U) { U[g] = G(g) } } function G(g) { return D.skin.getSkinElement("playlist", g) } T(); return this } })(jwplayer); (function (c) { c.html5.playlistitem = function (b) { var a = { author: "", date: "", description: "", image: "", link: "", mediaid: "", tags: "", title: "", provider: "", file: "", streamer: "", duration: -1, start: 0, currentLevel: -1, levels: [] }; var f = c.utils.extend({}, a, b); if (f.type) { f.provider = f.type; delete f.type } if (f.levels.length === 0) { f.levels[0] = new c.html5.playlistitemlevel(f) } if (!f.provider) { f.provider = d(f.levels[0]) } else { f.provider = f.provider.toLowerCase() } return f }; function d(b) { if (c.utils.isYouTube(b.file)) { return "youtube" } else { var a = c.utils.extension(b.file); var h; if (a && c.utils.extensionmap[a]) { if (a == "m3u8") { return "video" } h = c.utils.extensionmap[a].html5 } else { if (b.type) { h = b.type } } if (h) { var g = h.split("/")[0]; if (g == "audio") { return "sound" } else { if (g == "video") { return g } } } } return "" } })(jwplayer); (function (b) { b.html5.playlistitemlevel = function (a) { var e = { file: "", streamer: "", bitrate: 0, width: 0 }; for (var f in e) { if (b.utils.exists(a[f])) { e[f] = a[f] } } return e } })(jwplayer); (function (b) { b.html5.playlistloader = function () { var f = new b.html5.eventdispatcher(); b.utils.extend(this, f); this.load = function (c) { b.utils.ajax(c, e, a) }; function e(d) { var j = []; try { var j = b.utils.parsers.rssparser.parse(d.responseXML.firstChild); f.sendEvent(b.api.events.JWPLAYER_PLAYLIST_LOADED, { playlist: new b.html5.playlist({ playlist: j }) }) } catch (c) { a("Could not parse the playlist") } } function a(c) { f.sendEvent(b.api.events.JWPLAYER_ERROR, { message: c ? c : "Could not load playlist an unknown reason." }) } } })(jwplayer); (function (b) { b.html5.skin = function () { var a = {}; var d = false; this.load = function (f, c) { new b.html5.skinloader(f, function (e) { d = true; a = e; c() }, function () { new b.html5.skinloader("", function (e) { d = true; a = e; c() }) }) }; this.getSkinElement = function (h, g) { if (d) { try { return a[h].elements[g] } catch (c) { b.utils.log("No such skin component / element: ", [h, g]) } } return null }; this.getComponentSettings = function (c) { if (d) { return a[c].settings } return null }; this.getComponentLayout = function (c) { if (d) { return a[c].layout } return null } } })(jwplayer); (function (b) { b.html5.skinloader = function (D, u, z) { var v = {}; var G = u; var y = z; var E = true; var A; var w = D; var I = false; function x() { if (typeof w != "string" || w === "") { F(b.html5.defaultSkin().xml) } else { b.utils.ajax(b.utils.getAbsolutePath(w), function (d) { try { if (b.utils.exists(d.responseXML)) { F(d.responseXML); return } } catch (c) { B() } F(b.html5.defaultSkin().xml) }, function (c) { F(b.html5.defaultSkin().xml) }) } } function F(m) { var U = m.getElementsByTagName("component"); if (U.length === 0) { return } for (var p = 0; p < U.length; p++) { var W = U[p].getAttribute("name"); var X = { settings: {}, elements: {}, layout: {} }; v[W] = X; var s = U[p].getElementsByTagName("elements")[0].getElementsByTagName("element"); for (var S = 0; S < s.length; S++) { H(s[S], W) } var k = U[p].getElementsByTagName("settings")[0]; if (k && k.childNodes.length > 0) { var j = k.getElementsByTagName("setting"); for (var d = 0; d < j.length; d++) { var c = j[d].getAttribute("name"); var n = j[d].getAttribute("value"); var o = /color$/.test(c) ? "color" : null; v[W].settings[c] = b.utils.typechecker(n, o) } } var h = U[p].getElementsByTagName("layout")[0]; if (h && h.childNodes.length > 0) { var g = h.getElementsByTagName("group"); for (var q = 0; q < g.length; q++) { var Y = g[q]; v[W].layout[Y.getAttribute("position")] = { elements: [] }; for (var e = 0; e < Y.attributes.length; e++) { var V = Y.attributes[e]; v[W].layout[Y.getAttribute("position")][V.name] = V.value } var f = Y.getElementsByTagName("*"); for (var r = 0; r < f.length; r++) { var T = f[r]; v[W].layout[Y.getAttribute("position")].elements.push({ type: T.tagName }); for (var R = 0; R < T.attributes.length; R++) { var l = T.attributes[R]; v[W].layout[Y.getAttribute("position")].elements[r][l.name] = l.value } if (!b.utils.exists(v[W].layout[Y.getAttribute("position")].elements[r].name)) { v[W].layout[Y.getAttribute("position")].elements[r].name = T.tagName } } } } E = false; a() } } function a() { clearInterval(A); if (!I) { A = setInterval(function () { t() }, 100) } } function H(k, d) { var e = new Image(); var h = k.getAttribute("name"); var f = k.getAttribute("src"); var c; if (f.indexOf("data:image/png;base64,") === 0) { c = f } else { var g = b.utils.getAbsolutePath(w); var j = g.substr(0, g.lastIndexOf("/")); c = [j, d, f].join("/") } v[d].elements[h] = { height: 0, width: 0, src: "", ready: false, image: e }; e.onload = function (l) { C(e, h, d) }; e.onerror = function (l) { I = true; a(); y() }; e.src = c } function B() { for (var f in v) { var d = v[f]; for (var g in d.elements) { var c = d.elements[g]; var e = c.image; e.onload = null; e.onerror = null; delete c.image; delete d.elements[g] } delete v[f] } } function t() { for (var d in v) { if (d != "properties") { for (var c in v[d].elements) { if (!v[d].elements[c].ready) { return } } } } if (E === false) { clearInterval(A); G(v) } } function C(e, c, d) { if (v[d] && v[d].elements[c]) { v[d].elements[c].height = e.height; v[d].elements[c].width = e.width; v[d].elements[c].src = e.src; v[d].elements[c].ready = true; a() } else { b.utils.log("Loaded an image for a missing element: " + d + "." + c) } } x() } })(jwplayer); (function (b) { b.html5.api = function (x, a) { var o = {}; var u = document.createElement("div"); x.parentNode.replaceChild(u, x); u.id = x.id; o.version = b.version; o.id = u.id; var p = new b.html5.model(o, u, a); var r = new b.html5.view(o, u, p); var q = new b.html5.controller(o, u, p, r); o.skin = new b.html5.skin(); o.jwPlay = function (c) { if (typeof c == "undefined") { v() } else { if (c.toString().toLowerCase() == "true") { q.play() } else { q.pause() } } }; o.jwPause = function (c) { if (typeof c == "undefined") { v() } else { if (c.toString().toLowerCase() == "true") { q.pause() } else { q.play() } } }; function v() { if (p.state == b.api.events.state.PLAYING || p.state == b.api.events.state.BUFFERING) { q.pause() } else { q.play() } } o.jwStop = q.stop; o.jwSeek = q.seek; o.jwPlaylistItem = q.item; o.jwPlaylistNext = q.next; o.jwPlaylistPrev = q.prev; o.jwResize = q.resize; o.jwLoad = q.load; o.jwDetachMedia = q.detachMedia; o.jwAttachMedia = q.attachMedia; function s(c) { return function () { return p[c] } } function w(e, c, d) { return function () { var f = p.plugins.object[e]; if (f && f[c] && typeof f[c] == "function") { f[c].apply(f, d) } } } o.jwGetItem = s("item"); o.jwGetPosition = s("position"); o.jwGetDuration = s("duration"); o.jwGetBuffer = s("buffer"); o.jwGetWidth = s("width"); o.jwGetHeight = s("height"); o.jwGetFullscreen = s("fullscreen"); o.jwSetFullscreen = q.setFullscreen; o.jwGetVolume = s("volume"); o.jwSetVolume = q.setVolume; o.jwGetMute = s("mute"); o.jwSetMute = q.setMute; o.jwGetStretching = function () { return p.stretching.toUpperCase() }; o.jwGetState = s("state"); o.jwGetVersion = function () { return o.version }; o.jwGetPlaylist = function () { return p.playlist }; o.jwGetPlaylistIndex = o.jwGetItem; o.jwAddEventListener = q.addEventListener; o.jwRemoveEventListener = q.removeEventListener; o.jwSendEvent = q.sendEvent; o.jwDockSetButton = function (c, f, e, d) { if (p.plugins.object.dock && p.plugins.object.dock.setButton) { p.plugins.object.dock.setButton(c, f, e, d) } }; o.jwControlbarShow = w("controlbar", "show"); o.jwControlbarHide = w("controlbar", "hide"); o.jwDockShow = w("dock", "show"); o.jwDockHide = w("dock", "hide"); o.jwDisplayShow = w("display", "show"); o.jwDisplayHide = w("display", "hide"); o.jwGetLevel = function () { }; o.jwGetBandwidth = function () { }; o.jwGetLockState = function () { }; o.jwLock = function () { }; o.jwUnlock = function () { }; function y() { if (p.config.playlistfile) { p.addEventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED, t); p.loadPlaylist(p.config.playlistfile) } else { if (typeof p.config.playlist == "string") { p.addEventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED, t); p.loadPlaylist(p.config.playlist) } else { p.loadPlaylist(p.config); setTimeout(t, 25) } } } function t(c) { p.removeEventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED, t); p.setupPlugins(); r.setup(); var c = { id: o.id, version: o.version }; q.playerReady(c) } if (p.config.chromeless && !b.utils.isIOS()) { y() } else { o.skin.load(p.config.skin, y) } return o } })(jwplayer) };
/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject = function () { var D = "undefined", r = "object", S = "Shockwave Flash", W = "ShockwaveFlash.ShockwaveFlash", q = "application/x-shockwave-flash", R = "SWFObjectExprInst", x = "onreadystatechange", O = window, j = document, t = navigator, T = false, U = [h], o = [], N = [], I = [], l, Q, E, B, J = false, a = false, n, G, m = true, M = function () { var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D, ah = t.userAgent.toLowerCase(), Y = t.platform.toLowerCase(), ae = Y ? /win/.test(Y) : /win/.test(ah), ac = Y ? /mac/.test(Y) : /mac/.test(ah), af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, X = ! +"\v1", ag = [0, 0, 0], ab = null; if (typeof t.plugins != D && typeof t.plugins[S] == r) { ab = t.plugins[S].description; if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) { T = true; X = false; ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10); ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10); ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0 } } else { if (typeof O.ActiveXObject != D) { try { var ad = new ActiveXObject(W); if (ad) { ab = ad.GetVariable("$version"); if (ab) { X = true; ab = ab.split(" ")[1].split(","); ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } } catch (Z) { } } } return { w3: aa, pv: ag, wk: af, ie: X, win: ae, mac: ac} } (), k = function () { if (!M.w3) { return } if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) { f() } if (!J) { if (typeof j.addEventListener != D) { j.addEventListener("DOMContentLoaded", f, false) } if (M.ie && M.win) { j.attachEvent(x, function () { if (j.readyState == "complete") { j.detachEvent(x, arguments.callee); f() } }); if (O == top) { (function () { if (J) { return } try { j.documentElement.doScroll("left") } catch (X) { setTimeout(arguments.callee, 0); return } f() })() } } if (M.wk) { (function () { if (J) { return } if (!/loaded|complete/.test(j.readyState)) { setTimeout(arguments.callee, 0); return } f() })() } s(f) } } (); function f() { if (J) { return } try { var Z = j.getElementsByTagName("body")[0].appendChild(C("span")); Z.parentNode.removeChild(Z) } catch (aa) { return } J = true; var X = U.length; for (var Y = 0; Y < X; Y++) { U[Y]() } } function K(X) { if (J) { X() } else { U[U.length] = X } } function s(Y) { if (typeof O.addEventListener != D) { O.addEventListener("load", Y, false) } else { if (typeof j.addEventListener != D) { j.addEventListener("load", Y, false) } else { if (typeof O.attachEvent != D) { i(O, "onload", Y) } else { if (typeof O.onload == "function") { var X = O.onload; O.onload = function () { X(); Y() } } else { O.onload = Y } } } } } function h() { if (T) { V() } else { H() } } function V() { var X = j.getElementsByTagName("body")[0]; var aa = C(r); aa.setAttribute("type", q); var Z = X.appendChild(aa); if (Z) { var Y = 0; (function () { if (typeof Z.GetVariable != D) { var ab = Z.GetVariable("$version"); if (ab) { ab = ab.split(" ")[1].split(","); M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } else { if (Y < 10) { Y++; setTimeout(arguments.callee, 10); return } } X.removeChild(aa); Z = null; H() })() } else { H() } } function H() { var ag = o.length; if (ag > 0) { for (var af = 0; af < ag; af++) { var Y = o[af].id; var ab = o[af].callbackFn; var aa = { success: false, id: Y }; if (M.pv[0] > 0) { var ae = c(Y); if (ae) { if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) { w(Y, true); if (ab) { aa.success = true; aa.ref = z(Y); ab(aa) } } else { if (o[af].expressInstall && A()) { var ai = {}; ai.data = o[af].expressInstall; ai.width = ae.getAttribute("width") || "0"; ai.height = ae.getAttribute("height") || "0"; if (ae.getAttribute("class")) { ai.styleclass = ae.getAttribute("class") } if (ae.getAttribute("align")) { ai.align = ae.getAttribute("align") } var ah = {}; var X = ae.getElementsByTagName("param"); var ac = X.length; for (var ad = 0; ad < ac; ad++) { if (X[ad].getAttribute("name").toLowerCase() != "movie") { ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value") } } P(ai, ah, Y, ab) } else { p(ae); if (ab) { ab(aa) } } } } } else { w(Y, true); if (ab) { var Z = z(Y); if (Z && typeof Z.SetVariable != D) { aa.success = true; aa.ref = Z } ab(aa) } } } } } function z(aa) { var X = null; var Y = c(aa); if (Y && Y.nodeName == "OBJECT") { if (typeof Y.SetVariable != D) { X = Y } else { var Z = Y.getElementsByTagName(r)[0]; if (Z) { X = Z } } } return X } function A() { return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312) } function P(aa, ab, X, Z) { a = true; E = Z || null; B = { success: false, id: X }; var ae = c(X); if (ae) { if (ae.nodeName == "OBJECT") { l = g(ae); Q = null } else { l = ae; Q = X } aa.id = R; if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) { aa.width = "310" } if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) { aa.height = "137" } j.title = j.title.slice(0, 47) + " - Flash Player Installation"; var ad = M.ie && M.win ? "ActiveX" : "PlugIn", ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title; if (typeof ab.flashvars != D) { ab.flashvars += "&" + ac } else { ab.flashvars = ac } if (M.ie && M.win && ae.readyState != 4) { var Y = C("div"); X += "SWFObjectNew"; Y.setAttribute("id", X); ae.parentNode.insertBefore(Y, ae); ae.style.display = "none"; (function () { if (ae.readyState == 4) { ae.parentNode.removeChild(ae) } else { setTimeout(arguments.callee, 10) } })() } u(aa, ab, X) } } function p(Y) { if (M.ie && M.win && Y.readyState != 4) { var X = C("div"); Y.parentNode.insertBefore(X, Y); X.parentNode.replaceChild(g(Y), X); Y.style.display = "none"; (function () { if (Y.readyState == 4) { Y.parentNode.removeChild(Y) } else { setTimeout(arguments.callee, 10) } })() } else { Y.parentNode.replaceChild(g(Y), Y) } } function g(ab) { var aa = C("div"); if (M.win && M.ie) { aa.innerHTML = ab.innerHTML } else { var Y = ab.getElementsByTagName(r)[0]; if (Y) { var ad = Y.childNodes; if (ad) { var X = ad.length; for (var Z = 0; Z < X; Z++) { if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) { aa.appendChild(ad[Z].cloneNode(true)) } } } } } return aa } function u(ai, ag, Y) { var X, aa = c(Y); if (M.wk && M.wk < 312) { return X } if (aa) { if (typeof ai.id == D) { ai.id = Y } if (M.ie && M.win) { var ah = ""; for (var ae in ai) { if (ai[ae] != Object.prototype[ae]) { if (ae.toLowerCase() == "data") { ag.movie = ai[ae] } else { if (ae.toLowerCase() == "styleclass") { ah += ' class="' + ai[ae] + '"' } else { if (ae.toLowerCase() != "classid") { ah += " " + ae + '="' + ai[ae] + '"' } } } } } var af = ""; for (var ad in ag) { if (ag[ad] != Object.prototype[ad]) { af += '<param name="' + ad + '" value="' + ag[ad] + '" />' } } aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>"; N[N.length] = ai.id; X = c(ai.id) } else { var Z = C(r); Z.setAttribute("type", q); for (var ac in ai) { if (ai[ac] != Object.prototype[ac]) { if (ac.toLowerCase() == "styleclass") { Z.setAttribute("class", ai[ac]) } else { if (ac.toLowerCase() != "classid") { Z.setAttribute(ac, ai[ac]) } } } } for (var ab in ag) { if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") { e(Z, ab, ag[ab]) } } aa.parentNode.replaceChild(Z, aa); X = Z } } return X } function e(Z, X, Y) { var aa = C("param"); aa.setAttribute("name", X); aa.setAttribute("value", Y); Z.appendChild(aa) } function y(Y) { var X = c(Y); if (X && X.nodeName == "OBJECT") { if (M.ie && M.win) { X.style.display = "none"; (function () { if (X.readyState == 4) { b(Y) } else { setTimeout(arguments.callee, 10) } })() } else { X.parentNode.removeChild(X) } } } function b(Z) { var Y = c(Z); if (Y) { for (var X in Y) { if (typeof Y[X] == "function") { Y[X] = null } } Y.parentNode.removeChild(Y) } } function c(Z) { var X = null; try { X = j.getElementById(Z) } catch (Y) { } return X } function C(X) { return j.createElement(X) } function i(Z, X, Y) { Z.attachEvent(X, Y); I[I.length] = [Z, X, Y] } function F(Z) { var Y = M.pv, X = Z.split("."); X[0] = parseInt(X[0], 10); X[1] = parseInt(X[1], 10) || 0; X[2] = parseInt(X[2], 10) || 0; return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false } function v(ac, Y, ad, ab) { if (M.ie && M.mac) { return } var aa = j.getElementsByTagName("head")[0]; if (!aa) { return } var X = (ad && typeof ad == "string") ? ad : "screen"; if (ab) { n = null; G = null } if (!n || G != X) { var Z = C("style"); Z.setAttribute("type", "text/css"); Z.setAttribute("media", X); n = aa.appendChild(Z); if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) { n = j.styleSheets[j.styleSheets.length - 1] } G = X } if (M.ie && M.win) { if (n && typeof n.addRule == r) { n.addRule(ac, Y) } } else { if (n && typeof j.createTextNode != D) { n.appendChild(j.createTextNode(ac + " {" + Y + "}")) } } } function w(Z, X) { if (!m) { return } var Y = X ? "visible" : "hidden"; if (J && c(Z)) { c(Z).style.visibility = Y } else { v("#" + Z, "visibility:" + Y) } } function L(Y) { var Z = /[\\\"<>\.;]/; var X = Z.exec(Y) != null; return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y } var d = function () { if (M.ie && M.win) { window.attachEvent("onunload", function () { var ac = I.length; for (var ab = 0; ab < ac; ab++) { I[ab][0].detachEvent(I[ab][1], I[ab][2]) } var Z = N.length; for (var aa = 0; aa < Z; aa++) { y(N[aa]) } for (var Y in M) { M[Y] = null } M = null; for (var X in swfobject) { swfobject[X] = null } swfobject = null }) } } (); return { registerObject: function (ab, X, aa, Z) { if (M.w3 && ab && X) { var Y = {}; Y.id = ab; Y.swfVersion = X; Y.expressInstall = aa; Y.callbackFn = Z; o[o.length] = Y; w(ab, false) } else { if (Z) { Z({ success: false, id: ab }) } } }, getObjectById: function (X) { if (M.w3) { return z(X) } }, embedSWF: function (ab, ah, ae, ag, Y, aa, Z, ad, af, ac) { var X = { success: false, id: ah }; if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) { w(ah, false); K(function () { ae += ""; ag += ""; var aj = {}; if (af && typeof af === r) { for (var al in af) { aj[al] = af[al] } } aj.data = ab; aj.width = ae; aj.height = ag; var am = {}; if (ad && typeof ad === r) { for (var ak in ad) { am[ak] = ad[ak] } } if (Z && typeof Z === r) { for (var ai in Z) { if (typeof am.flashvars != D) { am.flashvars += "&" + ai + "=" + Z[ai] } else { am.flashvars = ai + "=" + Z[ai] } } } if (F(Y)) { var an = u(aj, am, ah); if (aj.id == ah) { w(ah, true) } X.success = true; X.ref = an } else { if (aa && A()) { aj.data = aa; P(aj, am, ah, ac); return } else { w(ah, true) } } if (ac) { ac(X) } }) } else { if (ac) { ac(X) } } }, switchOffAutoHideShow: function () { m = false }, ua: M, getFlashPlayerVersion: function () { return { major: M.pv[0], minor: M.pv[1], release: M.pv[2]} }, hasFlashPlayerVersion: F, createSWF: function (Z, Y, X) { if (M.w3) { return u(Z, Y, X) } else { return undefined } }, showExpressInstall: function (Z, aa, X, Y) { if (M.w3 && A()) { P(Z, aa, X, Y) } }, removeSWF: function (X) { if (M.w3) { y(X) } }, createCSS: function (aa, Z, Y, X) { if (M.w3) { v(aa, Z, Y, X) } }, addDomLoadEvent: K, addLoadEvent: s, getQueryParamValue: function (aa) { var Z = j.location.search || j.location.hash; if (Z) { if (/\?/.test(Z)) { Z = Z.split("?")[1] } if (aa == null) { return L(Z) } var Y = Z.split("&"); for (var X = 0; X < Y.length; X++) { if (Y[X].substring(0, Y[X].indexOf("=")) == aa) { return L(Y[X].substring((Y[X].indexOf("=") + 1))) } } } return "" }, expressInstallCallback: function () { if (a) { var X = c(R); if (X && l) { X.parentNode.replaceChild(l, X); if (Q) { w(Q, true); if (M.ie && M.win) { l.style.display = "block" } } if (E) { E(B) } } a = false } } } } ();
/**
 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!)
 * Common usage: wipe images (left and right to show the previous or next image)
 * 
 * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
 * @version 1.0 (15th July 2010)
 */
(function ($) { $.fn.touchwipe = function (settings) { var config = { min_move_x: 20, wipeLeft: function () { alert("left"); }, wipeRight: function () { alert("right"); }, preventDefaultEvents: true }; if (settings) $.extend(config, settings); this.each(function () { var startX; var isMoving = false; function cancelTouch() { this.removeEventListener('touchmove', onTouchMove); startX = null; isMoving = false; } function onTouchMove(e) { if (config.preventDefaultEvents) { e.preventDefault(); } if (isMoving) { var x = e.touches[0].pageX; var dx = startX - x; if (Math.abs(dx) >= config.min_move_x) { cancelTouch(); if (dx > 0) { config.wipeLeft(); } else { config.wipeRight(); } } } } function onTouchStart(e) { if (e.touches.length == 1) { startX = e.touches[0].pageX; isMoving = true; this.addEventListener('touchmove', onTouchMove, false); } } this.addEventListener('touchstart', onTouchStart, false); }); return this; }; })(jQuery);
/* DatePicker */

Date.dayNames = ['Sunnudagur', 'Mánudagur', 'Ţriđjudagur', 'Miđvikudagur', 'Fimmtudagur', 'Föstudagur', 'Laugardagur'];
Date.abbrDayNames = ['Sun', 'Mán', 'Ţri', 'Miđ', 'Fim', 'Fös', 'Lau']; Date.monthNames = ['Janúar', 'Febrúar', 'Mars', 'Apríl', 'Maí', 'Júní', 'Júlí', 'Ágúst', 'September', 'Október', 'Nóvember', 'Desember']; Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'Maí', 'Jún', 'Júl', 'Ágú', 'Sep', 'Okt', 'Nóv', 'Des']; Date.firstDayOfWeek = 1; Date.format = 'dd.mm.yyyy'; Date.fullYearStart = '20'; (function () { function add(name, method) { if (!Date.prototype[name]) { Date.prototype[name] = method } }; add("isLeapYear", function () { var y = this.getFullYear(); return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 }); add("isWeekend", function () { return this.getDay() == 0 || this.getDay() == 6 }); add("isWeekDay", function () { return !this.isWeekend() }); add("getDaysInMonth", function () { return [31, (this.isLeapYear() ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][this.getMonth()] }); add("getDayName", function (abbreviated) { return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()] }); add("getMonthName", function (abbreviated) { return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()] }); add("getDayOfYear", function () { var tmpdtm = new Date("1/1/" + this.getFullYear()); return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000) }); add("getWeekOfYear", function () { return Math.ceil(this.getDayOfYear() / 7) }); add("setDayOfYear", function (day) { this.setMonth(0); this.setDate(day); return this }); add("addYears", function (num) { this.setFullYear(this.getFullYear() + num); return this }); add("addMonths", function (num) { var tmpdtm = this.getDate(); this.setMonth(this.getMonth() + num); if (tmpdtm > this.getDate()) this.addDays(-this.getDate()); return this }); add("addDays", function (num) { this.setTime(this.getTime() + (num * 86400000)); return this }); add("addHours", function (num) { this.setHours(this.getHours() + num); return this }); add("addMinutes", function (num) { this.setMinutes(this.getMinutes() + num); return this }); add("addSeconds", function (num) { this.setSeconds(this.getSeconds() + num); return this }); add("zeroTime", function () { this.setMilliseconds(0); this.setSeconds(0); this.setMinutes(0); this.setHours(0); return this }); add("asString", function (format) { var r = format || Date.format; if (r.split('mm').length > 1) { r = r.split('mmmm').join(this.getMonthName(false)).split('mmm').join(this.getMonthName(true)).split('mm').join(_zeroPad(this.getMonth() + 1)) } else { r = r.split('m').join(this.getMonth() + 1) } r = r.split('yyyy').join(this.getFullYear()).split('yy').join((this.getFullYear() + '').substring(2)).split('dd').join(_zeroPad(this.getDate())).split('d').join(this.getDate()); return r }); Date.fromString = function (s) { var f = Date.format; var d = new Date('01/01/1970'); if (s == '') return d; s = s.toLowerCase(); var matcher = ''; var order = []; var r = /(dd?d?|mm?m?|yy?yy?)+([^(m|d|y)])?/g; var results; while ((results = r.exec(f)) != null) { switch (results[1]) { case 'd': case 'dd': case 'm': case 'mm': case 'yy': case 'yyyy': matcher += '(\\d+\\d?\\d?\\d?)+'; order.push(results[1].substr(0, 1)); break; case 'mmm': matcher += '([a-z]{3})'; order.push('M'); break } if (results[2]) { matcher += results[2] } } var dm = new RegExp(matcher); var result = s.match(dm); for (var i = 0; i < order.length; i++) { var res = result[i + 1]; switch (order[i]) { case 'd': d.setDate(res); break; case 'm': d.setMonth(Number(res) - 1); break; case 'M': for (var j = 0; j < Date.abbrMonthNames.length; j++) { if (Date.abbrMonthNames[j].toLowerCase() == res) break } d.setMonth(j); break; case 'y': d.setYear(res); break } } return d }; var _zeroPad = function (num) { var s = '0' + num; return s.substring(s.length - 2) } })();
/**
* Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.com/)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* .
* $Id: jquery.datePicker.js 102 2010-09-13 14:00:54Z kelvin.luck $
**/
(function ($) { $.fn.extend({ renderCalendar: function (s) { var dc = function (a) { return document.createElement(a) }; s = $.extend({}, $.fn.datePicker.defaults, s); if (s.showHeader != $.dpConst.SHOW_HEADER_NONE) { var headRow = $(dc('tr')); for (var i = Date.firstDayOfWeek; i < Date.firstDayOfWeek + 7; i++) { var weekday = i % 7; var day = Date.dayNames[weekday]; headRow.append(jQuery(dc('th')).attr({ 'scope': 'col', 'abbr': day, 'title': day, 'class': (weekday == 0 || weekday == 6 ? 'weekend' : 'weekday') }).html(s.showHeader == $.dpConst.SHOW_HEADER_SHORT ? day.substr(0, 1) : day)) } }; var calendarTable = $(dc('table')).attr({ 'cellspacing': 2 }).addClass('jCalendar').append((s.showHeader != $.dpConst.SHOW_HEADER_NONE ? $(dc('thead')).append(headRow) : dc('thead'))); var tbody = $(dc('tbody')); var today = (new Date()).zeroTime(); today.setHours(12); var month = s.month == undefined ? today.getMonth() : s.month; var year = s.year || today.getFullYear(); var currentDate = (new Date(year, month, 1, 12, 0, 0)); var firstDayOffset = Date.firstDayOfWeek - currentDate.getDay() + 1; if (firstDayOffset > 1) firstDayOffset -= 7; var weeksToDraw = Math.ceil(((-1 * firstDayOffset + 1) + currentDate.getDaysInMonth()) / 7); currentDate.addDays(firstDayOffset - 1); var doHover = function (firstDayInBounds) { return function () { if (s.hoverClass) { var $this = $(this); if (!s.selectWeek) { $this.addClass(s.hoverClass) } else if (firstDayInBounds && !$this.is('.disabled')) { $this.parent().addClass('activeWeekHover') } } } }; var unHover = function () { if (s.hoverClass) { var $this = $(this); $this.removeClass(s.hoverClass); $this.parent().removeClass('activeWeekHover') } }; var w = 0; while (w++ < weeksToDraw) { var r = jQuery(dc('tr')); var firstDayInBounds = s.dpController ? currentDate > s.dpController.startDate : false; for (var i = 0; i < 7; i++) { var thisMonth = currentDate.getMonth() == month; var d = $(dc('td')).text(currentDate.getDate() + '').addClass((thisMonth ? 'current-month ' : 'other-month ') + (currentDate.isWeekend() ? 'weekend ' : 'weekday ') + (thisMonth && currentDate.getTime() == today.getTime() ? 'today ' : '')).data('datePickerDate', currentDate.asString()).hover(doHover(firstDayInBounds), unHover); r.append(d); if (s.renderCallback) { s.renderCallback(d, currentDate, month, year) } currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate() + 1, 12, 0, 0) } tbody.append(r) } calendarTable.append(tbody); return this.each(function () { $(this).empty().append(calendarTable) }) }, datePicker: function (s) { if (!$.event._dpCache) $.event._dpCache = []; s = $.extend({}, $.fn.datePicker.defaults, s); return this.each(function () { var $this = $(this); var alreadyExists = true; if (!this._dpId) { this._dpId = $.event.guid++; $.event._dpCache[this._dpId] = new DatePicker(this); alreadyExists = false } if (s.inline) { s.createButton = false; s.displayClose = false; s.closeOnSelect = false; $this.empty() } var controller = $.event._dpCache[this._dpId]; controller.init(s); if (!alreadyExists && s.createButton) { controller.button = $('<a href="#" class="dp-choose-date" title="' + $.dpText.TEXT_CHOOSE_DATE + '">' + $.dpText.TEXT_CHOOSE_DATE + '</a>').bind('click', function () { $this.dpDisplay(this); this.blur(); return false }); $this.after(controller.button) } if (!alreadyExists && $this.is(':text')) { $this.bind('dateSelected', function (e, selectedDate, $td) { this.value = selectedDate.asString() }).bind('change', function () { if (this.value == '') { controller.clearSelected() } else { var d = Date.fromString(this.value); if (d) { controller.setSelected(d, true, true) } } }); if (s.clickInput) { $this.bind('click', function () { $this.trigger('change'); $this.dpDisplay() }) } var d = Date.fromString(this.value); if (this.value != '' && d) { controller.setSelected(d, true, true) } } $this.addClass('dp-applied') }) }, dpSetDisabled: function (s) { return _w.call(this, 'setDisabled', s) }, dpSetStartDate: function (d) { return _w.call(this, 'setStartDate', d) }, dpSetEndDate: function (d) { return _w.call(this, 'setEndDate', d) }, dpGetSelected: function () { var c = _getController(this[0]); if (c) { return c.getSelected() } return null }, dpSetSelected: function (d, v, m, e) { if (v == undefined) v = true; if (m == undefined) m = true; if (e == undefined) e = true; return _w.call(this, 'setSelected', Date.fromString(d), v, m, e) }, dpSetDisplayedMonth: function (m, y) { return _w.call(this, 'setDisplayedMonth', Number(m), Number(y), true) }, dpDisplay: function (e) { return _w.call(this, 'display', e) }, dpSetRenderCallback: function (a) { return _w.call(this, 'setRenderCallback', a) }, dpSetPosition: function (v, h) { return _w.call(this, 'setPosition', v, h) }, dpSetOffset: function (v, h) { return _w.call(this, 'setOffset', v, h) }, dpClose: function () { return _w.call(this, '_closeCalendar', false, this[0]) }, dpRerenderCalendar: function () { return _w.call(this, '_rerenderCalendar') }, _dpDestroy: function () { } }); var _w = function (f, a1, a2, a3, a4) { return this.each(function () { var c = _getController(this); if (c) { c[f](a1, a2, a3, a4) } }) }; function DatePicker(ele) { this.ele = ele; this.displayedMonth = null; this.displayedYear = null; this.startDate = null; this.endDate = null; this.showYearNavigation = null; this.closeOnSelect = null; this.displayClose = null; this.rememberViewedMonth = null; this.selectMultiple = null; this.numSelectable = null; this.numSelected = null; this.verticalPosition = null; this.horizontalPosition = null; this.verticalOffset = null; this.horizontalOffset = null; this.button = null; this.renderCallback = []; this.selectedDates = {}; this.inline = null; this.context = '#dp-popup'; this.settings = {} }; $.extend(DatePicker.prototype, { init: function (s) { this.setStartDate(s.startDate); this.setEndDate(s.endDate); this.setDisplayedMonth(Number(s.month), Number(s.year)); this.setRenderCallback(s.renderCallback); this.showYearNavigation = s.showYearNavigation; this.closeOnSelect = s.closeOnSelect; this.displayClose = s.displayClose; this.rememberViewedMonth = s.rememberViewedMonth; this.selectMultiple = s.selectMultiple; this.numSelectable = s.selectMultiple ? s.numSelectable : 1; this.numSelected = 0; this.verticalPosition = s.verticalPosition; this.horizontalPosition = s.horizontalPosition; this.hoverClass = s.hoverClass; this.setOffset(s.verticalOffset, s.horizontalOffset); this.inline = s.inline; this.settings = s; if (this.inline) { this.context = this.ele; this.display() } }, setStartDate: function (d) { if (d) { this.startDate = Date.fromString(d) } if (!this.startDate) { this.startDate = (new Date()).zeroTime() } this.setDisplayedMonth(this.displayedMonth, this.displayedYear) }, setEndDate: function (d) { if (d) { this.endDate = Date.fromString(d) } if (!this.endDate) { this.endDate = (new Date('12/31/2999')) } if (this.endDate.getTime() < this.startDate.getTime()) { this.endDate = this.startDate } this.setDisplayedMonth(this.displayedMonth, this.displayedYear) }, setPosition: function (v, h) { this.verticalPosition = v; this.horizontalPosition = h }, setOffset: function (v, h) { this.verticalOffset = parseInt(v) || 0; this.horizontalOffset = parseInt(h) || 0 }, setDisabled: function (s) { $e = $(this.ele); $e[s ? 'addClass' : 'removeClass']('dp-disabled'); if (this.button) { $but = $(this.button); $but[s ? 'addClass' : 'removeClass']('dp-disabled'); $but.attr('title', s ? '' : $.dpText.TEXT_CHOOSE_DATE) } if ($e.is(':text')) { $e.attr('disabled', s ? 'disabled' : '') } }, setDisplayedMonth: function (m, y, rerender) { if (this.startDate == undefined || this.endDate == undefined) { return } var s = new Date(this.startDate.getTime()); s.setDate(1); var e = new Date(this.endDate.getTime()); e.setDate(1); var t; if ((!m && !y) || (isNaN(m) && isNaN(y))) { t = new Date().zeroTime(); t.setDate(1) } else if (isNaN(m)) { t = new Date(y, this.displayedMonth, 1) } else if (isNaN(y)) { t = new Date(this.displayedYear, m, 1) } else { t = new Date(y, m, 1) } if (t.getTime() < s.getTime()) { t = s } else if (t.getTime() > e.getTime()) { t = e } var oldMonth = this.displayedMonth; var oldYear = this.displayedYear; this.displayedMonth = t.getMonth(); this.displayedYear = t.getFullYear(); if (rerender && (this.displayedMonth != oldMonth || this.displayedYear != oldYear)) { this._rerenderCalendar(); $(this.ele).trigger('dpMonthChanged', [this.displayedMonth, this.displayedYear]) } }, setSelected: function (d, v, moveToMonth, dispatchEvents) { if (d < this.startDate || d.zeroTime() > this.endDate.zeroTime()) { return } var s = this.settings; if (s.selectWeek) { d = d.addDays(-(d.getDay() - Date.firstDayOfWeek + 7) % 7); if (d < this.startDate) { return } } if (v == this.isSelected(d)) { return } if (this.selectMultiple == false) { this.clearSelected() } else if (v && this.numSelected == this.numSelectable) { return } if (moveToMonth && (this.displayedMonth != d.getMonth() || this.displayedYear != d.getFullYear())) { this.setDisplayedMonth(d.getMonth(), d.getFullYear(), true) } this.selectedDates[d.asString()] = v; this.numSelected += v ? 1 : -1; var selectorString = 'td.' + (d.getMonth() == this.displayedMonth ? 'current-month' : 'other-month'); var $td; $(selectorString, this.context).each(function () { if ($(this).data('datePickerDate') == d.asString()) { $td = $(this); if (s.selectWeek) { $td.parent()[v ? 'addClass' : 'removeClass']('selectedWeek') } $td[v ? 'addClass' : 'removeClass']('selected') } }); $('td', this.context).not('.selected')[this.selectMultiple && this.numSelected == this.numSelectable ? 'addClass' : 'removeClass']('unselectable'); if (dispatchEvents) { var s = this.isSelected(d); $e = $(this.ele); var dClone = Date.fromString(d.asString()); $e.trigger('dateSelected', [dClone, $td, s]); $e.trigger('change') } }, isSelected: function (d) { return this.selectedDates[d.asString()] }, getSelected: function () { var r = []; for (var s in this.selectedDates) { if (this.selectedDates[s] == true) { r.push(Date.fromString(s)) } } return r }, clearSelected: function () { this.selectedDates = {}; this.numSelected = 0; $('td.selected', this.context).removeClass('selected').parent().removeClass('selectedWeek') }, display: function (eleAlignTo) { if ($(this.ele).is('.dp-disabled')) return; eleAlignTo = eleAlignTo || this.ele; var c = this; var $ele = $(eleAlignTo); var eleOffset = $ele.offset(); var $createIn; var attrs; var attrsCalendarHolder; var cssRules; if (c.inline) { $createIn = $(this.ele); attrs = { 'id': 'calendar-' + this.ele._dpId, 'class': 'dp-popup dp-popup-inline' }; $('.dp-popup', $createIn).remove(); cssRules = {} } else { $createIn = $('body'); attrs = { 'id': 'dp-popup', 'class': 'dp-popup' }; cssRules = { 'top': eleOffset.top + c.verticalOffset, 'left': eleOffset.left + c.horizontalOffset }; var _checkMouse = function (e) { var el = e.target; var cal = $('#dp-popup')[0]; while (true) { if (el == cal) { return true } else if (el == document) { c._closeCalendar(); return false } else { el = $(el).parent()[0] } } }; this._checkMouse = _checkMouse; c._closeCalendar(true); $(document).bind('keydown.datepicker', function (event) { if (event.keyCode == 27) { c._closeCalendar() } }) } if (!c.rememberViewedMonth) { var selectedDate = this.getSelected()[0]; if (selectedDate) { selectedDate = new Date(selectedDate); this.setDisplayedMonth(selectedDate.getMonth(), selectedDate.getFullYear(), false) } } $createIn.append($('<div></div>').attr(attrs).css(cssRules).append($('<h2></h2>'), $('<div class="dp-nav-prev"></div>').append($('<a class="dp-nav-prev-year" href="#" title="' + $.dpText.TEXT_PREV_YEAR + '">&lt;&lt;</a>').bind('click', function () { return c._displayNewMonth.call(c, this, 0, -1) }), $('<a class="dp-nav-prev-month" href="#" title="' + $.dpText.TEXT_PREV_MONTH + '">&lt;</a>').bind('click', function () { return c._displayNewMonth.call(c, this, -1, 0) })), $('<div class="dp-nav-next"></div>').append($('<a class="dp-nav-next-year" href="#" title="' + $.dpText.TEXT_NEXT_YEAR + '">&gt;&gt;</a>').bind('click', function () { return c._displayNewMonth.call(c, this, 0, 1) }), $('<a class="dp-nav-next-month" href="#" title="' + $.dpText.TEXT_NEXT_MONTH + '">&gt;</a>').bind('click', function () { return c._displayNewMonth.call(c, this, 1, 0) })), $('<div class="dp-calendar"></div>')).bgIframe()); var $pop = this.inline ? $('.dp-popup', this.context) : $('#dp-popup'); if (this.showYearNavigation == false) { $('.dp-nav-prev-year, .dp-nav-next-year', c.context).css('display', 'none') } if (this.displayClose) { $pop.append($('<a href="#" id="dp-close">' + $.dpText.TEXT_CLOSE + '</a>').bind('click', function () { c._closeCalendar(); return false })) } c._renderCalendar(); $(this.ele).trigger('dpDisplayed', $pop); if (!c.inline) { if (this.verticalPosition == $.dpConst.POS_BOTTOM) { $pop.css('top', eleOffset.top + $ele.height() - $pop.height() + c.verticalOffset) } if (this.horizontalPosition == $.dpConst.POS_RIGHT) { $pop.css('left', eleOffset.left + $ele.width() - $pop.width() + c.horizontalOffset) } $(document).bind('mousedown.datepicker', this._checkMouse) } }, setRenderCallback: function (a) { if (a == null) return; if (a && typeof (a) == 'function') { a = [a] } this.renderCallback = this.renderCallback.concat(a) }, cellRender: function ($td, thisDate, month, year) { var c = this.dpController; var d = new Date(thisDate.getTime()); $td.bind('click', function () { var $this = $(this); if (!$this.is('.disabled')) { c.setSelected(d, !$this.is('.selected') || !c.selectMultiple, false, true); if (c.closeOnSelect) { if (c.settings.autoFocusNextInput) { var ele = c.ele; var found = false; $(':input', ele.form).each(function () { if (found) { $(this).focus(); return false } if (this == ele) { found = true } }) } else { c.ele.focus() } c._closeCalendar() } } }); if (c.isSelected(d)) { $td.addClass('selected'); if (c.settings.selectWeek) { $td.parent().addClass('selectedWeek') } } else if (c.selectMultiple && c.numSelected == c.numSelectable) { $td.addClass('unselectable') } }, _applyRenderCallbacks: function () { var c = this; $('td', this.context).each(function () { for (var i = 0; i < c.renderCallback.length; i++) { $td = $(this); c.renderCallback[i].apply(this, [$td, Date.fromString($td.data('datePickerDate')), c.displayedMonth, c.displayedYear]) } }); return }, _displayNewMonth: function (ele, m, y) { if (!$(ele).is('.disabled')) { this.setDisplayedMonth(this.displayedMonth + m, this.displayedYear + y, true) } ele.blur(); return false }, _rerenderCalendar: function () { this._clearCalendar(); this._renderCalendar() }, _renderCalendar: function () { $('h2', this.context).html((new Date(this.displayedYear, this.displayedMonth, 1)).asString($.dpText.HEADER_FORMAT)); $('.dp-calendar', this.context).renderCalendar($.extend({}, this.settings, { month: this.displayedMonth, year: this.displayedYear, renderCallback: this.cellRender, dpController: this, hoverClass: this.hoverClass })); if (this.displayedYear == this.startDate.getFullYear() && this.displayedMonth == this.startDate.getMonth()) { $('.dp-nav-prev-year', this.context).addClass('disabled'); $('.dp-nav-prev-month', this.context).addClass('disabled'); $('.dp-calendar td.other-month', this.context).each(function () { var $this = $(this); if (Number($this.text()) > 20) { $this.addClass('disabled') } }); var d = this.startDate.getDate(); $('.dp-calendar td.current-month', this.context).each(function () { var $this = $(this); if (Number($this.text()) < d) { $this.addClass('disabled') } }) } else { $('.dp-nav-prev-year', this.context).removeClass('disabled'); $('.dp-nav-prev-month', this.context).removeClass('disabled'); var d = this.startDate.getDate(); if (d > 20) { var st = this.startDate.getTime(); var sd = new Date(st); sd.addMonths(1); if (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) { $('.dp-calendar td.other-month', this.context).each(function () { var $this = $(this); if (Date.fromString($this.data('datePickerDate')).getTime() < st) { $this.addClass('disabled') } }) } } } if (this.displayedYear == this.endDate.getFullYear() && this.displayedMonth == this.endDate.getMonth()) { $('.dp-nav-next-year', this.context).addClass('disabled'); $('.dp-nav-next-month', this.context).addClass('disabled'); $('.dp-calendar td.other-month', this.context).each(function () { var $this = $(this); if (Number($this.text()) < 14) { $this.addClass('disabled') } }); var d = this.endDate.getDate(); $('.dp-calendar td.current-month', this.context).each(function () { var $this = $(this); if (Number($this.text()) > d) { $this.addClass('disabled') } }) } else { $('.dp-nav-next-year', this.context).removeClass('disabled'); $('.dp-nav-next-month', this.context).removeClass('disabled'); var d = this.endDate.getDate(); if (d < 13) { var ed = new Date(this.endDate.getTime()); ed.addMonths(-1); if (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) { $('.dp-calendar td.other-month', this.context).each(function () { var $this = $(this); var cellDay = Number($this.text()); if (cellDay < 13 && cellDay > d) { $this.addClass('disabled') } }) } } } this._applyRenderCallbacks() }, _closeCalendar: function (programatic, ele) { if (!ele || ele == this.ele) { $(document).unbind('mousedown.datepicker'); $(document).unbind('keydown.datepicker'); this._clearCalendar(); $('#dp-popup a').unbind(); $('#dp-popup').empty().remove(); if (!programatic) { $(this.ele).trigger('dpClosed', [this.getSelected()]) } } }, _clearCalendar: function () { $('.dp-calendar td', this.context).unbind(); $('.dp-calendar', this.context).empty() } }); $.dpConst = { SHOW_HEADER_NONE: 0, SHOW_HEADER_SHORT: 1, SHOW_HEADER_LONG: 2, POS_TOP: 0, POS_BOTTOM: 1, POS_LEFT: 0, POS_RIGHT: 1, DP_INTERNAL_FOCUS: 'dpInternalFocusTrigger' }; $.dpText = { TEXT_PREV_YEAR: 'Fyrra ár', TEXT_PREV_MONTH: 'Fyrri mánuđur', TEXT_NEXT_YEAR: 'Nćsta ár', TEXT_NEXT_MONTH: 'Nćsti mánuđur', TEXT_CLOSE: 'Loka', TEXT_CHOOSE_DATE: 'Veldu dagsetningu', HEADER_FORMAT: 'mmmm yyyy' }; $.dpVersion = '$Id: jquery.datePicker.js 102 2010-09-13 14:00:54Z kelvin.luck $'; $.fn.datePicker.defaults = { month: undefined, year: undefined, showHeader: $.dpConst.SHOW_HEADER_SHORT, startDate: undefined, endDate: undefined, inline: false, renderCallback: null, createButton: true, showYearNavigation: true, closeOnSelect: true, displayClose: false, selectMultiple: false, numSelectable: Number.MAX_VALUE, clickInput: false, rememberViewedMonth: true, selectWeek: false, verticalPosition: $.dpConst.POS_TOP, horizontalPosition: $.dpConst.POS_LEFT, verticalOffset: 0, horizontalOffset: 0, hoverClass: 'dp-hover', autoFocusNextInput: false }; function _getController(ele) { if (ele._dpId) return $.event._dpCache[ele._dpId]; return false }; if ($.fn.bgIframe == undefined) { $.fn.bgIframe = function () { return this } }; $(window).bind('unload', function () { var els = $.event._dpCache || []; for (var i in els) { $(els[i].ele)._dpDestroy() } }) })(jQuery);
$('.datePick').datePicker();
// ColorBox v1.3.19 - jQuery lightbox plugin
// (c) 2011 Jack Moore - jacklmoore.com
// License: http://www.opensource.org/licenses/mit-license.php
(function (a, b, c) { function Z(c, d, e) { var g = b.createElement(c); return d && (g.id = f + d), e && (g.style.cssText = e), a(g) } function $(a) { var b = y.length, c = (Q + a) % b; return c < 0 ? b + c : c } function _(a, b) { return Math.round((/%/.test(a) ? (b === "x" ? z.width() : z.height()) / 100 : 1) * parseInt(a, 10)) } function ba(a) { return K.photo || /\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a) } function bb() { var b; K = a.extend({}, a.data(P, e)); for (b in K) a.isFunction(K[b]) && b.slice(0, 2) !== "on" && (K[b] = K[b].call(P)); K.rel = K.rel || P.rel || "nofollow", K.href = K.href || a(P).attr("href"), K.title = K.title || P.title, typeof K.href == "string" && (K.href = a.trim(K.href)) } function bc(b, c) { a.event.trigger(b), c && c.call(P) } function bd() { var a, b = f + "Slideshow_", c = "click." + f, d, e, g; K.slideshow && y[1] ? (d = function () { F.text(K.slideshowStop).unbind(c).bind(j, function () { if (K.loop || y[Q + 1]) a = setTimeout(W.next, K.slideshowSpeed) }).bind(i, function () { clearTimeout(a) }).one(c + " " + k, e), r.removeClass(b + "off").addClass(b + "on"), a = setTimeout(W.next, K.slideshowSpeed) }, e = function () { clearTimeout(a), F.text(K.slideshowStart).unbind([j, i, k, c].join(" ")).one(c, function () { W.next(), d() }), r.removeClass(b + "on").addClass(b + "off") }, K.slideshowAuto ? d() : e()) : r.removeClass(b + "off " + b + "on") } function be(b) { U || (P = b, bb(), y = a(P), Q = 0, K.rel !== "nofollow" && (y = a("." + g).filter(function () { var b = a.data(this, e).rel || this.rel; return b === K.rel }), Q = y.index(P), Q === -1 && (y = y.add(P), Q = y.length - 1)), S || (S = T = !0, r.show(), K.returnFocus && a(P).blur().one(l, function () { a(this).focus() }), q.css({ opacity: +K.opacity, cursor: K.overlayClose ? "pointer" : "auto" }).show(), K.w = _(K.initialWidth, "x"), K.h = _(K.initialHeight, "y"), W.position(), o && z.bind("resize." + p + " scroll." + p, function () { q.css({ width: z.width(), height: z.height(), top: z.scrollTop(), left: z.scrollLeft() }) }).trigger("resize." + p), bc(h, K.onOpen), J.add(D).hide(), I.html(K.close).show()), W.load(!0)) } function bf() { !r && b.body && (Y = !1, z = a(c), r = Z(X).attr({ id: e, "class": n ? f + (o ? "IE6" : "IE") : "" }).hide(), q = Z(X, "Overlay", o ? "position:absolute" : "").hide(), s = Z(X, "Wrapper"), t = Z(X, "Content").append(A = Z(X, "LoadedContent", "width:0; height:0; overflow:hidden"), C = Z(X, "LoadingOverlay").add(Z(X, "LoadingGraphic")), D = Z(X, "Title"), E = Z(X, "Current"), G = Z(X, "Next"), H = Z(X, "Previous"), F = Z(X, "Slideshow").bind(h, bd), I = Z(X, "Close")), s.append(Z(X).append(Z(X, "TopLeft"), u = Z(X, "TopCenter"), Z(X, "TopRight")), Z(X, !1, "clear:left").append(v = Z(X, "MiddleLeft"), t, w = Z(X, "MiddleRight")), Z(X, !1, "clear:left").append(Z(X, "BottomLeft"), x = Z(X, "BottomCenter"), Z(X, "BottomRight"))).find("div div").css({ "float": "left" }), B = Z(X, !1, "position:absolute; width:9999px; visibility:hidden; display:none"), J = G.add(H).add(E).add(F), a(b.body).append(q, r.append(s, B))) } function bg() { return r ? (Y || (Y = !0, L = u.height() + x.height() + t.outerHeight(!0) - t.height(), M = v.width() + w.width() + t.outerWidth(!0) - t.width(), N = A.outerHeight(!0), O = A.outerWidth(!0), r.css({ "padding-bottom": L, "padding-right": M }), G.click(function () { W.next() }), H.click(function () { W.prev() }), I.click(function () { W.close() }), q.click(function () { K.overlayClose && W.close() }), a(b).bind("keydown." + f, function (a) { var b = a.keyCode; S && K.escKey && b === 27 && (a.preventDefault(), W.close()), S && K.arrowKey && y[1] && (b === 37 ? (a.preventDefault(), H.click()) : b === 39 && (a.preventDefault(), G.click())) }), a("." + g, b).live("click", function (a) { a.which > 1 || a.shiftKey || a.altKey || a.metaKey || (a.preventDefault(), be(this)) })), !0) : !1 } var d = { transition: "elastic", speed: 300, width: !1, initialWidth: "600", innerWidth: !1, maxWidth: !1, height: !1, initialHeight: "450", innerHeight: !1, maxHeight: !1, scalePhotos: !0, scrolling: !0, inline: !1, html: !1, iframe: !1, fastIframe: !0, photo: !1, href: !1, title: !1, rel: !1, opacity: .9, preloading: !0, current: "image {current} of {total}", previous: "previous", next: "next", close: "close", open: !1, returnFocus: !0, reposition: !0, loop: !0, slideshow: !1, slideshowAuto: !0, slideshowSpeed: 2500, slideshowStart: "start slideshow", slideshowStop: "stop slideshow", onOpen: !1, onLoad: !1, onComplete: !1, onCleanup: !1, onClosed: !1, overlayClose: !0, escKey: !0, arrowKey: !0, top: !1, bottom: !1, left: !1, right: !1, fixed: !1, data: undefined }, e = "colorbox", f = "cbox", g = f + "Element", h = f + "_open", i = f + "_load", j = f + "_complete", k = f + "_cleanup", l = f + "_closed", m = f + "_purge", n = !a.support.opacity && !a.support.style, o = n && !c.XMLHttpRequest, p = f + "_IE6", q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X = "div", Y; if (a.colorbox) return; a(bf), W = a.fn[e] = a[e] = function (b, c) { var f = this; b = b || {}, bf(); if (bg()) { if (!f[0]) { if (f.selector) return f; f = a("<a/>"), b.open = !0 } c && (b.onComplete = c), f.each(function () { a.data(this, e, a.extend({}, a.data(this, e) || d, b)) }).addClass(g), (a.isFunction(b.open) && b.open.call(f) || b.open) && be(f[0]) } return f }, W.position = function (a, b) { function i(a) { u[0].style.width = x[0].style.width = t[0].style.width = a.style.width, t[0].style.height = v[0].style.height = w[0].style.height = a.style.height } var c = 0, d = 0, e = r.offset(), g = z.scrollTop(), h = z.scrollLeft(); z.unbind("resize." + f), r.css({ top: -9e4, left: -9e4 }), K.fixed && !o ? (e.top -= g, e.left -= h, r.css({ position: "fixed" })) : (c = g, d = h, r.css({ position: "absolute" })), K.right !== !1 ? d += Math.max(z.width() - K.w - O - M - _(K.right, "x"), 0) : K.left !== !1 ? d += _(K.left, "x") : d += Math.round(Math.max(z.width() - K.w - O - M, 0) / 2), K.bottom !== !1 ? c += Math.max(z.height() - K.h - N - L - _(K.bottom, "y"), 0) : K.top !== !1 ? c += _(K.top, "y") : c += Math.round(Math.max(z.height() - K.h - N - L, 0) / 2), r.css({ top: e.top, left: e.left }), a = r.width() === K.w + O && r.height() === K.h + N ? 0 : a || 0, s[0].style.width = s[0].style.height = "9999px", r.dequeue().animate({ width: K.w + O, height: K.h + N, top: c, left: d }, { duration: a, complete: function () { i(this), T = !1, s[0].style.width = K.w + O + M + "px", s[0].style.height = K.h + N + L + "px", K.reposition && setTimeout(function () { z.bind("resize." + f, W.position) }, 1), b && b() }, step: function () { i(this) } }) }, W.resize = function (a) { S && (a = a || {}, a.width && (K.w = _(a.width, "x") - O - M), a.innerWidth && (K.w = _(a.innerWidth, "x")), A.css({ width: K.w }), a.height && (K.h = _(a.height, "y") - N - L), a.innerHeight && (K.h = _(a.innerHeight, "y")), !a.innerHeight && !a.height && (A.css({ height: "auto" }), K.h = A.height()), A.css({ height: K.h }), W.position(K.transition === "none" ? 0 : K.speed)) }, W.prep = function (b) { function g() { return K.w = K.w || A.width(), K.w = K.mw && K.mw < K.w ? K.mw : K.w, K.w } function h() { return K.h = K.h || A.height(), K.h = K.mh && K.mh < K.h ? K.mh : K.h, K.h } if (!S) return; var c, d = K.transition === "none" ? 0 : K.speed; A.remove(), A = Z(X, "LoadedContent").append(b), A.hide().appendTo(B.show()).css({ width: g(), overflow: K.scrolling ? "auto" : "hidden" }).css({ height: h() }).prependTo(t), B.hide(), a(R).css({ "float": "none" }), o && a("select").not(r.find("select")).filter(function () { return this.style.visibility !== "hidden" }).css({ visibility: "hidden" }).one(k, function () { this.style.visibility = "inherit" }), c = function () { function q() { n && r[0].style.removeAttribute("filter") } var b, c, g = y.length, h, i = "frameBorder", k = "allowTransparency", l, o, p; if (!S) return; l = function () { clearTimeout(V), C.hide(), bc(j, K.onComplete) }, n && R && A.fadeIn(100), D.html(K.title).add(A).show(); if (g > 1) { typeof K.current == "string" && E.html(K.current.replace("{current}", Q + 1).replace("{total}", g)).show(), G[K.loop || Q < g - 1 ? "show" : "hide"]().html(K.next), H[K.loop || Q ? "show" : "hide"]().html(K.previous), K.slideshow && F.show(); if (K.preloading) { b = [$(-1), $(1)]; while (c = y[b.pop()]) o = a.data(c, e).href || c.href, a.isFunction(o) && (o = o.call(c)), ba(o) && (p = new Image, p.src = o) } } else J.hide(); K.iframe ? (h = Z("iframe")[0], i in h && (h[i] = 0), k in h && (h[k] = "true"), h.name = f + +(new Date), K.fastIframe ? l() : a(h).one("load", l), h.src = K.href, K.scrolling || (h.scrolling = "no"), a(h).addClass(f + "Iframe").appendTo(A).one(m, function () { h.src = "//about:blank" })) : l(), K.transition === "fade" ? r.fadeTo(d, 1, q) : q() }, K.transition === "fade" ? r.fadeTo(d, 0, function () { W.position(0, c) }) : W.position(d, c) }, W.load = function (b) { var c, d, e = W.prep; T = !0, R = !1, P = y[Q], b || bb(), bc(m), bc(i, K.onLoad), K.h = K.height ? _(K.height, "y") - N - L : K.innerHeight && _(K.innerHeight, "y"), K.w = K.width ? _(K.width, "x") - O - M : K.innerWidth && _(K.innerWidth, "x"), K.mw = K.w, K.mh = K.h, K.maxWidth && (K.mw = _(K.maxWidth, "x") - O - M, K.mw = K.w && K.w < K.mw ? K.w : K.mw), K.maxHeight && (K.mh = _(K.maxHeight, "y") - N - L, K.mh = K.h && K.h < K.mh ? K.h : K.mh), c = K.href, V = setTimeout(function () { C.show() }, 100), K.inline ? (Z(X).hide().insertBefore(a(c)[0]).one(m, function () { a(this).replaceWith(A.children()) }), e(a(c))) : K.iframe ? e(" ") : K.html ? e(K.html) : ba(c) ? (a(R = new Image).addClass(f + "Photo").error(function () { K.title = !1, e(Z(X, "Error").text("This image could not be loaded")) }).load(function () { var a; R.onload = null, K.scalePhotos && (d = function () { R.height -= R.height * a, R.width -= R.width * a }, K.mw && R.width > K.mw && (a = (R.width - K.mw) / R.width, d()), K.mh && R.height > K.mh && (a = (R.height - K.mh) / R.height, d())), K.h && (R.style.marginTop = Math.max(K.h - R.height, 0) / 2 + "px"), y[1] && (K.loop || y[Q + 1]) && (R.style.cursor = "pointer", R.onclick = function () { W.next() }), n && (R.style.msInterpolationMode = "bicubic"), setTimeout(function () { e(R) }, 1) }), setTimeout(function () { R.src = c }, 1)) : c && B.load(c, K.data, function (b, c, d) { e(c === "error" ? Z(X, "Error").text("Request unsuccessful: " + d.statusText) : a(this).contents()) }) }, W.next = function () { !T && y[1] && (K.loop || y[Q + 1]) && (Q = $(1), W.load()) }, W.prev = function () { !T && y[1] && (K.loop || Q) && (Q = $(-1), W.load()) }, W.close = function () { S && !U && (U = !0, S = !1, bc(k, K.onCleanup), z.unbind("." + f + " ." + p), q.fadeTo(200, 0), r.stop().fadeTo(300, 0, function () { r.add(q).css({ opacity: 1, cursor: "auto" }).hide(), bc(m), A.remove(), setTimeout(function () { U = !1, bc(l, K.onClosed) }, 1) })) }, W.remove = function () { a([]).add(r).add(q).remove(), r = null, a("." + g).removeData(e).removeClass(g).die() }, W.element = function () { return a(P) }, W.settings = d })(jQuery, document, this);
