Changeset 2198
- Timestamp:
- 05/16/12 08:51:44 (12 months ago)
- Location:
- branches/jw6
- Files:
-
- 1 added
- 16 edited
-
bin-debug/jwplayer.flash.swf (modified) (previous)
-
bin-debug/jwplayer.html5.js (modified) (26 diffs)
-
bin-debug/jwplayer.js (modified) (17 diffs)
-
doc/events.html (added)
-
jwplayer.flash.swf (modified) (previous)
-
jwplayer.html5.js (modified) (1 diff)
-
jwplayer.js (modified) (1 diff)
-
src/flash/com/longtailvideo/jwplayer/player/PlayerVersion.as (modified) (1 diff)
-
src/flash/com/longtailvideo/jwplayer/view/components/DisplayComponent.as (modified) (1 diff)
-
src/js/api/jwplayer.api.js (modified) (15 diffs)
-
src/js/events/jwplayer.events.js (modified) (1 diff)
-
src/js/html5/jwplayer.html5.controller.js (modified) (2 diffs)
-
src/js/html5/jwplayer.html5.display.js (modified) (6 diffs)
-
src/js/html5/jwplayer.html5.js (modified) (1 diff)
-
src/js/html5/jwplayer.html5.player.js (modified) (4 diffs)
-
src/js/html5/jwplayer.html5.view.js (modified) (13 diffs)
-
src/js/jwplayer.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/jw6/bin-debug/jwplayer.html5.js
r2197 r2198 7 7 (function(jwplayer) { 8 8 jwplayer.html5 = {}; 9 jwplayer.html5.version = '6.0.219 7';9 jwplayer.html5.version = '6.0.2198'; 10 10 })(jwplayer);/** 11 11 * HTML5-only utilities for the JW Player. … … 1463 1463 1464 1464 _model.addGlobalListener(_forward); 1465 _view.addGlobalListener(_forward); 1465 1466 1466 1467 _load(); … … 1576 1577 } 1577 1578 } 1578 1579 1579 1580 function _isIdle() { 1580 1581 return (_model.state == states.IDLE || _model.state == states.COMPLETED); … … 1731 1732 */ 1732 1733 (function(html5) { 1733 var _utils = jwplayer.utils,1734 _css = _utils.css,1735 _events = jwplayer.events,1736 _ states = _events.state,1737 _ rotate = _utils.animations.rotate,1734 var utils = jwplayer.utils, 1735 events = jwplayer.events, 1736 states = events.state, 1737 _rotate = utils.animations.rotate, 1738 _css = utils.css, 1738 1739 1739 1740 … … 1759 1760 _degreesRotated, 1760 1761 _rotationInterval, 1761 _config = _utils.extend({1762 _config = utils.extend({ 1762 1763 backgroundcolor: '#000', 1763 1764 showicons: true 1764 1765 }, _skin.getComponentSettings('display'), config); 1765 _bufferRotation = !_utils.exists(_config.bufferrotation) ? 15 : parseInt(_config.bufferrotation, 10), 1766 _bufferInterval = !_utils.exists(_config.bufferinterval) ? 100 : parseInt(_config.bufferinterval, 10); 1766 _bufferRotation = !utils.exists(_config.bufferrotation) ? 15 : parseInt(_config.bufferrotation, 10), 1767 _bufferInterval = !utils.exists(_config.bufferinterval) ? 100 : parseInt(_config.bufferinterval, 10), 1768 _eventDispatcher = new events.eventdispatcher(); 1769 1770 utils.extend(this, _eventDispatcher); 1767 1771 1768 1772 function _init() { … … 1775 1779 _display.appendChild(_preview); 1776 1780 1777 _api.jwAddEventListener( _events.JWPLAYER_PLAYER_STATE, _stateHandler);1778 _api.jwAddEventListener( _events.JWPLAYER_PLAYLIST_ITEM, _itemHandler);1781 _api.jwAddEventListener(events.JWPLAYER_PLAYER_STATE, _stateHandler); 1782 _api.jwAddEventListener(events.JWPLAYER_PLAYLIST_ITEM, _itemHandler); 1779 1783 1780 1784 _display.addEventListener('click', _clickHandler, false); … … 1782 1786 _createIcons(); 1783 1787 1784 _stateHandler({newstate: _states.IDLE});1788 _stateHandler({newstate:states.IDLE}); 1785 1789 } 1786 1790 1787 1791 function _clickHandler(evt) { 1792 _eventDispatcher.sendEvent(events.JWPLAYER_DISPLAY_CLICK); 1788 1793 switch (_api.jwGetState()) { 1789 case _states.PLAYING:1790 case _states.BUFFERING:1794 case states.PLAYING: 1795 case states.BUFFERING: 1791 1796 _api.jwPause(); 1792 1797 break; … … 1906 1911 1907 1912 switch(state) { 1908 case _states.COMPLETED:1909 case _states.IDLE:1913 case states.COMPLETED: 1914 case states.IDLE: 1910 1915 _setIcon('play'); 1911 1916 _setVisibility(D_PREVIEW_CLASS, true); 1912 1917 break; 1913 case _states.BUFFERING:1918 case states.BUFFERING: 1914 1919 _setIcon('buffer'); 1915 1920 break; 1916 case _states.PLAYING:1921 case states.PLAYING: 1917 1922 _setIcon(); 1918 1923 _setVisibility(D_PREVIEW_CLASS, false); 1919 1924 break; 1920 case _states.PAUSED:1925 case states.PAUSED: 1921 1926 _setIcon('play'); 1922 1927 break; … … 1964 1969 1965 1970 function _redraw() { 1966 _utils.stretch(_api.jwGetStretching(), _preview, _display.clientWidth, _display.clientHeight, _imageWidth, _imageHeight);1971 utils.stretch(_api.jwGetStretching(), _preview, _display.clientWidth, _display.clientHeight, _imageWidth, _imageHeight); 1967 1972 } 1968 1973 … … 2561 2566 jwplayer.utils.log('There was a problem setting up the player: ' + evt.message); 2562 2567 } 2563 2564 2568 2565 2569 /** Methods **/ 2566 2570 2567 this.jwPlay = _controller.play;2568 this.jwPause = _controller.pause;2569 this.jwStop = _controller.stop;2570 this.jwSeek = _controller.seek;2571 this.jwSetVolume = _controller.setVolume;2572 this.jwSetMute = _controller.setMute;2573 this.jwLoad = _controller.load;2574 this.jwPlaylistNext = _controller.next;2575 this.jwPlaylistPrev = _controller.prev;2576 this.jwPlaylistItem = _controller.item;2577 this.jwSetFullscreen = _controller.setFullscreen;2578 this.jwResize = _view.resize;2579 this.jwSeekDrag = _model.seekDrag;2580 this.jwSetStretching = _controller.setStretching;2571 _api.jwPlay = _controller.play; 2572 _api.jwPause = _controller.pause; 2573 _api.jwStop = _controller.stop; 2574 _api.jwSeek = _controller.seek; 2575 _api.jwSetVolume = _controller.setVolume; 2576 _api.jwSetMute = _controller.setMute; 2577 _api.jwLoad = _controller.load; 2578 _api.jwPlaylistNext = _controller.next; 2579 _api.jwPlaylistPrev = _controller.prev; 2580 _api.jwPlaylistItem = _controller.item; 2581 _api.jwSetFullscreen = _controller.setFullscreen; 2582 _api.jwResize = _view.resize; 2583 _api.jwSeekDrag = _model.seekDrag; 2584 _api.jwSetStretching = _controller.setStretching; 2581 2585 2582 2586 … … 2590 2594 } 2591 2595 2592 this.jwGetPlaylistIndex = _statevarFactory('item');2593 this.jwGetPosition = _statevarFactory('position');2594 this.jwGetDuration = _statevarFactory('duration');2595 this.jwGetBuffer = _statevarFactory('buffer');2596 this.jwGetWidth = _statevarFactory('width');2597 this.jwGetHeight = _statevarFactory('height');2598 this.jwGetFullscreen = _statevarFactory('fullscreen');2599 this.jwGetVolume = _statevarFactory('volume');2600 this.jwGetMute = _statevarFactory('mute');2601 this.jwGetState = _statevarFactory('state');2602 this.jwGetStretching = _statevarFactory('stretching');2603 this.jwGetPlaylist = _statevarFactory('playlist');2596 _api.jwGetPlaylistIndex = _statevarFactory('item'); 2597 _api.jwGetPosition = _statevarFactory('position'); 2598 _api.jwGetDuration = _statevarFactory('duration'); 2599 _api.jwGetBuffer = _statevarFactory('buffer'); 2600 _api.jwGetWidth = _statevarFactory('width'); 2601 _api.jwGetHeight = _statevarFactory('height'); 2602 _api.jwGetFullscreen = _statevarFactory('fullscreen'); 2603 _api.jwGetVolume = _statevarFactory('volume'); 2604 _api.jwGetMute = _statevarFactory('mute'); 2605 _api.jwGetState = _statevarFactory('state'); 2606 _api.jwGetStretching = _statevarFactory('stretching'); 2607 _api.jwGetPlaylist = _statevarFactory('playlist'); 2604 2608 2605 2609 2606 2610 /** InStream API **/ 2607 this.jwDetachMedia = _controller.detachMedia;2608 this.jwAttachMedia = _controller.attachMedia;2611 _api.jwDetachMedia = _controller.detachMedia; 2612 _api.jwAttachMedia = _controller.attachMedia; 2609 2613 2610 2614 var _instreamPlayer; 2611 2615 2612 this.jwLoadInstream = function(item, options) {2616 _api.jwLoadInstream = function(item, options) { 2613 2617 if (!_instreamPlayer) { 2614 2618 _instreamPlayer = new html5.instream(_api, _model, _view, _controller); … … 2619 2623 } 2620 2624 2621 this.jwInstreamDestroy = function() {2625 _api.jwInstreamDestroy = function() { 2622 2626 if (_instreamPlayer) { 2623 2627 _instreamPlayer.jwInstreamDestroy(); … … 2626 2630 2627 2631 /** Events **/ 2628 this.jwAddEventListener = _controller.addEventListener;2629 this.jwRemoveEventListener = _controller.removeEventListener;2632 _api.jwAddEventListener = _controller.addEventListener; 2633 _api.jwRemoveEventListener = _controller.removeEventListener; 2630 2634 2631 2635 … … 3821 3825 */ 3822 3826 (function(html5) { 3823 var _jw = jwplayer,3824 _utils = _jw.utils,3825 _css = _utils.css,3826 _events = jwplayer.events,3827 _ states = _events.state,3827 var jw = jwplayer, 3828 utils = jw.utils, 3829 events = jwplayer.events, 3830 states = events.state, 3831 _css = utils.css, 3828 3832 3829 3833 DOCUMENT = document, … … 3848 3852 _videoLayer, 3849 3853 _instreamLayer, 3850 3851 3854 _controlbar, 3852 3855 _display, 3853 3856 _playlist, 3854 3855 _audioMode; 3857 _audioMode, 3858 _eventDispatcher = new events.eventdispatcher(); 3859 3860 utils.extend(this, _eventDispatcher); 3856 3861 3857 3862 this.setup = function(skin) { … … 3885 3890 DOCUMENT.addEventListener('keydown', _keyHandler, false); 3886 3891 3887 _api.jwAddEventListener( _events.JWPLAYER_PLAYER_STATE, _stateHandler);3888 3889 _stateHandler({newstate: _states.IDLE});3892 _api.jwAddEventListener(events.JWPLAYER_PLAYER_STATE, _stateHandler); 3893 3894 _stateHandler({newstate:states.IDLE}); 3890 3895 3891 3896 _controlsLayer.addEventListener('mouseout', _fadeControls, false); … … 3895 3900 _controlbar.getDisplayElement().addEventListener('mouseout', _resumeFade, false); 3896 3901 } 3897 3898 3902 3899 3903 } … … 3907 3911 function _startFade() { 3908 3912 clearTimeout(_controlsTimeout); 3909 if (_api.jwGetState() == _states.PLAYING || _api.jwGetState() == _states.PAUSED) {3913 if (_api.jwGetState() == states.PLAYING || _api.jwGetState() == states.PAUSED) { 3910 3914 _showControlbar(); 3911 3915 if (!_inCB) { … … 3927 3931 3928 3932 function _fadeControls() { 3929 if (_api.jwGetState() == _states.PLAYING || _api.jwGetState() == _states.PAUSED) {3933 if (_api.jwGetState() == states.PLAYING || _api.jwGetState() == states.PAUSED) { 3930 3934 _hideControlbar(); 3931 3935 } … … 3941 3945 3942 3946 _display = new html5.display(_api, displaySettings); 3947 _display.addEventListener(events.JWPLAYER_DISPLAY_CLICK, function(evt) { 3948 // Forward Display Clicks 3949 _eventDispatcher.sendEvent(evt.type, evt); 3950 }); 3943 3951 _controlsLayer.appendChild(_display.getDisplayElement()); 3944 3952 … … 3948 3956 } 3949 3957 3950 if (! _utils.isMobile() || (_model.mobilecontrols && _utils.isMobile())) {3958 if (!utils.isMobile() || (_model.mobilecontrols && utils.isMobile())) { 3951 3959 // TODO: allow override for showing HTML controlbar on iPads 3952 3960 _controlbar = new html5.controlbar(_api, cbSettings); … … 3962 3970 **/ 3963 3971 var _fullscreen = this.fullscreen = function(state) { 3964 if (! _utils.exists(state)) {3972 if (!utils.exists(state)) { 3965 3973 state = !_model.fullscreen; 3966 3974 } … … 3997 4005 */ 3998 4006 function _resize(width, height) { 3999 if ( _utils.exists(width) && _utils.exists(height)) {4007 if (utils.exists(width) && utils.exists(height)) { 4000 4008 _css(_internalSelector(), { 4001 4009 width: width, … … 4056 4064 4057 4065 function _resizeMedia() { 4058 _utils.stretch(_model.stretching, _videoTag,4066 utils.stretch(_model.stretching, _videoTag, 4059 4067 _videoLayer.clientWidth, _videoLayer.clientHeight, 4060 4068 _videoTag.videoWidth, _videoTag.videoHeight); … … 4166 4174 function _updateState(state) { 4167 4175 switch(state) { 4168 case _states.PLAYING:4176 case states.PLAYING: 4169 4177 _showVideo(true); 4170 4178 _resizeMedia(); 4171 4179 _startFade(); 4172 4180 break; 4173 case _states.COMPLETED:4174 case _states.IDLE:4181 case states.COMPLETED: 4182 case states.IDLE: 4175 4183 _showVideo(false); 4176 4184 _hideControlbar(); 4177 4185 _showDisplay(); 4178 4186 break; 4179 case _states.BUFFERING:4180 case _states.PAUSED:4181 //if (! _utils.isMobile()) {4187 case states.BUFFERING: 4188 case states.PAUSED: 4189 //if (!utils.isMobile()) { 4182 4190 _showControls(); 4183 4191 //} … … 4195 4203 _instreamLayer.appendChild(instreamDisplay); 4196 4204 _instreamVideo = instreamVideo; 4197 _stateHandler({newstate: _states.PLAYING});4205 _stateHandler({newstate:states.PLAYING}); 4198 4206 _instreamMode = true; 4199 4207 } -
branches/jw6/bin-debug/jwplayer.js
r2197 r2198 19 19 var $jw = jwplayer; 20 20 21 jwplayer.version = '6.0.219 7';21 jwplayer.version = '6.0.2198'; 22 22 23 23 // "Shiv" method for older IE browsers; required for parsing media tags … … 733 733 JWPLAYER_PLAYLIST_LOADED : 'jwplayerPlaylistLoaded', 734 734 JWPLAYER_PLAYLIST_ITEM : 'jwplayerPlaylistItem', 735 736 // Display CLick 737 JWPLAYER_DISPLAY_CLICK : 'jwplayerViewClick', 735 738 736 739 // Instream events … … 2070 2073 2071 2074 var api = jwplayer.api = function(container) { 2072 this.container = container;2073 this.id = container.id;2074 2075 var _listeners = {};2076 var _stateListeners = {};2077 var _componentListeners = {};2078 var _readyListeners = [];2079 var _player = undefined;2080 var _playerReady = false;2081 var _queuedCalls = [];2082 var _instream = undefined;2083 2084 var _itemMeta = {};2085 var _callbacks = {};2075 var _this = this, 2076 _listeners = {}, 2077 _stateListeners = {}, 2078 _componentListeners = {}, 2079 _readyListeners = [], 2080 _player = undefined, 2081 _playerReady = false, 2082 _queuedCalls = [], 2083 _instream = undefined, 2084 _itemMeta = {}, 2085 _callbacks = {}; 2086 2087 _this.container = container; 2088 _this.id = container.id; 2086 2089 2087 2090 // Player Getters 2088 this.getBuffer = function() {2089 return this.callInternal('jwGetBuffer');2090 }; 2091 this.getContainer = function() {2092 return this.container;2091 _this.getBuffer = function() { 2092 return _callInternal('jwGetBuffer'); 2093 }; 2094 _this.getContainer = function() { 2095 return _this.container; 2093 2096 }; 2094 2097 … … 2109 2112 } 2110 2113 2111 this.getPlugin = function(pluginName) { 2112 var _this = this; 2114 _this.getPlugin = function(pluginName) { 2113 2115 var _plugin = {}; 2114 2116 if (pluginName == "dock") { 2115 2117 return utils.extend(_plugin, { 2116 2118 setButton: _setButton(_this, _plugin), 2117 show: function() { _ this.callInternal('jwDockShow'); return _plugin; },2118 hide: function() { _ this.callInternal('jwDockHide'); return _plugin; },2119 show: function() { _callInternal('jwDockShow'); return _plugin; }, 2120 hide: function() { _callInternal('jwDockHide'); return _plugin; }, 2119 2121 onShow: function(callback) { 2120 _ this.componentListener("dock", events.JWPLAYER_COMPONENT_SHOW, callback);2122 _componentListener("dock", events.JWPLAYER_COMPONENT_SHOW, callback); 2121 2123 return _plugin; 2122 2124 }, 2123 2125 onHide: function(callback) { 2124 _ this.componentListener("dock", events.JWPLAYER_COMPONENT_HIDE, callback);2126 _componentListener("dock", events.JWPLAYER_COMPONENT_HIDE, callback); 2125 2127 return _plugin; 2126 2128 } … … 2128 2130 } else if (pluginName == "controlbar") { 2129 2131 return utils.extend(_plugin, { 2130 show: function() { _ this.callInternal('jwControlbarShow'); return _plugin; },2131 hide: function() { _ this.callInternal('jwControlbarHide'); return _plugin; },2132 show: function() { __callInternal('jwControlbarShow'); return _plugin; }, 2133 hide: function() { __callInternal('jwControlbarHide'); return _plugin; }, 2132 2134 onShow: function(callback) { 2133 _ this.componentListener("controlbar", events.JWPLAYER_COMPONENT_SHOW, callback);2135 _componentListener("controlbar", events.JWPLAYER_COMPONENT_SHOW, callback); 2134 2136 return _plugin; 2135 2137 }, 2136 2138 onHide: function(callback) { 2137 _ this.componentListener("controlbar", events.JWPLAYER_COMPONENT_HIDE, callback);2139 _componentListener("controlbar", events.JWPLAYER_COMPONENT_HIDE, callback); 2138 2140 return _plugin; 2139 2141 } … … 2141 2143 } else if (pluginName == "display") { 2142 2144 return utils.extend(_plugin, { 2143 show: function() { _ this.callInternal('jwDisplayShow'); return _plugin; },2144 hide: function() { _ this.callInternal('jwDisplayHide'); return _plugin; },2145 show: function() { __callInternal('jwDisplayShow'); return _plugin; }, 2146 hide: function() { __callInternal('jwDisplayHide'); return _plugin; }, 2145 2147 onShow: function(callback) { 2146 _ this.componentListener("display", events.JWPLAYER_COMPONENT_SHOW, callback);2148 _componentListener("display", events.JWPLAYER_COMPONENT_SHOW, callback); 2147 2149 return _plugin; 2148 2150 }, 2149 2151 onHide: function(callback) { 2150 _ this.componentListener("display", events.JWPLAYER_COMPONENT_HIDE, callback);2152 _componentListener("display", events.JWPLAYER_COMPONENT_HIDE, callback); 2151 2153 return _plugin; 2152 2154 } 2153 2155 }); 2154 2156 } else { 2155 return this.plugins[pluginName];2156 } 2157 }; 2158 2159 this.callback = function(id) {2157 return _this.plugins[pluginName]; 2158 } 2159 }; 2160 2161 _this.callback = function(id) { 2160 2162 if (_callbacks[id]) { 2161 2163 return _callbacks[id](); 2162 2164 } 2163 2165 }; 2164 this.getDuration = function() {2165 return this.callInternal('jwGetDuration');2166 }; 2167 this.getFullscreen = function() {2168 return this.callInternal('jwGetFullscreen');2169 }; 2170 this.getHeight = function() {2171 return this.callInternal('jwGetHeight');2172 }; 2173 this.getLockState = function() {2174 return this.callInternal('jwGetLockState');2175 }; 2176 this.getMeta = function() {2177 return this.getItemMeta();2178 }; 2179 this.getMute = function() {2180 return this.callInternal('jwGetMute');2181 }; 2182 this.getPlaylist = function() {2183 var playlist = this.callInternal('jwGetPlaylist');2184 if ( this.renderingMode == "flash") {2166 _this.getDuration = function() { 2167 return _callInternal('jwGetDuration'); 2168 }; 2169 _this.getFullscreen = function() { 2170 return _callInternal('jwGetFullscreen'); 2171 }; 2172 _this.getHeight = function() { 2173 return _callInternal('jwGetHeight'); 2174 }; 2175 _this.getLockState = function() { 2176 return _callInternal('jwGetLockState'); 2177 }; 2178 _this.getMeta = function() { 2179 return _this.getItemMeta(); 2180 }; 2181 _this.getMute = function() { 2182 return _callInternal('jwGetMute'); 2183 }; 2184 _this.getPlaylist = function() { 2185 var playlist = _callInternal('jwGetPlaylist'); 2186 if (_this.renderingMode == "flash") { 2185 2187 utils.deepReplaceKeyName(playlist, ["__dot__","__spc__","__dsh__"], ["."," ","-"]); 2186 2188 } … … 2192 2194 return playlist; 2193 2195 }; 2194 this.getPlaylistItem = function(item) {2196 _this.getPlaylistItem = function(item) { 2195 2197 if (!utils.exists(item)) { 2196 item = this.getCurrentItem();2197 } 2198 return this.getPlaylist()[item];2199 }; 2200 this.getPosition = function() {2201 return this.callInternal('jwGetPosition');2202 }; 2203 this.getRenderingMode = function() {2204 return this.renderingMode;2205 }; 2206 this.getState = function() {2207 return this.callInternal('jwGetState');2208 }; 2209 this.getVolume = function() {2210 return this.callInternal('jwGetVolume');2211 }; 2212 this.getWidth = function() {2213 return this.callInternal('jwGetWidth');2198 item = _this.getCurrentItem(); 2199 } 2200 return _this.getPlaylist()[item]; 2201 }; 2202 _this.getPosition = function() { 2203 return _callInternal('jwGetPosition'); 2204 }; 2205 _this.getRenderingMode = function() { 2206 return _this.renderingMode; 2207 }; 2208 _this.getState = function() { 2209 return _callInternal('jwGetState'); 2210 }; 2211 _this.getVolume = function() { 2212 return _callInternal('jwGetVolume'); 2213 }; 2214 _this.getWidth = function() { 2215 return _callInternal('jwGetWidth'); 2214 2216 }; 2215 2217 // Player Public Methods 2216 this.setFullscreen = function(fullscreen) {2218 _this.setFullscreen = function(fullscreen) { 2217 2219 if (!utils.exists(fullscreen)) { 2218 this.callInternal("jwSetFullscreen", !this.callInternal('jwGetFullscreen'));2220 _callInternal("jwSetFullscreen", !_callInternal('jwGetFullscreen')); 2219 2221 } else { 2220 this.callInternal("jwSetFullscreen", fullscreen);2221 } 2222 return this;2223 }; 2224 this.setMute = function(mute) {2222 _callInternal("jwSetFullscreen", fullscreen); 2223 } 2224 return _this; 2225 }; 2226 _this.setMute = function(mute) { 2225 2227 if (!utils.exists(mute)) { 2226 this.callInternal("jwSetMute", !this.callInternal('jwGetMute'));2228 _callInternal("jwSetMute", !_callInternal('jwGetMute')); 2227 2229 } else { 2228 this.callInternal("jwSetMute", mute);2229 } 2230 return this;2231 }; 2232 this.lock = function() {2233 return this;2234 }; 2235 this.unlock = function() {2236 return this;2237 }; 2238 this.load = function(toLoad) {2239 this.callInternal("jwLoad", toLoad);2240 return this;2241 }; 2242 this.playlistItem = function(item) {2243 this.callInternal("jwPlaylistItem", item);2244 return this;2245 }; 2246 this.playlistPrev = function() {2247 this.callInternal("jwPlaylistPrev");2248 return this;2249 }; 2250 this.playlistNext = function() {2251 this.callInternal("jwPlaylistNext");2252 return this;2253 }; 2254 this.resize = function(width, height) {2255 if ( this.renderingMode == "html5") {2230 _callInternal("jwSetMute", mute); 2231 } 2232 return _this; 2233 }; 2234 _this.lock = function() { 2235 return _this; 2236 }; 2237 _this.unlock = function() { 2238 return _this; 2239 }; 2240 _this.load = function(toLoad) { 2241 _callInternal("jwLoad", toLoad); 2242 return _this; 2243 }; 2244 _this.playlistItem = function(item) { 2245 _callInternal("jwPlaylistItem", item); 2246 return _this; 2247 }; 2248 _this.playlistPrev = function() { 2249 _callInternal("jwPlaylistPrev"); 2250 return _this; 2251 }; 2252 _this.playlistNext = function() { 2253 _callInternal("jwPlaylistNext"); 2254 return _this; 2255 }; 2256 _this.resize = function(width, height) { 2257 if (_this.renderingMode == "html5") { 2256 2258 _player.jwResize(width, height); 2257 2259 } else { 2258 var wrapper = document.getElementById( this.id + "_wrapper");2260 var wrapper = document.getElementById(_this.id + "_wrapper"); 2259 2261 if (wrapper) { 2260 2262 wrapper.style.width = utils.styleDimension(width); … … 2262 2264 } 2263 2265 } 2264 return this;2265 }; 2266 this.play = function(state) {2266 return _this; 2267 }; 2268 _this.play = function(state) { 2267 2269 if (typeof state == "undefined") { 2268 state = this.getState();2270 state = _this.getState(); 2269 2271 if (state == states.PLAYING || state == states.BUFFERING) { 2270 this.callInternal("jwPause");2272 _callInternal("jwPause"); 2271 2273 } else { 2272 this.callInternal("jwPlay");2274 _callInternal("jwPlay"); 2273 2275 } 2274 2276 } else { 2275 this.callInternal("jwPlay", state);2276 } 2277 return this;2278 }; 2279 this.pause = function(state) {2277 _callInternal("jwPlay", state); 2278 } 2279 return _this; 2280 }; 2281 _this.pause = function(state) { 2280 2282 if (typeof state == "undefined") { 2281 state = this.getState();2283 state = _this.getState(); 2282 2284 if (state == states.PLAYING || state == states.BUFFERING) { 2283 this.callInternal("jwPause");2285 _callInternal("jwPause"); 2284 2286 } else { 2285 this.callInternal("jwPlay");2287 _callInternal("jwPlay"); 2286 2288 } 2287 2289 } else { 2288 this.callInternal("jwPause", state);2289 } 2290 return this;2291 }; 2292 this.stop = function() {2293 this.callInternal("jwStop");2294 return this;2295 }; 2296 this.seek = function(position) {2297 this.callInternal("jwSeek", position);2298 return this;2299 }; 2300 this.setVolume = function(volume) {2301 this.callInternal("jwSetVolume", volume);2302 return this;2303 }; 2304 this.loadInstream = function(item, instreamOptions) {2290 _callInternal("jwPause", state); 2291 } 2292 return _this; 2293 }; 2294 _this.stop = function() { 2295 _callInternal("jwStop"); 2296 return _this; 2297 }; 2298 _this.seek = function(position) { 2299 _callInternal("jwSeek", position); 2300 return _this; 2301 }; 2302 _this.setVolume = function(volume) { 2303 _callInternal("jwSetVolume", volume); 2304 return _this; 2305 }; 2306 _this.loadInstream = function(item, instreamOptions) { 2305 2307 _instream = new api.instream(this, _player, item, instreamOptions); 2306 2308 return _instream; 2307 2309 }; 2308 // Player Events 2309 this.onBufferChange = function(callback) { 2310 return this.eventListener(events.JWPLAYER_MEDIA_BUFFER, callback); 2311 }; 2312 this.onBufferFull = function(callback) { 2313 return this.eventListener(events.JWPLAYER_MEDIA_BUFFER_FULL, callback); 2314 }; 2315 this.onError = function(callback) { 2316 return this.eventListener(events.JWPLAYER_ERROR, callback); 2317 }; 2318 this.onFullscreen = function(callback) { 2319 return this.eventListener(events.JWPLAYER_FULLSCREEN, callback); 2320 }; 2321 this.onMeta = function(callback) { 2322 return this.eventListener(events.JWPLAYER_MEDIA_META, callback); 2323 }; 2324 this.onMute = function(callback) { 2325 return this.eventListener(events.JWPLAYER_MEDIA_MUTE, callback); 2326 }; 2327 this.onPlaylist = function(callback) { 2328 return this.eventListener(events.JWPLAYER_PLAYLIST_LOADED, callback); 2329 }; 2330 this.onPlaylistItem = function(callback) { 2331 return this.eventListener(events.JWPLAYER_PLAYLIST_ITEM, callback); 2332 }; 2333 this.onReady = function(callback) { 2334 return this.eventListener(events.API_READY, callback); 2335 }; 2336 this.onResize = function(callback) { 2337 return this.eventListener(events.JWPLAYER_RESIZE, callback); 2338 }; 2339 this.onComplete = function(callback) { 2340 return this.eventListener(events.JWPLAYER_MEDIA_COMPLETE, callback); 2341 }; 2342 this.onSeek = function(callback) { 2343 return this.eventListener(events.JWPLAYER_MEDIA_SEEK, callback); 2344 }; 2345 this.onTime = function(callback) { 2346 return this.eventListener(events.JWPLAYER_MEDIA_TIME, callback); 2347 }; 2348 this.onVolume = function(callback) { 2349 return this.eventListener(events.JWPLAYER_MEDIA_VOLUME, callback); 2350 }; 2351 this.onBeforePlay = function(callback) { 2352 return this.eventListener(events.JWPLAYER_MEDIA_BEFOREPLAY, callback); 2353 }; 2354 this.onBeforeComplete = function(callback) { 2355 return this.eventListener(events.JWPLAYER_MEDIA_BEFORECOMPLETE, callback); 2356 }; 2357 // State events 2358 this.onBuffer = function(callback) { 2359 return this.stateListener(states.BUFFERING, callback); 2360 }; 2361 this.onPause = function(callback) { 2362 return this.stateListener(states.PAUSED, callback); 2363 }; 2364 this.onPlay = function(callback) { 2365 return this.stateListener(states.PLAYING, callback); 2366 }; 2367 this.onIdle = function(callback) { 2368 return this.stateListener(states.IDLE, callback); 2369 }; 2370 this.remove = function() { 2310 2311 var _eventMapping = { 2312 onBufferChange: events.JWPLAYER_MEDIA_BUFFER, 2313 onBufferFull: events.JWPLAYER_MEDIA_BUFFER_FULL, 2314 onError: events.JWPLAYER_ERROR, 2315 onFullscreen: events.JWPLAYER_FULLSCREEN, 2316 onMeta: events.JWPLAYER_MEDIA_META, 2317 onMute: events.JWPLAYER_MEDIA_MUTE, 2318 onPlaylist: events.JWPLAYER_PLAYLIST_LOADED, 2319 onPlaylistItem: events.JWPLAYER_PLAYLIST_ITEM, 2320 onReady: events.API_READY, 2321 onResize: events.JWPLAYER_RESIZE, 2322 onComplete: events.JWPLAYER_MEDIA_COMPLETE, 2323 onSeek: events.JWPLAYER_MEDIA_SEEK, 2324 onTime: events.JWPLAYER_MEDIA_TIME, 2325 onVolume: events.JWPLAYER_MEDIA_VOLUME, 2326 onBeforePlay: events.JWPLAYER_MEDIA_BEFOREPLAY, 2327 onBeforeComplete: events.JWPLAYER_MEDIA_BEFORECOMPLETE, 2328 onDisplayClick: events.JWPLAYER_DISPLAY_CLICK 2329 }; 2330 2331 for (var event in _eventMapping) { 2332 _this[event] = _eventCallback(_eventMapping[event], _eventListener); 2333 } 2334 2335 var _stateMapping = { 2336 onBuffer: states.BUFFERING, 2337 onPause: states.PAUSED, 2338 onPlay: states.PLAYING, 2339 onIdle: states.IDLE 2340 }; 2341 2342 for (var state in _stateMapping) { 2343 _this[state] = _eventCallback(_stateMapping[state], _stateListener); 2344 } 2345 2346 function _eventCallback(event, listener) { 2347 return function(callback) { 2348 return listener(event, callback); 2349 }; 2350 } 2351 2352 _this.remove = function() { 2371 2353 if (!_playerReady) { 2372 2354 throw "Cannot call remove() before player is ready"; … … 2381 2363 } 2382 2364 2383 this.setup = function(options) {2365 _this.setup = function(options) { 2384 2366 if (jwplayer.embed) { 2385 2367 // Destroy original API on setup() to remove existing listeners 2386 2368 _remove(this); 2387 var newApi = jwplayer( this.id);2369 var newApi = jwplayer(_this.id); 2388 2370 newApi.config = options; 2389 2371 return new jwplayer.embed(newApi); 2390 2372 } 2391 return this;2392 }; 2393 this.registerPlugin = function(id, arg1, arg2) {2373 return _this; 2374 }; 2375 _this.registerPlugin = function(id, arg1, arg2) { 2394 2376 jwplayer.plugins.registerPlugin(id, arg1, arg2); 2395 2377 }; 2396 2378 2397 2379 /** Use this function to set the internal low-level player. This is a javascript object which contains the low-level API calls. **/ 2398 this.setPlayer = function(player, renderingMode) {2380 _this.setPlayer = function(player, renderingMode) { 2399 2381 _player = player; 2400 this.renderingMode = renderingMode; 2401 }; 2402 2403 this.stateListener = function(state, callback) { 2382 _this.renderingMode = renderingMode; 2383 }; 2384 2385 _this.detachMedia = function() { 2386 if (_this.renderingMode == "html5") { 2387 return _callInternal("jwDetachMedia"); 2388 } 2389 } 2390 2391 _this.attachMedia = function() { 2392 if (_this.renderingMode == "html5") { 2393 return _callInternal("jwAttachMedia"); 2394 } 2395 } 2396 2397 function _stateListener(state, callback) { 2404 2398 if (!_stateListeners[state]) { 2405 2399 _stateListeners[state] = []; 2406 this.eventListener(events.JWPLAYER_PLAYER_STATE,stateCallback(state));2400 _eventListener(events.JWPLAYER_PLAYER_STATE, _stateCallback(state)); 2407 2401 } 2408 2402 _stateListeners[state].push(callback); 2409 return this; 2410 }; 2411 2412 this.detachMedia = function() { 2413 if (this.renderingMode == "html5") { 2414 return this.callInternal("jwDetachMedia"); 2415 } 2416 } 2417 2418 this.attachMedia = function() { 2419 if (this.renderingMode == "html5") { 2420 return this.callInternal("jwAttachMedia"); 2421 } 2422 } 2423 2424 function stateCallback(state) { 2403 return _this; 2404 }; 2405 2406 function _stateCallback(state) { 2425 2407 return function(args) { 2426 2408 var newstate = args.newstate, oldstate = args.oldstate; … … 2441 2423 } 2442 2424 2443 this.componentListener = function(component, type, callback) {2425 function _componentListener(component, type, callback) { 2444 2426 if (!_componentListeners[component]) { 2445 2427 _componentListeners[component] = {}; … … 2447 2429 if (!_componentListeners[component][type]) { 2448 2430 _componentListeners[component][type] = []; 2449 this.eventListener(type, _componentCallback(component, type));2431 _eventListener(type, _componentCallback(component, type)); 2450 2432 } 2451 2433 _componentListeners[component][type].push(callback); 2452 return this;2434 return _this; 2453 2435 }; 2454 2436 … … 2468 2450 } 2469 2451 2470 this.addInternalListener = function(player, type) {2452 function _addInternalListener(player, type) { 2471 2453 try { 2472 player.jwAddEventListener(type, 'function(dat) { jwplayer("' + this.id + '").dispatchEvent("' + type + '", dat); }');2454 player.jwAddEventListener(type, 'function(dat) { jwplayer("' + _this.id + '").dispatchEvent("' + type + '", dat); }'); 2473 2455 } catch(e) { 2474 2456 utils.log("Could not add internal listener"); … … 2476 2458 }; 2477 2459 2478 this.eventListener = function(type, callback) {2460 function _eventListener(type, callback) { 2479 2461 if (!_listeners[type]) { 2480 2462 _listeners[type] = []; 2481 2463 if (_player && _playerReady) { 2482 this.addInternalListener(_player, type);2464 _addInternalListener(_player, type); 2483 2465 } 2484 2466 } 2485 2467 _listeners[type].push(callback); 2486 return this;2487 }; 2488 2489 this.dispatchEvent = function(type) {2468 return _this; 2469 }; 2470 2471 _this.dispatchEvent = function(type) { 2490 2472 if (_listeners[type]) { 2491 2473 var args = utils.translateEventResponse(type, arguments[1]); … … 2498 2480 }; 2499 2481 2500 this.dispatchInstreamEvent = function(type) {2482 _this.dispatchInstreamEvent = function(type) { 2501 2483 if (_instream) { 2502 2484 _instream.dispatchEvent(type, arguments); … … 2504 2486 }; 2505 2487 2506 this.callInternal = function() {2488 function _callInternal() { 2507 2489 if (_playerReady) { 2508 2490 var funcName = arguments[0], … … 2528 2510 }; 2529 2511 2530 this.playerReady = function(obj) {2512 _this.playerReady = function(obj) { 2531 2513 _playerReady = true; 2532 2514 2533 2515 if (!_player) { 2534 this.setPlayer(document.getElementById(obj.id));2535 } 2536 this.container = document.getElementById(this.id);2516 _this.setPlayer(document.getElementById(obj.id)); 2517 } 2518 _this.container = document.getElementById(_this.id); 2537 2519 2538 2520 for (var eventType in _listeners) { 2539 this.addInternalListener(_player, eventType);2540 } 2541 2542 this.eventListener(events.JWPLAYER_PLAYLIST_ITEM, function(data) {2521 _addInternalListener(_player, eventType); 2522 } 2523 2524 _eventListener(events.JWPLAYER_PLAYLIST_ITEM, function(data) { 2543 2525 _itemMeta = {}; 2544 2526 }); 2545 2527 2546 this.eventListener(events.JWPLAYER_MEDIA_META, function(data) {2528 _eventListener(events.JWPLAYER_MEDIA_META, function(data) { 2547 2529 utils.extend(_itemMeta, data.metadata); 2548 2530 }); 2549 2531 2550 this.dispatchEvent(events.API_READY);2532 _this.dispatchEvent(events.API_READY); 2551 2533 2552 2534 while (_queuedCalls.length > 0) { 2553 this.callInternal.apply(this, _queuedCalls.shift());2554 } 2555 }; 2556 2557 this.getItemMeta = function() {2535 _callInternal.apply(this, _queuedCalls.shift()); 2536 } 2537 }; 2538 2539 _this.getItemMeta = function() { 2558 2540 return _itemMeta; 2559 2541 }; 2560 2542 2561 this.getCurrentItem = function() {2562 return this.callInternal('jwGetPlaylistIndex');2543 _this.getCurrentItem = function() { 2544 return _callInternal('jwGetPlaylistIndex'); 2563 2545 }; 2564 2546 … … 2577 2559 return ret; 2578 2560 } 2579 return this;2561 return _this 2580 2562 }; 2581 2563 -
branches/jw6/jwplayer.html5.js
r2197 r2198 1 (function(a){a.html5={};a.html5.version="6.0.219 7"})(jwplayer);(function(a){a.serialize=function(b){if(b==null){return null}else{if(b=="true"){return true}else{if(b=="false"){return false}else{if(isNaN(Number(b))||b.length>5||b.length==0){return b}else{return Number(b)}}}}}})(jwplayer.utils);(function(a){var b=a.animations=function(){};b.rotate=function(c,d){a.transform(c,"rotate("+d+"deg)")}})(jwplayer.utils);(function(h){var a={},g,b={};function f(){var k=document.createElement("style");k.type="text/css";document.getElementsByTagName("head")[0].appendChild(k);return k}h.css=function(k,n,l){if(!h.exists(l)){l=false}if(h.isIE()){if(!g){g=f()}}else{if(!a[k]){a[k]=f()}}if(!b[k]){b[k]={}}for(var m in n){var o=j(m,n[m],l);if(h.exists(b[k][m])&&!h.exists(o)){delete b[k][m]}else{b[k][m]=o}}if(h.isIE()){e()}else{d(k,a[k])}};function j(m,n,k){if(typeof n==="undefined"){return undefined}var l=k?" !important":"";if(!isNaN(n)){switch(m){case"z-index":case"opacity":return n+l;break;default:if(m.match(/color/i)){return"#"+h.pad(n.toString(16),6)+l}else{if(n==0){return 0+l}else{return Math.ceil(n)+"px"+l}}break}}else{return n+l}}function e(){var k="\n";for(var l in b){k+=c(l)}g.innerHTML=k}function d(k,l){if(l){l.innerHTML=c(k)}}function c(k){var l=k+"{\n";var n=b[k];for(var m in n){l+=" "+m+": "+n[m]+";\n"}l+="}\n";return l}h.clearCss=function(l){for(var m in b){if(m.indexOf(l)>=0){delete b[m]}}for(var k in a){if(k.indexOf(l)>=0){a[k].innerHTML=""}}}})(jwplayer.utils);(function(a){var b=a.exists;a.scale=function(f,e,d,h,j){var g;if(!b(e)){e=1}if(!b(d)){d=1}if(!b(h)){h=0}if(!b(j)){j=0}if(e==1&&d==1&&h==0&&j==0){g=""}else{g="scale("+e+","+d+") translate("+h+"px,"+j+"px)"}};a.transform=function(d,f){var e=d.style;if(b(f)){e.webkitTransform=f;e.MozTransform=f;e.msTransform=f;e.OTransform=f}};a.stretch=function(m,r,q,j,o,k){if(!r){return}if(!q||!j||!o||!k){return}var e=q/o,h=j/k,p=0,l=0,d={},f=(r.tagName.toLowerCase()=="video"),g=false,n;if(f){a.transform(r)}n="jw"+m.toLowerCase();switch(m.toLowerCase()){case c.FILL:if(e>h){o=o*e;k=k*e}else{o=o*h;k=k*h}case c.NONE:e=h=1;case c.EXACTFIT:g=true;break;case c.UNIFORM:if(e>h){o=o*h;k=k*h;if(o/q>0.95){g=true;n="jwexactfit";e=Math.ceil(100*q/o)/100;h=1}}else{o=o*e;k=k*e;if(k/j>0.95){g=true;n="jwexactfit";h=Math.ceil(100*j/k)/100;e=1}}break;default:return;break}if(f){if(g){r.style.width=o+"px";r.style.height=k+"px";p=((q-o)/2)/e;l=((j-k)/2)/h;a.scale(r,e,h,p,l)}else{r.style.width="";r.style.height=""}}else{r.className=r.className.replace(/\s*jw(none|exactfit|uniform|fill)/g,"");r.className+=" "+n}};var c=a.stretching={NONE:"none",FILL:"fill",UNIFORM:"uniform",EXACTFIT:"exactfit"}})(jwplayer.utils);(function(a){a.parsers={localName:function(b){if(!b){return""}else{if(b.localName){return b.localName}else{if(b.baseName){return b.baseName}else{return""}}}},textContent:function(b){if(!b){return""}else{if(b.textContent){return b.textContent}else{if(b.text){return b.text}else{return""}}}},getChildNode:function(c,b){return c.childNodes[b]},numChildren:function(b){if(b.childNodes){return b.childNodes.length}else{return 0}}}})(jwplayer.html5);(function(b){var a=b.html5.parsers;var d=a.jwparser=function(){};var c="jwplayer";d.parseEntry=function(h,j){for(var f=0;f<h.childNodes.length;f++){var g=h.childNodes[f];if(g.prefix==c){var e=a.localName(g);j[e]=b.utils.serialize(a.textContent(g));if(e=="file"&&j.sources){delete j.sources}}if(!j.file){j.file=j.link}}return j}})(jwplayer);(function(e){var b=jwplayer.utils,h=b.xmlAttribute,c=e.localName,a=e.textContent,d=e.numChildren;var g=e.mediaparser=function(){};var f="media";g.parseGroup=function(m,n){for(var k=0;k<d(m);k++){var l=m.childNodes[k];if(l.prefix==f){if(!c(l)){continue}switch(c(l).toLowerCase()){case"content":n.file=h(l,"url");if(h(l,"duration")){n.duration=b.seconds(h(l,"duration"))}if(d(l)>0){n=g.parseGroup(l,n)}if(h(l,"url")){if(!n.sources){n.sources=[]}n.sources.push({file:h(l,"url"),type:h(l,"type"),width:h(l,"width"),label:h(l,"height")?h(l,"height")+"p":undefined})}break;case"title":n.title=a(l);break;case"description":n.description=a(l);break;case"guid":n.mediaid=a(l);break;case"thumbnail":n.image=h(l,"url");break;case"player":var j=l.url;break;case"group":g.parseGroup(l,n);break}}}return n}})(jwplayer.html5.parsers);(function(g){var b=jwplayer.utils,a=g.textContent,e=g.getChildNode,f=g.numChildren,d=g.localName;g.rssparser={};g.rssparser.parse=function(o){var h=[];for(var m=0;m<f(o);m++){var n=e(o,m),k=d(n).toLowerCase();if(k=="channel"){for(var l=0;l<f(n);l++){var p=e(n,l);if(d(p).toLowerCase()=="item"){h.push(c(p))}}}}return h};function c(l){var m={};for(var j=0;j<l.childNodes.length;j++){var k=l.childNodes[j];var h=d(k);if(!h){continue}switch(h.toLowerCase()){case"enclosure":m.file=b.xmlAttribute(k,"url");break;case"title":m.title=a(k);break;case"pubdate":m.date=a(k);break;case"description":m.description=a(k);break;case"link":m.link=a(k);break;case"category":if(m.tags){m.tags+=a(k)}else{m.tags=a(k)}break}}m=g.mediaparser.parseGroup(l,m);m=g.jwparser.parseEntry(l,m);return new jwplayer.playlist.item(m)}})(jwplayer.html5.parsers);(function(n){var w=n.html5,h=n.utils,k=n.events,r=n.events.state,q=h.css,b="button",p="text",e="divider",s="slider",f="relative",g="absolute",a="none",o="block",u="inline",m="inline-block",j="hidden",c="left",x="right",l="100%",t="width .25s linear, left .25s linear, opacity .25s, background .25s, visibility .25s",v=".jwcontrolbar",d=document;w.controlbar=function(E,at){var C,Y,D={margin:10,font:"Arial,sans-serif",fontsize:10,fontcolor:parseInt("000000",16),fontstyle:"normal",fontweight:"bold",layout:{left:{position:"left",elements:[{name:"play",type:b},{name:"divider",type:e},{name:"prev",type:b},{name:"divider",type:e},{name:"next",type:b},{name:"divider",type:e},{name:"elapsed",type:p}]},center:{position:"center",elements:[{name:"time",type:s}]},right:{position:"right",elements:[{name:"duration",type:p},{name:"blank",type:b},{name:"divider",type:e},{name:"mute",type:b},{name:"volume",type:s},{name:"divider",type:e},{name:"fullscreen",type:b}]}}},W,aC,an,aA,aq,aK,L,O,ak=false,au=0,ab={play:"pause",mute:"unmute",fullscreen:"normalscreen"},aB={play:false,mute:false,fullscreen:false},B={play:ag,mute:P,fullscreen:ad,next:A,prev:aj},F={time:aa,volume:aF};function aE(){an={};C=E;aq=C.id+"_controlbar";aK=L=0;aA=Q();aA.id=aq;aA.className="jwcontrolbar";window.addEventListener("mousemove",aJ,false);window.addEventListener("mouseup",aJ,false);Y=C.skin;aC=Y.getComponentLayout("controlbar");if(!aC){aC=D.layout}h.clearCss("#"+aq);Z();aw();y();R();G();aG()}function y(){C.jwAddEventListener(n.events.JWPLAYER_MEDIA_TIME,aL);C.jwAddEventListener(n.events.JWPLAYER_PLAYER_STATE,I);C.jwAddEventListener(n.events.JWPLAYER_MEDIA_MUTE,aG);C.jwAddEventListener(n.events.JWPLAYER_MEDIA_VOLUME,G);C.jwAddEventListener(n.events.JWPLAYER_MEDIA_BUFFER,M);C.jwAddEventListener(n.events.JWPLAYER_FULLSCREEN,H);C.jwAddEventListener(n.events.JWPLAYER_PLAYLIST_LOADED,R)}function aL(aN){var aM=false,aO;if(an.elapsed){aO=h.timeFormat(aN.position);an.elapsed.innerHTML=aO;aM=(aO.length!=h.timeFormat(L).length)}if(an.duration){aO=h.timeFormat(aN.duration);an.duration.innerHTML=aO;aM=(aM||(aO.length!=h.timeFormat(aK).length))}if(aN.duration>0){az(aN.position/aN.duration)}else{az(0)}aK=aN.duration;L=aN.position;if(aM){U()}}function I(aM){switch(aM.newstate){case r.BUFFERING:case r.PLAYING:q(av(".jwtimeSliderThumb"),{opacity:1});V("play",true);break;case r.PAUSED:if(!ak){V("play",false)}break;case r.IDLE:V("play",false);q(av(".jwtimeSliderThumb"),{opacity:0});if(an.timeRail){an.timeRail.className="jwrail";setTimeout(function(){an.timeRail.className+=" jwsmooth"},100)}aD(0);aL({position:0,duration:0});break;case r.COMPLETED:q(av(),{opacity:0});break}}function aG(){var aM=C.jwGetMute();V("mute",aM);z(aM?0:O)}function G(){O=C.jwGetVolume()/100;z(O)}function M(aM){aD(aM.bufferPercent/100)}function H(aM){V("fullscreen",aM.fullscreen)}function R(aM){if(C.jwGetPlaylist().length<2){q(av(".jwnext"),{display:"none"});q(av(".jwprev"),{display:"none"})}else{q(av(".jwnext"),{display:undefined});q(av(".jwprev"),{display:undefined})}U()}function Z(){W=h.extend({},D,Y.getComponentSettings("controlbar"),at);q("#"+aq,{height:af("background").height,bottom:W.margin?W.margin:0,left:W.margin?W.margin:0,right:W.margin?W.margin:0});q(av(".jwtext"),{font:W.fontsize+"px/"+af("background").height+"px "+W.font,color:W.fontcolor,"font-weight":W.fontweight,"font-style":W.fontstyle,"text-align":"center",padding:"0 5px"})}function av(aM){return"#"+aq+(aM?" "+aM:"")}function Q(){return d.createElement("span")}function aw(){var aO=ao("capLeft");var aN=ao("capRight");var aM=ao("background",{position:g,left:af("capLeft").width,right:af("capRight").width,"background-repeat":"repeat-x"},true);if(aM){aA.appendChild(aM)}if(aO){aA.appendChild(aO)}ax();if(aN){aA.appendChild(aN)}}function S(aM){switch(aM.type){case e:return ai(aM);break;case p:return ap(aM.name);break;case b:if(aM.name!="blank"){return ah(aM.name)}break;case s:return T(aM.name);break}}function ao(aO,aR,aN,aT){var aQ=Q();aQ.className="jw"+aO;var aM=aT?" left center":" center";var aP=af(aO);aQ.innerHTML=" ";if(!aP||aP.src==""){return}var aS;if(aN){aS={background:"url('"+aP.src+"') repeat-x "+aM}}else{aS={background:"url('"+aP.src+"') no-repeat"+aM,width:aP.width}}q(av(".jw"+aO),h.extend(aS,aR));an[aO]=aQ;return aQ}function ah(aO){if(!af(aO+"Button").src){return null}var aP=d.createElement("button");aP.className="jw"+aO;aP.addEventListener("click",al(aO),false);var aQ=af(aO+"Button");var aN=af(aO+"ButtonOver");aP.innerHTML=" ";X(av(".jw"+aO),aQ,aN);var aM=ab[aO];if(aM){X(av(".jw"+aO+".jwtoggle"),af(aM+"Button"),af(aM+"ButtonOver"))}an[aO]=aP;return aP}function X(aM,aN,aO){if(!aN.src){return}q(aM,{width:aN.width,background:"url("+aN.src+") center no-repeat"});if(aO.src){q(aM+":hover",{background:"url("+aO.src+") center no-repeat"})}}function al(aM){return function(){if(B[aM]){B[aM]()}}}function ag(){if(aB.play){C.jwPause()}else{C.jwPlay()}}function P(){C.jwSetMute();aG({mute:aB.mute})}function aF(aM){if(aM<0.1){aM=0}if(aM>0.9){aM=1}C.jwSetVolume(aM*100);z(aM)}function aa(aM){C.jwSeek(aM*aK)}function ad(){C.jwSetFullscreen()}function A(){C.jwPlaylistNext()}function aj(){C.jwPlaylistNext()}function V(aM,aN){if(!h.exists(aN)){aN=!aB[aM]}if(an[aM]){an[aM].className="jw"+aM+(aN?" jwtoggle jwtoggling":" jwtoggling");setTimeout(function(){an[aM].className=an[aM].className.replace(" jwtoggling","")},100)}aB[aM]=aN}function N(aM){return aq+"_"+aM}function ap(aM,aQ){var aO=Q();aO.id=N(aM);aO.className="jwtext jw"+aM;var aN={};var aP=af(aM+"Background");if(aP.src){aN.background="url("+aP.src+") no-repeat center";aN["background-size"]="100% "+af("background").height+"px"}q(av(".jw"+aM),aN);aO.innerHTML="00:00";an[aM]=aO;return aO}function ai(aN){if(aN.width){var aM=Q();aM.className="jwblankDivider";q(aM,{width:parseInt(aN.width)});return aM}else{if(aN.element){return ao(aN.element)}else{return ao(aN.name)}}}function T(aM){var aP=Q();aP.className="jwslider jw"+aM;var aO=ao(aM+"SliderCapLeft");var aN=ao(aM+"SliderCapRight");var aQ=ar(aM);if(aO){aP.appendChild(aO)}aP.appendChild(aQ);if(aO){aP.appendChild(aN)}q(av(".jw"+aM+" .jwrail"),{left:af(aM+"SliderCapLeft").width,right:af(aM+"SliderCapRight").width,});an[aM]=aP;if(aM=="time"){aI(aP);az(0);aD(0)}else{if(aM=="volume"){ay(aP)}}return aP}function ar(aO){var aR=Q();aR.className="jwrail jwsmooth";var aM=["Rail","Buffer","Progress"];for(var aQ=0;aQ<aM.length;aQ++){var aP=ao(aO+"Slider"+aM[aQ],null,true,(aO=="volume"));if(aP){aP.className+=" jwstretch";aR.appendChild(aP)}}var aN=ao(aO+"SliderThumb");if(aN){q(av("."+aN.className),{opacity:0});aN.className+=" jwthumb";aR.appendChild(aN)}aR.addEventListener("mousedown",J(aO),false);an[aO+"Rail"]=aR;return aR}function K(){var aM=C.jwGetState();return(aM==r.IDLE||aM==r.COMPLETED)}function J(aM){return(function(aN){if(aN.button!=0){return}an[aM+"Rail"].className="jwrail";if(aM=="time"){if(!K()){C.jwSeekDrag(true);ak=aM}}else{ak=aM}})}function aJ(aM){if(!ak||aM.button!=0){return}var aQ=an[ak].getElementsByClassName("jwrail")[0],aR=h.getBoundingClientRect(aQ),aP=(aM.clientX-aR.left)/aR.width;if(aM.type=="mouseup"){var aN=ak;if(aN=="time"){C.jwSeekDrag(false)}an[aN+"Rail"].className="jwrail jwsmooth";ak=null;F[aN](aP)}else{if(ak=="time"){az(aP)}else{z(aP)}var aO=(new Date()).getTime();if(aO-au>500){au=aO;F[ak](aP)}}}function aI(aM){if(an.timeSliderThumb){q(av(".jwtimeSliderThumb"),{"margin-left":(af("timeSliderThumb").width/-2)})}aD(0);az(0)}function ay(aO){var aN=af("volumeSliderCapLeft").width,aM=af("volumeSliderCapRight").width,aP=af("volumeSliderRail").width;q(av(".jwvolume"),{width:(aN+aP+aM)})}var ac={};function ax(){aH("left");aH("center");aH("right");aA.appendChild(ac.left);aA.appendChild(ac.center);aA.appendChild(ac.right);q(av(".jwright"),{right:af("capRight").width})}function aH(aN){var aM=Q();aM.className="jwgroup jw"+aN;ac[aN]=aM;if(aC[aN]){ae(aC[aN],ac[aN])}}function ae(aP,aM){if(aP&&aP.elements.length>0){for(var aO=0;aO<aP.elements.length;aO++){var aN=S(aP.elements[aO]);if(aN){aM.appendChild(aN)}}}}var U=this.redraw=function(){Z();q(av(".jwgroup.jwcenter"),{left:Math.round(h.parseDimension(ac.left.offsetWidth)+af("capLeft").width),right:Math.round(h.parseDimension(ac.right.offsetWidth)+af("capRight").width)})};this.getDisplayElement=function(){return aA};function aD(aM){aM=Math.min(Math.max(0,aM),1);if(an.timeSliderBuffer){an.timeSliderBuffer.style.width=aM*100+"%"}}function am(aM,aO,aP){var aN=100*Math.min(Math.max(0,aO),1)+"%";if(an[aM+"SliderProgress"]){an[aM+"SliderProgress"].style.width=aN}if(an[aM+"SliderThumb"]){an[aM+"SliderThumb"].style.left=aN}}function z(aM){am("volume",aM,true)}function az(aM){am("time",aM)}function af(aM){var aN=Y.getSkinElement("controlbar",aM);if(aN){return aN}else{return{width:0,height:0,src:"",image:undefined,ready:false}}}this.show=function(){q(av(),{opacity:1,visibility:"visible"})};this.hide=function(){q(av(),{opacity:0,visibility:j})};aE()};q(v,{position:g,overflow:j,visibility:j,opacity:0,"-webkit-transition":t,"-moz-transition":t,"-o-transition":t});q(v+" span",{height:l,"-webkit-user-select":a,"-webkit-user-drag":a,"user-select":a,"user-drag":a});q(v+" .jwgroup",{display:u});q(v+" span, "+v+" .jwgroup button,"+v+" .jwleft",{position:f,"float":c});q(v+" .jwright",{position:g});q(v+" .jwcenter",{position:g});q(v+" button",{display:m,height:l,border:a,cursor:"pointer","-webkit-transition":t,"-moz-transition":t,"-o-transition":t});q(v+" .jwcapRight,"+v+" .jwtimeSliderCapRight,"+v+" .jwvolumeSliderCapRight",{right:0,position:g});q(v+" .jwtime,"+v+" .jwgroup span.jwstretch",{position:g,height:l,width:l,left:0});q(v+" .jwrail,"+v+" .jwthumb",{position:g,height:l,cursor:"pointer"});q(v+" .jwtime .jwsmooth span",{"-webkit-transition":t,"-moz-transition":t,"-o-transition":t});q(v+" .jwdivider+.jwdivider",{display:a});q(v+" .jwtext",{padding:"0 5px","text-align":"center"});q(v+" .jwtoggling",{"-webkit-transition":a,"-moz-transition":a,"-o-transition":a})})(jwplayer);(function(d){var c=d.html5,a=d.utils,e=d.events,b=e.state;c.controller=function(j,z){var G=j,g=z,q=j.getVideo(),y=this,n=new e.eventdispatcher(G.id,G.config.debug),f=false,t=[];a.extend(this,n);function r(){G.addEventListener(e.JWPLAYER_MEDIA_BUFFER_FULL,D);G.addEventListener(e.JWPLAYER_MEDIA_COMPLETE,function(M){setTimeout(u,25)})}function I(M){if(!f){f=true;g.completeSetup();n.sendEvent(M.type,M);if(d.utils.exists(window.playerReady)){playerReady(M)}n.sendEvent(d.events.JWPLAYER_PLAYLIST_LOADED,{playlist:G.playlist});n.sendEvent(d.events.JWPLAYER_PLAYLIST_ITEM,{index:G.item});G.addGlobalListener(J);L();if(G.autostart&&!a.isIOS()){x()}while(t.length>0){var N=t.shift();A(N.method,N.arguments)}}}function J(M){n.sendEvent(M.type,M)}function D(M){q.play()}function L(M){o();switch(a.typeOf(M)){case"string":G.setPlaylist(new d.playlist({file:M}));G.setItem(0);break;case"object":case"array":G.setPlaylist(new d.playlist(M));G.setItem(0);break;case"number":G.setItem(M);break}}var s,m,p;function x(){try{m=x;if(!s){s=true;n.sendEvent(e.JWPLAYER_MEDIA_BEFOREPLAY);s=false;if(p){p=false;m=null;return}}if(K()){q.load(G.playlist[G.item])}else{if(G.state==b.PAUSED){q.play()}}return true}catch(M){n.sendEvent(e.JWPLAYER_ERROR,M);m=null}return false}function o(){m=null;try{if(!K()){q.stop()}if(s){p=true}return true}catch(M){n.sendEvent(e.JWPLAYER_ERROR,M)}return false}function H(){try{switch(G.state){case b.PLAYING:case b.BUFFERING:q.pause();break;default:if(s){p=true}}return true}catch(M){n.sendEvent(e.JWPLAYER_ERROR,M)}return false;if(G.state==b.PLAYING||G.state==b.BUFFERING){q.pause()}}function K(){return(G.state==b.IDLE||G.state==b.COMPLETED)}function E(M){q.seek(M)}function C(M){g.fullscreen(M)}function w(M){G.stretching=M;g.resize()}function v(M){L(M);x()}function k(){v(G.item-1)}function l(){v(G.item+1)}function u(){if(!K()){return}m=u;switch(G.repeat.toLowerCase()){case"single":x();break;case"always":l();break;case"list":if(G.item==G.playlist.length-1){L(0);G.setState(b.COMPLETED)}else{l()}break;default:G.setState(b.COMPLETED);break}}function B(){try{return G.getVideo().detachMedia()}catch(M){return null}}function h(){try{var M=G.getVideo().attachMedia();if(typeof m=="function"){m()}}catch(N){return null}}function F(M){return function(){if(f){A(M,arguments)}else{t.push({method:M,arguments:arguments})}}}function A(O,N){var M=[];for(i=0;i<N.length;i++){M.push(N[i])}O.apply(this,M)}this.play=F(x);this.pause=F(H);this.seek=F(E);this.stop=F(o);this.load=F(L);this.next=F(l);this.prev=F(k);this.item=F(v);this.setVolume=F(G.setVolume);this.setMute=F(G.setMute);this.setFullscreen=F(C);this.setStretching=F(w);this.detachMedia=B;this.attachMedia=h;this.playerReady=I;r()}})(jwplayer);(function(a){a.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="0"/><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="mute"/><slider name="volume"/><divider name="divider"/><button name="fullscreen"/></group></layout><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAYCAYAAADd5VyeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFdJREFUeNqczMsOgCAMRFEw/v/PtkAfUNg6aEx0lieZmyOC0mV5jIHQe0dwdwQzQ1DdQEQRWhOEWhtCKRWBuSAQMcBJzAlgzvkRjrTtR+MJbtF4vywBBgAcr05Vhd9mLAAAAABJRU5ErkJggg=="/><element name="divider" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC5JREFUeNpimDlzZgMTAxAQTQgICDAwiYqKMjCJiYlBWcLCwgxMzMzMRJsCEGAAXVQDrCAU8IQAAAAASUVORK5CYII="/><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,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAYCAYAAAAyJzegAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEVJREFUeNpiYBhaYD4Q/4fSDAxNza3/oQJgDOIz8fDwoGgB8ZnY2NhQBEF8JhZWFhRBEJ+JlYUVRRDEx6oSu5OGCAAIMAC30g1QKMx9igAAAABJRU5ErkJggg=="/><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"><settings><setting name="bufferinterval" value="150"/><setting name="bufferrotation" value="90"/></settings><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGJJREFUeNrs0UERACAMBLGDwUf9S0JI/1jg36yDzK6quhnUzrCAgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgX873e0wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBw8gQYACnjBI/ihM8BAAAAAElFTkSuQmCC"/><element name="playIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiUlEQVR42u3XSw2AMBREURwgAQlIQAISKgUpSEFKJeCg5b0E0kWBTVcD9ySTsL0Jn9IBAAAA+K2UUrBlW/Rr5ZDoIeeuoFkxJD9ss03aIXXQqB9SttoG7ZA6qNcOKdttiwcJh9RB+iFl4SshkRBuLR72+9cvH0SOKI2HRo7x/Fi1/uoCAAAAwLsD8ki99IlO2dQAAAAASUVORK5CYII="/><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,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGJJREFUeNrs2TEBADAIxMCnGtjxL6luaqE7Fwc3p2bmZlEnywIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG/q262z0EBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZOngADAE0iAsIr/u2qAAAAAElFTkSuQmCC"/></elements></component><component name="playlist"><settings><setting name="backgroundcolor" value="0xe6e6e6"/><setting name="fontcolor" value="0x000000"/></settings><elements><element name="item" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAABPCAYAAAAJMDwFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQpJREFUeNrs1sGKhDAQRdHY+P+fqr1WSXQpojsLLHIONAzMTh6pO9RaW4F7y/GbH37/09/T9f8/344IhoVhkcfYmsTCi4VhYVjwfmP5CAQMqxTLwinEsNBYoLFwCjEseLexfANCGku94xRiWGgsCGgsH4GIYVkWGguNhcYCjYXGQmOBxsIpRLyDxkJjobFAY6GxcApBvPPdYa3b6ivgFOIU4sUCw8Kw6LaxJBYx8a7ecQoxLAwLDIsk8a7d8WJhWPR9Cl1CvFgkinf1jhcLw8KwwLBIEu/aHS8WaV4sDxZeLAyL3uNdvePFwrAwLDAsksS7didiWHaFU4hhYVgQEO/qHS8WhkXXdgEGAKAsO7NPrr2OAAAAAElFTkSuQmCC"/><element name="itemImage" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAA7CAIAAABKR2XkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAK5JREFUeNrslksKwCAMRGvplfzcf6VeQDyA57ABwW0XjVDpm0WILtrhOURNa+3YSuexm67eO4xxTCpgDGMYkwoYwxjGMCYVMIYxjJlun3LcVWWtfdx5KWXGOWfn3FxKLzu6vzC1VvWD896nlEZV//gSxzvleEjozqou/VkRQogxSiNV+q9Pt2l3aIVpU0rhBuFdwbuCVMAYxjDGMamAMYxhjGNSAWMYw/hfjm8BBgDatbXqT4uvsgAAAABJRU5ErkJggg=="/><element name="sliderCapTop" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAKCAYAAABBq/VWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABNJREFUeNpiYBgFo2AUjBwAEGAAA/IAAdBu5L8AAAAASUVORK5CYII="/><element name="sliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAECAYAAAB7oZQmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABxJREFUeNpiZCAeOGARO0CMRiYGOoDhYwlAgAEAYPMBCML0c4MAAAAASUVORK5CYII="/><element name="sliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAECAYAAAB7oZQmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtJREFUeNpiZCAO/Mcjx0hIMxMDHcDwsQQgwABz1wEIMGLXPQAAAABJRU5ErkJggg=="/><element name="sliderCapBottom" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAKCAYAAABBq/VWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABNJREFUeNpiYBgFo2AUjBwAEGAAA/IAAdBu5L8AAAAASUVORK5CYII="/></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(g){var n=jwplayer.utils,k=n.css,d=jwplayer.events,e=d.state,m=n.animations.rotate,l=document,a=".jwdisplay",j=".jwpreview",b="absolute",c="none",h="100%",f="opacity .25s";g.display=function(F,T){var M=F,B=F.skin,v,o,t,y,N,R,E={},p,D,P,I,z=n.extend({backgroundcolor:"#000",showicons:true},B.getComponentSettings("display"),T);_bufferRotation=!n.exists(z.bufferrotation)?15:parseInt(z.bufferrotation,10),_bufferInterval=!n.exists(z.bufferinterval)?100:parseInt(z.bufferinterval,10);function C(){v=l.createElement("div");v.id=M.id+"_display";v.className="jwdisplay";o=l.createElement("div");o.className="jwpreview";v.appendChild(o);M.jwAddEventListener(d.JWPLAYER_PLAYER_STATE,A);M.jwAddEventListener(d.JWPLAYER_PLAYLIST_ITEM,L);v.addEventListener("click",O,false);s();A({newstate:e.IDLE})}function O(V){switch(M.jwGetState()){case e.PLAYING:case e.BUFFERING:M.jwPause();break;default:M.jwPlay();break}}function s(){var V=["play","buffer"];for(var Y=0;Y<V.length;Y++){var ac=V[Y],aa=G(ac+"Icon"),X=G(ac+"IconOver"),Z=l.createElement("div"),W=G("background"),ab=G("backgroundOver");button=l.createElement("button");if(aa){button.className="jw"+ac;Z.className="jwicon";button.appendChild(Z);x("#"+v.id+" ."+button.className,W,ab);x("#"+v.id+" ."+button.className+" div",aa,X);if(ab||X){button.addEventListener("mouseover",H(button),false);button.addEventListener("mouseout",K(button),false)}E[ac]=button}}}function H(V){return function(W){if(V.className.indexOf("jwhover")<0){V.className+=" jwhover"}if(V.childNodes[0].className.indexOf("jwhover")<0){V.childNodes[0].className+=" jwhover"}}}function K(V){return function(W){V.className=V.className.replace(" jwhover","");V.childNodes[0].className=V.childNodes[0].className.replace(" jwhover","")}}function x(V,W,X){if(!(W&&W.src)){return}k(V,{width:W.width,height:W.height,"margin-left":W.width/-2,"margin-top":W.height/-2,background:"url("+W.src+") center no-repeat"});if(X&&X.src){k(V+".jwhover",{background:"url("+X.src+") center no-repeat"})}}function U(V){if(!z.showicons){return}if(D){v.removeChild(D)}D=E[V];if(D){v.appendChild(D)}if(V=="buffer"){P=0;I=setInterval(function(){P+=_bufferRotation;m(D.childNodes[0],P%360)},_bufferInterval)}}function L(){var V=M.jwGetPlaylist()[M.jwGetPlaylistIndex()];var W=V?V.image:"";if(t!=W){t=W;Q(j,false);w()}}var J;function A(V){clearTimeout(J);J=setTimeout(function(){r(V.newstate)},100)}function r(V){clearInterval(I);switch(V){case e.COMPLETED:case e.IDLE:U("play");Q(j,true);break;case e.BUFFERING:U("buffer");break;case e.PLAYING:U();Q(j,false);break;case e.PAUSED:U("play");break}}this.getDisplayElement=function(){return v};function u(V){return"#"+v.id+" "+V}function w(){if(t){var V=new Image();V.addEventListener("load",S,false);V.src=t}else{Q(j,false);y=N=0}}function S(){y=this.width;N=this.height;q();if(t){k(u(j),{"background-image":"url("+t+")"})}}function G(V){var W=B.getSkinElement("display",V);if(W){return W}return null}function q(){n.stretch(M.jwGetStretching(),o,v.clientWidth,v.clientHeight,y,N)}this.redraw=q;function Q(V,W){k(u(V),{opacity:W?1:0})}this.show=function(){Q("",true)};this.hide=function(){Q("",false)};this.getBGColor=function(){return z.backgroundcolor};this.setAlternateClickHandler=function(V){_alternateClickHandler=V};this.revertAlternateClickHandler=function(){_alternateClickHandler=undefined};C()};k(a,{position:b,cursor:"pointer",width:h,height:h,overflow:"hidden",opacity:0});k(a+" .jwpreview",{position:b,width:h,height:h,background:"no-repeat center",overflow:"hidden"});k(a+", "+a+" *",{"-webkit-transition":f,"-moz-transition":f,"-o-transition":f});k(a+" button, "+a+" .jwicon",{border:c,position:b,left:"50%",top:"50%",padding:0,cursor:"pointer"})})(jwplayer.html5);(function(a){var e=jwplayer,c=e.utils,d=e.events,b=d.state,f=e.playlist;a.instream=function(C,q,B,D){var x={controlbarseekable:"always",controlbarpausable:true,controlbarstoppable:true,playlistclickable:true};var z,E,G=C,I=q,n=B,A=D,v,L,s,K,j,k,l,p,u,m=false,o,h,r=this;this.load=function(P,O){g();m=true;E=c.extend(x,O);z=new f.item(P);J();h=document.createElement("div");h.id=r.id+"_instream_container";A.detachMedia();v=l.getTag();k=I.playlist[I.item];j=G.jwGetState();if(j==b.BUFFERING||j==b.PLAYING){v.pause()}L=v.src?v.src:v.currentSrc;s=v.innerHTML;K=v.currentTime;u=new a.display(r);u.setAlternateClickHandler(function(Q){if(_fakemodel.state==b.PAUSED){r.jwInstreamPlay()}else{H(d.JWPLAYER_INSTREAM_CLICK,Q)}});h.appendChild(u.getDisplayElement());if(!c.isMobile()){p=new a.controlbar(r);h.appendChild(p.getDisplayElement())}n.setupInstream(h,v);t();l.load(z)};this.jwInstreamDestroy=function(O){if(!m){return}m=false;if(j!=b.IDLE){l.load(k,false)}else{l.stop(true)}l.detachMedia();n.destroyInstream();if(p){try{p.getDisplayElement().parentNode.removeChild(p.getDisplayElement())}catch(P){}}H(d.JWPLAYER_INSTREAM_DESTROYED,{reason:(O?"complete":"destroyed")},true);A.attachMedia();if(j==b.BUFFERING||j==b.PLAYING){v.play();if(I.playlist[I.item]==k){I.getVideo().seek(K)}}return};this.jwInstreamAddEventListener=function(O,P){o.addEventListener(O,P)};this.jwInstreamRemoveEventListener=function(O,P){o.removeEventListener(O,P)};this.jwInstreamPlay=function(){if(!m){return}l.play(true)};this.jwInstreamPause=function(){if(!m){return}l.pause(true)};this.jwInstreamSeek=function(O){if(!m){return}l.seek(O)};this.jwInstreamGetState=function(){if(!m){return undefined}return _fakemodel.state};this.jwInstreamGetPosition=function(){if(!m){return undefined}return _fakemodel.position};this.jwInstreamGetDuration=function(){if(!m){return undefined}return _fakemodel.duration};this.playlistClickable=function(){return(!m||E.playlistclickable.toString().toLowerCase()=="true")};function w(){_fakemodel=new a.model({});o=new d.eventdispatcher();G.jwAddEventListener(d.JWPLAYER_RESIZE,t);G.jwAddEventListener(d.JWPLAYER_FULLSCREEN,t)}function g(){A.setMute(I.mute);A.setVolume(I.volume)}function J(){if(!l){l=new a.video(I.getVideo().getTag());l.addGlobalListener(M);l.addEventListener(d.JWPLAYER_MEDIA_META,N);l.addEventListener(d.JWPLAYER_MEDIA_COMPLETE,y);l.addEventListener(d.JWPLAYER_MEDIA_BUFFER_FULL,F)}l.attachMedia()}function M(O){if(m){H(O.type,O)}}function F(O){if(m){l.play()}}function y(O){if(m){setTimeout(function(){r.jwInstreamDestroy(true)},10)}}function N(O){if(O.metadata.width&&O.metadata.height){n.resizeMedia()}}function H(O,P,Q){if(m||Q){o.sendEvent(O,P)}}function t(){if(p){p.redraw()}if(u){u.redraw()}}this.jwPlay=function(O){if(E.controlbarpausable.toString().toLowerCase()=="true"){this.jwInstreamPlay()}};this.jwPause=function(O){if(E.controlbarpausable.toString().toLowerCase()=="true"){this.jwInstreamPause()}};this.jwStop=function(){if(E.controlbarstoppable.toString().toLowerCase()=="true"){this.jwInstreamDestroy();G.jwStop()}};this.jwSeek=function(O){switch(E.controlbarseekable.toLowerCase()){case"always":this.jwInstreamSeek(O);break;case"backwards":if(_fakemodel.position>O){this.jwInstreamSeek(O)}break}};this.jwGetPosition=function(){};this.jwGetDuration=function(){};this.jwGetWidth=G.jwGetWidth;this.jwGetHeight=G.jwGetHeight;this.jwGetFullscreen=G.jwGetFullscreen;this.jwSetFullscreen=G.jwSetFullscreen;this.jwGetVolume=function(){return I.volume};this.jwSetVolume=function(O){l.volume(O);G.jwSetVolume(O)};this.jwGetMute=function(){return I.mute};this.jwSetMute=function(O){l.mute(O);G.jwSetMute(O)};this.jwGetState=function(){return _fakemodel.state};this.jwGetPlaylist=function(){return[z]};this.jwGetPlaylistIndex=function(){return 0};this.jwGetStretching=function(){return I.config.stretching};this.jwAddEventListener=function(P,O){o.addEventListener(P,O)};this.jwRemoveEventListener=function(P,O){o.removeEventListener(P,O)};this.skin=G.skin;this.id=G.id+"_instream";w();return this}})(jwplayer.html5);(function(b){var a=jwplayer.utils,c=jwplayer.events,d=undefined;b.model=function(f){var m=this,h,o,p=a.getCookies(),e={};_defaults={autostart:false,controlbar:true,debug:d,height:320,icons:true,item:0,mobilecontrols:false,mute:false,playlist:[],playlistposition:"right",playlistsize:0,repeat:"list",skin:d,stretching:a.stretching.UNIFORM,volume:90,width:480};function l(q){for(var r in q){q[r]=a.serialize(q[r])}return q}function n(){a.extend(m,new c.eventdispatcher());m.config=l(a.extend({},_defaults,p,f));a.extend(m,{id:f.id,state:c.state.IDLE,position:0,buffer:0,},m.config);k();m.setItem(m.config.item);o=document.createElement("video");h=new b.video(o);h.volume(m.volume);h.mute(m.mute);h.addGlobalListener(g)}function k(){e.display={showicons:m.icons};e.controlbar={}}var j={};j[c.JWPLAYER_MEDIA_MUTE]="mute";j[c.JWPLAYER_MEDIA_VOLUME]="volume";j[c.JWPLAYER_PLAYER_STATE]="newstate->state";j[c.JWPLAYER_MEDIA_BUFFER]="bufferPercent->buffer";j[c.JWPLAYER_MEDIA_TIME]="position";function g(q){var s=j[q.type];if(s){var t=s.split("->"),u=t[0],r=t[1]?t[1]:u;if(m[r]!=q[u]){m[r]=q[u];m.sendEvent(q.type,q)}}else{m.sendEvent(q.type,q)}}m.setState=function(q){var r=m.state;m.state=q;if(q!=r){m.sendEvent(c.JWPLAYER_PLAYER_STATE,{newstate:m.state,oldstate:r})}};m.getVideo=function(){return h};m.seekDrag=function(q){h.seekDrag(q)};m.setFullscreen=function(q){if(q!=m.fullscreen){m.fullscreen=q;m.sendEvent(c.JWPLAYER_FULLSCREEN,{fullscreen:q})}};m.setPlaylist=function(q){m.playlist=q;m.sendEvent(c.JWPLAYER_PLAYLIST_LOADED,{playlist:q})};m.setItem=function(q){var r;if(q==m.playlist.length||q<-1){r=0}else{if(q==-1||q>m.playlist.length){r=m.playlist.length-1}else{r=q}}if(r!=m.item){m.item=r;m.sendEvent(c.JWPLAYER_PLAYLIST_ITEM,{index:m.item})}};m.setVolume=function(q){if(m.mute&&q>0){m.setMute(false)}q=Math.round(q);a.saveCookie("volume",q);h.volume(q)};m.setMute=function(q){if(!a.exists(q)){q=!m.mute}a.saveCookie("mute",q);h.mute(q)};m.componentConfig=function(q){return e[q]};n()}})(jwplayer.html5);(function(a){a.player=function(c){var l=this,j=new a.model(c),f=new a.view(this,j),g=new a.controller(j,f);function k(){l.id=j.id;var m=new a.setup(j,f,g);m.addEventListener(jwplayer.events.JWPLAYER_READY,d);m.addEventListener(jwplayer.events.JWPLAYER_ERROR,h);m.start()}function d(m){g.playerReady(m)}function h(m){jwplayer.utils.log("There was a problem setting up the player: "+m.message)}this.jwPlay=g.play;this.jwPause=g.pause;this.jwStop=g.stop;this.jwSeek=g.seek;this.jwSetVolume=g.setVolume;this.jwSetMute=g.setMute;this.jwLoad=g.load;this.jwPlaylistNext=g.next;this.jwPlaylistPrev=g.prev;this.jwPlaylistItem=g.item;this.jwSetFullscreen=g.setFullscreen;this.jwResize=f.resize;this.jwSeekDrag=j.seekDrag;this.jwSetStretching=g.setStretching;function e(m){return function(){return j[m]}}this.jwGetPlaylistIndex=e("item");this.jwGetPosition=e("position");this.jwGetDuration=e("duration");this.jwGetBuffer=e("buffer");this.jwGetWidth=e("width");this.jwGetHeight=e("height");this.jwGetFullscreen=e("fullscreen");this.jwGetVolume=e("volume");this.jwGetMute=e("mute");this.jwGetState=e("state");this.jwGetStretching=e("stretching");this.jwGetPlaylist=e("playlist");this.jwDetachMedia=g.detachMedia;this.jwAttachMedia=g.attachMedia;var b;this.jwLoadInstream=function(n,m){if(!b){b=new a.instream(l,j,f,g)}setTimeout(function(){b.load(n,m)},10)};this.jwInstreamDestroy=function(){if(b){b.jwInstreamDestroy()}};this.jwAddEventListener=g.addEventListener;this.jwRemoveEventListener=g.removeEventListener;k()}})(jwplayer.html5);(function(f){var d={size:180,itemheight:60,thumbs:true,fontcolor:"#000000",overcolor:"",activecolor:"",backgroundcolor:"#f8f8f8",font:"_sans",fontsize:"",fontstyle:"",fontweight:""},k={_sans:"Arial, Helvetica, sans-serif",_serif:"Times, Times New Roman, serif",_typewriter:"Courier New, Courier, monospace"},m=jwplayer.utils,h=m.css,e=jwplayer.events,l=".jwplaylist",j=document,a="absolute",b="relative",c="hidden",g="100%";f.playlistcomponent=function(A,M){var G=A,v=G.skin,o=m.extend({},d,G.skin.getComponentSettings("playlist"),M),H,n,q,p,u=-1,r={background:undefined,item:undefined,itemOver:undefined,itemImage:undefined,itemActive:undefined};this.getDisplayElement=function(){return H};this.redraw=function(){};this.show=function(){_show(H)};this.hide=function(){_hide(H)};function s(){H=K("div","jwplaylist");H.id=G.id+"_jwplayer_playlistcomponent";J();if(r.item){o.itemheight=r.item.height}x();G.jwAddEventListener(jwplayer.events.JWPLAYER_PLAYLIST_LOADED,B);G.jwAddEventListener(jwplayer.events.JWPLAYER_PLAYLIST_ITEM,E)}function t(N){return"#"+H.id+(N?" ."+N:"")}function x(){var R=0,Q=0,N=0,P=o.itemheight,T=o.fontsize;m.clearCss(t());h(t("jwlist"),{"background-image":r.background?" url("+r.background.src+")":"","background-color":o.backgroundcolor,color:o.fontcolor,font:o.fontweight+" "+o.fontstyle+" "+(T?T:11)+"px "+(k[o.font]?k[o.font]:k._sans)});if(r.itemImage){R=(P-r.itemImage.height)/2;Q=r.itemImage.width;N=r.itemImage.height}else{Q=P*4/3;N=P}h(t("jwplaylistimg"),{height:N,width:Q,margin:R});h(t("jwlist li"),{"background-image":r.item?"url("+r.item.src+")":"",height:P,"background-size":g+" "+P+"px",cursor:"pointer"});var O={overflow:"hidden"};if(o.activecolor!==""){O.color=o.activecolor}if(r.itemActive){O["background-image"]="url("+r.itemActive.src+")"}h(t("jwlist li.active"),O);var S={overflow:"hidden"};if(o.overcolor!==""){S.color=o.overcolor}if(r.itemOver){S["background-image"]="url("+r.itemOver.src+")"}h(t("jwlist li:hover"),S);h(t("jwtextwrapper"),{padding:"5px 5px 0 "+(R?0:"5px"),height:P-5,position:b});h(t("jwtitle"),{height:T?T+10:20,"line-height":T?T+10:20,overflow:"hidden",display:"inline-block",width:g,"font-size":T?T:13,"font-weight":o.fontweight?o.fontweight:"bold"});h(t("jwdescription"),{display:"block","line-height":T?T+4:16,overflow:"hidden",height:P,position:b});h(t("jwduration"),{position:"absolute",right:5})}function y(){var N=K("ul","jwlist");N.id=H.id+"_ul"+Math.round(Math.random()*10000000);return N}function z(Q){var V=n[Q],U=K("li","jwitem");U.id=p.id+"_item_"+Q;var R=K("div","jwplaylistimg jwfill");if(F()&&(V.image||V["playlist.image"]||r.itemImage)){var S;if(V["playlist.image"]){S=V["playlist.image"]}else{if(V.image){S=V.image}else{if(r.itemImage){S=r.itemImage.src}}}h("#"+U.id+" .jwplaylistimg",{"background-image":S?"url("+S+")":null});L(U,R)}var N=K("div","jwtextwrapper");var T=K("span","jwtitle");T.innerHTML=V?V.title:"";L(N,T);if(V.description){var P=K("span","jwdescription");P.innerHTML=V.description;L(N,P)}if(V.duration>0){var O=K("span","jwduration");O.innerHTML=m.timeFormat(V.duration);L(T,O)}L(U,N);return U}function K(O,N){var P=j.createElement(O);if(N){P.className=N}return P}function L(N,O){N.appendChild(O)}function B(O){H.innerHTML="";n=C();if(!n){return}items=[];p=y();for(var P=0;P<n.length;P++){var N=z(P);N.onclick=I(P);L(p,N);items.push(N)}u=G.jwGetPlaylistIndex();L(H,p);if(m.isIOS()&&window.iScroll){p.style.height=o.itemheight*n.length+"px";var Q=new iScroll(H.id)}}function C(){var O=G.jwGetPlaylist();var P=[];for(var N=0;N<O.length;N++){if(!O[N]["ova.hidden"]){P.push(O[N])}}return P}function I(N){return function(){G.jwPlaylistItem(N);G.jwPlay(true)}}function w(){p.scrollTop=G.jwGetPlaylistIndex()*o.itemheight}function F(){return o.thumbs.toString().toLowerCase()=="true"}function E(N){if(u>=0){j.getElementById(p.id+"_item_"+u).className="jwitem";u=N.index}j.getElementById(p.id+"_item_"+N.index).className="jwitem active";w()}function J(){for(var N in r){r[N]=D(N)}}function D(N){return v.getSkinElement("playlist",N)}s();return this};h(l,{overflow:c,position:a,width:g,height:g});h(l+" .jwplaylistimg",{position:b,width:g,"float":"left",margin:"0 5px 0 0",background:"#000",overflow:c});h(l+" .jwlist",{width:g,height:g,"list-style":"none",margin:0,padding:0,"overflow-y":"auto"});h(l+" .jwlist li",{width:g});h(l+" .jwtextwrapper",{overflow:c})})(jwplayer.html5);(function(b){var d=jwplayer,a=d.utils,c=d.events;b.playlistloader=function(){var f=new c.eventdispatcher();a.extend(this,f);this.load=function(h){a.ajax(h,g,e)};function g(j){try{var l=j.responseXML.firstChild;if(b.parsers.localName(l)=="xml"){l=l.nextSibling}var h=b.parsers.rssparser.parse(l);f.sendEvent(c.JWPLAYER_PLAYLIST_LOADED,{playlist:new d.playlist(h)})}catch(k){e("Could not load the playlist.")}}function e(h){f.sendEvent(c.JWPLAYER_ERROR,{message:h?h:"Could not load playlist an unknown reason."})}}})(jwplayer.html5);(function(f){var h=jwplayer,l=h.utils,m=h.events,a=h.playlist,j=1,e=2,d=3,k=4,c=5,b=6,g=7;f.setup=function(s,H,I){var L=s,q=H,F=I,u={},C={},A,z=new m.eventdispatcher(),v=false,w=[];function t(){r(j,p);r(e,P,j);r(d,y,j);r(k,K,d);r(c,O,k+","+e);r(b,J,c+","+d);r(g,D,b)}function r(Q,S,R){w.push({name:Q,method:S,depends:R})}function G(){for(var S=0;S<w.length;S++){var Q=w[S];if(N(Q.depends)){w.splice(S,1);try{Q.method();G()}catch(R){x(R.message)}return}}if(w.length>0&&!v){setTimeout(G,500)}}function N(S){if(!S){return true}var R=S.toString().split(",");for(var Q=0;Q<R.length;Q++){if(!u[R[Q]]){return false}}return true}function o(Q){u[Q]=true}function p(){o(j)}function P(){A=new f.skin();A.load(L.config.skin,B)}function B(Q){o(e)}function y(){switch(l.typeOf(L.config.playlist)){case"string":var Q=new f.playlistloader();Q.addEventListener(m.JWPLAYER_PLAYLIST_LOADED,n);Q.addEventListener(m.JWPLAYER_ERROR,E);Q.load(L.config.playlist);break;case"array":L.playlist=new a(L.config.playlist);o(d)}}function n(Q){L.setPlaylist(Q.playlist);o(d)}function E(Q){x(Q.message)}function K(){var R=L.playlist[L.item].image;if(R){var Q=new Image();Q.addEventListener("load",M,false);Q.addEventListener("error",M,false);Q.src=R}else{o(k)}}function M(Q){o(k)}function O(){q.setup(A);o(c)}function J(){o(b)}function D(){z.sendEvent(m.JWPLAYER_READY);o(g)}function x(Q){v=true;z.sendEvent(m.JWPLAYER_ERROR,{message:Q})}l.extend(this,z);this.start=G;t()}})(jwplayer.html5);(function(a){a.skin=function(){var b={};var c=false;this.load=function(d,e){new a.skinloader(d,function(f){c=true;b=f;e()},function(){new a.skinloader("",function(f){c=true;b=f;e()})})};this.getSkinElement=function(d,e){if(c){try{return b[d].elements[e]}catch(f){jwplayer.utils.log("No such skin component / element: ",[d,e])}}return null};this.getComponentSettings=function(d){if(c&&b&&b[d]){return b[d].settings}return null};this.getComponentLayout=function(d){if(c){var e=b[d].layout;if(e&&(e.left||e.right||e.center)){return b[d].layout}}return null}}})(jwplayer.html5);(function(a){var b=jwplayer.utils;a.skinloader=function(g,q,l){var p={};var d=q;var m=l;var f=true;var k;var o=g;var t=false;function n(){if(typeof o!="string"||o===""){e(a.defaultskin().xml)}else{b.ajax(b.getAbsolutePath(o),function(u){try{if(b.exists(u.responseXML)){e(u.responseXML);return}}catch(v){j()}e(a.defaultskin().xml)},function(u){e(a.defaultskin().xml)})}}function e(y){var E=y.getElementsByTagName("component");if(E.length===0){return}for(var H=0;H<E.length;H++){var C=E[H].getAttribute("name");var B={settings:{},elements:{},layout:{}};p[C]=B;var G=E[H].getElementsByTagName("elements")[0].getElementsByTagName("element");for(var F=0;F<G.length;F++){c(G[F],C)}var z=E[H].getElementsByTagName("settings")[0];if(z&&z.childNodes.length>0){var K=z.getElementsByTagName("setting");for(var O=0;O<K.length;O++){var Q=K[O].getAttribute("name");var I=K[O].getAttribute("value");if(/color$/.test(Q)){I=b.stringToColor(I)}p[C].settings[Q]=I}}var L=E[H].getElementsByTagName("layout")[0];if(L&&L.childNodes.length>0){var M=L.getElementsByTagName("group");for(var x=0;x<M.length;x++){var A=M[x];p[C].layout[A.getAttribute("position")]={elements:[]};for(var P=0;P<A.attributes.length;P++){var D=A.attributes[P];p[C].layout[A.getAttribute("position")][D.name]=D.value}var N=A.getElementsByTagName("*");for(var w=0;w<N.length;w++){var u=N[w];p[C].layout[A.getAttribute("position")].elements.push({type:u.tagName});for(var v=0;v<u.attributes.length;v++){var J=u.attributes[v];p[C].layout[A.getAttribute("position")].elements[w][J.name]=J.value}if(!b.exists(p[C].layout[A.getAttribute("position")].elements[w].name)){p[C].layout[A.getAttribute("position")].elements[w].name=u.tagName}}}}f=false;s()}}function s(){clearInterval(k);if(!t){k=setInterval(function(){r()},100)}}function c(z,y){var x=new Image();var u=z.getAttribute("name");var w=z.getAttribute("src");var B;if(w.indexOf("data:image/png;base64,")===0){B=w}else{var v=b.getAbsolutePath(o);var A=v.substr(0,v.lastIndexOf("/"));B=[A,y,w].join("/")}p[y].elements[u]={height:0,width:0,src:"",ready:false,image:x};x.onload=function(C){h(x,u,y)};x.onerror=function(C){t=true;s();m()};x.src=B}function j(){for(var v in p){var x=p[v];for(var u in x.elements){var y=x.elements[u];var w=y.image;w.onload=null;w.onerror=null;delete y.image;delete x.elements[u]}delete p[v]}}function r(){for(var u in p){if(u!="properties"){for(var v in p[u].elements){if(!p[u].elements[v].ready){return}}}}if(f===false){clearInterval(k);d(p)}}function h(u,w,v){if(p[v]&&p[v].elements[w]){p[v].elements[w].height=u.height;p[v].elements[w].width=u.width;p[v].elements[w].src=u.src;p[v].elements[w].ready=true;s()}else{b.log("Loaded an image for a missing element: "+v+"."+w)}}n()}})(jwplayer.html5);(function(c){var a=c.utils,d=c.events,b=d.state;c.html5.video=function(O){var I={abort:v,canplay:o,canplaythrough:v,durationchange:z,emptied:v,ended:v,error:k,loadeddata:v,loadedmetadata:o,loadstart:v,pause:N,play:N,playing:N,progress:v,ratechange:v,readystatechange:v,seeked:v,seeking:v,stalled:v,suspend:v,timeupdate:P,volumechange:j,waiting:r},u=a.extensionmap,A,x,s,T,m,L,S,D,J,B,e=b.IDLE,E,l=-1,C=-1,G=new d.eventdispatcher(),q=false;a.extend(this,G);function Q(U){s=U;K();s.controls=true;s.controls=false;q=true}function K(){for(var U in I){s.addEventListener(U,I[U],false)}}function p(U,V){if(q){G.sendEvent(U,V)}}function v(U){}function z(U){if(!q){return}if(T<0){T=s.duration}P()}function P(U){if(!q){return}if(e==b.PLAYING&&!B){m=s.currentTime;p(d.JWPLAYER_MEDIA_TIME,{position:m,duration:T});if(m>=T&&T>0){M()}}}function o(U){if(!q){return}if(!S){S=true;n();if(J>0){y(J)}}}function n(){if(!D){D=true;p(d.JWPLAYER_MEDIA_BUFFER_FULL)}}function N(U){if(!q||B){return}if(s.paused){g()}else{t(b.PLAYING)}}function r(U){if(!q){return}t(b.BUFFERING)}function k(U){if(!q){return}a.log("Error: %o",s.error);t(b.IDLE)}function f(U){var V=u[a.extension(U)];return(!!V&&!!V.html5&&s.canPlayType(V.html5))}function F(W){var U=W.sources;if(U&&U.length>0){for(var V=0;V<U.length;V++){if(f(U[V].file)){return U[V].file}}}else{if(W.file&&f(W.file)){return W.file}}return null}this.load=function(U){if(!q){return}A=U;S=false;D=false;J=0;T=U.duration?U.duration:-1;m=0;x=F(A);if(!x){a.log("Could not find a file to play.");return}t(b.BUFFERING);s.src=x;s.load();l=setInterval(h,100);if(a.isMobile()){s.controls=true}if(a.isIPod()){n()}};var w=this.stop=function(){if(!q){return}s.removeAttribute("src");s.load();clearInterval(l);t(b.IDLE)};this.play=function(){if(a.isIPad()){s.controls=true}if(q){s.play()}};var g=this.pause=function(){if(q){if(a.isIPad()){s.controls=false}s.pause();t(b.PAUSED)}};this.seekDrag=function(U){if(!q){return}B=U;if(U){s.pause()}else{s.play()}};var y=this.seek=function(U){if(!q){return}if(s.readyState>=s.HAVE_FUTURE_DATA){J=0;if(!B){p(d.JWPLAYER_MEDIA_SEEK,{position:m,offset:U})}s.currentTime=U}else{J=U}};var R=this.volume=function(U){s.volume=U/100};function j(U){p(d.JWPLAYER_MEDIA_VOLUME,{volume:Math.round(s.volume*100)});p(d.JWPLAYER_MEDIA_MUTE,{mute:s.muted})}this.mute=function(U){if(!a.exists(U)){U=!s.mute}if(U){if(!s.muted){E=s.volume*100;s.muted=true;R(0)}}else{if(s.muted){R(E);s.muted=false}}};function t(U){if(U==b.PAUSED&&e==b.IDLE){return}if(B){return}if(e!=U){var V=e;e=U;p(d.JWPLAYER_PLAYER_STATE,{oldstate:V,newstate:U})}}function h(){if(!q){return}var U=H();if(U!=C){C=U;p(d.JWPLAYER_MEDIA_BUFFER,{bufferPercent:Math.round(C*100)})}if(U>=1){clearInterval(l)}}function H(){if(s.buffered.length==0||s.duration==0){return 0}else{return s.buffered.end(s.buffered.length-1)/s.duration}}function M(){t(b.IDLE);p(d.JWPLAYER_MEDIA_BEFORECOMPLETE);p(d.JWPLAYER_MEDIA_COMPLETE)}this.detachMedia=function(){q=false;return s};this.attachMedia=function(){q=true};this.getTag=function(){return s};Q(O)}})(jwplayer);(function(g){var b=jwplayer,h=b.utils,n=h.css,j=jwplayer.events,o=j.state,d=document,l="jwplayer",a="."+l+".jwfullscreen",m="jwmain",s="jwinstream",r="jwvideo",c="jwcontrols",e="jwplaylistcontainer";g.view=function(C,y){var B=C,z=y,T,L,J,W,u=0,ac=2000,w,ai,F,ab,aj,ae,H;this.setup=function(an){B.skin=an;T=ad("div",l);T.id=B.id;var am=document.getElementById(B.id);am.parentNode.replaceChild(T,am);L=ad("span",m);ai=ad("span",r);w=z.getVideo().getTag();ai.appendChild(w);J=ad("span",c);F=ad("span",s);W=ad("span",e);t();L.appendChild(ai);L.appendChild(J);L.appendChild(F);T.appendChild(L);T.appendChild(W);d.addEventListener("webkitfullscreenchange",af,false);d.addEventListener("mozfullscreenchange",af,false);d.addEventListener("keydown",Y,false);B.jwAddEventListener(j.JWPLAYER_PLAYER_STATE,D);D({newstate:o.IDLE});J.addEventListener("mouseout",X,false);J.addEventListener("mousemove",ak,false);if(ab){ab.getDisplayElement().addEventListener("mousemove",S,false);ab.getDisplayElement().addEventListener("mouseout",ah,false)}};function ad(an,am){var ao=d.createElement(an);if(am){ao.className=am}return ao}function ak(){clearTimeout(u);if(B.jwGetState()==o.PLAYING||B.jwGetState()==o.PAUSED){K();if(!aa){u=setTimeout(X,ac)}}}var aa=false;function S(){clearTimeout(u);aa=true}function ah(){aa=false}function X(){if(B.jwGetState()==o.PLAYING||B.jwGetState()==o.PAUSED){E()}clearTimeout(u);u=0}function t(){var an=z.width,am=z.height,ao=z.componentConfig("controlbar");displaySettings=z.componentConfig("display");aj=new g.display(B,displaySettings);J.appendChild(aj.getDisplayElement());if(z.playlistsize&&z.playlistposition&&z.playlistposition!="none"){ae=new g.playlistcomponent(B,{});W.appendChild(ae.getDisplayElement())}if(!h.isMobile()||(z.mobilecontrols&&h.isMobile())){ab=new g.controlbar(B,ao);J.appendChild(ab.getDisplayElement())}Q(an,am)}var O=this.fullscreen=function(am){if(!h.exists(am)){am=!z.fullscreen}if(am){if(!z.fullscreen){R(true);if(T.requestFullScreen){T.requestFullScreen()}else{if(T.mozRequestFullScreen){T.mozRequestFullScreen()}else{if(T.webkitRequestFullScreen){T.webkitRequestFullScreen()}}}z.setFullscreen(true)}}else{R(false);if(z.fullscreen){if(d.cancelFullScreen){d.cancelFullScreen()}else{if(d.mozCancelFullScreen){d.mozCancelFullScreen()}else{if(d.webkitCancelFullScreen){d.webkitCancelFullScreen()}}}z.setFullscreen(false)}}};function Q(ao,am){if(h.exists(ao)&&h.exists(am)){n(V(),{width:ao,height:am});z.width=ao;z.height=am}if(aj){aj.redraw()}if(ab){ab.redraw()}var aq=z.playlistsize,ar=z.playlistposition;if(ae&&aq&&ar){ae.redraw();var an={display:"block"},ap={};an[ar]=0;ap[ar]=aq;if(ar=="left"||ar=="right"){an.width=aq}else{an.height=aq}n(V(e),an);n(V(m),ap)}x(am);A();return}function x(am){if(!ab){return}H=(am<=40&&am.toString().indexOf("%")<0);if(H){z.componentConfig("controlbar").margin=0;ab.redraw();K();I();M(false)}else{ag(B.jwGetState())}n(V(),{"background-color":H?"transparent":aj.getBGColor()})}function A(){h.stretch(z.stretching,w,ai.clientWidth,ai.clientHeight,w.videoWidth,w.videoHeight)}this.resize=Q;this.resizeMedia=A;this.completeSetup=function(){n(V(),{opacity:1})};function Y(am){switch(am.keyCode){case 27:if(z.fullscreen){O(false)}break;case 32:B.jwPlay();break}}function R(am){if(am){T.className+=" jwfullscreen"}else{T.className=T.className.replace(/\s+jwfullscreen/,"")}}function al(){var am=[d.mozFullScreenElement,d.webkitCurrentFullScreenElement];for(var an=0;an<am.length;an++){if(am[an]&&am[an].id==B.id){return true}}return false}function af(am){z.setFullscreen(al());O(z.fullscreen)}function K(){if(ab&&z.controlbar){ab.show()}}function E(){if(ab&&!H){ab.hide()}}function v(){if(aj&&!H){aj.show()}}function I(){if(aj){aj.hide()}}function G(){E();I()}function Z(){K();v()}function M(am){am=am&&!H;n(V(r),{visibility:am?"visible":"hidden",opacity:am?1:0})}var N;function D(am){clearTimeout(N);N=setTimeout(function(){ag(am.newstate)},100)}function ag(am){switch(am){case o.PLAYING:M(true);A();ak();break;case o.COMPLETED:case o.IDLE:M(false);E();v();break;case o.BUFFERING:case o.PAUSED:Z();break}}function V(am){return"#"+B.id+(am?" ."+am:"")}this.setupInstream=function(am,an){U(V(s),true);U(V(c),false);F.appendChild(am);_instreamVideo=an;D({newstate:o.PLAYING});_instreamMode=true};var P=this.destroyInstream=function(){U(V(s),false);U(V(c),true);F.innerHTML="";_instreamVideo=null;_instreamMode=false;Q(z.width,z.height)};function U(am,an){n(am,{display:an?"block":"none"})}};var q="opacity .5s ease",k="100%",f="absolute",p=" !important";n("."+l,{position:"relative",overflow:"hidden",opacity:0,"-webkit-transition":q,"-moz-transition":q,"-o-transition":q});n("."+m,{position:f,left:0,right:0,top:0,bottom:0,"-webkit-transition":q,"-moz-transition":q,"-o-transition":q});n("."+r+" ,."+c,{position:f,height:k,width:k,"-webkit-transition":q,"-moz-transition":q,"-o-transition":q});n("."+r+" video",{background:"transparent",width:k,height:k});n("."+e,{position:f,height:k,width:k,display:"none"});n("."+s,{overflow:"hidden",position:f,top:0,left:0,bottom:0,right:0,display:"none"});n(a,{width:k,height:k,left:0,right:0,top:0,bottom:0,"z-index":1000,position:"fixed"},true);n(a+" ."+m,{left:0,right:0,top:0,bottom:0},true);n(a+" ."+e,{display:"none"},true);n("."+l+" .jwuniform",{"background-size":"contain"+p});n("."+l+" .jwfill",{"background-size":"cover"+p,"background-position":"center"});n("."+l+" .jwexactfit",{"background-size":k+" "+k+p});n("."+l+" .jwnone",{"background-size":null})})(jwplayer.html5);1 (function(a){a.html5={};a.html5.version="6.0.2198"})(jwplayer);(function(a){a.serialize=function(b){if(b==null){return null}else{if(b=="true"){return true}else{if(b=="false"){return false}else{if(isNaN(Number(b))||b.length>5||b.length==0){return b}else{return Number(b)}}}}}})(jwplayer.utils);(function(a){var b=a.animations=function(){};b.rotate=function(c,d){a.transform(c,"rotate("+d+"deg)")}})(jwplayer.utils);(function(h){var a={},g,b={};function f(){var k=document.createElement("style");k.type="text/css";document.getElementsByTagName("head")[0].appendChild(k);return k}h.css=function(k,n,l){if(!h.exists(l)){l=false}if(h.isIE()){if(!g){g=f()}}else{if(!a[k]){a[k]=f()}}if(!b[k]){b[k]={}}for(var m in n){var o=j(m,n[m],l);if(h.exists(b[k][m])&&!h.exists(o)){delete b[k][m]}else{b[k][m]=o}}if(h.isIE()){e()}else{d(k,a[k])}};function j(m,n,k){if(typeof n==="undefined"){return undefined}var l=k?" !important":"";if(!isNaN(n)){switch(m){case"z-index":case"opacity":return n+l;break;default:if(m.match(/color/i)){return"#"+h.pad(n.toString(16),6)+l}else{if(n==0){return 0+l}else{return Math.ceil(n)+"px"+l}}break}}else{return n+l}}function e(){var k="\n";for(var l in b){k+=c(l)}g.innerHTML=k}function d(k,l){if(l){l.innerHTML=c(k)}}function c(k){var l=k+"{\n";var n=b[k];for(var m in n){l+=" "+m+": "+n[m]+";\n"}l+="}\n";return l}h.clearCss=function(l){for(var m in b){if(m.indexOf(l)>=0){delete b[m]}}for(var k in a){if(k.indexOf(l)>=0){a[k].innerHTML=""}}}})(jwplayer.utils);(function(a){var b=a.exists;a.scale=function(f,e,d,h,j){var g;if(!b(e)){e=1}if(!b(d)){d=1}if(!b(h)){h=0}if(!b(j)){j=0}if(e==1&&d==1&&h==0&&j==0){g=""}else{g="scale("+e+","+d+") translate("+h+"px,"+j+"px)"}};a.transform=function(d,f){var e=d.style;if(b(f)){e.webkitTransform=f;e.MozTransform=f;e.msTransform=f;e.OTransform=f}};a.stretch=function(m,r,q,j,o,k){if(!r){return}if(!q||!j||!o||!k){return}var e=q/o,h=j/k,p=0,l=0,d={},f=(r.tagName.toLowerCase()=="video"),g=false,n;if(f){a.transform(r)}n="jw"+m.toLowerCase();switch(m.toLowerCase()){case c.FILL:if(e>h){o=o*e;k=k*e}else{o=o*h;k=k*h}case c.NONE:e=h=1;case c.EXACTFIT:g=true;break;case c.UNIFORM:if(e>h){o=o*h;k=k*h;if(o/q>0.95){g=true;n="jwexactfit";e=Math.ceil(100*q/o)/100;h=1}}else{o=o*e;k=k*e;if(k/j>0.95){g=true;n="jwexactfit";h=Math.ceil(100*j/k)/100;e=1}}break;default:return;break}if(f){if(g){r.style.width=o+"px";r.style.height=k+"px";p=((q-o)/2)/e;l=((j-k)/2)/h;a.scale(r,e,h,p,l)}else{r.style.width="";r.style.height=""}}else{r.className=r.className.replace(/\s*jw(none|exactfit|uniform|fill)/g,"");r.className+=" "+n}};var c=a.stretching={NONE:"none",FILL:"fill",UNIFORM:"uniform",EXACTFIT:"exactfit"}})(jwplayer.utils);(function(a){a.parsers={localName:function(b){if(!b){return""}else{if(b.localName){return b.localName}else{if(b.baseName){return b.baseName}else{return""}}}},textContent:function(b){if(!b){return""}else{if(b.textContent){return b.textContent}else{if(b.text){return b.text}else{return""}}}},getChildNode:function(c,b){return c.childNodes[b]},numChildren:function(b){if(b.childNodes){return b.childNodes.length}else{return 0}}}})(jwplayer.html5);(function(b){var a=b.html5.parsers;var d=a.jwparser=function(){};var c="jwplayer";d.parseEntry=function(h,j){for(var f=0;f<h.childNodes.length;f++){var g=h.childNodes[f];if(g.prefix==c){var e=a.localName(g);j[e]=b.utils.serialize(a.textContent(g));if(e=="file"&&j.sources){delete j.sources}}if(!j.file){j.file=j.link}}return j}})(jwplayer);(function(e){var b=jwplayer.utils,h=b.xmlAttribute,c=e.localName,a=e.textContent,d=e.numChildren;var g=e.mediaparser=function(){};var f="media";g.parseGroup=function(m,n){for(var k=0;k<d(m);k++){var l=m.childNodes[k];if(l.prefix==f){if(!c(l)){continue}switch(c(l).toLowerCase()){case"content":n.file=h(l,"url");if(h(l,"duration")){n.duration=b.seconds(h(l,"duration"))}if(d(l)>0){n=g.parseGroup(l,n)}if(h(l,"url")){if(!n.sources){n.sources=[]}n.sources.push({file:h(l,"url"),type:h(l,"type"),width:h(l,"width"),label:h(l,"height")?h(l,"height")+"p":undefined})}break;case"title":n.title=a(l);break;case"description":n.description=a(l);break;case"guid":n.mediaid=a(l);break;case"thumbnail":n.image=h(l,"url");break;case"player":var j=l.url;break;case"group":g.parseGroup(l,n);break}}}return n}})(jwplayer.html5.parsers);(function(g){var b=jwplayer.utils,a=g.textContent,e=g.getChildNode,f=g.numChildren,d=g.localName;g.rssparser={};g.rssparser.parse=function(o){var h=[];for(var m=0;m<f(o);m++){var n=e(o,m),k=d(n).toLowerCase();if(k=="channel"){for(var l=0;l<f(n);l++){var p=e(n,l);if(d(p).toLowerCase()=="item"){h.push(c(p))}}}}return h};function c(l){var m={};for(var j=0;j<l.childNodes.length;j++){var k=l.childNodes[j];var h=d(k);if(!h){continue}switch(h.toLowerCase()){case"enclosure":m.file=b.xmlAttribute(k,"url");break;case"title":m.title=a(k);break;case"pubdate":m.date=a(k);break;case"description":m.description=a(k);break;case"link":m.link=a(k);break;case"category":if(m.tags){m.tags+=a(k)}else{m.tags=a(k)}break}}m=g.mediaparser.parseGroup(l,m);m=g.jwparser.parseEntry(l,m);return new jwplayer.playlist.item(m)}})(jwplayer.html5.parsers);(function(n){var w=n.html5,h=n.utils,k=n.events,r=n.events.state,q=h.css,b="button",p="text",e="divider",s="slider",f="relative",g="absolute",a="none",o="block",u="inline",m="inline-block",j="hidden",c="left",x="right",l="100%",t="width .25s linear, left .25s linear, opacity .25s, background .25s, visibility .25s",v=".jwcontrolbar",d=document;w.controlbar=function(E,at){var C,Y,D={margin:10,font:"Arial,sans-serif",fontsize:10,fontcolor:parseInt("000000",16),fontstyle:"normal",fontweight:"bold",layout:{left:{position:"left",elements:[{name:"play",type:b},{name:"divider",type:e},{name:"prev",type:b},{name:"divider",type:e},{name:"next",type:b},{name:"divider",type:e},{name:"elapsed",type:p}]},center:{position:"center",elements:[{name:"time",type:s}]},right:{position:"right",elements:[{name:"duration",type:p},{name:"blank",type:b},{name:"divider",type:e},{name:"mute",type:b},{name:"volume",type:s},{name:"divider",type:e},{name:"fullscreen",type:b}]}}},W,aC,an,aA,aq,aK,L,O,ak=false,au=0,ab={play:"pause",mute:"unmute",fullscreen:"normalscreen"},aB={play:false,mute:false,fullscreen:false},B={play:ag,mute:P,fullscreen:ad,next:A,prev:aj},F={time:aa,volume:aF};function aE(){an={};C=E;aq=C.id+"_controlbar";aK=L=0;aA=Q();aA.id=aq;aA.className="jwcontrolbar";window.addEventListener("mousemove",aJ,false);window.addEventListener("mouseup",aJ,false);Y=C.skin;aC=Y.getComponentLayout("controlbar");if(!aC){aC=D.layout}h.clearCss("#"+aq);Z();aw();y();R();G();aG()}function y(){C.jwAddEventListener(n.events.JWPLAYER_MEDIA_TIME,aL);C.jwAddEventListener(n.events.JWPLAYER_PLAYER_STATE,I);C.jwAddEventListener(n.events.JWPLAYER_MEDIA_MUTE,aG);C.jwAddEventListener(n.events.JWPLAYER_MEDIA_VOLUME,G);C.jwAddEventListener(n.events.JWPLAYER_MEDIA_BUFFER,M);C.jwAddEventListener(n.events.JWPLAYER_FULLSCREEN,H);C.jwAddEventListener(n.events.JWPLAYER_PLAYLIST_LOADED,R)}function aL(aN){var aM=false,aO;if(an.elapsed){aO=h.timeFormat(aN.position);an.elapsed.innerHTML=aO;aM=(aO.length!=h.timeFormat(L).length)}if(an.duration){aO=h.timeFormat(aN.duration);an.duration.innerHTML=aO;aM=(aM||(aO.length!=h.timeFormat(aK).length))}if(aN.duration>0){az(aN.position/aN.duration)}else{az(0)}aK=aN.duration;L=aN.position;if(aM){U()}}function I(aM){switch(aM.newstate){case r.BUFFERING:case r.PLAYING:q(av(".jwtimeSliderThumb"),{opacity:1});V("play",true);break;case r.PAUSED:if(!ak){V("play",false)}break;case r.IDLE:V("play",false);q(av(".jwtimeSliderThumb"),{opacity:0});if(an.timeRail){an.timeRail.className="jwrail";setTimeout(function(){an.timeRail.className+=" jwsmooth"},100)}aD(0);aL({position:0,duration:0});break;case r.COMPLETED:q(av(),{opacity:0});break}}function aG(){var aM=C.jwGetMute();V("mute",aM);z(aM?0:O)}function G(){O=C.jwGetVolume()/100;z(O)}function M(aM){aD(aM.bufferPercent/100)}function H(aM){V("fullscreen",aM.fullscreen)}function R(aM){if(C.jwGetPlaylist().length<2){q(av(".jwnext"),{display:"none"});q(av(".jwprev"),{display:"none"})}else{q(av(".jwnext"),{display:undefined});q(av(".jwprev"),{display:undefined})}U()}function Z(){W=h.extend({},D,Y.getComponentSettings("controlbar"),at);q("#"+aq,{height:af("background").height,bottom:W.margin?W.margin:0,left:W.margin?W.margin:0,right:W.margin?W.margin:0});q(av(".jwtext"),{font:W.fontsize+"px/"+af("background").height+"px "+W.font,color:W.fontcolor,"font-weight":W.fontweight,"font-style":W.fontstyle,"text-align":"center",padding:"0 5px"})}function av(aM){return"#"+aq+(aM?" "+aM:"")}function Q(){return d.createElement("span")}function aw(){var aO=ao("capLeft");var aN=ao("capRight");var aM=ao("background",{position:g,left:af("capLeft").width,right:af("capRight").width,"background-repeat":"repeat-x"},true);if(aM){aA.appendChild(aM)}if(aO){aA.appendChild(aO)}ax();if(aN){aA.appendChild(aN)}}function S(aM){switch(aM.type){case e:return ai(aM);break;case p:return ap(aM.name);break;case b:if(aM.name!="blank"){return ah(aM.name)}break;case s:return T(aM.name);break}}function ao(aO,aR,aN,aT){var aQ=Q();aQ.className="jw"+aO;var aM=aT?" left center":" center";var aP=af(aO);aQ.innerHTML=" ";if(!aP||aP.src==""){return}var aS;if(aN){aS={background:"url('"+aP.src+"') repeat-x "+aM}}else{aS={background:"url('"+aP.src+"') no-repeat"+aM,width:aP.width}}q(av(".jw"+aO),h.extend(aS,aR));an[aO]=aQ;return aQ}function ah(aO){if(!af(aO+"Button").src){return null}var aP=d.createElement("button");aP.className="jw"+aO;aP.addEventListener("click",al(aO),false);var aQ=af(aO+"Button");var aN=af(aO+"ButtonOver");aP.innerHTML=" ";X(av(".jw"+aO),aQ,aN);var aM=ab[aO];if(aM){X(av(".jw"+aO+".jwtoggle"),af(aM+"Button"),af(aM+"ButtonOver"))}an[aO]=aP;return aP}function X(aM,aN,aO){if(!aN.src){return}q(aM,{width:aN.width,background:"url("+aN.src+") center no-repeat"});if(aO.src){q(aM+":hover",{background:"url("+aO.src+") center no-repeat"})}}function al(aM){return function(){if(B[aM]){B[aM]()}}}function ag(){if(aB.play){C.jwPause()}else{C.jwPlay()}}function P(){C.jwSetMute();aG({mute:aB.mute})}function aF(aM){if(aM<0.1){aM=0}if(aM>0.9){aM=1}C.jwSetVolume(aM*100);z(aM)}function aa(aM){C.jwSeek(aM*aK)}function ad(){C.jwSetFullscreen()}function A(){C.jwPlaylistNext()}function aj(){C.jwPlaylistNext()}function V(aM,aN){if(!h.exists(aN)){aN=!aB[aM]}if(an[aM]){an[aM].className="jw"+aM+(aN?" jwtoggle jwtoggling":" jwtoggling");setTimeout(function(){an[aM].className=an[aM].className.replace(" jwtoggling","")},100)}aB[aM]=aN}function N(aM){return aq+"_"+aM}function ap(aM,aQ){var aO=Q();aO.id=N(aM);aO.className="jwtext jw"+aM;var aN={};var aP=af(aM+"Background");if(aP.src){aN.background="url("+aP.src+") no-repeat center";aN["background-size"]="100% "+af("background").height+"px"}q(av(".jw"+aM),aN);aO.innerHTML="00:00";an[aM]=aO;return aO}function ai(aN){if(aN.width){var aM=Q();aM.className="jwblankDivider";q(aM,{width:parseInt(aN.width)});return aM}else{if(aN.element){return ao(aN.element)}else{return ao(aN.name)}}}function T(aM){var aP=Q();aP.className="jwslider jw"+aM;var aO=ao(aM+"SliderCapLeft");var aN=ao(aM+"SliderCapRight");var aQ=ar(aM);if(aO){aP.appendChild(aO)}aP.appendChild(aQ);if(aO){aP.appendChild(aN)}q(av(".jw"+aM+" .jwrail"),{left:af(aM+"SliderCapLeft").width,right:af(aM+"SliderCapRight").width,});an[aM]=aP;if(aM=="time"){aI(aP);az(0);aD(0)}else{if(aM=="volume"){ay(aP)}}return aP}function ar(aO){var aR=Q();aR.className="jwrail jwsmooth";var aM=["Rail","Buffer","Progress"];for(var aQ=0;aQ<aM.length;aQ++){var aP=ao(aO+"Slider"+aM[aQ],null,true,(aO=="volume"));if(aP){aP.className+=" jwstretch";aR.appendChild(aP)}}var aN=ao(aO+"SliderThumb");if(aN){q(av("."+aN.className),{opacity:0});aN.className+=" jwthumb";aR.appendChild(aN)}aR.addEventListener("mousedown",J(aO),false);an[aO+"Rail"]=aR;return aR}function K(){var aM=C.jwGetState();return(aM==r.IDLE||aM==r.COMPLETED)}function J(aM){return(function(aN){if(aN.button!=0){return}an[aM+"Rail"].className="jwrail";if(aM=="time"){if(!K()){C.jwSeekDrag(true);ak=aM}}else{ak=aM}})}function aJ(aM){if(!ak||aM.button!=0){return}var aQ=an[ak].getElementsByClassName("jwrail")[0],aR=h.getBoundingClientRect(aQ),aP=(aM.clientX-aR.left)/aR.width;if(aM.type=="mouseup"){var aN=ak;if(aN=="time"){C.jwSeekDrag(false)}an[aN+"Rail"].className="jwrail jwsmooth";ak=null;F[aN](aP)}else{if(ak=="time"){az(aP)}else{z(aP)}var aO=(new Date()).getTime();if(aO-au>500){au=aO;F[ak](aP)}}}function aI(aM){if(an.timeSliderThumb){q(av(".jwtimeSliderThumb"),{"margin-left":(af("timeSliderThumb").width/-2)})}aD(0);az(0)}function ay(aO){var aN=af("volumeSliderCapLeft").width,aM=af("volumeSliderCapRight").width,aP=af("volumeSliderRail").width;q(av(".jwvolume"),{width:(aN+aP+aM)})}var ac={};function ax(){aH("left");aH("center");aH("right");aA.appendChild(ac.left);aA.appendChild(ac.center);aA.appendChild(ac.right);q(av(".jwright"),{right:af("capRight").width})}function aH(aN){var aM=Q();aM.className="jwgroup jw"+aN;ac[aN]=aM;if(aC[aN]){ae(aC[aN],ac[aN])}}function ae(aP,aM){if(aP&&aP.elements.length>0){for(var aO=0;aO<aP.elements.length;aO++){var aN=S(aP.elements[aO]);if(aN){aM.appendChild(aN)}}}}var U=this.redraw=function(){Z();q(av(".jwgroup.jwcenter"),{left:Math.round(h.parseDimension(ac.left.offsetWidth)+af("capLeft").width),right:Math.round(h.parseDimension(ac.right.offsetWidth)+af("capRight").width)})};this.getDisplayElement=function(){return aA};function aD(aM){aM=Math.min(Math.max(0,aM),1);if(an.timeSliderBuffer){an.timeSliderBuffer.style.width=aM*100+"%"}}function am(aM,aO,aP){var aN=100*Math.min(Math.max(0,aO),1)+"%";if(an[aM+"SliderProgress"]){an[aM+"SliderProgress"].style.width=aN}if(an[aM+"SliderThumb"]){an[aM+"SliderThumb"].style.left=aN}}function z(aM){am("volume",aM,true)}function az(aM){am("time",aM)}function af(aM){var aN=Y.getSkinElement("controlbar",aM);if(aN){return aN}else{return{width:0,height:0,src:"",image:undefined,ready:false}}}this.show=function(){q(av(),{opacity:1,visibility:"visible"})};this.hide=function(){q(av(),{opacity:0,visibility:j})};aE()};q(v,{position:g,overflow:j,visibility:j,opacity:0,"-webkit-transition":t,"-moz-transition":t,"-o-transition":t});q(v+" span",{height:l,"-webkit-user-select":a,"-webkit-user-drag":a,"user-select":a,"user-drag":a});q(v+" .jwgroup",{display:u});q(v+" span, "+v+" .jwgroup button,"+v+" .jwleft",{position:f,"float":c});q(v+" .jwright",{position:g});q(v+" .jwcenter",{position:g});q(v+" button",{display:m,height:l,border:a,cursor:"pointer","-webkit-transition":t,"-moz-transition":t,"-o-transition":t});q(v+" .jwcapRight,"+v+" .jwtimeSliderCapRight,"+v+" .jwvolumeSliderCapRight",{right:0,position:g});q(v+" .jwtime,"+v+" .jwgroup span.jwstretch",{position:g,height:l,width:l,left:0});q(v+" .jwrail,"+v+" .jwthumb",{position:g,height:l,cursor:"pointer"});q(v+" .jwtime .jwsmooth span",{"-webkit-transition":t,"-moz-transition":t,"-o-transition":t});q(v+" .jwdivider+.jwdivider",{display:a});q(v+" .jwtext",{padding:"0 5px","text-align":"center"});q(v+" .jwtoggling",{"-webkit-transition":a,"-moz-transition":a,"-o-transition":a})})(jwplayer);(function(d){var c=d.html5,a=d.utils,e=d.events,b=e.state;c.controller=function(j,z){var G=j,g=z,q=j.getVideo(),y=this,n=new e.eventdispatcher(G.id,G.config.debug),f=false,t=[];a.extend(this,n);function r(){G.addEventListener(e.JWPLAYER_MEDIA_BUFFER_FULL,D);G.addEventListener(e.JWPLAYER_MEDIA_COMPLETE,function(M){setTimeout(u,25)})}function I(M){if(!f){f=true;g.completeSetup();n.sendEvent(M.type,M);if(d.utils.exists(window.playerReady)){playerReady(M)}n.sendEvent(d.events.JWPLAYER_PLAYLIST_LOADED,{playlist:G.playlist});n.sendEvent(d.events.JWPLAYER_PLAYLIST_ITEM,{index:G.item});G.addGlobalListener(J);g.addGlobalListener(J);L();if(G.autostart&&!a.isIOS()){x()}while(t.length>0){var N=t.shift();A(N.method,N.arguments)}}}function J(M){n.sendEvent(M.type,M)}function D(M){q.play()}function L(M){o();switch(a.typeOf(M)){case"string":G.setPlaylist(new d.playlist({file:M}));G.setItem(0);break;case"object":case"array":G.setPlaylist(new d.playlist(M));G.setItem(0);break;case"number":G.setItem(M);break}}var s,m,p;function x(){try{m=x;if(!s){s=true;n.sendEvent(e.JWPLAYER_MEDIA_BEFOREPLAY);s=false;if(p){p=false;m=null;return}}if(K()){q.load(G.playlist[G.item])}else{if(G.state==b.PAUSED){q.play()}}return true}catch(M){n.sendEvent(e.JWPLAYER_ERROR,M);m=null}return false}function o(){m=null;try{if(!K()){q.stop()}if(s){p=true}return true}catch(M){n.sendEvent(e.JWPLAYER_ERROR,M)}return false}function H(){try{switch(G.state){case b.PLAYING:case b.BUFFERING:q.pause();break;default:if(s){p=true}}return true}catch(M){n.sendEvent(e.JWPLAYER_ERROR,M)}return false;if(G.state==b.PLAYING||G.state==b.BUFFERING){q.pause()}}function K(){return(G.state==b.IDLE||G.state==b.COMPLETED)}function E(M){q.seek(M)}function C(M){g.fullscreen(M)}function w(M){G.stretching=M;g.resize()}function v(M){L(M);x()}function k(){v(G.item-1)}function l(){v(G.item+1)}function u(){if(!K()){return}m=u;switch(G.repeat.toLowerCase()){case"single":x();break;case"always":l();break;case"list":if(G.item==G.playlist.length-1){L(0);G.setState(b.COMPLETED)}else{l()}break;default:G.setState(b.COMPLETED);break}}function B(){try{return G.getVideo().detachMedia()}catch(M){return null}}function h(){try{var M=G.getVideo().attachMedia();if(typeof m=="function"){m()}}catch(N){return null}}function F(M){return function(){if(f){A(M,arguments)}else{t.push({method:M,arguments:arguments})}}}function A(O,N){var M=[];for(i=0;i<N.length;i++){M.push(N[i])}O.apply(this,M)}this.play=F(x);this.pause=F(H);this.seek=F(E);this.stop=F(o);this.load=F(L);this.next=F(l);this.prev=F(k);this.item=F(v);this.setVolume=F(G.setVolume);this.setMute=F(G.setMute);this.setFullscreen=F(C);this.setStretching=F(w);this.detachMedia=B;this.attachMedia=h;this.playerReady=I;r()}})(jwplayer);(function(a){a.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="0"/><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="mute"/><slider name="volume"/><divider name="divider"/><button name="fullscreen"/></group></layout><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAYCAYAAADd5VyeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFdJREFUeNqczMsOgCAMRFEw/v/PtkAfUNg6aEx0lieZmyOC0mV5jIHQe0dwdwQzQ1DdQEQRWhOEWhtCKRWBuSAQMcBJzAlgzvkRjrTtR+MJbtF4vywBBgAcr05Vhd9mLAAAAABJRU5ErkJggg=="/><element name="divider" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC5JREFUeNpimDlzZgMTAxAQTQgICDAwiYqKMjCJiYlBWcLCwgxMzMzMRJsCEGAAXVQDrCAU8IQAAAAASUVORK5CYII="/><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,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAYCAYAAAAyJzegAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEVJREFUeNpiYBhaYD4Q/4fSDAxNza3/oQJgDOIz8fDwoGgB8ZnY2NhQBEF8JhZWFhRBEJ+JlYUVRRDEx6oSu5OGCAAIMAC30g1QKMx9igAAAABJRU5ErkJggg=="/><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"><settings><setting name="bufferinterval" value="150"/><setting name="bufferrotation" value="90"/></settings><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGJJREFUeNrs0UERACAMBLGDwUf9S0JI/1jg36yDzK6quhnUzrCAgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgX873e0wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBw8gQYACnjBI/ihM8BAAAAAElFTkSuQmCC"/><element name="playIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiUlEQVR42u3XSw2AMBREURwgAQlIQAISKgUpSEFKJeCg5b0E0kWBTVcD9ySTsL0Jn9IBAAAA+K2UUrBlW/Rr5ZDoIeeuoFkxJD9ss03aIXXQqB9SttoG7ZA6qNcOKdttiwcJh9RB+iFl4SshkRBuLR72+9cvH0SOKI2HRo7x/Fi1/uoCAAAAwLsD8ki99IlO2dQAAAAASUVORK5CYII="/><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,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGJJREFUeNrs2TEBADAIxMCnGtjxL6luaqE7Fwc3p2bmZlEnywIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG/q262z0EBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZOngADAE0iAsIr/u2qAAAAAElFTkSuQmCC"/></elements></component><component name="playlist"><settings><setting name="backgroundcolor" value="0xe6e6e6"/><setting name="fontcolor" value="0x000000"/></settings><elements><element name="item" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAABPCAYAAAAJMDwFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQpJREFUeNrs1sGKhDAQRdHY+P+fqr1WSXQpojsLLHIONAzMTh6pO9RaW4F7y/GbH37/09/T9f8/344IhoVhkcfYmsTCi4VhYVjwfmP5CAQMqxTLwinEsNBYoLFwCjEseLexfANCGku94xRiWGgsCGgsH4GIYVkWGguNhcYCjYXGQmOBxsIpRLyDxkJjobFAY6GxcApBvPPdYa3b6ivgFOIU4sUCw8Kw6LaxJBYx8a7ecQoxLAwLDIsk8a7d8WJhWPR9Cl1CvFgkinf1jhcLw8KwwLBIEu/aHS8WaV4sDxZeLAyL3uNdvePFwrAwLDAsksS7didiWHaFU4hhYVgQEO/qHS8WhkXXdgEGAKAsO7NPrr2OAAAAAElFTkSuQmCC"/><element name="itemImage" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAA7CAIAAABKR2XkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAK5JREFUeNrslksKwCAMRGvplfzcf6VeQDyA57ABwW0XjVDpm0WILtrhOURNa+3YSuexm67eO4xxTCpgDGMYkwoYwxjGMCYVMIYxjJlun3LcVWWtfdx5KWXGOWfn3FxKLzu6vzC1VvWD896nlEZV//gSxzvleEjozqou/VkRQogxSiNV+q9Pt2l3aIVpU0rhBuFdwbuCVMAYxjDGMamAMYxhjGNSAWMYw/hfjm8BBgDatbXqT4uvsgAAAABJRU5ErkJggg=="/><element name="sliderCapTop" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAKCAYAAABBq/VWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABNJREFUeNpiYBgFo2AUjBwAEGAAA/IAAdBu5L8AAAAASUVORK5CYII="/><element name="sliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAECAYAAAB7oZQmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABxJREFUeNpiZCAeOGARO0CMRiYGOoDhYwlAgAEAYPMBCML0c4MAAAAASUVORK5CYII="/><element name="sliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAECAYAAAB7oZQmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtJREFUeNpiZCAO/Mcjx0hIMxMDHcDwsQQgwABz1wEIMGLXPQAAAABJRU5ErkJggg=="/><element name="sliderCapBottom" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAKCAYAAABBq/VWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABNJREFUeNpiYBgFo2AUjBwAEGAAA/IAAdBu5L8AAAAASUVORK5CYII="/></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(e){var k=jwplayer.utils,m=jwplayer.events,n=m.state,l=k.animations.rotate,h=k.css,j=document,a=".jwdisplay",g=".jwpreview",b="absolute",c="none",f="100%",d="opacity .25s";e.display=function(F,T){var M=F,B=F.skin,v,o,t,y,N,R,E={},p,D,P,I,z=k.extend({backgroundcolor:"#000",showicons:true},B.getComponentSettings("display"),T);_bufferRotation=!k.exists(z.bufferrotation)?15:parseInt(z.bufferrotation,10),_bufferInterval=!k.exists(z.bufferinterval)?100:parseInt(z.bufferinterval,10),_eventDispatcher=new m.eventdispatcher();k.extend(this,_eventDispatcher);function C(){v=j.createElement("div");v.id=M.id+"_display";v.className="jwdisplay";o=j.createElement("div");o.className="jwpreview";v.appendChild(o);M.jwAddEventListener(m.JWPLAYER_PLAYER_STATE,A);M.jwAddEventListener(m.JWPLAYER_PLAYLIST_ITEM,L);v.addEventListener("click",O,false);s();A({newstate:n.IDLE})}function O(V){_eventDispatcher.sendEvent(m.JWPLAYER_DISPLAY_CLICK);switch(M.jwGetState()){case n.PLAYING:case n.BUFFERING:M.jwPause();break;default:M.jwPlay();break}}function s(){var V=["play","buffer"];for(var Y=0;Y<V.length;Y++){var ac=V[Y],aa=G(ac+"Icon"),X=G(ac+"IconOver"),Z=j.createElement("div"),W=G("background"),ab=G("backgroundOver");button=j.createElement("button");if(aa){button.className="jw"+ac;Z.className="jwicon";button.appendChild(Z);x("#"+v.id+" ."+button.className,W,ab);x("#"+v.id+" ."+button.className+" div",aa,X);if(ab||X){button.addEventListener("mouseover",H(button),false);button.addEventListener("mouseout",K(button),false)}E[ac]=button}}}function H(V){return function(W){if(V.className.indexOf("jwhover")<0){V.className+=" jwhover"}if(V.childNodes[0].className.indexOf("jwhover")<0){V.childNodes[0].className+=" jwhover"}}}function K(V){return function(W){V.className=V.className.replace(" jwhover","");V.childNodes[0].className=V.childNodes[0].className.replace(" jwhover","")}}function x(V,W,X){if(!(W&&W.src)){return}h(V,{width:W.width,height:W.height,"margin-left":W.width/-2,"margin-top":W.height/-2,background:"url("+W.src+") center no-repeat"});if(X&&X.src){h(V+".jwhover",{background:"url("+X.src+") center no-repeat"})}}function U(V){if(!z.showicons){return}if(D){v.removeChild(D)}D=E[V];if(D){v.appendChild(D)}if(V=="buffer"){P=0;I=setInterval(function(){P+=_bufferRotation;l(D.childNodes[0],P%360)},_bufferInterval)}}function L(){var V=M.jwGetPlaylist()[M.jwGetPlaylistIndex()];var W=V?V.image:"";if(t!=W){t=W;Q(g,false);w()}}var J;function A(V){clearTimeout(J);J=setTimeout(function(){r(V.newstate)},100)}function r(V){clearInterval(I);switch(V){case n.COMPLETED:case n.IDLE:U("play");Q(g,true);break;case n.BUFFERING:U("buffer");break;case n.PLAYING:U();Q(g,false);break;case n.PAUSED:U("play");break}}this.getDisplayElement=function(){return v};function u(V){return"#"+v.id+" "+V}function w(){if(t){var V=new Image();V.addEventListener("load",S,false);V.src=t}else{Q(g,false);y=N=0}}function S(){y=this.width;N=this.height;q();if(t){h(u(g),{"background-image":"url("+t+")"})}}function G(V){var W=B.getSkinElement("display",V);if(W){return W}return null}function q(){k.stretch(M.jwGetStretching(),o,v.clientWidth,v.clientHeight,y,N)}this.redraw=q;function Q(V,W){h(u(V),{opacity:W?1:0})}this.show=function(){Q("",true)};this.hide=function(){Q("",false)};this.getBGColor=function(){return z.backgroundcolor};this.setAlternateClickHandler=function(V){_alternateClickHandler=V};this.revertAlternateClickHandler=function(){_alternateClickHandler=undefined};C()};h(a,{position:b,cursor:"pointer",width:f,height:f,overflow:"hidden",opacity:0});h(a+" .jwpreview",{position:b,width:f,height:f,background:"no-repeat center",overflow:"hidden"});h(a+", "+a+" *",{"-webkit-transition":d,"-moz-transition":d,"-o-transition":d});h(a+" button, "+a+" .jwicon",{border:c,position:b,left:"50%",top:"50%",padding:0,cursor:"pointer"})})(jwplayer.html5);(function(a){var e=jwplayer,c=e.utils,d=e.events,b=d.state,f=e.playlist;a.instream=function(C,q,B,D){var x={controlbarseekable:"always",controlbarpausable:true,controlbarstoppable:true,playlistclickable:true};var z,E,G=C,I=q,n=B,A=D,v,L,s,K,j,k,l,p,u,m=false,o,h,r=this;this.load=function(P,O){g();m=true;E=c.extend(x,O);z=new f.item(P);J();h=document.createElement("div");h.id=r.id+"_instream_container";A.detachMedia();v=l.getTag();k=I.playlist[I.item];j=G.jwGetState();if(j==b.BUFFERING||j==b.PLAYING){v.pause()}L=v.src?v.src:v.currentSrc;s=v.innerHTML;K=v.currentTime;u=new a.display(r);u.setAlternateClickHandler(function(Q){if(_fakemodel.state==b.PAUSED){r.jwInstreamPlay()}else{H(d.JWPLAYER_INSTREAM_CLICK,Q)}});h.appendChild(u.getDisplayElement());if(!c.isMobile()){p=new a.controlbar(r);h.appendChild(p.getDisplayElement())}n.setupInstream(h,v);t();l.load(z)};this.jwInstreamDestroy=function(O){if(!m){return}m=false;if(j!=b.IDLE){l.load(k,false)}else{l.stop(true)}l.detachMedia();n.destroyInstream();if(p){try{p.getDisplayElement().parentNode.removeChild(p.getDisplayElement())}catch(P){}}H(d.JWPLAYER_INSTREAM_DESTROYED,{reason:(O?"complete":"destroyed")},true);A.attachMedia();if(j==b.BUFFERING||j==b.PLAYING){v.play();if(I.playlist[I.item]==k){I.getVideo().seek(K)}}return};this.jwInstreamAddEventListener=function(O,P){o.addEventListener(O,P)};this.jwInstreamRemoveEventListener=function(O,P){o.removeEventListener(O,P)};this.jwInstreamPlay=function(){if(!m){return}l.play(true)};this.jwInstreamPause=function(){if(!m){return}l.pause(true)};this.jwInstreamSeek=function(O){if(!m){return}l.seek(O)};this.jwInstreamGetState=function(){if(!m){return undefined}return _fakemodel.state};this.jwInstreamGetPosition=function(){if(!m){return undefined}return _fakemodel.position};this.jwInstreamGetDuration=function(){if(!m){return undefined}return _fakemodel.duration};this.playlistClickable=function(){return(!m||E.playlistclickable.toString().toLowerCase()=="true")};function w(){_fakemodel=new a.model({});o=new d.eventdispatcher();G.jwAddEventListener(d.JWPLAYER_RESIZE,t);G.jwAddEventListener(d.JWPLAYER_FULLSCREEN,t)}function g(){A.setMute(I.mute);A.setVolume(I.volume)}function J(){if(!l){l=new a.video(I.getVideo().getTag());l.addGlobalListener(M);l.addEventListener(d.JWPLAYER_MEDIA_META,N);l.addEventListener(d.JWPLAYER_MEDIA_COMPLETE,y);l.addEventListener(d.JWPLAYER_MEDIA_BUFFER_FULL,F)}l.attachMedia()}function M(O){if(m){H(O.type,O)}}function F(O){if(m){l.play()}}function y(O){if(m){setTimeout(function(){r.jwInstreamDestroy(true)},10)}}function N(O){if(O.metadata.width&&O.metadata.height){n.resizeMedia()}}function H(O,P,Q){if(m||Q){o.sendEvent(O,P)}}function t(){if(p){p.redraw()}if(u){u.redraw()}}this.jwPlay=function(O){if(E.controlbarpausable.toString().toLowerCase()=="true"){this.jwInstreamPlay()}};this.jwPause=function(O){if(E.controlbarpausable.toString().toLowerCase()=="true"){this.jwInstreamPause()}};this.jwStop=function(){if(E.controlbarstoppable.toString().toLowerCase()=="true"){this.jwInstreamDestroy();G.jwStop()}};this.jwSeek=function(O){switch(E.controlbarseekable.toLowerCase()){case"always":this.jwInstreamSeek(O);break;case"backwards":if(_fakemodel.position>O){this.jwInstreamSeek(O)}break}};this.jwGetPosition=function(){};this.jwGetDuration=function(){};this.jwGetWidth=G.jwGetWidth;this.jwGetHeight=G.jwGetHeight;this.jwGetFullscreen=G.jwGetFullscreen;this.jwSetFullscreen=G.jwSetFullscreen;this.jwGetVolume=function(){return I.volume};this.jwSetVolume=function(O){l.volume(O);G.jwSetVolume(O)};this.jwGetMute=function(){return I.mute};this.jwSetMute=function(O){l.mute(O);G.jwSetMute(O)};this.jwGetState=function(){return _fakemodel.state};this.jwGetPlaylist=function(){return[z]};this.jwGetPlaylistIndex=function(){return 0};this.jwGetStretching=function(){return I.config.stretching};this.jwAddEventListener=function(P,O){o.addEventListener(P,O)};this.jwRemoveEventListener=function(P,O){o.removeEventListener(P,O)};this.skin=G.skin;this.id=G.id+"_instream";w();return this}})(jwplayer.html5);(function(b){var a=jwplayer.utils,c=jwplayer.events,d=undefined;b.model=function(f){var m=this,h,o,p=a.getCookies(),e={};_defaults={autostart:false,controlbar:true,debug:d,height:320,icons:true,item:0,mobilecontrols:false,mute:false,playlist:[],playlistposition:"right",playlistsize:0,repeat:"list",skin:d,stretching:a.stretching.UNIFORM,volume:90,width:480};function l(q){for(var r in q){q[r]=a.serialize(q[r])}return q}function n(){a.extend(m,new c.eventdispatcher());m.config=l(a.extend({},_defaults,p,f));a.extend(m,{id:f.id,state:c.state.IDLE,position:0,buffer:0,},m.config);k();m.setItem(m.config.item);o=document.createElement("video");h=new b.video(o);h.volume(m.volume);h.mute(m.mute);h.addGlobalListener(g)}function k(){e.display={showicons:m.icons};e.controlbar={}}var j={};j[c.JWPLAYER_MEDIA_MUTE]="mute";j[c.JWPLAYER_MEDIA_VOLUME]="volume";j[c.JWPLAYER_PLAYER_STATE]="newstate->state";j[c.JWPLAYER_MEDIA_BUFFER]="bufferPercent->buffer";j[c.JWPLAYER_MEDIA_TIME]="position";function g(q){var s=j[q.type];if(s){var t=s.split("->"),u=t[0],r=t[1]?t[1]:u;if(m[r]!=q[u]){m[r]=q[u];m.sendEvent(q.type,q)}}else{m.sendEvent(q.type,q)}}m.setState=function(q){var r=m.state;m.state=q;if(q!=r){m.sendEvent(c.JWPLAYER_PLAYER_STATE,{newstate:m.state,oldstate:r})}};m.getVideo=function(){return h};m.seekDrag=function(q){h.seekDrag(q)};m.setFullscreen=function(q){if(q!=m.fullscreen){m.fullscreen=q;m.sendEvent(c.JWPLAYER_FULLSCREEN,{fullscreen:q})}};m.setPlaylist=function(q){m.playlist=q;m.sendEvent(c.JWPLAYER_PLAYLIST_LOADED,{playlist:q})};m.setItem=function(q){var r;if(q==m.playlist.length||q<-1){r=0}else{if(q==-1||q>m.playlist.length){r=m.playlist.length-1}else{r=q}}if(r!=m.item){m.item=r;m.sendEvent(c.JWPLAYER_PLAYLIST_ITEM,{index:m.item})}};m.setVolume=function(q){if(m.mute&&q>0){m.setMute(false)}q=Math.round(q);a.saveCookie("volume",q);h.volume(q)};m.setMute=function(q){if(!a.exists(q)){q=!m.mute}a.saveCookie("mute",q);h.mute(q)};m.componentConfig=function(q){return e[q]};n()}})(jwplayer.html5);(function(a){a.player=function(c){var l=this,j=new a.model(c),f=new a.view(this,j),g=new a.controller(j,f);function k(){l.id=j.id;var m=new a.setup(j,f,g);m.addEventListener(jwplayer.events.JWPLAYER_READY,d);m.addEventListener(jwplayer.events.JWPLAYER_ERROR,h);m.start()}function d(m){g.playerReady(m)}function h(m){jwplayer.utils.log("There was a problem setting up the player: "+m.message)}l.jwPlay=g.play;l.jwPause=g.pause;l.jwStop=g.stop;l.jwSeek=g.seek;l.jwSetVolume=g.setVolume;l.jwSetMute=g.setMute;l.jwLoad=g.load;l.jwPlaylistNext=g.next;l.jwPlaylistPrev=g.prev;l.jwPlaylistItem=g.item;l.jwSetFullscreen=g.setFullscreen;l.jwResize=f.resize;l.jwSeekDrag=j.seekDrag;l.jwSetStretching=g.setStretching;function e(m){return function(){return j[m]}}l.jwGetPlaylistIndex=e("item");l.jwGetPosition=e("position");l.jwGetDuration=e("duration");l.jwGetBuffer=e("buffer");l.jwGetWidth=e("width");l.jwGetHeight=e("height");l.jwGetFullscreen=e("fullscreen");l.jwGetVolume=e("volume");l.jwGetMute=e("mute");l.jwGetState=e("state");l.jwGetStretching=e("stretching");l.jwGetPlaylist=e("playlist");l.jwDetachMedia=g.detachMedia;l.jwAttachMedia=g.attachMedia;var b;l.jwLoadInstream=function(n,m){if(!b){b=new a.instream(l,j,f,g)}setTimeout(function(){b.load(n,m)},10)};l.jwInstreamDestroy=function(){if(b){b.jwInstreamDestroy()}};l.jwAddEventListener=g.addEventListener;l.jwRemoveEventListener=g.removeEventListener;k()}})(jwplayer.html5);(function(f){var d={size:180,itemheight:60,thumbs:true,fontcolor:"#000000",overcolor:"",activecolor:"",backgroundcolor:"#f8f8f8",font:"_sans",fontsize:"",fontstyle:"",fontweight:""},k={_sans:"Arial, Helvetica, sans-serif",_serif:"Times, Times New Roman, serif",_typewriter:"Courier New, Courier, monospace"},m=jwplayer.utils,h=m.css,e=jwplayer.events,l=".jwplaylist",j=document,a="absolute",b="relative",c="hidden",g="100%";f.playlistcomponent=function(A,M){var G=A,v=G.skin,o=m.extend({},d,G.skin.getComponentSettings("playlist"),M),H,n,q,p,u=-1,r={background:undefined,item:undefined,itemOver:undefined,itemImage:undefined,itemActive:undefined};this.getDisplayElement=function(){return H};this.redraw=function(){};this.show=function(){_show(H)};this.hide=function(){_hide(H)};function s(){H=K("div","jwplaylist");H.id=G.id+"_jwplayer_playlistcomponent";J();if(r.item){o.itemheight=r.item.height}x();G.jwAddEventListener(jwplayer.events.JWPLAYER_PLAYLIST_LOADED,B);G.jwAddEventListener(jwplayer.events.JWPLAYER_PLAYLIST_ITEM,E)}function t(N){return"#"+H.id+(N?" ."+N:"")}function x(){var R=0,Q=0,N=0,P=o.itemheight,T=o.fontsize;m.clearCss(t());h(t("jwlist"),{"background-image":r.background?" url("+r.background.src+")":"","background-color":o.backgroundcolor,color:o.fontcolor,font:o.fontweight+" "+o.fontstyle+" "+(T?T:11)+"px "+(k[o.font]?k[o.font]:k._sans)});if(r.itemImage){R=(P-r.itemImage.height)/2;Q=r.itemImage.width;N=r.itemImage.height}else{Q=P*4/3;N=P}h(t("jwplaylistimg"),{height:N,width:Q,margin:R});h(t("jwlist li"),{"background-image":r.item?"url("+r.item.src+")":"",height:P,"background-size":g+" "+P+"px",cursor:"pointer"});var O={overflow:"hidden"};if(o.activecolor!==""){O.color=o.activecolor}if(r.itemActive){O["background-image"]="url("+r.itemActive.src+")"}h(t("jwlist li.active"),O);var S={overflow:"hidden"};if(o.overcolor!==""){S.color=o.overcolor}if(r.itemOver){S["background-image"]="url("+r.itemOver.src+")"}h(t("jwlist li:hover"),S);h(t("jwtextwrapper"),{padding:"5px 5px 0 "+(R?0:"5px"),height:P-5,position:b});h(t("jwtitle"),{height:T?T+10:20,"line-height":T?T+10:20,overflow:"hidden",display:"inline-block",width:g,"font-size":T?T:13,"font-weight":o.fontweight?o.fontweight:"bold"});h(t("jwdescription"),{display:"block","line-height":T?T+4:16,overflow:"hidden",height:P,position:b});h(t("jwduration"),{position:"absolute",right:5})}function y(){var N=K("ul","jwlist");N.id=H.id+"_ul"+Math.round(Math.random()*10000000);return N}function z(Q){var V=n[Q],U=K("li","jwitem");U.id=p.id+"_item_"+Q;var R=K("div","jwplaylistimg jwfill");if(F()&&(V.image||V["playlist.image"]||r.itemImage)){var S;if(V["playlist.image"]){S=V["playlist.image"]}else{if(V.image){S=V.image}else{if(r.itemImage){S=r.itemImage.src}}}h("#"+U.id+" .jwplaylistimg",{"background-image":S?"url("+S+")":null});L(U,R)}var N=K("div","jwtextwrapper");var T=K("span","jwtitle");T.innerHTML=V?V.title:"";L(N,T);if(V.description){var P=K("span","jwdescription");P.innerHTML=V.description;L(N,P)}if(V.duration>0){var O=K("span","jwduration");O.innerHTML=m.timeFormat(V.duration);L(T,O)}L(U,N);return U}function K(O,N){var P=j.createElement(O);if(N){P.className=N}return P}function L(N,O){N.appendChild(O)}function B(O){H.innerHTML="";n=C();if(!n){return}items=[];p=y();for(var P=0;P<n.length;P++){var N=z(P);N.onclick=I(P);L(p,N);items.push(N)}u=G.jwGetPlaylistIndex();L(H,p);if(m.isIOS()&&window.iScroll){p.style.height=o.itemheight*n.length+"px";var Q=new iScroll(H.id)}}function C(){var O=G.jwGetPlaylist();var P=[];for(var N=0;N<O.length;N++){if(!O[N]["ova.hidden"]){P.push(O[N])}}return P}function I(N){return function(){G.jwPlaylistItem(N);G.jwPlay(true)}}function w(){p.scrollTop=G.jwGetPlaylistIndex()*o.itemheight}function F(){return o.thumbs.toString().toLowerCase()=="true"}function E(N){if(u>=0){j.getElementById(p.id+"_item_"+u).className="jwitem";u=N.index}j.getElementById(p.id+"_item_"+N.index).className="jwitem active";w()}function J(){for(var N in r){r[N]=D(N)}}function D(N){return v.getSkinElement("playlist",N)}s();return this};h(l,{overflow:c,position:a,width:g,height:g});h(l+" .jwplaylistimg",{position:b,width:g,"float":"left",margin:"0 5px 0 0",background:"#000",overflow:c});h(l+" .jwlist",{width:g,height:g,"list-style":"none",margin:0,padding:0,"overflow-y":"auto"});h(l+" .jwlist li",{width:g});h(l+" .jwtextwrapper",{overflow:c})})(jwplayer.html5);(function(b){var d=jwplayer,a=d.utils,c=d.events;b.playlistloader=function(){var f=new c.eventdispatcher();a.extend(this,f);this.load=function(h){a.ajax(h,g,e)};function g(j){try{var l=j.responseXML.firstChild;if(b.parsers.localName(l)=="xml"){l=l.nextSibling}var h=b.parsers.rssparser.parse(l);f.sendEvent(c.JWPLAYER_PLAYLIST_LOADED,{playlist:new d.playlist(h)})}catch(k){e("Could not load the playlist.")}}function e(h){f.sendEvent(c.JWPLAYER_ERROR,{message:h?h:"Could not load playlist an unknown reason."})}}})(jwplayer.html5);(function(f){var h=jwplayer,l=h.utils,m=h.events,a=h.playlist,j=1,e=2,d=3,k=4,c=5,b=6,g=7;f.setup=function(s,H,I){var L=s,q=H,F=I,u={},C={},A,z=new m.eventdispatcher(),v=false,w=[];function t(){r(j,p);r(e,P,j);r(d,y,j);r(k,K,d);r(c,O,k+","+e);r(b,J,c+","+d);r(g,D,b)}function r(Q,S,R){w.push({name:Q,method:S,depends:R})}function G(){for(var S=0;S<w.length;S++){var Q=w[S];if(N(Q.depends)){w.splice(S,1);try{Q.method();G()}catch(R){x(R.message)}return}}if(w.length>0&&!v){setTimeout(G,500)}}function N(S){if(!S){return true}var R=S.toString().split(",");for(var Q=0;Q<R.length;Q++){if(!u[R[Q]]){return false}}return true}function o(Q){u[Q]=true}function p(){o(j)}function P(){A=new f.skin();A.load(L.config.skin,B)}function B(Q){o(e)}function y(){switch(l.typeOf(L.config.playlist)){case"string":var Q=new f.playlistloader();Q.addEventListener(m.JWPLAYER_PLAYLIST_LOADED,n);Q.addEventListener(m.JWPLAYER_ERROR,E);Q.load(L.config.playlist);break;case"array":L.playlist=new a(L.config.playlist);o(d)}}function n(Q){L.setPlaylist(Q.playlist);o(d)}function E(Q){x(Q.message)}function K(){var R=L.playlist[L.item].image;if(R){var Q=new Image();Q.addEventListener("load",M,false);Q.addEventListener("error",M,false);Q.src=R}else{o(k)}}function M(Q){o(k)}function O(){q.setup(A);o(c)}function J(){o(b)}function D(){z.sendEvent(m.JWPLAYER_READY);o(g)}function x(Q){v=true;z.sendEvent(m.JWPLAYER_ERROR,{message:Q})}l.extend(this,z);this.start=G;t()}})(jwplayer.html5);(function(a){a.skin=function(){var b={};var c=false;this.load=function(d,e){new a.skinloader(d,function(f){c=true;b=f;e()},function(){new a.skinloader("",function(f){c=true;b=f;e()})})};this.getSkinElement=function(d,e){if(c){try{return b[d].elements[e]}catch(f){jwplayer.utils.log("No such skin component / element: ",[d,e])}}return null};this.getComponentSettings=function(d){if(c&&b&&b[d]){return b[d].settings}return null};this.getComponentLayout=function(d){if(c){var e=b[d].layout;if(e&&(e.left||e.right||e.center)){return b[d].layout}}return null}}})(jwplayer.html5);(function(a){var b=jwplayer.utils;a.skinloader=function(g,q,l){var p={};var d=q;var m=l;var f=true;var k;var o=g;var t=false;function n(){if(typeof o!="string"||o===""){e(a.defaultskin().xml)}else{b.ajax(b.getAbsolutePath(o),function(u){try{if(b.exists(u.responseXML)){e(u.responseXML);return}}catch(v){j()}e(a.defaultskin().xml)},function(u){e(a.defaultskin().xml)})}}function e(y){var E=y.getElementsByTagName("component");if(E.length===0){return}for(var H=0;H<E.length;H++){var C=E[H].getAttribute("name");var B={settings:{},elements:{},layout:{}};p[C]=B;var G=E[H].getElementsByTagName("elements")[0].getElementsByTagName("element");for(var F=0;F<G.length;F++){c(G[F],C)}var z=E[H].getElementsByTagName("settings")[0];if(z&&z.childNodes.length>0){var K=z.getElementsByTagName("setting");for(var O=0;O<K.length;O++){var Q=K[O].getAttribute("name");var I=K[O].getAttribute("value");if(/color$/.test(Q)){I=b.stringToColor(I)}p[C].settings[Q]=I}}var L=E[H].getElementsByTagName("layout")[0];if(L&&L.childNodes.length>0){var M=L.getElementsByTagName("group");for(var x=0;x<M.length;x++){var A=M[x];p[C].layout[A.getAttribute("position")]={elements:[]};for(var P=0;P<A.attributes.length;P++){var D=A.attributes[P];p[C].layout[A.getAttribute("position")][D.name]=D.value}var N=A.getElementsByTagName("*");for(var w=0;w<N.length;w++){var u=N[w];p[C].layout[A.getAttribute("position")].elements.push({type:u.tagName});for(var v=0;v<u.attributes.length;v++){var J=u.attributes[v];p[C].layout[A.getAttribute("position")].elements[w][J.name]=J.value}if(!b.exists(p[C].layout[A.getAttribute("position")].elements[w].name)){p[C].layout[A.getAttribute("position")].elements[w].name=u.tagName}}}}f=false;s()}}function s(){clearInterval(k);if(!t){k=setInterval(function(){r()},100)}}function c(z,y){var x=new Image();var u=z.getAttribute("name");var w=z.getAttribute("src");var B;if(w.indexOf("data:image/png;base64,")===0){B=w}else{var v=b.getAbsolutePath(o);var A=v.substr(0,v.lastIndexOf("/"));B=[A,y,w].join("/")}p[y].elements[u]={height:0,width:0,src:"",ready:false,image:x};x.onload=function(C){h(x,u,y)};x.onerror=function(C){t=true;s();m()};x.src=B}function j(){for(var v in p){var x=p[v];for(var u in x.elements){var y=x.elements[u];var w=y.image;w.onload=null;w.onerror=null;delete y.image;delete x.elements[u]}delete p[v]}}function r(){for(var u in p){if(u!="properties"){for(var v in p[u].elements){if(!p[u].elements[v].ready){return}}}}if(f===false){clearInterval(k);d(p)}}function h(u,w,v){if(p[v]&&p[v].elements[w]){p[v].elements[w].height=u.height;p[v].elements[w].width=u.width;p[v].elements[w].src=u.src;p[v].elements[w].ready=true;s()}else{b.log("Loaded an image for a missing element: "+v+"."+w)}}n()}})(jwplayer.html5);(function(c){var a=c.utils,d=c.events,b=d.state;c.html5.video=function(O){var I={abort:v,canplay:o,canplaythrough:v,durationchange:z,emptied:v,ended:v,error:k,loadeddata:v,loadedmetadata:o,loadstart:v,pause:N,play:N,playing:N,progress:v,ratechange:v,readystatechange:v,seeked:v,seeking:v,stalled:v,suspend:v,timeupdate:P,volumechange:j,waiting:r},u=a.extensionmap,A,x,s,T,m,L,S,D,J,B,e=b.IDLE,E,l=-1,C=-1,G=new d.eventdispatcher(),q=false;a.extend(this,G);function Q(U){s=U;K();s.controls=true;s.controls=false;q=true}function K(){for(var U in I){s.addEventListener(U,I[U],false)}}function p(U,V){if(q){G.sendEvent(U,V)}}function v(U){}function z(U){if(!q){return}if(T<0){T=s.duration}P()}function P(U){if(!q){return}if(e==b.PLAYING&&!B){m=s.currentTime;p(d.JWPLAYER_MEDIA_TIME,{position:m,duration:T});if(m>=T&&T>0){M()}}}function o(U){if(!q){return}if(!S){S=true;n();if(J>0){y(J)}}}function n(){if(!D){D=true;p(d.JWPLAYER_MEDIA_BUFFER_FULL)}}function N(U){if(!q||B){return}if(s.paused){g()}else{t(b.PLAYING)}}function r(U){if(!q){return}t(b.BUFFERING)}function k(U){if(!q){return}a.log("Error: %o",s.error);t(b.IDLE)}function f(U){var V=u[a.extension(U)];return(!!V&&!!V.html5&&s.canPlayType(V.html5))}function F(W){var U=W.sources;if(U&&U.length>0){for(var V=0;V<U.length;V++){if(f(U[V].file)){return U[V].file}}}else{if(W.file&&f(W.file)){return W.file}}return null}this.load=function(U){if(!q){return}A=U;S=false;D=false;J=0;T=U.duration?U.duration:-1;m=0;x=F(A);if(!x){a.log("Could not find a file to play.");return}t(b.BUFFERING);s.src=x;s.load();l=setInterval(h,100);if(a.isMobile()){s.controls=true}if(a.isIPod()){n()}};var w=this.stop=function(){if(!q){return}s.removeAttribute("src");s.load();clearInterval(l);t(b.IDLE)};this.play=function(){if(a.isIPad()){s.controls=true}if(q){s.play()}};var g=this.pause=function(){if(q){if(a.isIPad()){s.controls=false}s.pause();t(b.PAUSED)}};this.seekDrag=function(U){if(!q){return}B=U;if(U){s.pause()}else{s.play()}};var y=this.seek=function(U){if(!q){return}if(s.readyState>=s.HAVE_FUTURE_DATA){J=0;if(!B){p(d.JWPLAYER_MEDIA_SEEK,{position:m,offset:U})}s.currentTime=U}else{J=U}};var R=this.volume=function(U){s.volume=U/100};function j(U){p(d.JWPLAYER_MEDIA_VOLUME,{volume:Math.round(s.volume*100)});p(d.JWPLAYER_MEDIA_MUTE,{mute:s.muted})}this.mute=function(U){if(!a.exists(U)){U=!s.mute}if(U){if(!s.muted){E=s.volume*100;s.muted=true;R(0)}}else{if(s.muted){R(E);s.muted=false}}};function t(U){if(U==b.PAUSED&&e==b.IDLE){return}if(B){return}if(e!=U){var V=e;e=U;p(d.JWPLAYER_PLAYER_STATE,{oldstate:V,newstate:U})}}function h(){if(!q){return}var U=H();if(U!=C){C=U;p(d.JWPLAYER_MEDIA_BUFFER,{bufferPercent:Math.round(C*100)})}if(U>=1){clearInterval(l)}}function H(){if(s.buffered.length==0||s.duration==0){return 0}else{return s.buffered.end(s.buffered.length-1)/s.duration}}function M(){t(b.IDLE);p(d.JWPLAYER_MEDIA_BEFORECOMPLETE);p(d.JWPLAYER_MEDIA_COMPLETE)}this.detachMedia=function(){q=false;return s};this.attachMedia=function(){q=true};this.getTag=function(){return s};Q(O)}})(jwplayer);(function(h){var l=jwplayer,q=l.utils,a=jwplayer.events,d=a.state,n=q.css,e=document,k="jwplayer",b="."+k+".jwfullscreen",m="jwmain",s="jwinstream",r="jwvideo",c="jwcontrols",f="jwplaylistcontainer";h.view=function(C,y){var B=C,z=y,T,L,J,W,u=0,ad=2000,w,aj,F,ac,ak,af,H,Y=new a.eventdispatcher();q.extend(this,Y);this.setup=function(ao){B.skin=ao;T=ae("div",k);T.id=B.id;var an=document.getElementById(B.id);an.parentNode.replaceChild(T,an);L=ae("span",m);aj=ae("span",r);w=z.getVideo().getTag();aj.appendChild(w);J=ae("span",c);F=ae("span",s);W=ae("span",f);t();L.appendChild(aj);L.appendChild(J);L.appendChild(F);T.appendChild(L);T.appendChild(W);e.addEventListener("webkitfullscreenchange",ag,false);e.addEventListener("mozfullscreenchange",ag,false);e.addEventListener("keydown",Z,false);B.jwAddEventListener(a.JWPLAYER_PLAYER_STATE,D);D({newstate:d.IDLE});J.addEventListener("mouseout",X,false);J.addEventListener("mousemove",al,false);if(ac){ac.getDisplayElement().addEventListener("mousemove",S,false);ac.getDisplayElement().addEventListener("mouseout",ai,false)}};function ae(ao,an){var ap=e.createElement(ao);if(an){ap.className=an}return ap}function al(){clearTimeout(u);if(B.jwGetState()==d.PLAYING||B.jwGetState()==d.PAUSED){K();if(!ab){u=setTimeout(X,ad)}}}var ab=false;function S(){clearTimeout(u);ab=true}function ai(){ab=false}function X(){if(B.jwGetState()==d.PLAYING||B.jwGetState()==d.PAUSED){E()}clearTimeout(u);u=0}function t(){var ao=z.width,an=z.height,ap=z.componentConfig("controlbar");displaySettings=z.componentConfig("display");ak=new h.display(B,displaySettings);ak.addEventListener(a.JWPLAYER_DISPLAY_CLICK,function(aq){Y.sendEvent(aq.type,aq)});J.appendChild(ak.getDisplayElement());if(z.playlistsize&&z.playlistposition&&z.playlistposition!="none"){af=new h.playlistcomponent(B,{});W.appendChild(af.getDisplayElement())}if(!q.isMobile()||(z.mobilecontrols&&q.isMobile())){ac=new h.controlbar(B,ap);J.appendChild(ac.getDisplayElement())}Q(ao,an)}var O=this.fullscreen=function(an){if(!q.exists(an)){an=!z.fullscreen}if(an){if(!z.fullscreen){R(true);if(T.requestFullScreen){T.requestFullScreen()}else{if(T.mozRequestFullScreen){T.mozRequestFullScreen()}else{if(T.webkitRequestFullScreen){T.webkitRequestFullScreen()}}}z.setFullscreen(true)}}else{R(false);if(z.fullscreen){if(e.cancelFullScreen){e.cancelFullScreen()}else{if(e.mozCancelFullScreen){e.mozCancelFullScreen()}else{if(e.webkitCancelFullScreen){e.webkitCancelFullScreen()}}}z.setFullscreen(false)}}};function Q(ap,an){if(q.exists(ap)&&q.exists(an)){n(V(),{width:ap,height:an});z.width=ap;z.height=an}if(ak){ak.redraw()}if(ac){ac.redraw()}var ar=z.playlistsize,at=z.playlistposition;if(af&&ar&&at){af.redraw();var ao={display:"block"},aq={};ao[at]=0;aq[at]=ar;if(at=="left"||at=="right"){ao.width=ar}else{ao.height=ar}n(V(f),ao);n(V(m),aq)}x(an);A();return}function x(an){if(!ac){return}H=(an<=40&&an.toString().indexOf("%")<0);if(H){z.componentConfig("controlbar").margin=0;ac.redraw();K();I();M(false)}else{ah(B.jwGetState())}n(V(),{"background-color":H?"transparent":ak.getBGColor()})}function A(){q.stretch(z.stretching,w,aj.clientWidth,aj.clientHeight,w.videoWidth,w.videoHeight)}this.resize=Q;this.resizeMedia=A;this.completeSetup=function(){n(V(),{opacity:1})};function Z(an){switch(an.keyCode){case 27:if(z.fullscreen){O(false)}break;case 32:B.jwPlay();break}}function R(an){if(an){T.className+=" jwfullscreen"}else{T.className=T.className.replace(/\s+jwfullscreen/,"")}}function am(){var an=[e.mozFullScreenElement,e.webkitCurrentFullScreenElement];for(var ao=0;ao<an.length;ao++){if(an[ao]&&an[ao].id==B.id){return true}}return false}function ag(an){z.setFullscreen(am());O(z.fullscreen)}function K(){if(ac&&z.controlbar){ac.show()}}function E(){if(ac&&!H){ac.hide()}}function v(){if(ak&&!H){ak.show()}}function I(){if(ak){ak.hide()}}function G(){E();I()}function aa(){K();v()}function M(an){an=an&&!H;n(V(r),{visibility:an?"visible":"hidden",opacity:an?1:0})}var N;function D(an){clearTimeout(N);N=setTimeout(function(){ah(an.newstate)},100)}function ah(an){switch(an){case d.PLAYING:M(true);A();al();break;case d.COMPLETED:case d.IDLE:M(false);E();v();break;case d.BUFFERING:case d.PAUSED:aa();break}}function V(an){return"#"+B.id+(an?" ."+an:"")}this.setupInstream=function(an,ao){U(V(s),true);U(V(c),false);F.appendChild(an);_instreamVideo=ao;D({newstate:d.PLAYING});_instreamMode=true};var P=this.destroyInstream=function(){U(V(s),false);U(V(c),true);F.innerHTML="";_instreamVideo=null;_instreamMode=false;Q(z.width,z.height)};function U(an,ao){n(an,{display:ao?"block":"none"})}};var p="opacity .5s ease",j="100%",g="absolute",o=" !important";n("."+k,{position:"relative",overflow:"hidden",opacity:0,"-webkit-transition":p,"-moz-transition":p,"-o-transition":p});n("."+m,{position:g,left:0,right:0,top:0,bottom:0,"-webkit-transition":p,"-moz-transition":p,"-o-transition":p});n("."+r+" ,."+c,{position:g,height:j,width:j,"-webkit-transition":p,"-moz-transition":p,"-o-transition":p});n("."+r+" video",{background:"transparent",width:j,height:j});n("."+f,{position:g,height:j,width:j,display:"none"});n("."+s,{overflow:"hidden",position:g,top:0,left:0,bottom:0,right:0,display:"none"});n(b,{width:j,height:j,left:0,right:0,top:0,bottom:0,"z-index":1000,position:"fixed"},true);n(b+" ."+m,{left:0,right:0,top:0,bottom:0},true);n(b+" ."+f,{display:"none"},true);n("."+k+" .jwuniform",{"background-size":"contain"+o});n("."+k+" .jwfill",{"background-size":"cover"+o,"background-position":"center"});n("."+k+" .jwexactfit",{"background-size":j+" "+j+o});n("."+k+" .jwnone",{"background-size":null})})(jwplayer.html5); -
branches/jw6/jwplayer.js
r2197 r2198 1 if(typeof jwplayer=="undefined"){jwplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a)}};var $jw=jwplayer;jwplayer.version="6.0.219 7";jwplayer.vid=document.createElement("video");jwplayer.audio=document.createElement("audio");jwplayer.source=document.createElement("source");(function(c){var g=document,e=window;var h=c.utils=function(){};h.exists=function(k){switch(typeof(k)){case"string":return(k.length>0);break;case"object":return(k!==null);case"undefined":return false}return true};h.styleDimension=function(k){return k+(k.toString().indexOf("%")>0?"":"px")};h.getAbsolutePath=function(q,p){if(!h.exists(p)){p=g.location.href}if(!h.exists(q)){return undefined}if(a(q)){return q}var r=p.substring(0,p.indexOf("://")+3);var o=p.substring(r.length,p.indexOf("/",r.length+1));var l;if(q.indexOf("/")===0){l=q.split("/")}else{var m=p.split("?")[0];m=m.substring(r.length+o.length+1,m.lastIndexOf("/"));l=m.split("/").concat(q.split("/"))}var k=[];for(var n=0;n<l.length;n++){if(!l[n]||!h.exists(l[n])||l[n]=="."){continue}else{if(l[n]==".."){k.pop()}else{k.push(l[n])}}}return r+o+"/"+k.join("/")};function a(l){if(!h.exists(l)){return}var m=l.indexOf("://");var k=l.indexOf("?");return(m>0&&(k<0||(k>m)))}h.extend=function(){var k=h.extend["arguments"];if(k.length>1){for(var m=1;m<k.length;m++){for(var l in k[m]){k[0][l]=k[m][l]}}return k[0]}return null};h.parseDimension=function(k){if(typeof k=="string"){if(k===""){return 0}else{if(k.lastIndexOf("%")>-1){return k}else{return parseInt(k.replace("px",""),10)}}}return k};h.timeFormat=function(k){if(k>0){var l=Math.floor(k/60)<10?"0"+Math.floor(k/60)+":":Math.floor(k/60)+":";l+=Math.floor(k%60)<10?"0"+Math.floor(k%60):Math.floor(k%60);return l}else{return"00:00"}};h.log=function(l,k){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(k){console.log(l,k)}else{console.log(l)}}};h.getBoundingClientRect=function(k){if(typeof k.getBoundingClientRect=="function"){return k.getBoundingClientRect()}else{return{left:k.offsetLeft+g.body.scrollLeft,top:k.offsetTop+g.body.scrollTop,width:k.offsetWidth,height:k.offsetHeight}}};var d=h.userAgentMatch=function(l){var k=navigator.userAgent.toLowerCase();return(k.match(l)!==null)};h.isIE=function(){return d(/msie/i)};h.isMobile=function(){return d(/(iP(hone|ad|od))|android/i)};h.isIOS=function(){return d(/iP(hone|ad|od)/i)};h.isIPod=function(){return d(/iP(hone|od)/i)};h.isIPad=function(){return d(/iPad/i)};h.saveCookie=function(k,l){g.cookie="jwplayer."+k+"="+l+"; path=/"};h.getCookies=function(){var n={};var m=g.cookie.split("; ");for(var l=0;l<m.length;l++){var k=m[l].split("=");if(k[0].indexOf("jwplayer.")==0){n[k[0].substring(9,k[0].length)]=k[1]}}return n};h.ajax=function(o,n,k){var m;if(b(o)&&h.exists(e.XDomainRequest)){m=new XDomainRequest();m.onload=j(m,o,n,k);m.onerror=i(k,o,m)}else{if(h.exists(e.XMLHttpRequest)){m=new XMLHttpRequest();m.onreadystatechange=f(m,o,n,k);m.onerror=i(k,o)}else{if(k){k()}}}try{m.open("GET",o,true);m.send(null)}catch(l){if(k){k(o)}}return m};function b(k){if(k&&k.indexOf("://")>=0){if(k.split("/")[2]!=e.location.href.split("/")[2]){return true}}return false}function i(k,m,l){return function(){k(m)}}function f(l,n,m,k){return function(){if(l.readyState===4){if(l.status==200){j(l,n,m,k)()}else{if(k){k(n)}}}}}function j(l,n,m,k){return function(){if(!h.exists(l.responseXML)){try{var o;if(e.DOMParser){o=(new DOMParser()).parseFromString(l.responseText,"text/xml")}else{o=new ActiveXObject("Microsoft.XMLDOM");o.async="false";o.loadXML(l.responseText)}if(o){l=h.extend({},l,{responseXML:o})}}catch(p){if(k){k(n)}return}}m(l)}}h.typeOf=function(l){var k=typeof l;if(k==="object"){if(!l){return"null"}return(l instanceof Array)?"array":k}else{return k}};h.translateEventResponse=function(m,k){var o=h.extend({},k);if(m==c.events.JWPLAYER_FULLSCREEN&&!o.fullscreen){o.fullscreen=o.message=="true"?true:false;delete o.message}else{if(typeof o.data=="object"){o=h.extend(o,o.data);delete o.data}else{if(typeof o.metadata=="object"){h.deepReplaceKeyName(o.metadata,["__dot__","__spc__","__dsh__"],["."," ","-"])}}}var l=["position","duration","offset"];for(var n in l){if(o[l[n]]){o[l[n]]=Math.round(o[l[n]]*1000)/1000}}return o};h.hasFlash=function(){if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined"){return true}if(typeof e.ActiveXObject!="undefined"){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(k){}}return false};h.wrap=function(k,l){if(k.parentNode){k.parentNode.replaceChild(l,k)}l.appendChild(k)};h.getScriptPath=function(m){var k=g.getElementsByTagName("script");for(var l=0;l<k.length;l++){var n=k[l].src;if(n&&n.indexOf(m)>=0){return n.substr(0,n.indexOf(m))}}return""};c.utils.deepReplaceKeyName=function(r,m,k){switch(c.utils.typeOf(r)){case"array":for(var o=0;o<r.length;o++){r[o]=c.utils.deepReplaceKeyName(r[o],m,k)}break;case"object":for(var n in r){var q,p;if(m instanceof Array&&k instanceof Array){if(m.length!=k.length){continue}else{q=m;p=k}}else{q=[m];p=[k]}var l=n;for(var o=0;o<q.length;o++){l=l.replace(new RegExp(m[o],"g"),k[o])}r[l]=c.utils.deepReplaceKeyName(r[n],m,k);if(n!=l){delete r[n]}}break}return r}})(jwplayer);(function(i){var b="video/",g="audio/",e="image",h="mp4",f={f4a:g+h,f4b:g+h,f4v:b+h,mov:b+"quicktime",m4a:g+h,m4b:g+h,m4p:g+h,m4v:b+h,mp4:b+h,aac:g+"aac",mp3:g+"mp3",ogg:g+"ogg",oga:g+"ogg",ogv:b+"ogg",webm:b+"webm",m3u8:g+"x-mpegurl",wav:g+"x-wav"},b="video",d={flv:b,f4b:b,f4v:b,mov:b,m4a:b,m4v:b,mp4:b,aac:b,mp3:"sound",gif:e,jpeg:e,jpg:e,swf:e,png:e,rtmp:"rtmp",hls:"hls"};var a=i.extensionmap={};for(var c in f){a[c]={html5:f[c]}}for(c in d){if(!a[c]){a[c]={}}a[c].flash=d[c]}})(jwplayer.utils);(function(b){var a=b.loaderstatus={NEW:0,LOADING:1,ERROR:2,COMPLETE:3},c=document;b.scriptloader=function(e){var f=a.NEW,g=jwplayer.events,d=new g.eventdispatcher();b.extend(this,d);this.load=function(){if(f==a.NEW){f=a.LOADING;var h=c.createElement("script");h.onload=function(i){f=a.COMPLETE;d.sendEvent(g.COMPLETE)};h.onerror=function(i){f=a.ERROR;d.sendEvent(g.ERROR)};h.onreadystatechange=function(){if(h.readyState=="loaded"||h.readyState=="complete"){f=a.COMPLETE;d.sendEvent(g.COMPLETE)}};c.getElementsByTagName("head")[0].appendChild(h);h.src=e}};this.getStatus=function(){return f}}})(jwplayer.utils);(function(a){a.trim=function(b){return b.replace(/^\s*/,"").replace(/\s*$/,"")};a.pad=function(c,d,b){if(!b){b="0"}while(c.length<d){c=b+c}return c};a.seconds=function(d){d=d.replace(",",".");var b=d.split(":");var c=0;if(d.substr(-1)=="s"){c=Number(d.substr(0,d.length-1))}else{if(d.substr(-1)=="m"){c=Number(d.substr(0,d.length-1))*60}else{if(d.substr(-1)=="h"){c=Number(d.substr(0,d.length-1))*3600}else{if(b.length>1){c=Number(b[b.length-1]);c+=Number(b[b.length-2])*60;if(b.length==3){c+=Number(b[b.length-3])*3600}}else{c=Number(d)}}}}return c};a.xmlAttribute=function(b,c){for(var d=0;d<b.attributes.length;d++){if(b.attributes[d].name&&b.attributes[d].name.toLowerCase()==c.toLowerCase()){return b.attributes[d].value.toString()}}return""};a.jsonToString=function(f){var h=h||{};if(h&&h.stringify){return h.stringify(f)}var c=typeof(f);if(c!="object"||f===null){if(c=="string"){f='"'+f.replace(/"/g,'\\"')+'"'}else{return String(f)}}else{var g=[],b=(f&&f.constructor==Array);for(var d in f){var e=f[d];switch(typeof(e)){case"string":e='"'+e.replace(/"/g,'\\"')+'"';break;case"object":if(a.exists(e)){e=a.jsonToString(e)}break}if(b){if(typeof(e)!="function"){g.push(String(e))}}else{if(typeof(e)!="function"){g.push('"'+d+'":'+String(e))}}}if(b){return"["+String(g)+"]"}else{return"{"+String(g)+"}"}}};a.extension=function(b){if(!b){return""}b=b.substring(b.lastIndexOf("/")+1,b.length).split("?")[0];if(b.lastIndexOf(".")>-1){return b.substr(b.lastIndexOf(".")+1,b.length).toLowerCase()}};a.stringToColor=function(b){b=b.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(b.length==3){b=b.charAt(0)+b.charAt(0)+b.charAt(1)+b.charAt(1)+b.charAt(2)+b.charAt(2)}return parseInt(b,16)}})(jwplayer.utils);(function(a){a.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",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",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING",COMPLETED:"COMPLETED"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed"}})(jwplayer);(function(a){var b=jwplayer.utils;a.eventdispatcher=function(h,c){var e=h,g=c,f,d;this.resetEventListeners=function(){f={};d=[]};this.resetEventListeners();this.addEventListener=function(i,l,k){try{if(!b.exists(f[i])){f[i]=[]}if(b.typeOf(l)=="string"){l=(new Function("return "+l))()}f[i].push({listener:l,count:k})}catch(j){b.log("error",j)}return false};this.removeEventListener=function(j,l){if(!f[j]){return}try{for(var i=0;i<f[j].length;i++){if(f[j][i].listener.toString()==l.toString()){f[j].splice(i,1);break}}}catch(k){b.log("error",k)}return false};this.addGlobalListener=function(k,j){try{if(b.typeOf(k)=="string"){k=(new Function("return "+k))()}d.push({listener:k,count:j})}catch(i){b.log("error",i)}return false};this.removeGlobalListener=function(k){if(!k){return}try{for(var i=0;i<d.length;i++){if(d[i].listener.toString()==k.toString()){d.splice(i,1);break}}}catch(j){b.log("error",j)}return false};this.sendEvent=function(k,m){if(!b.exists(m)){m={}}b.extend(m,{id:e,version:jwplayer.version,type:k});if(g){b.log(k,m)}if(b.typeOf(f[k])!="undefined"){for(var j=0;j<f[k].length;j++){try{f[k][j].listener(m)}catch(l){b.log("There was an error while handling a listener: "+l.toString(),f[k][j].listener)}if(f[k][j]){if(f[k][j].count===1){delete f[k][j]}else{if(f[k][j].count>0){f[k][j].count=f[k][j].count-1}}}}}var i;for(i=0;i<d.length;i++){try{d[i].listener(m)}catch(l){b.log("There was an error while handling a listener: "+l.toString(),d[i].listener)}if(d[i]){if(d[i].count===1){delete d[i]}else{if(d[i].count>0){d[i].count=d[i].count-1}}}}}}})(jwplayer.events);(function(a){var c={};var b={};a.plugins=function(){};a.plugins.loadPlugins=function(e,d){b[e]=new a.plugins.pluginloader(new a.plugins.model(c),d);return b[e]};a.plugins.registerPlugin=function(h,f,e){var d=a.utils.getPluginName(h);if(c[d]){c[d].registerPlugin(h,f,e)}else{a.utils.log("A plugin ("+h+") was registered with the player that was not loaded. Please check your configuration.");for(var g in b){b[g].pluginFailed()}}}})(jwplayer);(function(a){a.plugins.model=function(b){this.addPlugin=function(c){var d=a.utils.getPluginName(c);if(!b[d]){b[d]=new a.plugins.plugin(c)}return b[d]}}})(jwplayer);(function(a){a.plugins.pluginmodes={FLASH:"FLASH",JAVASCRIPT:"JAVASCRIPT",HYBRID:"HYBRID"};a.plugins.plugin=function(b){var d="http://plugins.longtailvideo.com";var i=a.utils.loaderstatus.NEW;var j;var h;var k;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function e(){switch(a.utils.getPluginPathType(b)){case a.utils.pluginPathType.ABSOLUTE:return b;case a.utils.pluginPathType.RELATIVE:return a.utils.getAbsolutePath(b,window.location.href);case a.utils.pluginPathType.CDN:var n=a.utils.getPluginName(b);var m=a.utils.getPluginVersion(b);var l=(window.location.href.indexOf("https://")==0)?d.replace("http://","https://secure"):d;return l+"/"+a.version.split(".")[0]+"/"+n+"/"+n+(m!==""?("-"+m):"")+".js"}}function g(l){k=setTimeout(function(){i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)},1000)}function f(l){i=a.utils.loaderstatus.ERROR;c.sendEvent(a.events.ERROR)}this.load=function(){if(i==a.utils.loaderstatus.NEW){if(b.lastIndexOf(".swf")>0){j=b;i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);return}i=a.utils.loaderstatus.LOADING;var l=new a.utils.scriptloader(e());l.addEventListener(a.events.COMPLETE,g);l.addEventListener(a.events.ERROR,f);l.load()}};this.registerPlugin=function(n,m,l){if(k){clearTimeout(k);k=undefined}if(m&&l){j=l;h=m}else{if(typeof m=="string"){j=m}else{if(typeof m=="function"){h=m}else{if(!m&&!l){j=n}}}}i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)};this.getStatus=function(){return i};this.getPluginName=function(){return a.utils.getPluginName(b)};this.getFlashPath=function(){if(j){switch(a.utils.getPluginPathType(j)){case a.utils.pluginPathType.ABSOLUTE:return j;case a.utils.pluginPathType.RELATIVE:if(b.lastIndexOf(".swf")>0){return a.utils.getAbsolutePath(j,window.location.href)}return a.utils.getAbsolutePath(j,e());case a.utils.pluginPathType.CDN:if(j.indexOf("-")>-1){return j+"h"}return j+"-h"}}return null};this.getJS=function(){return h};this.getPluginmode=function(){if(typeof j!="undefined"&&typeof h!="undefined"){return a.plugins.pluginmodes.HYBRID}else{if(typeof j!="undefined"){return a.plugins.pluginmodes.FLASH}else{if(typeof h!="undefined"){return a.plugins.pluginmodes.JAVASCRIPT}}}};this.getNewInstance=function(m,l,n){return new h(m,l,n)};this.getURL=function(){return b}}})(jwplayer);(function(a){a.plugins.pluginloader=function(h,e){var g={};var j=a.utils.loaderstatus.NEW;var d=false;var b=false;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function f(){if(!b){b=true;j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)}}function i(){if(!b){var l=0;for(plugin in g){var k=g[plugin].getStatus();if(k==a.utils.loaderstatus.LOADING||k==a.utils.loaderstatus.NEW){l++}}if(l==0){f()}}}this.setupPlugins=function(m,k,r){var l={length:0,plugins:{}};var o={length:0,plugins:{}};for(var n in g){var p=g[n].getPluginName();if(g[n].getFlashPath()){l.plugins[g[n].getFlashPath()]=k.plugins[n];l.plugins[g[n].getFlashPath()].pluginmode=g[n].getPluginmode();l.length++}if(g[n].getJS()){var q=document.createElement("div");q.id=m.id+"_"+p;q.style.position="absolute";q.style.zIndex=o.length+10;o.plugins[p]=g[n].getNewInstance(m,k.plugins[n],q);o.length++;if(typeof o.plugins[p].resize!="undefined"){m.onReady(r(o.plugins[p],q,true));m.onResize(r(o.plugins[p],q))}}}m.plugins=o.plugins;return l};this.load=function(){j=a.utils.loaderstatus.LOADING;d=true;for(var k in e){if(a.utils.exists(k)){g[k]=h.addPlugin(k);g[k].addEventListener(a.events.COMPLETE,i);g[k].addEventListener(a.events.ERROR,i)}}for(k in g){g[k].load()}d=false;i()};this.pluginFailed=function(){f()};this.getStatus=function(){return j}}})(jwplayer);(function(a){a.playlist=function(c){var d=[];if(a.utils.typeOf(c)=="array"){for(var b=0;b<c.length;b++){d.push(new a.playlist.item(c[b]))}}else{d.push(new a.playlist.item(c))}return d}})(jwplayer);(function(a){a.item=function(c){var d={description:"",image:"",mediaid:"",title:"",duration:-1,sources:[]};var b=jwplayer.utils.extend({},d,c);if(b.sources.length==0){b.sources[0]=new a.source(b)}return b}})(jwplayer.playlist);(function(a){a.source=function(c){var b={file:"",width:0,label:undefined,type:undefined};for(var d in b){if(jwplayer.utils.exists(c[d])){b[d]=c[d]}}return b}})(jwplayer.playlist);(function(a){var b=a.utils,c=a.events;var d=a.embed=function(h){var g=new d.config(h.config);g.id=h.id;var i=a.plugins.loadPlugins(h.id,g.plugins);function e(l,k){for(var j in k){if(typeof l[j]=="function"){(l[j]).call(l,k[j])}}}function f(){var k=document.getElementById(h.id);if(i.getStatus()==b.loaderstatus.COMPLETE){for(var m=0;m<g.modes.length;m++){if(g.modes[m].type&&d[g.modes[m].type]){var n=g.modes[m].config;var j=b.extend({},n?d.config.addConfig(g,n):g);var l=new d[g.modes[m].type](k,g.modes[m],j,i,h);if(l.supportsConfig()){l.embed();e(h,g.events);return h}}}if(g.fallback){b.log("No suitable players found and fallback enabled");new d.download(k,g)}else{b.log("No suitable players found and fallback disabled")}}}i.addEventListener(c.COMPLETE,f);i.addEventListener(c.ERROR,f);i.load();return h}})(jwplayer);(function(c){var a=c.utils,g=c.embed,e=undefined;var b=g.config=function(i){function l(p,o,n){for(var m=0;m<p.length;m++){var q=p[m].type;p[m].src=n[q]?n[q]:o+"jwplayer."+q+(q=="flash"?".swf":".js")}}var k={fallback:true,height:300,primary:"html5",width:400,base:e},h={html5:{type:"html5"},flash:{type:"flash"}},j=a.extend(k,i);if(!j.base){j.base=a.getScriptPath("jwplayer.js")}if(!j.modes){j.modes=(j.primary=="flash")?[h.flash,h.html5]:[h.html5,h.flash]}l(j.modes,j.base,{html5:j.html5player,flash:j.flashplayer});d(j);return j};b.addConfig=function(h,i){d(i);return a.extend(h,i)};function d(i){if(!i.playlist){var j={};f(i,j,"sources");f(i,j,"image");if(!i.sources){if(i.levels){j.sources=i.levels;delete i.levels}else{var h={};f(i,h,"file");f(i,h,"type");j.sources=[h]}}i.playlist=[j]}}function f(j,h,i){if(a.exists(j[i])){h[i]=j[i];delete j[i]}}})(jwplayer);(function(c){var h=c.embed,e=c.utils,d="pointer",a="none",f="block",g="100%",b="absolute";h.download=function(j,u){var m=e.extend({},u),q,k=m.width?m.width:480,n=m.height?m.height:320,v,o,i=u.logo?u.logo:{prefix:"http://l.longtailvideo.com/download/",file:"logo.png",margin:10};function t(){if(m.playlist&&m.playlist.length){try{v=m.playlist[0].sources[0].file;o=m.playlist[0].image}catch(w){return}}else{return}if(i.prefix){i.prefix+=c.version.split(/\W/).splice(0,2).join("/")+"/"}p();l()}function p(){if(j){q=r("a","display",j);r("div","iconbackground",q);r("div","icon",q);r("div","logo",q);if(v){q.setAttribute("href",e.getAbsolutePath(v))}}}function s(w,y){var z=document.querySelectorAll(w);for(var x=0;x<z.length;x++){for(var A in y){z[x].style[A]=y[A]}}}function l(){var w="#"+j.id+" .jwdownload";s(w+"display",{width:utils.styleDimension(k),height:utils.styleDimension(n),background:"black center no-repeat "+(o?"url("+o+")":""),backgroundSize:"contain",position:b,border:a,display:f});s(w+"display div",{position:b,width:g,height:g});s(w+"logo",{bottom:i.margin+"px",left:i.margin+"px",background:"bottom left no-repeat url("+i.prefix+i.file+")"});s(w+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg==)"});s(w+"iconbackground",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC)"})}function r(w,z,y){var x=document.createElement(w);x.className="jwdownload"+z;if(y){y.appendChild(x)}return x}t()}})(jwplayer);(function(b){var a=b.utils;b.embed.flash=function(h,i,m,g,k){function n(p,o,q){var r=document.createElement("param");r.setAttribute("name",o);r.setAttribute("value",q);p.appendChild(r)}function l(p,q,o){return function(r){if(o){document.getElementById(k.id+"_wrapper").appendChild(q)}var s=document.getElementById(k.id).getPluginConfig("display");p.resize(s.width,s.height);q.style.left=s.x;q.style.top=s.h}}function f(q){if(!q){return{}}var s={};for(var p in q){var o=q[p];for(var r in o){s[p+"."+r]=o[r]}}return s}function j(r,q){if(r[q]){var t=r[q];for(var p in t){var o=t[p];if(typeof o=="string"){if(!r[p]){r[p]=o}}else{for(var s in o){if(!r[p+"."+s]){r[p+"."+s]=o[s]}}}}delete r[q]}}function d(r){if(!r){return{}}var u={},t=[];for(var o in r){var q=a.getPluginName(o);var p=r[o];t.push(o);for(var s in p){u[q+"."+s]=p[s]}}u.plugins=t.join(",");return u}function e(q){var o="";for(var p in q){if(typeof(q[p])=="object"){o+=p+"="+encodeURIComponent("[[JSON]]"+a.jsonToString(q[p]))+"&"}else{o+=p+"="+encodeURIComponent(q[p])+"&"}}return o.substring(0,o.length-1)}this.embed=function(){m.id=k.id;var A;var s=a.extend({},m);if(h.id+"_wrapper"==h.parentNode.id){A=document.getElementById(h.id+"_wrapper")}else{A=document.createElement("div");A.id=h.id+"_wrapper";A.style.position="relative";A.style.width=a.styleDimension(s.width);A.style.height=a.styleDimension(s.height);a.wrap(h,A)}var o=g.setupPlugins(k,s,l);if(o.length>0){a.extend(s,d(o.plugins))}else{delete s.plugins}var t=["height","width","modes","events","primary","base","fallback"];for(var w=0;w<t.length;w++){delete s[t[w]]}var q="opaque";if(s.wmode){q=s.wmode}j(s,"components");j(s,"providers");if(typeof s["dock.position"]!="undefined"){if(s["dock.position"].toString().toLowerCase()=="false"){s.dock=s["dock.position"];delete s["dock.position"]}}var y=a.getCookies();for(var p in y){if(typeof(s[p])=="undefined"){s[p]=y[p]}}var z="#000000",v,r=e(s);if(a.isIE()){var x='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="'+z+'" width="100%" height="100%" id="'+h.id+'" name="'+h.id+'" tabindex=0"">';x+='<param name="movie" value="'+i.src+'">';x+='<param name="allowfullscreen" value="true">';x+='<param name="allowscriptaccess" value="always">';x+='<param name="seamlesstabbing" value="true">';x+='<param name="wmode" value="'+q+'">';x+='<param name="flashvars" value="'+r+'">';x+="</object>";a.setOuterHTML(h,x);v=document.getElementById(h.id)}else{var u=document.createElement("object");u.setAttribute("type","application/x-shockwave-flash");u.setAttribute("data",i.src);u.setAttribute("width","100%");u.setAttribute("height","100%");u.setAttribute("bgcolor","#000000");u.setAttribute("id",h.id);u.setAttribute("name",h.id);u.setAttribute("tabindex",0);n(u,"allowfullscreen","true");n(u,"allowscriptaccess","always");n(u,"seamlesstabbing","true");n(u,"wmode",q);n(u,"flashvars",r);h.parentNode.replaceChild(u,h);v=u}k.container=v;k.setPlayer(v,"flash")};this.supportsConfig=function(){if(a.hasFlash()){if(m){try{var q=m.playlist[0],o=q.sources;if(typeof o=="undefined"){return true}else{for(var p=0;p<o.length;p++){if(o[p].file&&c(o[p].file,q.type)){return true}}}}catch(r){return false}}else{return true}}return false};function c(p,q){var o=["mp4","flv","aac","mp3","hls","rtmp","youtube"];if(q&&(o.toString().indexOf(q)<0)){return true}var r=a.extension(p);if(!q){q=r}if(!r){return true}if(a.exists(a.extensionmap[r])){return a.exists(a.extensionmap[r].flash)}return false}}})(jwplayer);(function(c){var a=c.utils,b=a.extensionmap;c.embed.html5=function(e,k,d,f,i){function h(m,n,l){return function(o){var p=document.getElementById(e.id+"_displayarea");if(l){p.appendChild(n)}m.resize(p.clientWidth,p.clientHeight);n.left=p.style.left;n.top=p.style.top}}this.embed=function(){if(c.html5){f.setupPlugins(i,d,h);e.innerHTML="";var l=c.utils.extend({},d);if(l.skin&&l.skin.toLowerCase().indexOf(".zip")>0){l.skin=l.skin.replace(/\.zip/i,".xml")}var m=new c.html5.player(l);i.container=document.getElementById(i.id);i.setPlayer(m,"html5")}else{var n=new a.scriptloader(k.src);n.addEventListener(c.events.COMPLETE,this.embed);n.load()}};this.supportsConfig=function(){if(!!c.vid.canPlayType){try{if(a.typeOf(d.playlist)=="string"){return true}else{var l=d.playlist[0].sources;for(var n=0;n<l.length;n++){var m=l[n].file,o=l[n].type;if(j(m,o)){return true}}}}catch(p){return false}}return false};function j(l,m){if(navigator.userAgent.match(/BlackBerry/i)!==null){return false}var n=a.extension(l);m=m?m:n;if((!m)||!b[m]){return false}return g(b[m].html5)}function g(l){var m=c.vid;if(!l){return true}if(m.canPlayType(l)){return true}else{if(l=="audio/mp3"&&navigator.userAgent.match(/safari/i)){return m.canPlayType("audio/mpeg")}else{return false}}}}})(jwplayer);(function(d){var c=[],a=d.utils,e=d.events,b=e.state;var f=d.api=function(h){this.container=h;this.id=h.id;var p={};var v={};var r={};var g=[];var k=undefined;var n=false;var l=[];var t=undefined;var u={};var m={};this.getBuffer=function(){return this.callInternal("jwGetBuffer")};this.getContainer=function(){return this.container};function i(x,w){return function(C,y,z,A){if(x.renderingMode=="flash"||x.renderingMode=="html5"){var B;if(y){m[C]=y;B="jwplayer('"+x.id+"').callback('"+C+"')"}else{if(!y&&m[C]){delete m[C]}}k.jwDockSetButton(C,B,z,A)}return w}}this.getPlugin=function(w){var y=this;var x={};if(w=="dock"){return a.extend(x,{setButton:i(y,x),show:function(){y.callInternal("jwDockShow");return x},hide:function(){y.callInternal("jwDockHide");return x},onShow:function(z){y.componentListener("dock",e.JWPLAYER_COMPONENT_SHOW,z);return x},onHide:function(z){y.componentListener("dock",e.JWPLAYER_COMPONENT_HIDE,z);return x}})}else{if(w=="controlbar"){return a.extend(x,{show:function(){y.callInternal("jwControlbarShow");return x},hide:function(){y.callInternal("jwControlbarHide");return x},onShow:function(z){y.componentListener("controlbar",e.JWPLAYER_COMPONENT_SHOW,z);return x},onHide:function(z){y.componentListener("controlbar",e.JWPLAYER_COMPONENT_HIDE,z);return x}})}else{if(w=="display"){return a.extend(x,{show:function(){y.callInternal("jwDisplayShow");return x},hide:function(){y.callInternal("jwDisplayHide");return x},onShow:function(z){y.componentListener("display",e.JWPLAYER_COMPONENT_SHOW,z);return x},onHide:function(z){y.componentListener("display",e.JWPLAYER_COMPONENT_HIDE,z);return x}})}else{return this.plugins[w]}}}};this.callback=function(w){if(m[w]){return m[w]()}};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 x=this.callInternal("jwGetPlaylist");if(this.renderingMode=="flash"){a.deepReplaceKeyName(x,["__dot__","__spc__","__dsh__"],["."," ","-"])}for(var w=0;w<x.length;w++){if(!a.exists(x[w].index)){x[w].index=w}}return x};this.getPlaylistItem=function(w){if(!a.exists(w)){w=this.getCurrentItem()}return this.getPlaylist()[w]};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(w){if(!a.exists(w)){this.callInternal("jwSetFullscreen",!this.callInternal("jwGetFullscreen"))}else{this.callInternal("jwSetFullscreen",w)}return this};this.setMute=function(w){if(!a.exists(w)){this.callInternal("jwSetMute",!this.callInternal("jwGetMute"))}else{this.callInternal("jwSetMute",w)}return this};this.lock=function(){return this};this.unlock=function(){return this};this.load=function(w){this.callInternal("jwLoad",w);return this};this.playlistItem=function(w){this.callInternal("jwPlaylistItem",w);return this};this.playlistPrev=function(){this.callInternal("jwPlaylistPrev");return this};this.playlistNext=function(){this.callInternal("jwPlaylistNext");return this};this.resize=function(x,w){if(this.renderingMode=="html5"){k.jwResize(x,w)}else{var y=document.getElementById(this.id+"_wrapper");if(y){y.style.width=a.styleDimension(x);y.style.height=a.styleDimension(w)}}return this};this.play=function(w){if(typeof w=="undefined"){w=this.getState();if(w==b.PLAYING||w==b.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPlay",w)}return this};this.pause=function(w){if(typeof w=="undefined"){w=this.getState();if(w==b.PLAYING||w==b.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPause",w)}return this};this.stop=function(){this.callInternal("jwStop");return this};this.seek=function(w){this.callInternal("jwSeek",w);return this};this.setVolume=function(w){this.callInternal("jwSetVolume",w);return this};this.loadInstream=function(x,w){t=new f.instream(this,k,x,w);return t};this.onBufferChange=function(w){return this.eventListener(e.JWPLAYER_MEDIA_BUFFER,w)};this.onBufferFull=function(w){return this.eventListener(e.JWPLAYER_MEDIA_BUFFER_FULL,w)};this.onError=function(w){return this.eventListener(e.JWPLAYER_ERROR,w)};this.onFullscreen=function(w){return this.eventListener(e.JWPLAYER_FULLSCREEN,w)};this.onMeta=function(w){return this.eventListener(e.JWPLAYER_MEDIA_META,w)};this.onMute=function(w){return this.eventListener(e.JWPLAYER_MEDIA_MUTE,w)};this.onPlaylist=function(w){return this.eventListener(e.JWPLAYER_PLAYLIST_LOADED,w)};this.onPlaylistItem=function(w){return this.eventListener(e.JWPLAYER_PLAYLIST_ITEM,w)};this.onReady=function(w){return this.eventListener(e.API_READY,w)};this.onResize=function(w){return this.eventListener(e.JWPLAYER_RESIZE,w)};this.onComplete=function(w){return this.eventListener(e.JWPLAYER_MEDIA_COMPLETE,w)};this.onSeek=function(w){return this.eventListener(e.JWPLAYER_MEDIA_SEEK,w)};this.onTime=function(w){return this.eventListener(e.JWPLAYER_MEDIA_TIME,w)};this.onVolume=function(w){return this.eventListener(e.JWPLAYER_MEDIA_VOLUME,w)};this.onBeforePlay=function(w){return this.eventListener(e.JWPLAYER_MEDIA_BEFOREPLAY,w)};this.onBeforeComplete=function(w){return this.eventListener(e.JWPLAYER_MEDIA_BEFORECOMPLETE,w)};this.onBuffer=function(w){return this.stateListener(b.BUFFERING,w)};this.onPause=function(w){return this.stateListener(b.PAUSED,w)};this.onPlay=function(w){return this.stateListener(b.PLAYING,w)};this.onIdle=function(w){return this.stateListener(b.IDLE,w)};this.remove=function(){if(!n){throw"Cannot call remove() before player is ready";return}s(this)};function s(w){l=[];f.destroyPlayer(w.id)}this.setup=function(w){if(d.embed){s(this);var x=d(this.id);x.config=w;return new d.embed(x)}return this};this.registerPlugin=function(y,x,w){d.plugins.registerPlugin(y,x,w)};this.setPlayer=function(w,x){k=w;this.renderingMode=x};this.stateListener=function(w,x){if(!v[w]){v[w]=[];this.eventListener(e.JWPLAYER_PLAYER_STATE,j(w))}v[w].push(x);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 j(w){return function(y){var x=y.newstate,A=y.oldstate;if(x==w){var z=v[x];if(z){for(var B=0;B<z.length;B++){if(typeof z[B]=="function"){z[B].call(this,{oldstate:A,newstate:x})}}}}}}this.componentListener=function(w,x,y){if(!r[w]){r[w]={}}if(!r[w][x]){r[w][x]=[];this.eventListener(x,o(w,x))}r[w][x].push(y);return this};function o(w,x){return function(z){if(w==z.component){var y=r[w][x];if(y){for(var A=0;A<y.length;A++){if(typeof y[A]=="function"){y[A].call(this,z)}}}}}}this.addInternalListener=function(w,x){try{w.jwAddEventListener(x,'function(dat) { jwplayer("'+this.id+'").dispatchEvent("'+x+'", dat); }')}catch(y){a.log("Could not add internal listener")}};this.eventListener=function(w,x){if(!p[w]){p[w]=[];if(k&&n){this.addInternalListener(k,w)}}p[w].push(x);return this};this.dispatchEvent=function(y){if(p[y]){var x=a.translateEventResponse(y,arguments[1]);for(var w=0;w<p[y].length;w++){if(typeof p[y][w]=="function"){p[y][w].call(this,x)}}}};this.dispatchInstreamEvent=function(w){if(t){t.dispatchEvent(w,arguments)}};this.callInternal=function(){if(n){var y=arguments[0],w=[];for(var x=1;x<arguments.length;x++){w.push(arguments[x])}if(typeof k!="undefined"&&typeof k[y]=="function"){if(w.length==2){return(k[y])(w[0],w[1])}else{if(w.length==1){return(k[y])(w[0])}else{return(k[y])()}}}return null}else{l.push(arguments)}};this.playerReady=function(x){n=true;if(!k){this.setPlayer(document.getElementById(x.id))}this.container=document.getElementById(this.id);for(var w in p){this.addInternalListener(k,w)}this.eventListener(e.JWPLAYER_PLAYLIST_ITEM,function(y){u={}});this.eventListener(e.JWPLAYER_MEDIA_META,function(y){a.extend(u,y.metadata)});this.dispatchEvent(e.API_READY);while(l.length>0){this.callInternal.apply(this,l.shift())}};this.getItemMeta=function(){return u};this.getCurrentItem=function(){return this.callInternal("jwGetPlaylistIndex")};function q(y,A,z){var w=[];if(!A){A=0}if(!z){z=y.length-1}for(var x=A;x<=z;x++){w.push(y[x])}return w}return this};f.selectPlayer=function(h){var g;if(!a.exists(h)){h=0}if(h.nodeType){g=h}else{if(typeof h=="string"){g=document.getElementById(h)}}if(g){var i=f.playerById(g.id);if(i){return i}else{return f.addPlayer(new f(g))}}else{if(typeof h=="number"){return c[h]}}return null};f.playerById=function(h){for(var g=0;g<c.length;g++){if(c[g].id==h){return c[g]}}return null};f.addPlayer=function(g){for(var h=0;h<c.length;h++){if(c[h]==g){return g}}c.push(g);return g};f.destroyPlayer=function(i){var h=-1;for(var k=0;k<c.length;k++){if(c[k].id==i){h=k;continue}}if(h>=0){var l=c[h].id,g=document.getElementById(l+"_wrapper");if(!g){g=document.getElementById(l)}if(g){var j=document.createElement("div");j.id=l;g.parentNode.replaceChild(j,g)}c.splice(h,1)}return null}})(jwplayer);var _userPlayerReady=(typeof playerReady=="function")?playerReady:undefined;playerReady=function(b){var a=jwplayer.api.playerById(b.id);if(a){a.playerReady(b)}else{jwplayer.api.selectPlayer(b.id).playerReady(b)}if(_userPlayerReady){_userPlayerReady.call(this,b)}};(function(b){var c=b.events,a=c.state;b.api.instream=function(e,k,o,r){var j=e,d=k,i=o,l=r,g={},q={};function h(){j.callInternal("jwLoadInstream",o,r)}function n(s,t){d.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+j.id+'").dispatchInstreamEvent("'+t+'", dat); }')}function f(s,t){if(!g[s]){g[s]=[];n(d,s)}g[s].push(t);return this}function p(s,t){if(!q[s]){q[s]=[];f(c.JWPLAYER_PLAYER_STATE,m(s))}q[s].push(t);return this}function m(s){return function(u){var t=u.newstate,w=u.oldstate;if(t==s){var v=q[t];if(v){for(var x=0;x<v.length;x++){if(typeof v[x]=="function"){v[x].call(this,{oldstate:w,newstate:t,type:u.type})}}}}}}this.dispatchEvent=function(v,u){if(g[v]){var t=_utils.translateEventResponse(v,u[1]);for(var s=0;s<g[v].length;s++){if(typeof g[v][s]=="function"){g[v][s].call(this,t)}}}};this.onError=function(s){return f(c.JWPLAYER_ERROR,s)};this.onFullscreen=function(s){return f(c.JWPLAYER_FULLSCREEN,s)};this.onMeta=function(s){return f(c.JWPLAYER_MEDIA_META,s)};this.onMute=function(s){return f(c.JWPLAYER_MEDIA_MUTE,s)};this.onComplete=function(s){return f(c.JWPLAYER_MEDIA_COMPLETE,s)};this.onSeek=function(s){return f(c.JWPLAYER_MEDIA_SEEK,s)};this.onTime=function(s){return f(c.JWPLAYER_MEDIA_TIME,s)};this.onVolume=function(s){return f(c.JWPLAYER_MEDIA_VOLUME,s)};this.onBuffer=function(s){return p(a.BUFFERING,s)};this.onPause=function(s){return p(a.PAUSED,s)};this.onPlay=function(s){return p(a.PLAYING,s)};this.onIdle=function(s){return p(a.IDLE,s)};this.onInstreamClick=function(s){return f(c.JWPLAYER_INSTREAM_CLICK,s)};this.onInstreamDestroyed=function(s){return f(c.JWPLAYER_INSTREAM_DESTROYED,s)};this.play=function(s){d.jwInstreamPlay(s)};this.pause=function(s){d.jwInstreamPause(s)};this.seek=function(s){d.jwInstreamSeek(s)};this.destroy=function(){d.jwInstreamDestroy()};this.getState=function(){return d.jwInstreamGetState()};this.getDuration=function(){return d.jwInstreamGetDuration()};this.getPosition=function(){return d.jwInstreamGetPosition()};h()}})(jwplayer)};1 if(typeof jwplayer=="undefined"){jwplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a)}};var $jw=jwplayer;jwplayer.version="6.0.2198";jwplayer.vid=document.createElement("video");jwplayer.audio=document.createElement("audio");jwplayer.source=document.createElement("source");(function(c){var g=document,e=window;var h=c.utils=function(){};h.exists=function(k){switch(typeof(k)){case"string":return(k.length>0);break;case"object":return(k!==null);case"undefined":return false}return true};h.styleDimension=function(k){return k+(k.toString().indexOf("%")>0?"":"px")};h.getAbsolutePath=function(q,p){if(!h.exists(p)){p=g.location.href}if(!h.exists(q)){return undefined}if(a(q)){return q}var r=p.substring(0,p.indexOf("://")+3);var o=p.substring(r.length,p.indexOf("/",r.length+1));var l;if(q.indexOf("/")===0){l=q.split("/")}else{var m=p.split("?")[0];m=m.substring(r.length+o.length+1,m.lastIndexOf("/"));l=m.split("/").concat(q.split("/"))}var k=[];for(var n=0;n<l.length;n++){if(!l[n]||!h.exists(l[n])||l[n]=="."){continue}else{if(l[n]==".."){k.pop()}else{k.push(l[n])}}}return r+o+"/"+k.join("/")};function a(l){if(!h.exists(l)){return}var m=l.indexOf("://");var k=l.indexOf("?");return(m>0&&(k<0||(k>m)))}h.extend=function(){var k=h.extend["arguments"];if(k.length>1){for(var m=1;m<k.length;m++){for(var l in k[m]){k[0][l]=k[m][l]}}return k[0]}return null};h.parseDimension=function(k){if(typeof k=="string"){if(k===""){return 0}else{if(k.lastIndexOf("%")>-1){return k}else{return parseInt(k.replace("px",""),10)}}}return k};h.timeFormat=function(k){if(k>0){var l=Math.floor(k/60)<10?"0"+Math.floor(k/60)+":":Math.floor(k/60)+":";l+=Math.floor(k%60)<10?"0"+Math.floor(k%60):Math.floor(k%60);return l}else{return"00:00"}};h.log=function(l,k){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(k){console.log(l,k)}else{console.log(l)}}};h.getBoundingClientRect=function(k){if(typeof k.getBoundingClientRect=="function"){return k.getBoundingClientRect()}else{return{left:k.offsetLeft+g.body.scrollLeft,top:k.offsetTop+g.body.scrollTop,width:k.offsetWidth,height:k.offsetHeight}}};var d=h.userAgentMatch=function(l){var k=navigator.userAgent.toLowerCase();return(k.match(l)!==null)};h.isIE=function(){return d(/msie/i)};h.isMobile=function(){return d(/(iP(hone|ad|od))|android/i)};h.isIOS=function(){return d(/iP(hone|ad|od)/i)};h.isIPod=function(){return d(/iP(hone|od)/i)};h.isIPad=function(){return d(/iPad/i)};h.saveCookie=function(k,l){g.cookie="jwplayer."+k+"="+l+"; path=/"};h.getCookies=function(){var n={};var m=g.cookie.split("; ");for(var l=0;l<m.length;l++){var k=m[l].split("=");if(k[0].indexOf("jwplayer.")==0){n[k[0].substring(9,k[0].length)]=k[1]}}return n};h.ajax=function(o,n,k){var m;if(b(o)&&h.exists(e.XDomainRequest)){m=new XDomainRequest();m.onload=j(m,o,n,k);m.onerror=i(k,o,m)}else{if(h.exists(e.XMLHttpRequest)){m=new XMLHttpRequest();m.onreadystatechange=f(m,o,n,k);m.onerror=i(k,o)}else{if(k){k()}}}try{m.open("GET",o,true);m.send(null)}catch(l){if(k){k(o)}}return m};function b(k){if(k&&k.indexOf("://")>=0){if(k.split("/")[2]!=e.location.href.split("/")[2]){return true}}return false}function i(k,m,l){return function(){k(m)}}function f(l,n,m,k){return function(){if(l.readyState===4){if(l.status==200){j(l,n,m,k)()}else{if(k){k(n)}}}}}function j(l,n,m,k){return function(){if(!h.exists(l.responseXML)){try{var o;if(e.DOMParser){o=(new DOMParser()).parseFromString(l.responseText,"text/xml")}else{o=new ActiveXObject("Microsoft.XMLDOM");o.async="false";o.loadXML(l.responseText)}if(o){l=h.extend({},l,{responseXML:o})}}catch(p){if(k){k(n)}return}}m(l)}}h.typeOf=function(l){var k=typeof l;if(k==="object"){if(!l){return"null"}return(l instanceof Array)?"array":k}else{return k}};h.translateEventResponse=function(m,k){var o=h.extend({},k);if(m==c.events.JWPLAYER_FULLSCREEN&&!o.fullscreen){o.fullscreen=o.message=="true"?true:false;delete o.message}else{if(typeof o.data=="object"){o=h.extend(o,o.data);delete o.data}else{if(typeof o.metadata=="object"){h.deepReplaceKeyName(o.metadata,["__dot__","__spc__","__dsh__"],["."," ","-"])}}}var l=["position","duration","offset"];for(var n in l){if(o[l[n]]){o[l[n]]=Math.round(o[l[n]]*1000)/1000}}return o};h.hasFlash=function(){if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined"){return true}if(typeof e.ActiveXObject!="undefined"){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(k){}}return false};h.wrap=function(k,l){if(k.parentNode){k.parentNode.replaceChild(l,k)}l.appendChild(k)};h.getScriptPath=function(m){var k=g.getElementsByTagName("script");for(var l=0;l<k.length;l++){var n=k[l].src;if(n&&n.indexOf(m)>=0){return n.substr(0,n.indexOf(m))}}return""};c.utils.deepReplaceKeyName=function(r,m,k){switch(c.utils.typeOf(r)){case"array":for(var o=0;o<r.length;o++){r[o]=c.utils.deepReplaceKeyName(r[o],m,k)}break;case"object":for(var n in r){var q,p;if(m instanceof Array&&k instanceof Array){if(m.length!=k.length){continue}else{q=m;p=k}}else{q=[m];p=[k]}var l=n;for(var o=0;o<q.length;o++){l=l.replace(new RegExp(m[o],"g"),k[o])}r[l]=c.utils.deepReplaceKeyName(r[n],m,k);if(n!=l){delete r[n]}}break}return r}})(jwplayer);(function(i){var b="video/",g="audio/",e="image",h="mp4",f={f4a:g+h,f4b:g+h,f4v:b+h,mov:b+"quicktime",m4a:g+h,m4b:g+h,m4p:g+h,m4v:b+h,mp4:b+h,aac:g+"aac",mp3:g+"mp3",ogg:g+"ogg",oga:g+"ogg",ogv:b+"ogg",webm:b+"webm",m3u8:g+"x-mpegurl",wav:g+"x-wav"},b="video",d={flv:b,f4b:b,f4v:b,mov:b,m4a:b,m4v:b,mp4:b,aac:b,mp3:"sound",gif:e,jpeg:e,jpg:e,swf:e,png:e,rtmp:"rtmp",hls:"hls"};var a=i.extensionmap={};for(var c in f){a[c]={html5:f[c]}}for(c in d){if(!a[c]){a[c]={}}a[c].flash=d[c]}})(jwplayer.utils);(function(b){var a=b.loaderstatus={NEW:0,LOADING:1,ERROR:2,COMPLETE:3},c=document;b.scriptloader=function(e){var f=a.NEW,g=jwplayer.events,d=new g.eventdispatcher();b.extend(this,d);this.load=function(){if(f==a.NEW){f=a.LOADING;var h=c.createElement("script");h.onload=function(i){f=a.COMPLETE;d.sendEvent(g.COMPLETE)};h.onerror=function(i){f=a.ERROR;d.sendEvent(g.ERROR)};h.onreadystatechange=function(){if(h.readyState=="loaded"||h.readyState=="complete"){f=a.COMPLETE;d.sendEvent(g.COMPLETE)}};c.getElementsByTagName("head")[0].appendChild(h);h.src=e}};this.getStatus=function(){return f}}})(jwplayer.utils);(function(a){a.trim=function(b){return b.replace(/^\s*/,"").replace(/\s*$/,"")};a.pad=function(c,d,b){if(!b){b="0"}while(c.length<d){c=b+c}return c};a.seconds=function(d){d=d.replace(",",".");var b=d.split(":");var c=0;if(d.substr(-1)=="s"){c=Number(d.substr(0,d.length-1))}else{if(d.substr(-1)=="m"){c=Number(d.substr(0,d.length-1))*60}else{if(d.substr(-1)=="h"){c=Number(d.substr(0,d.length-1))*3600}else{if(b.length>1){c=Number(b[b.length-1]);c+=Number(b[b.length-2])*60;if(b.length==3){c+=Number(b[b.length-3])*3600}}else{c=Number(d)}}}}return c};a.xmlAttribute=function(b,c){for(var d=0;d<b.attributes.length;d++){if(b.attributes[d].name&&b.attributes[d].name.toLowerCase()==c.toLowerCase()){return b.attributes[d].value.toString()}}return""};a.jsonToString=function(f){var h=h||{};if(h&&h.stringify){return h.stringify(f)}var c=typeof(f);if(c!="object"||f===null){if(c=="string"){f='"'+f.replace(/"/g,'\\"')+'"'}else{return String(f)}}else{var g=[],b=(f&&f.constructor==Array);for(var d in f){var e=f[d];switch(typeof(e)){case"string":e='"'+e.replace(/"/g,'\\"')+'"';break;case"object":if(a.exists(e)){e=a.jsonToString(e)}break}if(b){if(typeof(e)!="function"){g.push(String(e))}}else{if(typeof(e)!="function"){g.push('"'+d+'":'+String(e))}}}if(b){return"["+String(g)+"]"}else{return"{"+String(g)+"}"}}};a.extension=function(b){if(!b){return""}b=b.substring(b.lastIndexOf("/")+1,b.length).split("?")[0];if(b.lastIndexOf(".")>-1){return b.substr(b.lastIndexOf(".")+1,b.length).toLowerCase()}};a.stringToColor=function(b){b=b.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(b.length==3){b=b.charAt(0)+b.charAt(0)+b.charAt(1)+b.charAt(1)+b.charAt(2)+b.charAt(2)}return parseInt(b,16)}})(jwplayer.utils);(function(a){a.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",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",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING",COMPLETED:"COMPLETED"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed"}})(jwplayer);(function(a){var b=jwplayer.utils;a.eventdispatcher=function(h,c){var e=h,g=c,f,d;this.resetEventListeners=function(){f={};d=[]};this.resetEventListeners();this.addEventListener=function(i,l,k){try{if(!b.exists(f[i])){f[i]=[]}if(b.typeOf(l)=="string"){l=(new Function("return "+l))()}f[i].push({listener:l,count:k})}catch(j){b.log("error",j)}return false};this.removeEventListener=function(j,l){if(!f[j]){return}try{for(var i=0;i<f[j].length;i++){if(f[j][i].listener.toString()==l.toString()){f[j].splice(i,1);break}}}catch(k){b.log("error",k)}return false};this.addGlobalListener=function(k,j){try{if(b.typeOf(k)=="string"){k=(new Function("return "+k))()}d.push({listener:k,count:j})}catch(i){b.log("error",i)}return false};this.removeGlobalListener=function(k){if(!k){return}try{for(var i=0;i<d.length;i++){if(d[i].listener.toString()==k.toString()){d.splice(i,1);break}}}catch(j){b.log("error",j)}return false};this.sendEvent=function(k,m){if(!b.exists(m)){m={}}b.extend(m,{id:e,version:jwplayer.version,type:k});if(g){b.log(k,m)}if(b.typeOf(f[k])!="undefined"){for(var j=0;j<f[k].length;j++){try{f[k][j].listener(m)}catch(l){b.log("There was an error while handling a listener: "+l.toString(),f[k][j].listener)}if(f[k][j]){if(f[k][j].count===1){delete f[k][j]}else{if(f[k][j].count>0){f[k][j].count=f[k][j].count-1}}}}}var i;for(i=0;i<d.length;i++){try{d[i].listener(m)}catch(l){b.log("There was an error while handling a listener: "+l.toString(),d[i].listener)}if(d[i]){if(d[i].count===1){delete d[i]}else{if(d[i].count>0){d[i].count=d[i].count-1}}}}}}})(jwplayer.events);(function(a){var c={};var b={};a.plugins=function(){};a.plugins.loadPlugins=function(e,d){b[e]=new a.plugins.pluginloader(new a.plugins.model(c),d);return b[e]};a.plugins.registerPlugin=function(h,f,e){var d=a.utils.getPluginName(h);if(c[d]){c[d].registerPlugin(h,f,e)}else{a.utils.log("A plugin ("+h+") was registered with the player that was not loaded. Please check your configuration.");for(var g in b){b[g].pluginFailed()}}}})(jwplayer);(function(a){a.plugins.model=function(b){this.addPlugin=function(c){var d=a.utils.getPluginName(c);if(!b[d]){b[d]=new a.plugins.plugin(c)}return b[d]}}})(jwplayer);(function(a){a.plugins.pluginmodes={FLASH:"FLASH",JAVASCRIPT:"JAVASCRIPT",HYBRID:"HYBRID"};a.plugins.plugin=function(b){var d="http://plugins.longtailvideo.com";var i=a.utils.loaderstatus.NEW;var j;var h;var k;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function e(){switch(a.utils.getPluginPathType(b)){case a.utils.pluginPathType.ABSOLUTE:return b;case a.utils.pluginPathType.RELATIVE:return a.utils.getAbsolutePath(b,window.location.href);case a.utils.pluginPathType.CDN:var n=a.utils.getPluginName(b);var m=a.utils.getPluginVersion(b);var l=(window.location.href.indexOf("https://")==0)?d.replace("http://","https://secure"):d;return l+"/"+a.version.split(".")[0]+"/"+n+"/"+n+(m!==""?("-"+m):"")+".js"}}function g(l){k=setTimeout(function(){i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)},1000)}function f(l){i=a.utils.loaderstatus.ERROR;c.sendEvent(a.events.ERROR)}this.load=function(){if(i==a.utils.loaderstatus.NEW){if(b.lastIndexOf(".swf")>0){j=b;i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);return}i=a.utils.loaderstatus.LOADING;var l=new a.utils.scriptloader(e());l.addEventListener(a.events.COMPLETE,g);l.addEventListener(a.events.ERROR,f);l.load()}};this.registerPlugin=function(n,m,l){if(k){clearTimeout(k);k=undefined}if(m&&l){j=l;h=m}else{if(typeof m=="string"){j=m}else{if(typeof m=="function"){h=m}else{if(!m&&!l){j=n}}}}i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)};this.getStatus=function(){return i};this.getPluginName=function(){return a.utils.getPluginName(b)};this.getFlashPath=function(){if(j){switch(a.utils.getPluginPathType(j)){case a.utils.pluginPathType.ABSOLUTE:return j;case a.utils.pluginPathType.RELATIVE:if(b.lastIndexOf(".swf")>0){return a.utils.getAbsolutePath(j,window.location.href)}return a.utils.getAbsolutePath(j,e());case a.utils.pluginPathType.CDN:if(j.indexOf("-")>-1){return j+"h"}return j+"-h"}}return null};this.getJS=function(){return h};this.getPluginmode=function(){if(typeof j!="undefined"&&typeof h!="undefined"){return a.plugins.pluginmodes.HYBRID}else{if(typeof j!="undefined"){return a.plugins.pluginmodes.FLASH}else{if(typeof h!="undefined"){return a.plugins.pluginmodes.JAVASCRIPT}}}};this.getNewInstance=function(m,l,n){return new h(m,l,n)};this.getURL=function(){return b}}})(jwplayer);(function(a){a.plugins.pluginloader=function(h,e){var g={};var j=a.utils.loaderstatus.NEW;var d=false;var b=false;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function f(){if(!b){b=true;j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)}}function i(){if(!b){var l=0;for(plugin in g){var k=g[plugin].getStatus();if(k==a.utils.loaderstatus.LOADING||k==a.utils.loaderstatus.NEW){l++}}if(l==0){f()}}}this.setupPlugins=function(m,k,r){var l={length:0,plugins:{}};var o={length:0,plugins:{}};for(var n in g){var p=g[n].getPluginName();if(g[n].getFlashPath()){l.plugins[g[n].getFlashPath()]=k.plugins[n];l.plugins[g[n].getFlashPath()].pluginmode=g[n].getPluginmode();l.length++}if(g[n].getJS()){var q=document.createElement("div");q.id=m.id+"_"+p;q.style.position="absolute";q.style.zIndex=o.length+10;o.plugins[p]=g[n].getNewInstance(m,k.plugins[n],q);o.length++;if(typeof o.plugins[p].resize!="undefined"){m.onReady(r(o.plugins[p],q,true));m.onResize(r(o.plugins[p],q))}}}m.plugins=o.plugins;return l};this.load=function(){j=a.utils.loaderstatus.LOADING;d=true;for(var k in e){if(a.utils.exists(k)){g[k]=h.addPlugin(k);g[k].addEventListener(a.events.COMPLETE,i);g[k].addEventListener(a.events.ERROR,i)}}for(k in g){g[k].load()}d=false;i()};this.pluginFailed=function(){f()};this.getStatus=function(){return j}}})(jwplayer);(function(a){a.playlist=function(c){var d=[];if(a.utils.typeOf(c)=="array"){for(var b=0;b<c.length;b++){d.push(new a.playlist.item(c[b]))}}else{d.push(new a.playlist.item(c))}return d}})(jwplayer);(function(a){a.item=function(c){var d={description:"",image:"",mediaid:"",title:"",duration:-1,sources:[]};var b=jwplayer.utils.extend({},d,c);if(b.sources.length==0){b.sources[0]=new a.source(b)}return b}})(jwplayer.playlist);(function(a){a.source=function(c){var b={file:"",width:0,label:undefined,type:undefined};for(var d in b){if(jwplayer.utils.exists(c[d])){b[d]=c[d]}}return b}})(jwplayer.playlist);(function(a){var b=a.utils,c=a.events;var d=a.embed=function(h){var g=new d.config(h.config);g.id=h.id;var i=a.plugins.loadPlugins(h.id,g.plugins);function e(l,k){for(var j in k){if(typeof l[j]=="function"){(l[j]).call(l,k[j])}}}function f(){var k=document.getElementById(h.id);if(i.getStatus()==b.loaderstatus.COMPLETE){for(var m=0;m<g.modes.length;m++){if(g.modes[m].type&&d[g.modes[m].type]){var n=g.modes[m].config;var j=b.extend({},n?d.config.addConfig(g,n):g);var l=new d[g.modes[m].type](k,g.modes[m],j,i,h);if(l.supportsConfig()){l.embed();e(h,g.events);return h}}}if(g.fallback){b.log("No suitable players found and fallback enabled");new d.download(k,g)}else{b.log("No suitable players found and fallback disabled")}}}i.addEventListener(c.COMPLETE,f);i.addEventListener(c.ERROR,f);i.load();return h}})(jwplayer);(function(c){var a=c.utils,g=c.embed,e=undefined;var b=g.config=function(i){function l(p,o,n){for(var m=0;m<p.length;m++){var q=p[m].type;p[m].src=n[q]?n[q]:o+"jwplayer."+q+(q=="flash"?".swf":".js")}}var k={fallback:true,height:300,primary:"html5",width:400,base:e},h={html5:{type:"html5"},flash:{type:"flash"}},j=a.extend(k,i);if(!j.base){j.base=a.getScriptPath("jwplayer.js")}if(!j.modes){j.modes=(j.primary=="flash")?[h.flash,h.html5]:[h.html5,h.flash]}l(j.modes,j.base,{html5:j.html5player,flash:j.flashplayer});d(j);return j};b.addConfig=function(h,i){d(i);return a.extend(h,i)};function d(i){if(!i.playlist){var j={};f(i,j,"sources");f(i,j,"image");if(!i.sources){if(i.levels){j.sources=i.levels;delete i.levels}else{var h={};f(i,h,"file");f(i,h,"type");j.sources=[h]}}i.playlist=[j]}}function f(j,h,i){if(a.exists(j[i])){h[i]=j[i];delete j[i]}}})(jwplayer);(function(c){var h=c.embed,e=c.utils,d="pointer",a="none",f="block",g="100%",b="absolute";h.download=function(j,u){var m=e.extend({},u),q,k=m.width?m.width:480,n=m.height?m.height:320,v,o,i=u.logo?u.logo:{prefix:"http://l.longtailvideo.com/download/",file:"logo.png",margin:10};function t(){if(m.playlist&&m.playlist.length){try{v=m.playlist[0].sources[0].file;o=m.playlist[0].image}catch(w){return}}else{return}if(i.prefix){i.prefix+=c.version.split(/\W/).splice(0,2).join("/")+"/"}p();l()}function p(){if(j){q=r("a","display",j);r("div","iconbackground",q);r("div","icon",q);r("div","logo",q);if(v){q.setAttribute("href",e.getAbsolutePath(v))}}}function s(w,y){var z=document.querySelectorAll(w);for(var x=0;x<z.length;x++){for(var A in y){z[x].style[A]=y[A]}}}function l(){var w="#"+j.id+" .jwdownload";s(w+"display",{width:utils.styleDimension(k),height:utils.styleDimension(n),background:"black center no-repeat "+(o?"url("+o+")":""),backgroundSize:"contain",position:b,border:a,display:f});s(w+"display div",{position:b,width:g,height:g});s(w+"logo",{bottom:i.margin+"px",left:i.margin+"px",background:"bottom left no-repeat url("+i.prefix+i.file+")"});s(w+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg==)"});s(w+"iconbackground",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC)"})}function r(w,z,y){var x=document.createElement(w);x.className="jwdownload"+z;if(y){y.appendChild(x)}return x}t()}})(jwplayer);(function(b){var a=b.utils;b.embed.flash=function(h,i,m,g,k){function n(p,o,q){var r=document.createElement("param");r.setAttribute("name",o);r.setAttribute("value",q);p.appendChild(r)}function l(p,q,o){return function(r){if(o){document.getElementById(k.id+"_wrapper").appendChild(q)}var s=document.getElementById(k.id).getPluginConfig("display");p.resize(s.width,s.height);q.style.left=s.x;q.style.top=s.h}}function f(q){if(!q){return{}}var s={};for(var p in q){var o=q[p];for(var r in o){s[p+"."+r]=o[r]}}return s}function j(r,q){if(r[q]){var t=r[q];for(var p in t){var o=t[p];if(typeof o=="string"){if(!r[p]){r[p]=o}}else{for(var s in o){if(!r[p+"."+s]){r[p+"."+s]=o[s]}}}}delete r[q]}}function d(r){if(!r){return{}}var u={},t=[];for(var o in r){var q=a.getPluginName(o);var p=r[o];t.push(o);for(var s in p){u[q+"."+s]=p[s]}}u.plugins=t.join(",");return u}function e(q){var o="";for(var p in q){if(typeof(q[p])=="object"){o+=p+"="+encodeURIComponent("[[JSON]]"+a.jsonToString(q[p]))+"&"}else{o+=p+"="+encodeURIComponent(q[p])+"&"}}return o.substring(0,o.length-1)}this.embed=function(){m.id=k.id;var A;var s=a.extend({},m);if(h.id+"_wrapper"==h.parentNode.id){A=document.getElementById(h.id+"_wrapper")}else{A=document.createElement("div");A.id=h.id+"_wrapper";A.style.position="relative";A.style.width=a.styleDimension(s.width);A.style.height=a.styleDimension(s.height);a.wrap(h,A)}var o=g.setupPlugins(k,s,l);if(o.length>0){a.extend(s,d(o.plugins))}else{delete s.plugins}var t=["height","width","modes","events","primary","base","fallback"];for(var w=0;w<t.length;w++){delete s[t[w]]}var q="opaque";if(s.wmode){q=s.wmode}j(s,"components");j(s,"providers");if(typeof s["dock.position"]!="undefined"){if(s["dock.position"].toString().toLowerCase()=="false"){s.dock=s["dock.position"];delete s["dock.position"]}}var y=a.getCookies();for(var p in y){if(typeof(s[p])=="undefined"){s[p]=y[p]}}var z="#000000",v,r=e(s);if(a.isIE()){var x='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="'+z+'" width="100%" height="100%" id="'+h.id+'" name="'+h.id+'" tabindex=0"">';x+='<param name="movie" value="'+i.src+'">';x+='<param name="allowfullscreen" value="true">';x+='<param name="allowscriptaccess" value="always">';x+='<param name="seamlesstabbing" value="true">';x+='<param name="wmode" value="'+q+'">';x+='<param name="flashvars" value="'+r+'">';x+="</object>";a.setOuterHTML(h,x);v=document.getElementById(h.id)}else{var u=document.createElement("object");u.setAttribute("type","application/x-shockwave-flash");u.setAttribute("data",i.src);u.setAttribute("width","100%");u.setAttribute("height","100%");u.setAttribute("bgcolor","#000000");u.setAttribute("id",h.id);u.setAttribute("name",h.id);u.setAttribute("tabindex",0);n(u,"allowfullscreen","true");n(u,"allowscriptaccess","always");n(u,"seamlesstabbing","true");n(u,"wmode",q);n(u,"flashvars",r);h.parentNode.replaceChild(u,h);v=u}k.container=v;k.setPlayer(v,"flash")};this.supportsConfig=function(){if(a.hasFlash()){if(m){try{var q=m.playlist[0],o=q.sources;if(typeof o=="undefined"){return true}else{for(var p=0;p<o.length;p++){if(o[p].file&&c(o[p].file,q.type)){return true}}}}catch(r){return false}}else{return true}}return false};function c(p,q){var o=["mp4","flv","aac","mp3","hls","rtmp","youtube"];if(q&&(o.toString().indexOf(q)<0)){return true}var r=a.extension(p);if(!q){q=r}if(!r){return true}if(a.exists(a.extensionmap[r])){return a.exists(a.extensionmap[r].flash)}return false}}})(jwplayer);(function(c){var a=c.utils,b=a.extensionmap;c.embed.html5=function(e,k,d,f,i){function h(m,n,l){return function(o){var p=document.getElementById(e.id+"_displayarea");if(l){p.appendChild(n)}m.resize(p.clientWidth,p.clientHeight);n.left=p.style.left;n.top=p.style.top}}this.embed=function(){if(c.html5){f.setupPlugins(i,d,h);e.innerHTML="";var l=c.utils.extend({},d);if(l.skin&&l.skin.toLowerCase().indexOf(".zip")>0){l.skin=l.skin.replace(/\.zip/i,".xml")}var m=new c.html5.player(l);i.container=document.getElementById(i.id);i.setPlayer(m,"html5")}else{var n=new a.scriptloader(k.src);n.addEventListener(c.events.COMPLETE,this.embed);n.load()}};this.supportsConfig=function(){if(!!c.vid.canPlayType){try{if(a.typeOf(d.playlist)=="string"){return true}else{var l=d.playlist[0].sources;for(var n=0;n<l.length;n++){var m=l[n].file,o=l[n].type;if(j(m,o)){return true}}}}catch(p){return false}}return false};function j(l,m){if(navigator.userAgent.match(/BlackBerry/i)!==null){return false}var n=a.extension(l);m=m?m:n;if((!m)||!b[m]){return false}return g(b[m].html5)}function g(l){var m=c.vid;if(!l){return true}if(m.canPlayType(l)){return true}else{if(l=="audio/mp3"&&navigator.userAgent.match(/safari/i)){return m.canPlayType("audio/mpeg")}else{return false}}}}})(jwplayer);(function(d){var c=[],a=d.utils,e=d.events,b=e.state;var f=d.api=function(u){var y=this,g={},m={},C={},p=[],h=undefined,F=false,q=[],A=undefined,t={},o={};y.container=u;y.id=u.id;y.getBuffer=function(){return x("jwGetBuffer")};y.getContainer=function(){return y.container};function i(I,H){return function(N,J,K,L){if(I.renderingMode=="flash"||I.renderingMode=="html5"){var M;if(J){o[N]=J;M="jwplayer('"+I.id+"').callback('"+N+"')"}else{if(!J&&o[N]){delete o[N]}}h.jwDockSetButton(N,M,K,L)}return H}}y.getPlugin=function(H){var I={};if(H=="dock"){return a.extend(I,{setButton:i(y,I),show:function(){x("jwDockShow");return I},hide:function(){x("jwDockHide");return I},onShow:function(J){D("dock",e.JWPLAYER_COMPONENT_SHOW,J);return I},onHide:function(J){D("dock",e.JWPLAYER_COMPONENT_HIDE,J);return I}})}else{if(H=="controlbar"){return a.extend(I,{show:function(){__callInternal("jwControlbarShow");return I},hide:function(){__callInternal("jwControlbarHide");return I},onShow:function(J){D("controlbar",e.JWPLAYER_COMPONENT_SHOW,J);return I},onHide:function(J){D("controlbar",e.JWPLAYER_COMPONENT_HIDE,J);return I}})}else{if(H=="display"){return a.extend(I,{show:function(){__callInternal("jwDisplayShow");return I},hide:function(){__callInternal("jwDisplayHide");return I},onShow:function(J){D("display",e.JWPLAYER_COMPONENT_SHOW,J);return I},onHide:function(J){D("display",e.JWPLAYER_COMPONENT_HIDE,J);return I}})}else{return y.plugins[H]}}}};y.callback=function(H){if(o[H]){return o[H]()}};y.getDuration=function(){return x("jwGetDuration")};y.getFullscreen=function(){return x("jwGetFullscreen")};y.getHeight=function(){return x("jwGetHeight")};y.getLockState=function(){return x("jwGetLockState")};y.getMeta=function(){return y.getItemMeta()};y.getMute=function(){return x("jwGetMute")};y.getPlaylist=function(){var I=x("jwGetPlaylist");if(y.renderingMode=="flash"){a.deepReplaceKeyName(I,["__dot__","__spc__","__dsh__"],["."," ","-"])}for(var H=0;H<I.length;H++){if(!a.exists(I[H].index)){I[H].index=H}}return I};y.getPlaylistItem=function(H){if(!a.exists(H)){H=y.getCurrentItem()}return y.getPlaylist()[H]};y.getPosition=function(){return x("jwGetPosition")};y.getRenderingMode=function(){return y.renderingMode};y.getState=function(){return x("jwGetState")};y.getVolume=function(){return x("jwGetVolume")};y.getWidth=function(){return x("jwGetWidth")};y.setFullscreen=function(H){if(!a.exists(H)){x("jwSetFullscreen",!x("jwGetFullscreen"))}else{x("jwSetFullscreen",H)}return y};y.setMute=function(H){if(!a.exists(H)){x("jwSetMute",!x("jwGetMute"))}else{x("jwSetMute",H)}return y};y.lock=function(){return y};y.unlock=function(){return y};y.load=function(H){x("jwLoad",H);return y};y.playlistItem=function(H){x("jwPlaylistItem",H);return y};y.playlistPrev=function(){x("jwPlaylistPrev");return y};y.playlistNext=function(){x("jwPlaylistNext");return y};y.resize=function(I,H){if(y.renderingMode=="html5"){h.jwResize(I,H)}else{var J=document.getElementById(y.id+"_wrapper");if(J){J.style.width=a.styleDimension(I);J.style.height=a.styleDimension(H)}}return y};y.play=function(H){if(typeof H=="undefined"){H=y.getState();if(H==b.PLAYING||H==b.BUFFERING){x("jwPause")}else{x("jwPlay")}}else{x("jwPlay",H)}return y};y.pause=function(H){if(typeof H=="undefined"){H=y.getState();if(H==b.PLAYING||H==b.BUFFERING){x("jwPause")}else{x("jwPlay")}}else{x("jwPause",H)}return y};y.stop=function(){x("jwStop");return y};y.seek=function(H){x("jwSeek",H);return y};y.setVolume=function(H){x("jwSetVolume",H);return y};y.loadInstream=function(I,H){A=new f.instream(this,h,I,H);return A};var s={onBufferChange:e.JWPLAYER_MEDIA_BUFFER,onBufferFull:e.JWPLAYER_MEDIA_BUFFER_FULL,onError:e.JWPLAYER_ERROR,onFullscreen:e.JWPLAYER_FULLSCREEN,onMeta:e.JWPLAYER_MEDIA_META,onMute:e.JWPLAYER_MEDIA_MUTE,onPlaylist:e.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:e.JWPLAYER_PLAYLIST_ITEM,onReady:e.API_READY,onResize:e.JWPLAYER_RESIZE,onComplete:e.JWPLAYER_MEDIA_COMPLETE,onSeek:e.JWPLAYER_MEDIA_SEEK,onTime:e.JWPLAYER_MEDIA_TIME,onVolume:e.JWPLAYER_MEDIA_VOLUME,onBeforePlay:e.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:e.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:e.JWPLAYER_DISPLAY_CLICK};for(var z in s){y[z]=E(s[z],B)}var w={onBuffer:b.BUFFERING,onPause:b.PAUSED,onPlay:b.PLAYING,onIdle:b.IDLE};for(var k in w){y[k]=E(w[k],r)}function E(H,I){return function(J){return I(H,J)}}y.remove=function(){if(!F){throw"Cannot call remove() before player is ready";return}n(this)};function n(H){q=[];f.destroyPlayer(H.id)}y.setup=function(H){if(d.embed){n(this);var I=d(y.id);I.config=H;return new d.embed(I)}return y};y.registerPlugin=function(J,I,H){d.plugins.registerPlugin(J,I,H)};y.setPlayer=function(H,I){h=H;y.renderingMode=I};y.detachMedia=function(){if(y.renderingMode=="html5"){return x("jwDetachMedia")}};y.attachMedia=function(){if(y.renderingMode=="html5"){return x("jwAttachMedia")}};function r(H,I){if(!m[H]){m[H]=[];B(e.JWPLAYER_PLAYER_STATE,G(H))}m[H].push(I);return y}function G(H){return function(J){var I=J.newstate,L=J.oldstate;if(I==H){var K=m[I];if(K){for(var M=0;M<K.length;M++){if(typeof K[M]=="function"){K[M].call(this,{oldstate:L,newstate:I})}}}}}}function D(H,I,J){if(!C[H]){C[H]={}}if(!C[H][I]){C[H][I]=[];B(I,l(H,I))}C[H][I].push(J);return y}function l(H,I){return function(K){if(H==K.component){var J=C[H][I];if(J){for(var L=0;L<J.length;L++){if(typeof J[L]=="function"){J[L].call(this,K)}}}}}}function j(H,I){try{H.jwAddEventListener(I,'function(dat) { jwplayer("'+y.id+'").dispatchEvent("'+I+'", dat); }')}catch(J){a.log("Could not add internal listener")}}function B(H,I){if(!g[H]){g[H]=[];if(h&&F){j(h,H)}}g[H].push(I);return y}y.dispatchEvent=function(J){if(g[J]){var I=a.translateEventResponse(J,arguments[1]);for(var H=0;H<g[J].length;H++){if(typeof g[J][H]=="function"){g[J][H].call(this,I)}}}};y.dispatchInstreamEvent=function(H){if(A){A.dispatchEvent(H,arguments)}};function x(){if(F){var J=arguments[0],H=[];for(var I=1;I<arguments.length;I++){H.push(arguments[I])}if(typeof h!="undefined"&&typeof h[J]=="function"){if(H.length==2){return(h[J])(H[0],H[1])}else{if(H.length==1){return(h[J])(H[0])}else{return(h[J])()}}}return null}else{q.push(arguments)}}y.playerReady=function(I){F=true;if(!h){y.setPlayer(document.getElementById(I.id))}y.container=document.getElementById(y.id);for(var H in g){j(h,H)}B(e.JWPLAYER_PLAYLIST_ITEM,function(J){t={}});B(e.JWPLAYER_MEDIA_META,function(J){a.extend(t,J.metadata)});y.dispatchEvent(e.API_READY);while(q.length>0){x.apply(this,q.shift())}};y.getItemMeta=function(){return t};y.getCurrentItem=function(){return x("jwGetPlaylistIndex")};function v(J,L,K){var H=[];if(!L){L=0}if(!K){K=J.length-1}for(var I=L;I<=K;I++){H.push(J[I])}return H}return y};f.selectPlayer=function(h){var g;if(!a.exists(h)){h=0}if(h.nodeType){g=h}else{if(typeof h=="string"){g=document.getElementById(h)}}if(g){var i=f.playerById(g.id);if(i){return i}else{return f.addPlayer(new f(g))}}else{if(typeof h=="number"){return c[h]}}return null};f.playerById=function(h){for(var g=0;g<c.length;g++){if(c[g].id==h){return c[g]}}return null};f.addPlayer=function(g){for(var h=0;h<c.length;h++){if(c[h]==g){return g}}c.push(g);return g};f.destroyPlayer=function(i){var h=-1;for(var k=0;k<c.length;k++){if(c[k].id==i){h=k;continue}}if(h>=0){var l=c[h].id,g=document.getElementById(l+"_wrapper");if(!g){g=document.getElementById(l)}if(g){var j=document.createElement("div");j.id=l;g.parentNode.replaceChild(j,g)}c.splice(h,1)}return null}})(jwplayer);var _userPlayerReady=(typeof playerReady=="function")?playerReady:undefined;playerReady=function(b){var a=jwplayer.api.playerById(b.id);if(a){a.playerReady(b)}else{jwplayer.api.selectPlayer(b.id).playerReady(b)}if(_userPlayerReady){_userPlayerReady.call(this,b)}};(function(b){var c=b.events,a=c.state;b.api.instream=function(e,k,o,r){var j=e,d=k,i=o,l=r,g={},q={};function h(){j.callInternal("jwLoadInstream",o,r)}function n(s,t){d.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+j.id+'").dispatchInstreamEvent("'+t+'", dat); }')}function f(s,t){if(!g[s]){g[s]=[];n(d,s)}g[s].push(t);return this}function p(s,t){if(!q[s]){q[s]=[];f(c.JWPLAYER_PLAYER_STATE,m(s))}q[s].push(t);return this}function m(s){return function(u){var t=u.newstate,w=u.oldstate;if(t==s){var v=q[t];if(v){for(var x=0;x<v.length;x++){if(typeof v[x]=="function"){v[x].call(this,{oldstate:w,newstate:t,type:u.type})}}}}}}this.dispatchEvent=function(v,u){if(g[v]){var t=_utils.translateEventResponse(v,u[1]);for(var s=0;s<g[v].length;s++){if(typeof g[v][s]=="function"){g[v][s].call(this,t)}}}};this.onError=function(s){return f(c.JWPLAYER_ERROR,s)};this.onFullscreen=function(s){return f(c.JWPLAYER_FULLSCREEN,s)};this.onMeta=function(s){return f(c.JWPLAYER_MEDIA_META,s)};this.onMute=function(s){return f(c.JWPLAYER_MEDIA_MUTE,s)};this.onComplete=function(s){return f(c.JWPLAYER_MEDIA_COMPLETE,s)};this.onSeek=function(s){return f(c.JWPLAYER_MEDIA_SEEK,s)};this.onTime=function(s){return f(c.JWPLAYER_MEDIA_TIME,s)};this.onVolume=function(s){return f(c.JWPLAYER_MEDIA_VOLUME,s)};this.onBuffer=function(s){return p(a.BUFFERING,s)};this.onPause=function(s){return p(a.PAUSED,s)};this.onPlay=function(s){return p(a.PLAYING,s)};this.onIdle=function(s){return p(a.IDLE,s)};this.onInstreamClick=function(s){return f(c.JWPLAYER_INSTREAM_CLICK,s)};this.onInstreamDestroyed=function(s){return f(c.JWPLAYER_INSTREAM_DESTROYED,s)};this.play=function(s){d.jwInstreamPlay(s)};this.pause=function(s){d.jwInstreamPause(s)};this.seek=function(s){d.jwInstreamSeek(s)};this.destroy=function(){d.jwInstreamDestroy()};this.getState=function(){return d.jwInstreamGetState()};this.getDuration=function(){return d.jwInstreamGetDuration()};this.getPosition=function(){return d.jwInstreamGetPosition()};h()}})(jwplayer)}; -
branches/jw6/src/flash/com/longtailvideo/jwplayer/player/PlayerVersion.as
r2197 r2198 3 3 4 4 public class PlayerVersion { 5 protected static var _version:String = '6.0.219 7';5 protected static var _version:String = '6.0.2198'; 6 6 7 7 public static function get version():String { -
branches/jw6/src/flash/com/longtailvideo/jwplayer/view/components/DisplayComponent.as
r2192 r2198 420 420 protected function clickHandler(event:MouseEvent):void { 421 421 dispatchEvent(new ViewEvent(ViewEvent.JWPLAYER_VIEW_CLICK)); 422 if(_player.config.displayclick == 'link') { 423 var link:String = _player.playlist.currentItem.link; 424 if(link) { 425 navigateToURL(new URLRequest(Strings.cleanLink(link)),_player.config.linktarget); 426 } 427 } else if (currentState == PlayerState.PLAYING || currentState == PlayerState.BUFFERING) { 422 if (currentState == PlayerState.PLAYING || currentState == PlayerState.BUFFERING) { 428 423 dispatchEvent(new ViewEvent(ViewEvent.JWPLAYER_VIEW_PAUSE)); 429 424 } else { -
branches/jw6/src/js/api/jwplayer.api.js
r2197 r2198 12 12 13 13 var api = jwplayer.api = function(container) { 14 this.container = container;15 this.id = container.id;16 17 var _listeners = {};18 var _stateListeners = {};19 var _componentListeners = {};20 var _readyListeners = [];21 var _player = undefined;22 var _playerReady = false;23 var _queuedCalls = [];24 var _instream = undefined;25 26 var _itemMeta = {};27 var _callbacks = {};14 var _this = this, 15 _listeners = {}, 16 _stateListeners = {}, 17 _componentListeners = {}, 18 _readyListeners = [], 19 _player = undefined, 20 _playerReady = false, 21 _queuedCalls = [], 22 _instream = undefined, 23 _itemMeta = {}, 24 _callbacks = {}; 25 26 _this.container = container; 27 _this.id = container.id; 28 28 29 29 // Player Getters 30 this.getBuffer = function() {31 return this.callInternal('jwGetBuffer');32 }; 33 this.getContainer = function() {34 return this.container;30 _this.getBuffer = function() { 31 return _callInternal('jwGetBuffer'); 32 }; 33 _this.getContainer = function() { 34 return _this.container; 35 35 }; 36 36 … … 51 51 } 52 52 53 this.getPlugin = function(pluginName) { 54 var _this = this; 53 _this.getPlugin = function(pluginName) { 55 54 var _plugin = {}; 56 55 if (pluginName == "dock") { 57 56 return utils.extend(_plugin, { 58 57 setButton: _setButton(_this, _plugin), 59 show: function() { _ this.callInternal('jwDockShow'); return _plugin; },60 hide: function() { _ this.callInternal('jwDockHide'); return _plugin; },58 show: function() { _callInternal('jwDockShow'); return _plugin; }, 59 hide: function() { _callInternal('jwDockHide'); return _plugin; }, 61 60 onShow: function(callback) { 62 _ this.componentListener("dock", events.JWPLAYER_COMPONENT_SHOW, callback);61 _componentListener("dock", events.JWPLAYER_COMPONENT_SHOW, callback); 63 62 return _plugin; 64 63 }, 65 64 onHide: function(callback) { 66 _ this.componentListener("dock", events.JWPLAYER_COMPONENT_HIDE, callback);65 _componentListener("dock", events.JWPLAYER_COMPONENT_HIDE, callback); 67 66 return _plugin; 68 67 } … … 70 69 } else if (pluginName == "controlbar") { 71 70 return utils.extend(_plugin, { 72 show: function() { _ this.callInternal('jwControlbarShow'); return _plugin; },73 hide: function() { _ this.callInternal('jwControlbarHide'); return _plugin; },71 show: function() { __callInternal('jwControlbarShow'); return _plugin; }, 72 hide: function() { __callInternal('jwControlbarHide'); return _plugin; }, 74 73 onShow: function(callback) { 75 _ this.componentListener("controlbar", events.JWPLAYER_COMPONENT_SHOW, callback);74 _componentListener("controlbar", events.JWPLAYER_COMPONENT_SHOW, callback); 76 75 return _plugin; 77 76 }, 78 77 onHide: function(callback) { 79 _ this.componentListener("controlbar", events.JWPLAYER_COMPONENT_HIDE, callback);78 _componentListener("controlbar", events.JWPLAYER_COMPONENT_HIDE, callback); 80 79 return _plugin; 81 80 } … … 83 82 } else if (pluginName == "display") { 84 83 return utils.extend(_plugin, { 85 show: function() { _ this.callInternal('jwDisplayShow'); return _plugin; },86 hide: function() { _ this.callInternal('jwDisplayHide'); return _plugin; },84 show: function() { __callInternal('jwDisplayShow'); return _plugin; }, 85 hide: function() { __callInternal('jwDisplayHide'); return _plugin; }, 87 86 onShow: function(callback) { 88 _ this.componentListener("display", events.JWPLAYER_COMPONENT_SHOW, callback);87 _componentListener("display", events.JWPLAYER_COMPONENT_SHOW, callback); 89 88 return _plugin; 90 89 }, 91 90 onHide: function(callback) { 92 _ this.componentListener("display", events.JWPLAYER_COMPONENT_HIDE, callback);91 _componentListener("display", events.JWPLAYER_COMPONENT_HIDE, callback); 93 92 return _plugin; 94 93 } 95 94 }); 96 95 } else { 97 return this.plugins[pluginName];98 } 99 }; 100 101 this.callback = function(id) {96 return _this.plugins[pluginName]; 97 } 98 }; 99 100 _this.callback = function(id) { 102 101 if (_callbacks[id]) { 103 102 return _callbacks[id](); 104 103 } 105 104 }; 106 this.getDuration = function() {107 return this.callInternal('jwGetDuration');108 }; 109 this.getFullscreen = function() {110 return this.callInternal('jwGetFullscreen');111 }; 112 this.getHeight = function() {113 return this.callInternal('jwGetHeight');114 }; 115 this.getLockState = function() {116 return this.callInternal('jwGetLockState');117 }; 118 this.getMeta = function() {119 return this.getItemMeta();120 }; 121 this.getMute = function() {122 return this.callInternal('jwGetMute');123 }; 124 this.getPlaylist = function() {125 var playlist = this.callInternal('jwGetPlaylist');126 if ( this.renderingMode == "flash") {105 _this.getDuration = function() { 106 return _callInternal('jwGetDuration'); 107 }; 108 _this.getFullscreen = function() { 109 return _callInternal('jwGetFullscreen'); 110 }; 111 _this.getHeight = function() { 112 return _callInternal('jwGetHeight'); 113 }; 114 _this.getLockState = function() { 115 return _callInternal('jwGetLockState'); 116 }; 117 _this.getMeta = function() { 118 return _this.getItemMeta(); 119 }; 120 _this.getMute = function() { 121 return _callInternal('jwGetMute'); 122 }; 123 _this.getPlaylist = function() { 124 var playlist = _callInternal('jwGetPlaylist'); 125 if (_this.renderingMode == "flash") { 127 126 utils.deepReplaceKeyName(playlist, ["__dot__","__spc__","__dsh__"], ["."," ","-"]); 128 127 } … … 134 133 return playlist; 135 134 }; 136 this.getPlaylistItem = function(item) {135 _this.getPlaylistItem = function(item) { 137 136 if (!utils.exists(item)) { 138 item = this.getCurrentItem();139 } 140 return this.getPlaylist()[item];141 }; 142 this.getPosition = function() {143 return this.callInternal('jwGetPosition');144 }; 145 this.getRenderingMode = function() {146 return this.renderingMode;147 }; 148 this.getState = function() {149 return this.callInternal('jwGetState');150 }; 151 this.getVolume = function() {152 return this.callInternal('jwGetVolume');153 }; 154 this.getWidth = function() {155 return this.callInternal('jwGetWidth');137 item = _this.getCurrentItem(); 138 } 139 return _this.getPlaylist()[item]; 140 }; 141 _this.getPosition = function() { 142 return _callInternal('jwGetPosition'); 143 }; 144 _this.getRenderingMode = function() { 145 return _this.renderingMode; 146 }; 147 _this.getState = function() { 148 return _callInternal('jwGetState'); 149 }; 150 _this.getVolume = function() { 151 return _callInternal('jwGetVolume'); 152 }; 153 _this.getWidth = function() { 154 return _callInternal('jwGetWidth'); 156 155 }; 157 156 // Player Public Methods 158 this.setFullscreen = function(fullscreen) {157 _this.setFullscreen = function(fullscreen) { 159 158 if (!utils.exists(fullscreen)) { 160 this.callInternal("jwSetFullscreen", !this.callInternal('jwGetFullscreen'));161 } else { 162 this.callInternal("jwSetFullscreen", fullscreen);163 } 164 return this;165 }; 166 this.setMute = function(mute) {159 _callInternal("jwSetFullscreen", !_callInternal('jwGetFullscreen')); 160 } else { 161 _callInternal("jwSetFullscreen", fullscreen); 162 } 163 return _this; 164 }; 165 _this.setMute = function(mute) { 167 166 if (!utils.exists(mute)) { 168 this.callInternal("jwSetMute", !this.callInternal('jwGetMute'));169 } else { 170 this.callInternal("jwSetMute", mute);171 } 172 return this;173 }; 174 this.lock = function() {175 return this;176 }; 177 this.unlock = function() {178 return this;179 }; 180 this.load = function(toLoad) {181 this.callInternal("jwLoad", toLoad);182 return this;183 }; 184 this.playlistItem = function(item) {185 this.callInternal("jwPlaylistItem", item);186 return this;187 }; 188 this.playlistPrev = function() {189 this.callInternal("jwPlaylistPrev");190 return this;191 }; 192 this.playlistNext = function() {193 this.callInternal("jwPlaylistNext");194 return this;195 }; 196 this.resize = function(width, height) {197 if ( this.renderingMode == "html5") {167 _callInternal("jwSetMute", !_callInternal('jwGetMute')); 168 } else { 169 _callInternal("jwSetMute", mute); 170 } 171 return _this; 172 }; 173 _this.lock = function() { 174 return _this; 175 }; 176 _this.unlock = function() { 177 return _this; 178 }; 179 _this.load = function(toLoad) { 180 _callInternal("jwLoad", toLoad); 181 return _this; 182 }; 183 _this.playlistItem = function(item) { 184 _callInternal("jwPlaylistItem", item); 185 return _this; 186 }; 187 _this.playlistPrev = function() { 188 _callInternal("jwPlaylistPrev"); 189 return _this; 190 }; 191 _this.playlistNext = function() { 192 _callInternal("jwPlaylistNext"); 193 return _this; 194 }; 195 _this.resize = function(width, height) { 196 if (_this.renderingMode == "html5") { 198 197 _player.jwResize(width, height); 199 198 } else { 200 var wrapper = document.getElementById( this.id + "_wrapper");199 var wrapper = document.getElementById(_this.id + "_wrapper"); 201 200 if (wrapper) { 202 201 wrapper.style.width = utils.styleDimension(width); … … 204 203 } 205 204 } 206 return this;207 }; 208 this.play = function(state) {205 return _this; 206 }; 207 _this.play = function(state) { 209 208 if (typeof state == "undefined") { 210 state = this.getState();209 state = _this.getState(); 211 210 if (state == states.PLAYING || state == states.BUFFERING) { 212 this.callInternal("jwPause");211 _callInternal("jwPause"); 213 212 } else { 214 this.callInternal("jwPlay");215 } 216 } else { 217 this.callInternal("jwPlay", state);218 } 219 return this;220 }; 221 this.pause = function(state) {213 _callInternal("jwPlay"); 214 } 215 } else { 216 _callInternal("jwPlay", state); 217 } 218 return _this; 219 }; 220 _this.pause = function(state) { 222 221 if (typeof state == "undefined") { 223 state = this.getState();222 state = _this.getState(); 224 223 if (state == states.PLAYING || state == states.BUFFERING) { 225 this.callInternal("jwPause");224 _callInternal("jwPause"); 226 225 } else { 227 this.callInternal("jwPlay");228 } 229 } else { 230 this.callInternal("jwPause", state);231 } 232 return this;233 }; 234 this.stop = function() {235 this.callInternal("jwStop");236 return this;237 }; 238 this.seek = function(position) {239 this.callInternal("jwSeek", position);240 return this;241 }; 242 this.setVolume = function(volume) {243 this.callInternal("jwSetVolume", volume);244 return this;245 }; 246 this.loadInstream = function(item, instreamOptions) {226 _callInternal("jwPlay"); 227 } 228 } else { 229 _callInternal("jwPause", state); 230 } 231 return _this; 232 }; 233 _this.stop = function() { 234 _callInternal("jwStop"); 235 return _this; 236 }; 237 _this.seek = function(position) { 238 _callInternal("jwSeek", position); 239 return _this; 240 }; 241 _this.setVolume = function(volume) { 242 _callInternal("jwSetVolume", volume); 243 return _this; 244 }; 245 _this.loadInstream = function(item, instreamOptions) { 247 246 _instream = new api.instream(this, _player, item, instreamOptions); 248 247 return _instream; 249 248 }; 250 // Player Events 251 this.onBufferChange = function(callback) { 252 return this.eventListener(events.JWPLAYER_MEDIA_BUFFER, callback); 253 }; 254 this.onBufferFull = function(callback) { 255 return this.eventListener(events.JWPLAYER_MEDIA_BUFFER_FULL, callback); 256 }; 257 this.onError = function(callback) { 258 return this.eventListener(events.JWPLAYER_ERROR, callback); 259 }; 260 this.onFullscreen = function(callback) { 261 return this.eventListener(events.JWPLAYER_FULLSCREEN, callback); 262 }; 263 this.onMeta = function(callback) { 264 return this.eventListener(events.JWPLAYER_MEDIA_META, callback); 265 }; 266 this.onMute = function(callback) { 267 return this.eventListener(events.JWPLAYER_MEDIA_MUTE, callback); 268 }; 269 this.onPlaylist = function(callback) { 270 return this.eventListener(events.JWPLAYER_PLAYLIST_LOADED, callback); 271 }; 272 this.onPlaylistItem = function(callback) { 273 return this.eventListener(events.JWPLAYER_PLAYLIST_ITEM, callback); 274 }; 275 this.onReady = function(callback) { 276 return this.eventListener(events.API_READY, callback); 277 }; 278 this.onResize = function(callback) { 279 return this.eventListener(events.JWPLAYER_RESIZE, callback); 280 }; 281 this.onComplete = function(callback) { 282 return this.eventListener(events.JWPLAYER_MEDIA_COMPLETE, callback); 283 }; 284 this.onSeek = function(callback) { 285 return this.eventListener(events.JWPLAYER_MEDIA_SEEK, callback); 286 }; 287 this.onTime = function(callback) { 288 return this.eventListener(events.JWPLAYER_MEDIA_TIME, callback); 289 }; 290 this.onVolume = function(callback) { 291 return this.eventListener(events.JWPLAYER_MEDIA_VOLUME, callback); 292 }; 293 this.onBeforePlay = function(callback) { 294 return this.eventListener(events.JWPLAYER_MEDIA_BEFOREPLAY, callback); 295 }; 296 this.onBeforeComplete = function(callback) { 297 return this.eventListener(events.JWPLAYER_MEDIA_BEFORECOMPLETE, callback); 298 }; 299 // State events 300 this.onBuffer = function(callback) { 301 return this.stateListener(states.BUFFERING, callback); 302 }; 303 this.onPause = function(callback) { 304 return this.stateListener(states.PAUSED, callback); 305 }; 306 this.onPlay = function(callback) { 307 return this.stateListener(states.PLAYING, callback); 308 }; 309 this.onIdle = function(callback) { 310 return this.stateListener(states.IDLE, callback); 311 }; 312 this.remove = function() { 249 250 var _eventMapping = { 251 onBufferChange: events.JWPLAYER_MEDIA_BUFFER, 252 onBufferFull: events.JWPLAYER_MEDIA_BUFFER_FULL, 253 onError: events.JWPLAYER_ERROR, 254 onFullscreen: events.JWPLAYER_FULLSCREEN, 255 onMeta: events.JWPLAYER_MEDIA_META, 256 onMute: events.JWPLAYER_MEDIA_MUTE, 257 onPlaylist: events.JWPLAYER_PLAYLIST_LOADED, 258 onPlaylistItem: events.JWPLAYER_PLAYLIST_ITEM, 259 onReady: events.API_READY, 260 onResize: events.JWPLAYER_RESIZE, 261 onComplete: events.JWPLAYER_MEDIA_COMPLETE, 262 onSeek: events.JWPLAYER_MEDIA_SEEK, 263 onTime: events.JWPLAYER_MEDIA_TIME, 264 onVolume: events.JWPLAYER_MEDIA_VOLUME, 265 onBeforePlay: events.JWPLAYER_MEDIA_BEFOREPLAY, 266 onBeforeComplete: events.JWPLAYER_MEDIA_BEFORECOMPLETE, 267 onDisplayClick: events.JWPLAYER_DISPLAY_CLICK 268 }; 269 270 for (var event in _eventMapping) { 271 _this[event] = _eventCallback(_eventMapping[event], _eventListener); 272 } 273 274 var _stateMapping = { 275 onBuffer: states.BUFFERING, 276 onPause: states.PAUSED, 277 onPlay: states.PLAYING, 278 onIdle: states.IDLE 279 }; 280 281 for (var state in _stateMapping) { 282 _this[state] = _eventCallback(_stateMapping[state], _stateListener); 283 } 284 285 function _eventCallback(event, listener) { 286 return function(callback) { 287 return listener(event, callback); 288 }; 289 } 290 291 _this.remove = function() { 313 292 if (!_playerReady) { 314 293 throw "Cannot call remove() before player is ready"; … … 323 302 } 324 303 325 this.setup = function(options) {304 _this.setup = function(options) { 326 305 if (jwplayer.embed) { 327 306 // Destroy original API on setup() to remove existing listeners 328 307 _remove(this); 329 var newApi = jwplayer( this.id);308 var newApi = jwplayer(_this.id); 330 309 newApi.config = options; 331 310 return new jwplayer.embed(newApi); 332 311 } 333 return this;334 }; 335 this.registerPlugin = function(id, arg1, arg2) {312 return _this; 313 }; 314 _this.registerPlugin = function(id, arg1, arg2) { 336 315 jwplayer.plugins.registerPlugin(id, arg1, arg2); 337 316 }; 338 317 339 318 /** Use this function to set the internal low-level player. This is a javascript object which contains the low-level API calls. **/ 340 this.setPlayer = function(player, renderingMode) {319 _this.setPlayer = function(player, renderingMode) { 341 320 _player = player; 342 this.renderingMode = renderingMode; 343 }; 344 345 this.stateListener = function(state, callback) { 321 _this.renderingMode = renderingMode; 322 }; 323 324 _this.detachMedia = function() { 325 if (_this.renderingMode == "html5") { 326 return _callInternal("jwDetachMedia"); 327 } 328 } 329 330 _this.attachMedia = function() { 331 if (_this.renderingMode == "html5") { 332 return _callInternal("jwAttachMedia"); 333 } 334 } 335 336 function _stateListener(state, callback) { 346 337 if (!_stateListeners[state]) { 347 338 _stateListeners[state] = []; 348 this.eventListener(events.JWPLAYER_PLAYER_STATE,stateCallback(state));339 _eventListener(events.JWPLAYER_PLAYER_STATE, _stateCallback(state)); 349 340 } 350 341 _stateListeners[state].push(callback); 351 return this; 352 }; 353 354 this.detachMedia = function() { 355 if (this.renderingMode == "html5") { 356 return this.callInternal("jwDetachMedia"); 357 } 358 } 359 360 this.attachMedia = function() { 361 if (this.renderingMode == "html5") { 362 return this.callInternal("jwAttachMedia"); 363 } 364 } 365 366 function stateCallback(state) { 342 return _this; 343 }; 344 345 function _stateCallback(state) { 367 346 return function(args) { 368 347 var newstate = args.newstate, oldstate = args.oldstate; … … 383 362 } 384 363 385 this.componentListener = function(component, type, callback) {364 function _componentListener(component, type, callback) { 386 365 if (!_componentListeners[component]) { 387 366 _componentListeners[component] = {}; … … 389 368 if (!_componentListeners[component][type]) { 390 369 _componentListeners[component][type] = []; 391 this.eventListener(type, _componentCallback(component, type));370 _eventListener(type, _componentCallback(component, type)); 392 371 } 393 372 _componentListeners[component][type].push(callback); 394 return this;373 return _this; 395 374 }; 396 375 … … 410 389 } 411 390 412 this.addInternalListener = function(player, type) {391 function _addInternalListener(player, type) { 413 392 try { 414 player.jwAddEventListener(type, 'function(dat) { jwplayer("' + this.id + '").dispatchEvent("' + type + '", dat); }');393 player.jwAddEventListener(type, 'function(dat) { jwplayer("' + _this.id + '").dispatchEvent("' + type + '", dat); }'); 415 394 } catch(e) { 416 395 utils.log("Could not add internal listener"); … … 418 397 }; 419 398 420 this.eventListener = function(type, callback) {399 function _eventListener(type, callback) { 421 400 if (!_listeners[type]) { 422 401 _listeners[type] = []; 423 402 if (_player && _playerReady) { 424 this.addInternalListener(_player, type);403 _addInternalListener(_player, type); 425 404 } 426 405 } 427 406 _listeners[type].push(callback); 428 return this;429 }; 430 431 this.dispatchEvent = function(type) {407 return _this; 408 }; 409 410 _this.dispatchEvent = function(type) { 432 411 if (_listeners[type]) { 433 412 var args = utils.translateEventResponse(type, arguments[1]); … … 440 419 }; 441 420 442 this.dispatchInstreamEvent = function(type) {421 _this.dispatchInstreamEvent = function(type) { 443 422 if (_instream) { 444 423 _instream.dispatchEvent(type, arguments); … … 446 425 }; 447 426 448 this.callInternal = function() {427 function _callInternal() { 449 428 if (_playerReady) { 450 429 var funcName = arguments[0], … … 470 449 }; 471 450 472 this.playerReady = function(obj) {451 _this.playerReady = function(obj) { 473 452 _playerReady = true; 474 453 475 454 if (!_player) { 476 this.setPlayer(document.getElementById(obj.id));477 } 478 this.container = document.getElementById(this.id);455 _this.setPlayer(document.getElementById(obj.id)); 456 } 457 _this.container = document.getElementById(_this.id); 479 458 480 459 for (var eventType in _listeners) { 481 this.addInternalListener(_player, eventType);482 } 483 484 this.eventListener(events.JWPLAYER_PLAYLIST_ITEM, function(data) {460 _addInternalListener(_player, eventType); 461 } 462 463 _eventListener(events.JWPLAYER_PLAYLIST_ITEM, function(data) { 485 464 _itemMeta = {}; 486 465 }); 487 466 488 this.eventListener(events.JWPLAYER_MEDIA_META, function(data) {467 _eventListener(events.JWPLAYER_MEDIA_META, function(data) { 489 468 utils.extend(_itemMeta, data.metadata); 490 469 }); 491 470 492 this.dispatchEvent(events.API_READY);471 _this.dispatchEvent(events.API_READY); 493 472 494 473 while (_queuedCalls.length > 0) { 495 this.callInternal.apply(this, _queuedCalls.shift());496 } 497 }; 498 499 this.getItemMeta = function() {474 _callInternal.apply(this, _queuedCalls.shift()); 475 } 476 }; 477 478 _this.getItemMeta = function() { 500 479 return _itemMeta; 501 480 }; 502 481 503 this.getCurrentItem = function() {504 return this.callInternal('jwGetPlaylistIndex');482 _this.getCurrentItem = function() { 483 return _callInternal('jwGetPlaylistIndex'); 505 484 }; 506 485 … … 519 498 return ret; 520 499 } 521 return this;500 return _this 522 501 }; 523 502 -
branches/jw6/src/js/events/jwplayer.events.js
r2174 r2198 48 48 JWPLAYER_PLAYLIST_ITEM : 'jwplayerPlaylistItem', 49 49 50 // Display CLick 51 JWPLAYER_DISPLAY_CLICK : 'jwplayerViewClick', 52 50 53 // Instream events 51 54 JWPLAYER_INSTREAM_CLICK : 'jwplayerInstreamClicked', -
branches/jw6/src/js/html5/jwplayer.html5.controller.js
r2192 r2198 45 45 46 46 _model.addGlobalListener(_forward); 47 _view.addGlobalListener(_forward); 47 48 48 49 _load(); … … 158 159 } 159 160 } 160 161 161 162 function _isIdle() { 162 163 return (_model.state == states.IDLE || _model.state == states.COMPLETED); -
branches/jw6/src/js/html5/jwplayer.html5.display.js
r2197 r2198 6 6 */ 7 7 (function(html5) { 8 var _utils = jwplayer.utils,9 _css = _utils.css,10 _events = jwplayer.events,11 _ states = _events.state,12 _ rotate = _utils.animations.rotate,8 var utils = jwplayer.utils, 9 events = jwplayer.events, 10 states = events.state, 11 _rotate = utils.animations.rotate, 12 _css = utils.css, 13 13 14 14 … … 34 34 _degreesRotated, 35 35 _rotationInterval, 36 _config = _utils.extend({36 _config = utils.extend({ 37 37 backgroundcolor: '#000', 38 38 showicons: true 39 39 }, _skin.getComponentSettings('display'), config); 40 _bufferRotation = !_utils.exists(_config.bufferrotation) ? 15 : parseInt(_config.bufferrotation, 10), 41 _bufferInterval = !_utils.exists(_config.bufferinterval) ? 100 : parseInt(_config.bufferinterval, 10); 40 _bufferRotation = !utils.exists(_config.bufferrotation) ? 15 : parseInt(_config.bufferrotation, 10), 41 _bufferInterval = !utils.exists(_config.bufferinterval) ? 100 : parseInt(_config.bufferinterval, 10), 42 _eventDispatcher = new events.eventdispatcher(); 43 44 utils.extend(this, _eventDispatcher); 42 45 43 46 function _init() { … … 50 53 _display.appendChild(_preview); 51 54 52 _api.jwAddEventListener( _events.JWPLAYER_PLAYER_STATE, _stateHandler);53 _api.jwAddEventListener( _events.JWPLAYER_PLAYLIST_ITEM, _itemHandler);55 _api.jwAddEventListener(events.JWPLAYER_PLAYER_STATE, _stateHandler); 56 _api.jwAddEventListener(events.JWPLAYER_PLAYLIST_ITEM, _itemHandler); 54 57 55 58 _display.addEventListener('click', _clickHandler, false); … … 57 60 _createIcons(); 58 61 59 _stateHandler({newstate: _states.IDLE});62 _stateHandler({newstate:states.IDLE}); 60 63 } 61 64 62 65 function _clickHandler(evt) { 66 _eventDispatcher.sendEvent(events.JWPLAYER_DISPLAY_CLICK); 63 67 switch (_api.jwGetState()) { 64 case _states.PLAYING:65 case _states.BUFFERING:68 case states.PLAYING: 69 case states.BUFFERING: 66 70 _api.jwPause(); 67 71 break; … … 181 185 182 186 switch(state) { 183 case _states.COMPLETED:184 case _states.IDLE:187 case states.COMPLETED: 188 case states.IDLE: 185 189 _setIcon('play'); 186 190 _setVisibility(D_PREVIEW_CLASS, true); 187 191 break; 188 case _states.BUFFERING:192 case states.BUFFERING: 189 193 _setIcon('buffer'); 190 194 break; 191 case _states.PLAYING:195 case states.PLAYING: 192 196 _setIcon(); 193 197 _setVisibility(D_PREVIEW_CLASS, false); 194 198 break; 195 case _states.PAUSED:199 case states.PAUSED: 196 200 _setIcon('play'); 197 201 break; … … 239 243 240 244 function _redraw() { 241 _utils.stretch(_api.jwGetStretching(), _preview, _display.clientWidth, _display.clientHeight, _imageWidth, _imageHeight);245 utils.stretch(_api.jwGetStretching(), _preview, _display.clientWidth, _display.clientHeight, _imageWidth, _imageHeight); 242 246 } 243 247 -
branches/jw6/src/js/html5/jwplayer.html5.js
r2197 r2198 7 7 (function(jwplayer) { 8 8 jwplayer.html5 = {}; 9 jwplayer.html5.version = '6.0.219 7';9 jwplayer.html5.version = '6.0.2198'; 10 10 })(jwplayer); -
branches/jw6/src/js/html5/jwplayer.html5.player.js
r2189 r2198 28 28 jwplayer.utils.log('There was a problem setting up the player: ' + evt.message); 29 29 } 30 31 30 32 31 /** Methods **/ 33 32 34 this.jwPlay = _controller.play;35 this.jwPause = _controller.pause;36 this.jwStop = _controller.stop;37 this.jwSeek = _controller.seek;38 this.jwSetVolume = _controller.setVolume;39 this.jwSetMute = _controller.setMute;40 this.jwLoad = _controller.load;41 this.jwPlaylistNext = _controller.next;42 this.jwPlaylistPrev = _controller.prev;43 this.jwPlaylistItem = _controller.item;44 this.jwSetFullscreen = _controller.setFullscreen;45 this.jwResize = _view.resize;46 this.jwSeekDrag = _model.seekDrag;47 this.jwSetStretching = _controller.setStretching;33 _api.jwPlay = _controller.play; 34 _api.jwPause = _controller.pause; 35 _api.jwStop = _controller.stop; 36 _api.jwSeek = _controller.seek; 37 _api.jwSetVolume = _controller.setVolume; 38 _api.jwSetMute = _controller.setMute; 39 _api.jwLoad = _controller.load; 40 _api.jwPlaylistNext = _controller.next; 41 _api.jwPlaylistPrev = _controller.prev; 42 _api.jwPlaylistItem = _controller.item; 43 _api.jwSetFullscreen = _controller.setFullscreen; 44 _api.jwResize = _view.resize; 45 _api.jwSeekDrag = _model.seekDrag; 46 _api.jwSetStretching = _controller.setStretching; 48 47 49 48 … … 57 56 } 58 57 59 this.jwGetPlaylistIndex = _statevarFactory('item');60 this.jwGetPosition = _statevarFactory('position');61 this.jwGetDuration = _statevarFactory('duration');62 this.jwGetBuffer = _statevarFactory('buffer');63 this.jwGetWidth = _statevarFactory('width');64 this.jwGetHeight = _statevarFactory('height');65 this.jwGetFullscreen = _statevarFactory('fullscreen');66 this.jwGetVolume = _statevarFactory('volume');67 this.jwGetMute = _statevarFactory('mute');68 this.jwGetState = _statevarFactory('state');69 this.jwGetStretching = _statevarFactory('stretching');70 this.jwGetPlaylist = _statevarFactory('playlist');58 _api.jwGetPlaylistIndex = _statevarFactory('item'); 59 _api.jwGetPosition = _statevarFactory('position'); 60 _api.jwGetDuration = _statevarFactory('duration'); 61 _api.jwGetBuffer = _statevarFactory('buffer'); 62 _api.jwGetWidth = _statevarFactory('width'); 63 _api.jwGetHeight = _statevarFactory('height'); 64 _api.jwGetFullscreen = _statevarFactory('fullscreen'); 65 _api.jwGetVolume = _statevarFactory('volume'); 66 _api.jwGetMute = _statevarFactory('mute'); 67 _api.jwGetState = _statevarFactory('state'); 68 _api.jwGetStretching = _statevarFactory('stretching'); 69 _api.jwGetPlaylist = _statevarFactory('playlist'); 71 70 72 71 73 72 /** InStream API **/ 74 this.jwDetachMedia = _controller.detachMedia;75 this.jwAttachMedia = _controller.attachMedia;73 _api.jwDetachMedia = _controller.detachMedia; 74 _api.jwAttachMedia = _controller.attachMedia; 76 75 77 76 var _instreamPlayer; 78 77 79 this.jwLoadInstream = function(item, options) {78 _api.jwLoadInstream = function(item, options) { 80 79 if (!_instreamPlayer) { 81 80 _instreamPlayer = new html5.instream(_api, _model, _view, _controller); … … 86 85 } 87 86 88 this.jwInstreamDestroy = function() {87 _api.jwInstreamDestroy = function() { 89 88 if (_instreamPlayer) { 90 89 _instreamPlayer.jwInstreamDestroy(); … … 93 92 94 93 /** Events **/ 95 this.jwAddEventListener = _controller.addEventListener;96 this.jwRemoveEventListener = _controller.removeEventListener;94 _api.jwAddEventListener = _controller.addEventListener; 95 _api.jwRemoveEventListener = _controller.removeEventListener; 97 96 98 97 -
branches/jw6/src/js/html5/jwplayer.html5.view.js
r2197 r2198 6 6 */ 7 7 (function(html5) { 8 var _jw = jwplayer,9 _utils = _jw.utils,10 _css = _utils.css,11 _events = jwplayer.events,12 _ states = _events.state,8 var jw = jwplayer, 9 utils = jw.utils, 10 events = jwplayer.events, 11 states = events.state, 12 _css = utils.css, 13 13 14 14 DOCUMENT = document, … … 33 33 _videoLayer, 34 34 _instreamLayer, 35 36 35 _controlbar, 37 36 _display, 38 37 _playlist, 39 40 _audioMode; 38 _audioMode, 39 _eventDispatcher = new events.eventdispatcher(); 40 41 utils.extend(this, _eventDispatcher); 41 42 42 43 this.setup = function(skin) { … … 70 71 DOCUMENT.addEventListener('keydown', _keyHandler, false); 71 72 72 _api.jwAddEventListener( _events.JWPLAYER_PLAYER_STATE, _stateHandler);73 74 _stateHandler({newstate: _states.IDLE});73 _api.jwAddEventListener(events.JWPLAYER_PLAYER_STATE, _stateHandler); 74 75 _stateHandler({newstate:states.IDLE}); 75 76 76 77 _controlsLayer.addEventListener('mouseout', _fadeControls, false); … … 80 81 _controlbar.getDisplayElement().addEventListener('mouseout', _resumeFade, false); 81 82 } 82 83 83 84 84 } … … 92 92 function _startFade() { 93 93 clearTimeout(_controlsTimeout); 94 if (_api.jwGetState() == _states.PLAYING || _api.jwGetState() == _states.PAUSED) {94 if (_api.jwGetState() == states.PLAYING || _api.jwGetState() == states.PAUSED) { 95 95 _showControlbar(); 96 96 if (!_inCB) { … … 112 112 113 113 function _fadeControls() { 114 if (_api.jwGetState() == _states.PLAYING || _api.jwGetState() == _states.PAUSED) {114 if (_api.jwGetState() == states.PLAYING || _api.jwGetState() == states.PAUSED) { 115 115 _hideControlbar(); 116 116 } … … 126 126 127 127 _display = new html5.display(_api, displaySettings); 128 _display.addEventListener(events.JWPLAYER_DISPLAY_CLICK, function(evt) { 129 // Forward Display Clicks 130 _eventDispatcher.sendEvent(evt.type, evt); 131 }); 128 132 _controlsLayer.appendChild(_display.getDisplayElement()); 129 133 … … 133 137 } 134 138 135 if (! _utils.isMobile() || (_model.mobilecontrols && _utils.isMobile())) {139 if (!utils.isMobile() || (_model.mobilecontrols && utils.isMobile())) { 136 140 // TODO: allow override for showing HTML controlbar on iPads 137 141 _controlbar = new html5.controlbar(_api, cbSettings); … … 147 151 **/ 148 152 var _fullscreen = this.fullscreen = function(state) { 149 if (! _utils.exists(state)) {153 if (!utils.exists(state)) { 150 154 state = !_model.fullscreen; 151 155 } … … 182 186 */ 183 187 function _resize(width, height) { 184 if ( _utils.exists(width) && _utils.exists(height)) {188 if (utils.exists(width) && utils.exists(height)) { 185 189 _css(_internalSelector(), { 186 190 width: width, … … 241 245 242 246 function _resizeMedia() { 243 _utils.stretch(_model.stretching, _videoTag,247 utils.stretch(_model.stretching, _videoTag, 244 248 _videoLayer.clientWidth, _videoLayer.clientHeight, 245 249 _videoTag.videoWidth, _videoTag.videoHeight); … … 351 355 function _updateState(state) { 352 356 switch(state) { 353 case _states.PLAYING:357 case states.PLAYING: 354 358 _showVideo(true); 355 359 _resizeMedia(); 356 360 _startFade(); 357 361 break; 358 case _states.COMPLETED:359 case _states.IDLE:362 case states.COMPLETED: 363 case states.IDLE: 360 364 _showVideo(false); 361 365 _hideControlbar(); 362 366 _showDisplay(); 363 367 break; 364 case _states.BUFFERING:365 case _states.PAUSED:366 //if (! _utils.isMobile()) {368 case states.BUFFERING: 369 case states.PAUSED: 370 //if (!utils.isMobile()) { 367 371 _showControls(); 368 372 //} … … 380 384 _instreamLayer.appendChild(instreamDisplay); 381 385 _instreamVideo = instreamVideo; 382 _stateHandler({newstate: _states.PLAYING});386 _stateHandler({newstate:states.PLAYING}); 383 387 _instreamMode = true; 384 388 } -
branches/jw6/src/js/jwplayer.js
r2197 r2198 11 11 var $jw = jwplayer; 12 12 13 jwplayer.version = '6.0.219 7';13 jwplayer.version = '6.0.2198'; 14 14 15 15 // "Shiv" method for older IE browsers; required for parsing media tags
Note: See TracChangeset
for help on using the changeset viewer.
