Changeset 2197


Ignore:
Timestamp:
05/15/12 11:31:52 (13 months ago)
Author:
pablo
Message:

Internal HTML5 restructuring -- moving methods only used in HTML5 to jwplayer.html5.js

Location:
branches/jw6
Files:
1 added
1 deleted
29 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/jw6/bin-debug/jwplayer.html5.js

    r2196 r2197  
    77(function(jwplayer) { 
    88        jwplayer.html5 = {}; 
    9         jwplayer.html5.version = '6.0.2196'; 
     9        jwplayer.html5.version = '6.0.2197'; 
    1010})(jwplayer);/** 
    1111 * HTML5-only utilities for the JW Player. 
     
    1414 * @version 6.0 
    1515 */ 
    16 (function(html5) { 
    17         html5.utils = {}; 
    18 })(jwplayer.html5);/** 
     16(function(utils) { 
     17 
     18        /** 
     19         * Basic serialization: string representations of booleans and numbers are returned typed 
     20         * 
     21         * @param {String} val  String value to serialize. 
     22         * @return {Object}             The original value in the correct primitive type. 
     23         */ 
     24        utils.serialize = function(val) { 
     25                if (val == null) { 
     26                        return null; 
     27                } else if (val == 'true') { 
     28                        return true; 
     29                } else if (val == 'false') { 
     30                        return false; 
     31                } else if (isNaN(Number(val)) || val.length > 5 || val.length == 0) { 
     32                        return val; 
     33                } else { 
     34                        return Number(val); 
     35                } 
     36        } 
     37         
     38 
     39         
     40})(jwplayer.utils);/** 
    1941 * Utility methods for the JW Player. 
    2042 * 
     
    3153        }; 
    3254         
     55})(jwplayer.utils); 
     56/** 
     57 * CSS utility methods for the JW Player. 
     58 * 
     59 * @author pablo 
     60 * @version 6.0 
     61 */ 
     62(function(utils) { 
     63        var _styleSheets={}, 
     64                _styleSheet, 
     65                _rules = {}; 
     66 
     67        function _createStylesheet() { 
     68                var styleSheet = document.createElement("style"); 
     69                styleSheet.type = "text/css"; 
     70                document.getElementsByTagName('head')[0].appendChild(styleSheet); 
     71                return styleSheet; 
     72        } 
     73         
     74        utils.css = function(selector, styles, important) { 
     75                if (!utils.exists(important)) important = false; 
     76                 
     77                if (utils.isIE()) { 
     78                        if (!_styleSheet) { 
     79                                _styleSheet = _createStylesheet(); 
     80                        } 
     81                } else if (!_styleSheets[selector]) { 
     82                        _styleSheets[selector] = _createStylesheet(); 
     83                } 
     84 
     85                if (!_rules[selector]) { 
     86                        _rules[selector] = {}; 
     87                } 
     88 
     89                for (var style in styles) { 
     90                        var val = _styleValue(style, styles[style], important); 
     91                        if (utils.exists(_rules[selector][style]) && !utils.exists(val)) { 
     92                                delete _rules[selector][style]; 
     93                        } else { 
     94                                _rules[selector][style] = val; 
     95                        } 
     96                } 
     97 
     98                // IE9 limits the number of style tags in the head, so we need to update the entire stylesheet each time 
     99                if (utils.isIE()) { 
     100                        _updateAllStyles(); 
     101                } else { 
     102                        _updateStylesheet(selector, _styleSheets[selector]); 
     103                } 
     104        } 
     105         
     106        function _styleValue(style, value, important) { 
     107                if (typeof value === "undefined") { 
     108                        return undefined; 
     109                }  
     110                 
     111                var importantString = important ? " !important" : ""; 
     112 
     113                if (!isNaN(value)) { 
     114                        switch (style) { 
     115                        case "z-index": 
     116                        case "opacity": 
     117                                return value + importantString; 
     118                                break; 
     119                        default: 
     120                                if (style.match(/color/i)) { 
     121                                        return "#" + utils.pad(value.toString(16), 6) + importantString; 
     122                                } else if (value == 0) { 
     123                                        return 0 + importantString; 
     124                                } else { 
     125                                        return Math.ceil(value) + "px" + importantString; 
     126                                } 
     127                                break; 
     128                        } 
     129                } else { 
     130                        return value + importantString; 
     131                } 
     132        } 
     133 
     134        function _updateAllStyles() { 
     135                var ruleText = "\n"; 
     136                for (var rule in _rules) { 
     137                        ruleText += _getRuleText(rule); 
     138                } 
     139                _styleSheet.innerHTML = ruleText; 
     140        } 
     141         
     142        function _updateStylesheet(selector, sheet) { 
     143                if (sheet) { 
     144                        sheet.innerHTML = _getRuleText(selector); 
     145                } 
     146        } 
     147         
     148        function _getRuleText(selector) { 
     149                var ruleText = selector + "{\n"; 
     150                var styles = _rules[selector]; 
     151                for (var style in styles) { 
     152                        ruleText += "  "+style + ": " + styles[style] + ";\n"; 
     153                } 
     154                ruleText += "}\n"; 
     155                return ruleText; 
     156        } 
     157         
     158         
     159        /** 
     160         * Removes all css elements which match a particular style 
     161         */ 
     162        utils.clearCss = function(filter) { 
     163                for (var rule in _rules) { 
     164                        if (rule.indexOf(filter) >= 0) { 
     165                                delete _rules[rule]; 
     166                        } 
     167                } 
     168                for (var selector in _styleSheets) { 
     169                        if (selector.indexOf(filter) >= 0) { 
     170                                _styleSheets[selector].innerHTML = ''; 
     171                        } 
     172                } 
     173        } 
     174})(jwplayer.utils);/** 
     175 * Utility methods for the JW Player. 
     176 *  
     177 * @author pablo 
     178 * @version 6.0 
     179 */ 
     180(function(utils) { 
     181        var exists = utils.exists; 
     182         
     183        utils.scale = function(domelement, xscale, yscale, xoffset, yoffset) { 
     184                var value; 
     185                 
     186                // Set defaults 
     187                if (!exists(xscale)) xscale = 1; 
     188                if (!exists(yscale)) yscale = 1; 
     189                if (!exists(xoffset)) xoffset = 0; 
     190                if (!exists(yoffset)) yoffset = 0; 
     191                 
     192                if (xscale == 1 && yscale == 1 && xoffset == 0 && yoffset == 0) { 
     193                        value = ""; 
     194                } else { 
     195                        value = "scale("+xscale+","+yscale+") translate("+xoffset+"px,"+yoffset+"px)"; 
     196                } 
     197                 
     198        }; 
     199         
     200        utils.transform = function(element, value) { 
     201                var style = element.style; 
     202                if (exists(value)) { 
     203                        style.webkitTransform = value; 
     204                        style.MozTransform = value; 
     205                        style.msTransform = value; 
     206                        style.OTransform = value; 
     207                } 
     208        } 
     209         
     210        /** 
     211         * Stretches domelement based on stretching. parentWidth, parentHeight, 
     212         * elementWidth, and elementHeight are required as the elements dimensions 
     213         * change as a result of the stretching. Hence, the original dimensions must 
     214         * always be supplied. 
     215         *  
     216         * @param {String} 
     217         *            stretching 
     218         * @param {DOMElement} 
     219         *            domelement 
     220         * @param {Number} 
     221         *            parentWidth 
     222         * @param {Number} 
     223         *            parentHeight 
     224         * @param {Number} 
     225         *            elementWidth 
     226         * @param {Number} 
     227         *            elementHeight 
     228         */ 
     229        utils.stretch = function(stretching, domelement, parentWidth, parentHeight, elementWidth, elementHeight) { 
     230                if (!domelement) return; 
     231                if (!parentWidth || !parentHeight || !elementWidth || !elementHeight) return; 
     232                 
     233                var xscale = parentWidth / elementWidth, 
     234                        yscale = parentHeight / elementHeight, 
     235                        xoff = 0, yoff = 0, 
     236                        style = {}, 
     237                        video = (domelement.tagName.toLowerCase() == "video"), 
     238                        scale = false, 
     239                        stretchClass; 
     240                 
     241                if (video) { 
     242                        utils.transform(domelement); 
     243                } 
     244 
     245                stretchClass = "jw" + stretching.toLowerCase(); 
     246                 
     247                switch (stretching.toLowerCase()) { 
     248                case _stretching.FILL: 
     249                        if (xscale > yscale) { 
     250                                elementWidth = elementWidth * xscale; 
     251                                elementHeight = elementHeight * xscale; 
     252                        } else { 
     253                                elementWidth = elementWidth * yscale; 
     254                                elementHeight = elementHeight * yscale; 
     255                        } 
     256                case _stretching.NONE: 
     257                        xscale = yscale = 1; 
     258                case _stretching.EXACTFIT: 
     259                        scale = true; 
     260                        break; 
     261                case _stretching.UNIFORM: 
     262                        if (xscale > yscale) { 
     263                                elementWidth = elementWidth * yscale; 
     264                                elementHeight = elementHeight * yscale; 
     265                                if (elementWidth / parentWidth > 0.95) { 
     266                                        scale = true; 
     267                                        stretchClass = "jwexactfit"; 
     268                                        xscale = Math.ceil(100 * parentWidth / elementWidth) / 100; 
     269                                        yscale = 1; 
     270                                } 
     271                        } else { 
     272                                elementWidth = elementWidth * xscale; 
     273                                elementHeight = elementHeight * xscale; 
     274                                if (elementHeight / parentHeight > 0.95) { 
     275                                        scale = true; 
     276                                        stretchClass = "jwexactfit"; 
     277                                        yscale = Math.ceil(100 * parentHeight / elementHeight) / 100; 
     278                                        xscale = 1; 
     279                                } 
     280                        } 
     281                        break; 
     282                default: 
     283                        return; 
     284                        break; 
     285                } 
     286 
     287                if (video) { 
     288                        if (scale) { 
     289                                domelement.style.width = elementWidth + "px"; 
     290                                domelement.style.height = elementHeight + "px";  
     291                                xoff = ((parentWidth - elementWidth) / 2) / xscale; 
     292                                yoff = ((parentHeight - elementHeight) / 2) / yscale; 
     293                                utils.scale(domelement, xscale, yscale, xoff, yoff); 
     294                        } else { 
     295                                domelement.style.width = ""; 
     296                                domelement.style.height = ""; 
     297                        } 
     298                } else { 
     299                        domelement.className = domelement.className.replace(/\s*jw(none|exactfit|uniform|fill)/g, ""); 
     300                        domelement.className += " " + stretchClass; 
     301                } 
     302        }; 
     303         
     304        /** Stretching options **/ 
     305        var _stretching = utils.stretching = { 
     306                NONE : "none", 
     307                FILL : "fill", 
     308                UNIFORM : "uniform", 
     309                EXACTFIT : "exactfit" 
     310        }; 
     311 
    33312})(jwplayer.utils); 
    34313/** 
     
    499778                        _position = evt.position; 
    500779                         
    501                         if (refreshRequired) _resize(); 
     780                        if (refreshRequired) _redraw(); 
    502781                } 
    503782                 
     
    560839                                _css(_internalSelector(".jwprev"), { display: undefined }); 
    561840                        } 
    562                         _resize(); 
     841                        _redraw(); 
    563842                } 
    564843 
     
    9761255                } 
    9771256 
    978                 var _resize = this.resize = function(width, height) { 
     1257                var _redraw = this.redraw = function() { 
    9791258                        _createStyles(); 
    9801259                        _css(_internalSelector('.jwgroup.jwcenter'), { 
     
    16681947                        _imageWidth = this.width; 
    16691948                        _imageHeight = this.height; 
    1670                         _resize(); 
     1949                        _redraw(); 
    16711950                        if (_image) { 
    16721951                                _css(_internalSelector(D_PREVIEW_CLASS), { 
     
    16841963                } 
    16851964                 
    1686                 function _resize() { 
     1965                function _redraw() { 
    16871966                        _utils.stretch(_api.jwGetStretching(), _preview, _display.clientWidth, _display.clientHeight, _imageWidth, _imageHeight); 
    16881967                } 
    16891968 
    1690                 this.resize = _resize; 
     1969                this.redraw = _redraw; 
    16911970                 
    16921971                function _setVisibility(selector, state) { 
     
    20092288                        if (_cbar) { 
    20102289//                              var originalBar = _model.plugins.object.controlbar.getDisplayElement().style; 
    2011                                 _cbar.resize(); 
     2290                                _cbar.redraw(); 
    20122291                                //_cbar.resize(_utils.parseDimension(originalDisp.width), _utils.parseDimension(originalDisp.height)); 
    20132292//                              _css(_cbar.getDisplayElement(), _utils.extend({}, originalBar, { zIndex: 1001, opacity: 1 })); 
     
    20162295//                               
    20172296//                              _disp.resize(_utils.parseDimension(originalDisp.width), _utils.parseDimension(originalDisp.height)); 
    2018                                 _disp.resize(); 
     2297                                _disp.redraw(); 
    20192298//                              _css(_disp.getDisplayElement(), _utils.extend({}, originalDisp, { zIndex: 1000 })); 
    20202299                        } 
     
    21212400                                icons: true, 
    21222401                                item: 0, 
     2402                                mobilecontrols: false, 
    21232403                                mute: false, 
    21242404                                playlist: [], 
     
    21412421                function _init() { 
    21422422                        utils.extend(_model, new events.eventdispatcher()); 
    2143                         _model.config = utils.extend({}, _defaults, _cookies, _parseConfig(config)); 
     2423                        _model.config = _parseConfig(utils.extend({}, _defaults, _cookies, config)); 
    21442424                        utils.extend(_model, { 
    21452425                                id: config.id, 
     
    24012681                        _settings = _utils.extend({}, _defaults, _api.skin.getComponentSettings("playlist"), config), 
    24022682                        _wrapper, 
    2403                         _width, 
    2404                         _height, 
    24052683                        _playlist, 
    24062684                        _items, 
     
    24192697                }; 
    24202698                 
    2421                 this.resize = function(width, height) { 
    2422                         _width = width; 
    2423                         _height = height; 
     2699                this.redraw = function() { 
     2700                        // not needed 
    24242701                }; 
    24252702                 
     
    30343311                                                var name = settings[settingIndex].getAttribute("name"); 
    30353312                                                var value = settings[settingIndex].getAttribute("value"); 
    3036                                                 var type = /color$/.test(name) ? "color" : null; 
    3037                                                 _skin[componentName].settings[name] = _utils.typechecker(value, type); 
     3313                                                if(/color$/.test(name)) { value = _utils.stringToColor(value); } 
     3314                                                _skin[componentName].settings[name] = value; 
    30383315                                        } 
    30393316                                } 
     
    36713948                        } 
    36723949 
    3673                         if (!_utils.isMobile()) { 
     3950                        if (!_utils.isMobile() || (_model.mobilecontrols && _utils.isMobile())) { 
    36743951                                // TODO: allow override for showing HTML controlbar on iPads 
    36753952                                _controlbar = new html5.controlbar(_api, cbSettings); 
     
    37304007 
    37314008                        if (_display) { 
    3732                                 _display.resize(width, height); 
     4009                                _display.redraw(); 
    37334010                        } 
    37344011                        if (_controlbar) { 
    3735                                 _controlbar.resize(width, height); 
     4012                                _controlbar.redraw(); 
    37364013                        } 
    37374014                        var playlistSize = _model.playlistsize, 
     
    37394016                         
    37404017                        if (_playlist && playlistSize && playlistPos) { 
    3741                                 _playlist.resize(width, height); 
     4018                                _playlist.redraw(); 
    37424019                                 
    37434020                                var playlistStyle = { display: "block" }, containerStyle = {}; 
     
    37664043                        if (_audioMode) { 
    37674044                                _model.componentConfig('controlbar').margin = 0; 
    3768                                 _controlbar.resize(); 
     4045                                _controlbar.redraw(); 
    37694046                                _showControlbar(); 
    37704047                                _hideDisplay(); 
  • branches/jw6/bin-debug/jwplayer.js

    r2196 r2197  
    1919var $jw = jwplayer; 
    2020 
    21 jwplayer.version = '6.0.2196'; 
     21jwplayer.version = '6.0.2197'; 
    2222 
    2323// "Shiv" method for older IE browsers; required for parsing media tags 
     
    3131 */ 
    3232(function(jwplayer) { 
    33         var DOCUMENT = document; 
    34         var WINDOW = window; 
     33        var DOCUMENT = document, WINDOW = window; 
    3534         
    3635        //Declare namespace 
     
    5756        } 
    5857 
    59         var _styleSheets={}, 
    60                 _styleSheet, 
    61                 _rules = {}; 
    62  
    63         function _createStylesheet() { 
    64                 var styleSheet = DOCUMENT.createElement("style"); 
    65                 styleSheet.type = "text/css"; 
    66                 DOCUMENT.getElementsByTagName('head')[0].appendChild(styleSheet); 
    67                 return styleSheet; 
    68         } 
    69          
    70         utils.css = function(selector, styles, important) { 
    71                 if (!utils.exists(important)) important = false; 
    72                  
    73                 if (utils.isIE()) { 
    74                         if (!_styleSheet) { 
    75                                 _styleSheet = _createStylesheet(); 
    76                         } 
    77                 } else if (!_styleSheets[selector]) { 
    78                         _styleSheets[selector] = _createStylesheet(); 
    79                 } 
    80  
    81                 if (!_rules[selector]) { 
    82                         _rules[selector] = {}; 
    83                 } 
    84  
    85                 for (var style in styles) { 
    86                         var val = _styleValue(style, styles[style], important); 
    87                         if (utils.exists(_rules[selector][style]) && !utils.exists(val)) { 
    88                                 delete _rules[selector][style]; 
    89                         } else { 
    90                                 _rules[selector][style] = val; 
    91                         } 
    92                 } 
    93  
    94                 // IE9 limits the number of style tags in the head, so we need to update the entire stylesheet each time 
    95                 if (utils.isIE()) { 
    96                         _updateAllStyles(); 
    97                 } else { 
    98                         _updateStylesheet(selector, _styleSheets[selector]); 
    99                 } 
    100         } 
    101          
    102         function _styleValue(style, value, important) { 
    103                 if (typeof value === "undefined") { 
    104                         return undefined; 
    105                 }  
    106                  
    107                 var importantString = important ? " !important" : ""; 
    108  
    109                 if (typeof value == "number") { 
    110                         if (isNaN(value)) { 
    111                                 return undefined; 
    112                         } 
    113                         switch (style) { 
    114                         case "z-index": 
    115                         case "opacity": 
    116                                 return value + importantString; 
    117                                 break; 
    118                         default: 
    119                                 if (style.match(/color/i)) { 
    120                                         return "#" + utils.pad(value.toString(16), 6); 
    121                                 } else { 
    122                                         return Math.ceil(value) + "px" + importantString; 
    123                                 } 
    124                                 break; 
    125                         } 
    126                 } else { 
    127                         return value + importantString; 
    128                 } 
    129         } 
    130  
    131         function _updateAllStyles() { 
    132                 var ruleText = "\n"; 
    133                 for (var rule in _rules) { 
    134                         ruleText += _getRuleText(rule); 
    135                 } 
    136                 _styleSheet.innerHTML = ruleText; 
    137         } 
    138          
    139         function _updateStylesheet(selector, sheet) { 
    140                 if (sheet) { 
    141                         sheet.innerHTML = _getRuleText(selector); 
    142                 } 
    143         } 
    144          
    145         function _getRuleText(selector) { 
    146                 var ruleText = selector + "{\n"; 
    147                 var styles = _rules[selector]; 
    148                 for (var style in styles) { 
    149                         ruleText += "  "+style + ": " + styles[style] + ";\n"; 
    150                 } 
    151                 ruleText += "}\n"; 
    152                 return ruleText; 
    153         } 
    154          
    155          
    156         /** 
    157          * Removes all css elements which match a particular style 
    158          */ 
    159         utils.clearCss = function(filter) { 
    160                 for (var rule in _rules) { 
    161                         if (rule.indexOf(filter) >= 0) { 
    162                                 delete _rules[rule]; 
    163                         } 
    164                 } 
    165                 for (var selector in _styleSheets) { 
    166                         if (selector.indexOf(filter) >= 0) { 
    167                                 _styleSheets[selector].innerHTML = ''; 
    168                         } 
    169                 } 
    170         } 
     58        /** Used for styling dimensions in CSS -- return the string unchanged if it's a percentage width; add 'px' otherwise **/  
     59        utils.styleDimension = function(dimension) { 
     60                return dimension + (dimension.toString().indexOf("%") > 0 ? "" : "px"); 
     61        } 
     62 
    17163         
    17264        /** Gets an absolute file path based on a relative filepath * */ 
     
    320212                        var split = cookies[i].split('='); 
    321213                        if (split[0].indexOf("jwplayer.") == 0) { 
    322                                 jwCookies[split[0].substring(9, split[0].length)] = utils.serialize(split[1]); 
     214                                jwCookies[split[0].substring(9, split[0].length)] = split[1]; 
    323215                        } 
    324216                } 
     
    644536})(jwplayer.utils); 
    645537/** 
    646  * Utility methods for the JW Player. 
    647  *  
    648  * @author pablo 
    649  * @version 6.0 
    650  */ 
    651 (function(utils) { 
    652         var exists = utils.exists; 
    653          
    654         utils.scale = function(domelement, xscale, yscale, xoffset, yoffset) { 
    655                 var value; 
    656                  
    657                 // Set defaults 
    658                 if (!exists(xscale)) xscale = 1; 
    659                 if (!exists(yscale)) yscale = 1; 
    660                 if (!exists(xoffset)) xoffset = 0; 
    661                 if (!exists(yoffset)) yoffset = 0; 
    662                  
    663                 if (xscale == 1 && yscale == 1 && xoffset == 0 && yoffset == 0) { 
    664                         value = ""; 
    665                 } else { 
    666                         value = "scale("+xscale+","+yscale+") translate("+xoffset+"px,"+yoffset+"px)"; 
    667                 } 
    668                  
    669         }; 
    670          
    671         utils.transform = function(element, value) { 
    672                 var style = element.style; 
    673                 if (exists(value)) { 
    674                         style.webkitTransform = value; 
    675                         style.MozTransform = value; 
    676                         style.msTransform = value; 
    677                         style.OTransform = value; 
    678                 } 
    679         } 
    680          
    681         /** 
    682          * Stretches domelement based on stretching. parentWidth, parentHeight, 
    683          * elementWidth, and elementHeight are required as the elements dimensions 
    684          * change as a result of the stretching. Hence, the original dimensions must 
    685          * always be supplied. 
    686          *  
    687          * @param {String} 
    688          *            stretching 
    689          * @param {DOMElement} 
    690          *            domelement 
    691          * @param {Number} 
    692          *            parentWidth 
    693          * @param {Number} 
    694          *            parentHeight 
    695          * @param {Number} 
    696          *            elementWidth 
    697          * @param {Number} 
    698          *            elementHeight 
    699          */ 
    700         utils.stretch = function(stretching, domelement, parentWidth, parentHeight, elementWidth, elementHeight) { 
    701                 if (!domelement) return; 
    702                 if (!parentWidth || !parentHeight || !elementWidth || !elementHeight) return; 
    703                  
    704                 var xscale = parentWidth / elementWidth, 
    705                         yscale = parentHeight / elementHeight, 
    706                         xoff = 0, yoff = 0, 
    707                         style = {}, 
    708                         video = (domelement.tagName.toLowerCase() == "video"), 
    709                         scale = false, 
    710                         stretchClass; 
    711                  
    712                 if (video) { 
    713                         utils.transform(domelement); 
    714                 } 
    715  
    716                 stretchClass = "jw" + stretching.toLowerCase(); 
    717                  
    718                 switch (stretching.toLowerCase()) { 
    719                 case _stretching.FILL: 
    720                         if (xscale > yscale) { 
    721                                 elementWidth = elementWidth * xscale; 
    722                                 elementHeight = elementHeight * xscale; 
    723                         } else { 
    724                                 elementWidth = elementWidth * yscale; 
    725                                 elementHeight = elementHeight * yscale; 
    726                         } 
    727                 case _stretching.NONE: 
    728                         xscale = yscale = 1; 
    729                 case _stretching.EXACTFIT: 
    730                         scale = true; 
    731                         break; 
    732                 case _stretching.UNIFORM: 
    733                         if (xscale > yscale) { 
    734                                 elementWidth = elementWidth * yscale; 
    735                                 elementHeight = elementHeight * yscale; 
    736                                 if (elementWidth / parentWidth > 0.95) { 
    737                                         scale = true; 
    738                                         stretchClass = "jwexactfit"; 
    739                                         xscale = Math.ceil(100 * parentWidth / elementWidth) / 100; 
    740                                         yscale = 1; 
    741                                 } 
    742                         } else { 
    743                                 elementWidth = elementWidth * xscale; 
    744                                 elementHeight = elementHeight * xscale; 
    745                                 if (elementHeight / parentHeight > 0.95) { 
    746                                         scale = true; 
    747                                         stretchClass = "jwexactfit"; 
    748                                         yscale = Math.ceil(100 * parentHeight / elementHeight) / 100; 
    749                                         xscale = 1; 
    750                                 } 
    751                         } 
    752                         break; 
    753                 default: 
    754                         return; 
    755                         break; 
    756                 } 
    757  
    758                 if (video) { 
    759                         if (scale) { 
    760                                 domelement.style.width = elementWidth + "px"; 
    761                                 domelement.style.height = elementHeight + "px";  
    762                                 xoff = ((parentWidth - elementWidth) / 2) / xscale; 
    763                                 yoff = ((parentHeight - elementHeight) / 2) / yscale; 
    764                                 utils.scale(domelement, xscale, yscale, xoff, yoff); 
    765                         } else { 
    766                                 domelement.style.width = ""; 
    767                                 domelement.style.height = ""; 
    768                         } 
    769                 } else { 
    770                         domelement.className = domelement.className.replace(/\s*jw(none|exactfit|uniform|fill)/g, ""); 
    771                         domelement.className += " " + stretchClass; 
    772                 } 
    773         }; 
    774          
    775         /** Stretching options **/ 
    776         var _stretching = utils.stretching = { 
    777                 NONE : "none", 
    778                 FILL : "fill", 
    779                 UNIFORM : "uniform", 
    780                 EXACTFIT : "exactfit" 
    781         }; 
    782  
    783 })(jwplayer.utils); 
    784 /** 
    785538 * String utilities for the JW Player. 
    786539 * 
     
    808561                return string; 
    809562        } 
    810          
    811                 /** 
    812          * Basic serialization: string representations of booleans and numbers are returned typed; 
    813          * strings are returned urldecoded. 
    814          * 
    815          * @param {String} val  String value to serialize. 
    816          * @return {Object}             The original value in the correct primitive type. 
    817          */ 
    818         utils.serialize = function(val) { 
    819                 if (val == null) { 
    820                         return null; 
    821                 } else if (val == 'true') { 
    822                         return true; 
    823                 } else if (val == 'false') { 
    824                         return false; 
    825                 } else if (isNaN(Number(val)) || val.length > 5 || val.length == 0) { 
    826                         return val; 
    827                 } else { 
    828                         return Number(val); 
    829                 } 
    830         } 
    831          
    832563         
    833564        /** 
     
    883614                var JSON = JSON || {} 
    884615                if (JSON && JSON.stringify) { 
    885                                 return JSON.stringify(obj); 
     616                        return JSON.stringify(obj); 
    886617                } 
    887618 
     
    942673                } 
    943674        }; 
    944  
    945 })(jwplayer.utils); 
    946 /** 
    947  * Utility methods for the JW Player. 
    948  * 
    949  * @author zach 
    950  * @modified pablo 
    951  * @version 6.0 
    952  */ 
    953 (function(utils) { 
    954         var _colorPattern = new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/); 
    955          
    956         utils.typechecker = function(value, type) { 
    957                 type = !utils.exists(type) ? _guessType(value) : type; 
    958                 return _typeData(value, type); 
    959         }; 
    960          
    961         function _guessType(value) { 
    962                 var bools = ["true", "false", "t", "f"]; 
    963                 if (bools.toString().indexOf(value.toLowerCase().replace(" ", "")) >= 0) { 
    964                         return "boolean"; 
    965                 } else if (_colorPattern.test(value)) { 
    966                         return "color"; 
    967                 } else if (!isNaN(parseInt(value, 10)) && parseInt(value, 10).toString().length == value.length) { 
    968                         return "integer"; 
    969                 } else if (!isNaN(parseFloat(value)) && parseFloat(value).toString().length == value.length) { 
    970                         return "float"; 
    971                 } 
    972                 return "string"; 
    973         } 
    974          
    975         function _typeData(value, type) { 
    976                 if (!utils.exists(type)) { 
    977                         return value; 
    978                 } 
    979                  
    980                 switch (type) { 
    981                         case "color": 
    982                                 if (value.length > 0) { 
    983                                         return _stringToColor(value); 
    984                                 } 
    985                                 return null; 
    986                         case "integer": 
    987                                 return parseInt(value, 10); 
    988                         case "float": 
    989                                 return parseFloat(value); 
    990                         case "boolean": 
    991                                 if (value.toLowerCase() == "true") { 
    992                                         return true; 
    993                                 } else if (value == "1") { 
    994                                         return true; 
    995                                 } 
    996                                 return false; 
    997                 } 
    998                 return value; 
    999         } 
    1000          
    1001         function _stringToColor(value) { 
     675         
     676        /** Convert a string representation of a string to an integer **/ 
     677        utils.stringToColor = function(value) { 
    1002678                value = value.replace(/(#|0x)?([0-9A-F]{3,6})$/gi, "$2"); 
    1003679                if (value.length == 3) { 
     
    1006682                return parseInt(value, 16); 
    1007683        } 
    1008          
     684 
     685 
    1009686})(jwplayer.utils); 
    1010687/** 
     
    16321309                                        if (_config.modes[mode].type && embed[_config.modes[mode].type]) { 
    16331310                                                var modeconfig = _config.modes[mode].config; 
    1634                                                 var configClone = _config; 
    1635                                                 if (modeconfig) { 
    1636                                                         configClone = _utils.extend(_utils.clone(_config), modeconfig); 
    1637  
    1638                                                         /** Remove fields from top-level config which are overridden in mode config **/  
    1639                                                         var overrides = ["file", "levels", "playlist"]; 
    1640                                                         for (var i=0; i < overrides.length; i++) { 
    1641                                                                 var field = overrides[i]; 
    1642                                                                 if (_utils.exists(modeconfig[field])) { 
    1643                                                                         for (var j=0; j < overrides.length; j++) { 
    1644                                                                                 if (j != i) { 
    1645                                                                                         var other = overrides[j]; 
    1646                                                                                         if (_utils.exists(configClone[other]) && !_utils.exists(modeconfig[other])) { 
    1647                                                                                                 delete configClone[other]; 
    1648                                                                                         } 
    1649                                                                                 } 
    1650                                                                         } 
    1651                                                                 } 
    1652                                                         } 
    1653                                                 } 
     1311                                                var configClone = _utils.extend({}, modeconfig ? embed.config.addConfig(_config, modeconfig) : _config); 
    16541312                                                var embedder = new embed[_config.modes[mode].type](container, _config.modes[mode], configClone, _pluginloader, playerApi); 
    16551313                                                if (embedder.supportsConfig()) { 
     
    16911349 */ 
    16921350(function(jwplayer) { 
    1693         var utils = jwplayer.utils; 
    1694  
    1695         function _playerDefaults(primary, base, html5player, flashplayer) { 
    1696                 var modes = { 
    1697                         html5: { 
    1698                                 type: "html5", 
    1699                                 src: html5player ? html5player: base + "jwplayer.html5.js" 
    1700                         },  
    1701                         flash: { 
    1702                                 type: "flash", 
    1703                                 src: flashplayer ? flashplayer : base + "jwplayer.flash.swf"  
    1704                         } 
    1705                 } 
    1706                 if (primary == "flash") { 
    1707                         return [modes.flash, modes.html5]; 
    1708                 } else { 
    1709                         return [modes.html5, modes.flash]; 
    1710                 } 
    1711         } 
    1712  
    1713         jwplayer.embed.config = function(config) { 
     1351        var utils = jwplayer.utils, 
     1352                embed = jwplayer.embed, 
     1353                UNDEFINED = undefined; 
     1354 
     1355        var config = embed.config = function(config) { 
     1356                 
     1357                function _setSources(modes, base, players) { 
     1358                        for (var i=0; i<modes.length; i++) { 
     1359                                var mode = modes[i].type; 
     1360                                modes[i].src = players[mode] ? players[mode] : base + "jwplayer." + mode + (mode == "flash" ? ".swf" : ".js"); 
     1361                        } 
     1362                } 
     1363                 
    17141364                var _defaults = { 
    17151365                                fallback: true, 
     
    17171367                                primary: "html5", 
    17181368                                width: 400, 
    1719                                 base: undefined 
     1369                                base: UNDEFINED 
    17201370                        }, 
    1721                         parsedConfig = utils.extend(_defaults, config); 
    1722  
    1723                 if (!parsedConfig.base) { 
    1724                         parsedConfig.base = utils.getScriptPath("jwplayer.js"); 
    1725                 } 
    1726                  
    1727                 if (!parsedConfig.modes) { 
    1728                         parsedConfig.modes = _playerDefaults( 
    1729                                         parsedConfig.primary, 
    1730                                         parsedConfig.base,  
    1731                                         parsedConfig.html5player,  
    1732                                         parsedConfig.flashplayer); 
    1733                 } 
    1734                  
    1735                 return parsedConfig; 
    1736         }; 
    1737          
    1738  
     1371                        _modes = { 
     1372                            html5: { type: "html5" }, 
     1373                                flash: { type: "flash" } 
     1374                        }, 
     1375                        _config = utils.extend(_defaults, config); 
     1376 
     1377                if (!_config.base) { 
     1378                        _config.base = utils.getScriptPath("jwplayer.js"); 
     1379                } 
     1380                 
     1381                if (!_config.modes) { 
     1382                        _config.modes = (_config.primary == "flash") ? [_modes.flash, _modes.html5] : [_modes.html5, _modes.flash];  
     1383                } 
     1384                 
     1385                _setSources(_config.modes, _config.base, { html5: _config.html5player, flash: _config.flashplayer }) 
     1386                 
     1387                _normalizePlaylist(_config); 
     1388                 
     1389                return _config; 
     1390        }; 
     1391 
     1392        /** Appends a new configuration onto an old one; used for mode configuration **/ 
     1393        config.addConfig = function(oldConfig, newConfig) { 
     1394                _normalizePlaylist(newConfig); 
     1395                return utils.extend(oldConfig, newConfig); 
     1396        } 
     1397         
     1398        /** Construct a playlist from base-level config elements **/ 
     1399        function _normalizePlaylist(config) { 
     1400                if (!config.playlist) { 
     1401                        var singleItem = {}; 
     1402                        _moveProperty(config, singleItem, "sources"); 
     1403                        _moveProperty(config, singleItem, "image"); 
     1404 
     1405                        if (!config.sources) { 
     1406                                if (config.levels) { 
     1407                                        singleItem.sources = config.levels; 
     1408                                        delete config.levels; 
     1409                                } else { 
     1410                                        var singleSource = {}; 
     1411                                        _moveProperty(config, singleSource, "file"); 
     1412                                        _moveProperty(config, singleSource, "type"); 
     1413                                        singleItem.sources = [singleSource]; 
     1414                                } 
     1415                        } 
     1416                                 
     1417                        config.playlist = [singleItem]; 
     1418                } 
     1419        } 
     1420         
     1421        function _moveProperty(sourceObj, destObj, property) { 
     1422                if (utils.exists(sourceObj[property])) { 
     1423                        destObj[property] = sourceObj[property]; 
     1424                        delete sourceObj[property]; 
     1425                } 
     1426        } 
    17391427         
    17401428         
     
    18441532        var embed = jwplayer.embed, 
    18451533                _utils = jwplayer.utils, 
    1846                 _css = _utils.css, 
    18471534                 
    18481535                JW_CSS_CURSOR = "pointer", 
     
    18821569                        } 
    18831570                         
     1571                        _buildElements(); 
    18841572                        _styleElements(); 
    1885                         _buildElements(); 
    18861573                } 
    18871574                 
     
    18981585                } 
    18991586                 
     1587                function _css(selector, style) { 
     1588                        var elements = document.querySelectorAll(selector); 
     1589                        for (var i=0; i<elements.length; i++) { 
     1590                                for (var prop in style) { 
     1591                                        elements[i].style[prop] = style[prop]; 
     1592                                } 
     1593                        } 
     1594                } 
     1595                 
    19001596                function _styleElements() { 
    1901                          
    19021597                        var _prefix = "#" + _container.id + " .jwdownload"; 
    19031598 
    19041599                        _css(_prefix+"display", { 
    1905                                 width: _width, 
    1906                                 height: _height, 
     1600                                width: utils.styleDimension(_width), 
     1601                                height: utils.styleDimension(_height), 
    19071602                                background: "black center no-repeat " + (_image ? 'url('+_image+')' : ""), 
    1908                                 'background-size': "contain", 
     1603                                backgroundSize: "contain", 
    19091604                                position: JW_CSS_ABSOLUTE, 
    19101605                                border: JW_CSS_NONE, 
     
    19191614 
    19201615                        _css(_prefix+"logo", { 
    1921                                 bottom: _logo.margin, 
    1922                                 left: _logo.margin, 
     1616                                bottom: _logo.margin + "px", 
     1617                                left: _logo.margin + "px", 
    19231618                                background: "bottom left no-repeat url(" + _logo.prefix + _logo.file + ")" 
    19241619                        }); 
     
    19731668                                var display = document.getElementById(_api.id).getPluginConfig("display"); 
    19741669                                plugin.resize(display.width, display.height); 
    1975                                 var style = { 
    1976                                         left: display.x, 
    1977                                         top: display.y 
    1978                                 } 
    1979                                 utils.css(div, style); 
     1670                                div.style.left = display.x; 
     1671                                div.style.top = display.h; 
    19801672                        } 
    19811673                } 
     
    20621754                        var params = utils.extend({}, _options); 
    20631755                         
    2064                         var width = params.width;        
    2065                         var height = params.height; 
    2066                          
    20671756                        // Hack for when adding / removing happens too quickly 
    20681757                        if (_container.id + "_wrapper" == _container.parentNode.id) { 
     
    20711760                                _wrapper = document.createElement("div"); 
    20721761                                _wrapper.id = _container.id + "_wrapper"; 
     1762                                _wrapper.style.position = "relative"; 
     1763                                _wrapper.style.width = utils.styleDimension(params.width); 
     1764                                _wrapper.style.height= utils.styleDimension(params.height); 
    20731765                                utils.wrap(_container, _wrapper); 
    2074                                 utils.css('#'+_wrapper.id, { 
    2075                                         position: "relative", 
    2076                                         width: width, 
    2077                                         height: height 
    2078                                 }); 
    20791766                        } 
    20801767                         
     
    22161903                        } 
    22171904                         
    2218                         // Extension is in the extension map, but not supported by Flash - fail 
    2219                         if (utils.exists(utils.extensionmap[extension]) && 
    2220                                         !utils.exists(utils.extensionmap[extension].flash)) { 
    2221                                 return false; 
    2222                         } 
    2223                         return true; 
    2224                 }; 
    2225         }; 
     1905                        // Extension is in the extension map 
     1906                        if (utils.exists(utils.extensionmap[extension])) { 
     1907                                // Return true if the extension has a flash mapping 
     1908                                return utils.exists(utils.extensionmap[extension].flash); 
     1909                        } 
     1910                        return false; 
     1911                } 
     1912        } 
    22261913         
    22271914})(jwplayer); 
     
    23322019                        type = type ? type : extension; 
    23332020                         
    2334                         // If no type or unrecognized type, allow to play 
     2021                        // If no type or unrecognized type, don't allow to play 
    23352022                        if ((!type) || !extensionmap[type]) { 
    2336                                 return true; 
    2337                         } 
     2023                                return false; 
     2024                        } 
     2025                         
    23382026                                                 
    23392027                        // Last, but not least, we ask the browser  
     
    25682256                                _player.jwResize(width, height); 
    25692257                        } else { 
    2570                                 this.container.width = width; 
    2571                                 this.container.height = height; 
    25722258                                var wrapper = document.getElementById(this.id + "_wrapper"); 
    25732259                                if (wrapper) { 
    2574                                         wrapper.style.width = width + "px"; 
    2575                                         wrapper.style.height = height + "px"; 
     2260                                        wrapper.style.width = utils.styleDimension(width); 
     2261                                        wrapper.style.height = utils.styleDimension(height); 
    25762262                                } 
    25772263                        } 
  • branches/jw6/jwplayer.html5.js

    r2196 r2197  
    1 (function(a){a.html5={};a.html5.version="6.0.2196"})(jwplayer);(function(a){a.utils={}})(jwplayer.html5);(function(a){var b=a.animations=function(){};b.rotate=function(c,d){a.transform(c,"rotate("+d+"deg)")}})(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,X,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}]}}},V,aC,an,aA,aq,aK,L,O,ak=false,au=0,aa={play:"pause",mute:"unmute",fullscreen:"normalscreen"},aB={play:false,mute:false,fullscreen:false},B={play:af,mute:P,fullscreen:ac,next:A,prev:ai},F={time:Z,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);X=C.skin;aC=X.getComponentLayout("controlbar");if(!aC){aC=D.layout}h.clearCss("#"+aq);Y();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){aj()}}function I(aM){switch(aM.newstate){case r.BUFFERING:case r.PLAYING:q(av(".jwtimeSliderThumb"),{opacity:1});U("play",true);break;case r.PAUSED:if(!ak){U("play",false)}break;case r.IDLE:U("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();U("mute",aM);z(aM?0:O)}function G(){O=C.jwGetVolume()/100;z(O)}function M(aM){aD(aM.bufferPercent/100)}function H(aM){U("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})}aj()}function Y(){V=h.extend({},D,X.getComponentSettings("controlbar"),at);q("#"+aq,{height:ae("background").height,bottom:V.margin?V.margin:0,left:V.margin?V.margin:0,right:V.margin?V.margin:0});q(av(".jwtext"),{font:V.fontsize+"px/"+ae("background").height+"px "+V.font,color:V.fontcolor,"font-weight":V.fontweight,"font-style":V.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:ae("capLeft").width,right:ae("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 ah(aM);break;case p:return ap(aM.name);break;case b:if(aM.name!="blank"){return ag(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=ae(aO);aQ.innerHTML="&nbsp;";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 ag(aO){if(!ae(aO+"Button").src){return null}var aP=d.createElement("button");aP.className="jw"+aO;aP.addEventListener("click",al(aO),false);var aQ=ae(aO+"Button");var aN=ae(aO+"ButtonOver");aP.innerHTML="&nbsp;";W(av(".jw"+aO),aQ,aN);var aM=aa[aO];if(aM){W(av(".jw"+aO+".jwtoggle"),ae(aM+"Button"),ae(aM+"ButtonOver"))}an[aO]=aP;return aP}function W(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 af(){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 Z(aM){C.jwSeek(aM*aK)}function ac(){C.jwSetFullscreen()}function A(){C.jwPlaylistNext()}function ai(){C.jwPlaylistNext()}function U(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=ae(aM+"Background");if(aP.src){aN.background="url("+aP.src+") no-repeat center";aN["background-size"]="100% "+ae("background").height+"px"}q(av(".jw"+aM),aN);aO.innerHTML="00:00";an[aM]=aO;return aO}function ah(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:ae(aM+"SliderCapLeft").width,right:ae(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":(ae("timeSliderThumb").width/-2)})}aD(0);az(0)}function ay(aO){var aN=ae("volumeSliderCapLeft").width,aM=ae("volumeSliderCapRight").width,aP=ae("volumeSliderRail").width;q(av(".jwvolume"),{width:(aN+aP+aM)})}var ab={};function ax(){aH("left");aH("center");aH("right");aA.appendChild(ab.left);aA.appendChild(ab.center);aA.appendChild(ab.right);q(av(".jwright"),{right:ae("capRight").width})}function aH(aN){var aM=Q();aM.className="jwgroup jw"+aN;ab[aN]=aM;if(aC[aN]){ad(aC[aN],ab[aN])}}function ad(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 aj=this.resize=function(aN,aM){Y();q(av(".jwgroup.jwcenter"),{left:Math.round(h.parseDimension(ab.left.offsetWidth)+ae("capLeft").width),right:Math.round(h.parseDimension(ab.right.offsetWidth)+ae("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 ae(aM){var aN=X.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,u,o,s,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(){u=l.createElement("div");u.id=M.id+"_display";u.className="jwdisplay";o=l.createElement("div");o.className="jwpreview";u.appendChild(o);M.jwAddEventListener(d.JWPLAYER_PLAYER_STATE,A);M.jwAddEventListener(d.JWPLAYER_PLAYLIST_ITEM,L);u.addEventListener("click",O,false);r();A({newstate:e.IDLE})}function O(V){switch(M.jwGetState()){case e.PLAYING:case e.BUFFERING:M.jwPause();break;default:M.jwPlay();break}}function r(){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);w("#"+u.id+" ."+button.className,W,ab);w("#"+u.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 w(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){u.removeChild(D)}D=E[V];if(D){u.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(s!=W){s=W;Q(j,false);v()}}var J;function A(V){clearTimeout(J);J=setTimeout(function(){q(V.newstate)},100)}function q(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 u};function t(V){return"#"+u.id+" "+V}function v(){if(s){var V=new Image();V.addEventListener("load",S,false);V.src=s}else{Q(j,false);y=N=0}}function S(){y=this.width;N=this.height;x();if(s){k(t(j),{"background-image":"url("+s+")"})}}function G(V){var W=B.getSkinElement("display",V);if(W){return W}return null}function x(){n.stretch(M.jwGetStretching(),o,u.clientWidth,u.clientHeight,y,N)}this.resize=x;function Q(V,W){k(t(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.resize()}if(u){u.resize()}}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,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=a.extend({},_defaults,p,l(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(B,N){var H=B,w=H.skin,o=m.extend({},d,H.skin.getComponentSettings("playlist"),N),I,v,O,n,q,p,u=-1,r={background:undefined,item:undefined,itemOver:undefined,itemImage:undefined,itemActive:undefined};this.getDisplayElement=function(){return I};this.resize=function(Q,P){v=Q;O=P};this.show=function(){_show(I)};this.hide=function(){_hide(I)};function s(){I=L("div","jwplaylist");I.id=H.id+"_jwplayer_playlistcomponent";K();if(r.item){o.itemheight=r.item.height}y();H.jwAddEventListener(jwplayer.events.JWPLAYER_PLAYLIST_LOADED,C);H.jwAddEventListener(jwplayer.events.JWPLAYER_PLAYLIST_ITEM,F)}function t(P){return"#"+I.id+(P?" ."+P:"")}function y(){var T=0,S=0,P=0,R=o.itemheight,V=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+" "+(V?V:11)+"px "+(k[o.font]?k[o.font]:k._sans)});if(r.itemImage){T=(R-r.itemImage.height)/2;S=r.itemImage.width;P=r.itemImage.height}else{S=R*4/3;P=R}h(t("jwplaylistimg"),{height:P,width:S,margin:T});h(t("jwlist li"),{"background-image":r.item?"url("+r.item.src+")":"",height:R,"background-size":g+" "+R+"px",cursor:"pointer"});var Q={overflow:"hidden"};if(o.activecolor!==""){Q.color=o.activecolor}if(r.itemActive){Q["background-image"]="url("+r.itemActive.src+")"}h(t("jwlist li.active"),Q);var U={overflow:"hidden"};if(o.overcolor!==""){U.color=o.overcolor}if(r.itemOver){U["background-image"]="url("+r.itemOver.src+")"}h(t("jwlist li:hover"),U);h(t("jwtextwrapper"),{padding:"5px 5px 0 "+(T?0:"5px"),height:R-5,position:b});h(t("jwtitle"),{height:V?V+10:20,"line-height":V?V+10:20,overflow:"hidden",display:"inline-block",width:g,"font-size":V?V:13,"font-weight":o.fontweight?o.fontweight:"bold"});h(t("jwdescription"),{display:"block","line-height":V?V+4:16,overflow:"hidden",height:R,position:b});h(t("jwduration"),{position:"absolute",right:5})}function z(){var P=L("ul","jwlist");P.id=I.id+"_ul"+Math.round(Math.random()*10000000);return P}function A(S){var X=n[S],W=L("li","jwitem");W.id=p.id+"_item_"+S;var T=L("div","jwplaylistimg jwfill");if(G()&&(X.image||X["playlist.image"]||r.itemImage)){var U;if(X["playlist.image"]){U=X["playlist.image"]}else{if(X.image){U=X.image}else{if(r.itemImage){U=r.itemImage.src}}}h("#"+W.id+" .jwplaylistimg",{"background-image":U?"url("+U+")":null});M(W,T)}var P=L("div","jwtextwrapper");var V=L("span","jwtitle");V.innerHTML=X?X.title:"";M(P,V);if(X.description){var R=L("span","jwdescription");R.innerHTML=X.description;M(P,R)}if(X.duration>0){var Q=L("span","jwduration");Q.innerHTML=m.timeFormat(X.duration);M(V,Q)}M(W,P);return W}function L(Q,P){var R=j.createElement(Q);if(P){R.className=P}return R}function M(P,Q){P.appendChild(Q)}function C(Q){I.innerHTML="";n=D();if(!n){return}items=[];p=z();for(var R=0;R<n.length;R++){var P=A(R);P.onclick=J(R);M(p,P);items.push(P)}u=H.jwGetPlaylistIndex();M(I,p);if(m.isIOS()&&window.iScroll){p.style.height=o.itemheight*n.length+"px";var S=new iScroll(I.id)}}function D(){var Q=H.jwGetPlaylist();var R=[];for(var P=0;P<Q.length;P++){if(!Q[P]["ova.hidden"]){R.push(Q[P])}}return R}function J(P){return function(){H.jwPlaylistItem(P);H.jwPlay(true)}}function x(){p.scrollTop=H.jwGetPlaylistIndex()*o.itemheight}function G(){return o.thumbs.toString().toLowerCase()=="true"}function F(P){if(u>=0){j.getElementById(p.id+"_item_"+u).className="jwitem";u=P.index}j.getElementById(p.id+"_item_"+P.index).className="jwitem active";x()}function K(){for(var P in r){r[P]=E(P)}}function E(P){return w.getSkinElement("playlist",P)}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(z){var F=z.getElementsByTagName("component");if(F.length===0){return}for(var I=0;I<F.length;I++){var D=F[I].getAttribute("name");var C={settings:{},elements:{},layout:{}};p[D]=C;var H=F[I].getElementsByTagName("elements")[0].getElementsByTagName("element");for(var G=0;G<H.length;G++){c(H[G],D)}var A=F[I].getElementsByTagName("settings")[0];if(A&&A.childNodes.length>0){var L=A.getElementsByTagName("setting");for(var Q=0;Q<L.length;Q++){var R=L[Q].getAttribute("name");var J=L[Q].getAttribute("value");var y=/color$/.test(R)?"color":null;p[D].settings[R]=b.typechecker(J,y)}}var M=F[I].getElementsByTagName("layout")[0];if(M&&M.childNodes.length>0){var N=M.getElementsByTagName("group");for(var x=0;x<N.length;x++){var B=N[x];p[D].layout[B.getAttribute("position")]={elements:[]};for(var P=0;P<B.attributes.length;P++){var E=B.attributes[P];p[D].layout[B.getAttribute("position")][E.name]=E.value}var O=B.getElementsByTagName("*");for(var w=0;w<O.length;w++){var u=O[w];p[D].layout[B.getAttribute("position")].elements.push({type:u.tagName});for(var v=0;v<u.attributes.length;v++){var K=u.attributes[v];p[D].layout[B.getAttribute("position")].elements[w][K.name]=K.value}if(!b.exists(p[D].layout[B.getAttribute("position")].elements[w].name)){p[D].layout[B.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()){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.resize(ao,am)}if(ab){ab.resize(ao,am)}var aq=z.playlistsize,ar=z.playlistposition;if(ae&&aq&&ar){ae.resize(ao,am);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.resize();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.2197"})(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="&nbsp;";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="&nbsp;";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); 
  • branches/jw6/jwplayer.js

    r2196 r2197  
    1 if(typeof jwplayer=="undefined"){jwplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a)}};var $jw=jwplayer;jwplayer.version="6.0.2196";jwplayer.vid=document.createElement("video");jwplayer.audio=document.createElement("audio");jwplayer.source=document.createElement("source");(function(h){var d=document;var o=window;var n=h.utils=function(){};n.exists=function(s){switch(typeof(s)){case"string":return(s.length>0);break;case"object":return(s!==null);case"undefined":return false}return true};var b={},q,a={};function p(){var s=d.createElement("style");s.type="text/css";d.getElementsByTagName("head")[0].appendChild(s);return s}n.css=function(s,v,t){if(!n.exists(t)){t=false}if(n.isIE()){if(!q){q=p()}}else{if(!b[s]){b[s]=p()}}if(!a[s]){a[s]={}}for(var u in v){var w=g(u,v[u],t);if(n.exists(a[s][u])&&!n.exists(w)){delete a[s][u]}else{a[s][u]=w}}if(n.isIE()){i()}else{e(s,b[s])}};function g(u,v,s){if(typeof v==="undefined"){return undefined}var t=s?" !important":"";if(typeof v=="number"){if(isNaN(v)){return undefined}switch(u){case"z-index":case"opacity":return v+t;break;default:if(u.match(/color/i)){return"#"+n.pad(v.toString(16),6)}else{return Math.ceil(v)+"px"+t}break}}else{return v+t}}function i(){var s="\n";for(var t in a){s+=r(t)}q.innerHTML=s}function e(s,t){if(t){t.innerHTML=r(s)}}function r(s){var t=s+"{\n";var v=a[s];for(var u in v){t+="  "+u+": "+v[u]+";\n"}t+="}\n";return t}n.clearCss=function(t){for(var u in a){if(u.indexOf(t)>=0){delete a[u]}}for(var s in b){if(s.indexOf(t)>=0){b[s].innerHTML=""}}};n.getAbsolutePath=function(y,x){if(!n.exists(x)){x=d.location.href}if(!n.exists(y)){return undefined}if(j(y)){return y}var z=x.substring(0,x.indexOf("://")+3);var w=x.substring(z.length,x.indexOf("/",z.length+1));var t;if(y.indexOf("/")===0){t=y.split("/")}else{var u=x.split("?")[0];u=u.substring(z.length+w.length+1,u.lastIndexOf("/"));t=u.split("/").concat(y.split("/"))}var s=[];for(var v=0;v<t.length;v++){if(!t[v]||!n.exists(t[v])||t[v]=="."){continue}else{if(t[v]==".."){s.pop()}else{s.push(t[v])}}}return z+w+"/"+s.join("/")};function j(t){if(!n.exists(t)){return}var u=t.indexOf("://");var s=t.indexOf("?");return(u>0&&(s<0||(s>u)))}n.extend=function(){var s=n.extend["arguments"];if(s.length>1){for(var u=1;u<s.length;u++){for(var t in s[u]){s[0][t]=s[u][t]}}return s[0]}return null};n.parseDimension=function(s){if(typeof s=="string"){if(s===""){return 0}else{if(s.lastIndexOf("%")>-1){return s}else{return parseInt(s.replace("px",""),10)}}}return s};n.timeFormat=function(s){if(s>0){var t=Math.floor(s/60)<10?"0"+Math.floor(s/60)+":":Math.floor(s/60)+":";t+=Math.floor(s%60)<10?"0"+Math.floor(s%60):Math.floor(s%60);return t}else{return"00:00"}};n.log=function(t,s){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(s){console.log(t,s)}else{console.log(t)}}};n.getBoundingClientRect=function(s){if(typeof s.getBoundingClientRect=="function"){return s.getBoundingClientRect()}else{return{left:s.offsetLeft+d.body.scrollLeft,top:s.offsetTop+d.body.scrollTop,width:s.offsetWidth,height:s.offsetHeight}}};var k=n.userAgentMatch=function(t){var s=navigator.userAgent.toLowerCase();return(s.match(t)!==null)};n.isIE=function(){return k(/msie/i)};n.isMobile=function(){return k(/(iP(hone|ad|od))|android/i)};n.isIOS=function(){return k(/iP(hone|ad|od)/i)};n.isIPod=function(){return k(/iP(hone|od)/i)};n.isIPad=function(){return k(/iPad/i)};n.saveCookie=function(s,t){d.cookie="jwplayer."+s+"="+t+"; path=/"};n.getCookies=function(){var v={};var u=d.cookie.split("; ");for(var t=0;t<u.length;t++){var s=u[t].split("=");if(s[0].indexOf("jwplayer.")==0){v[s[0].substring(9,s[0].length)]=n.serialize(s[1])}}return v};n.ajax=function(w,v,s){var u;if(l(w)&&n.exists(o.XDomainRequest)){u=new XDomainRequest();u.onload=m(u,w,v,s);u.onerror=f(s,w,u)}else{if(n.exists(o.XMLHttpRequest)){u=new XMLHttpRequest();u.onreadystatechange=c(u,w,v,s);u.onerror=f(s,w)}else{if(s){s()}}}try{u.open("GET",w,true);u.send(null)}catch(t){if(s){s(w)}}return u};function l(s){if(s&&s.indexOf("://")>=0){if(s.split("/")[2]!=o.location.href.split("/")[2]){return true}}return false}function f(s,u,t){return function(){s(u)}}function c(t,v,u,s){return function(){if(t.readyState===4){if(t.status==200){m(t,v,u,s)()}else{if(s){s(v)}}}}}function m(t,v,u,s){return function(){if(!n.exists(t.responseXML)){try{var w;if(o.DOMParser){w=(new DOMParser()).parseFromString(t.responseText,"text/xml")}else{w=new ActiveXObject("Microsoft.XMLDOM");w.async="false";w.loadXML(t.responseText)}if(w){t=n.extend({},t,{responseXML:w})}}catch(x){if(s){s(v)}return}}u(t)}}n.typeOf=function(t){var s=typeof t;if(s==="object"){if(!t){return"null"}return(t instanceof Array)?"array":s}else{return s}};n.translateEventResponse=function(u,s){var w=n.extend({},s);if(u==h.events.JWPLAYER_FULLSCREEN&&!w.fullscreen){w.fullscreen=w.message=="true"?true:false;delete w.message}else{if(typeof w.data=="object"){w=n.extend(w,w.data);delete w.data}else{if(typeof w.metadata=="object"){n.deepReplaceKeyName(w.metadata,["__dot__","__spc__","__dsh__"],["."," ","-"])}}}var t=["position","duration","offset"];for(var v in t){if(w[t[v]]){w[t[v]]=Math.round(w[t[v]]*1000)/1000}}return w};n.hasFlash=function(){if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined"){return true}if(typeof o.ActiveXObject!="undefined"){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(s){}}return false};n.wrap=function(s,t){if(s.parentNode){s.parentNode.replaceChild(t,s)}t.appendChild(s)};n.getScriptPath=function(u){var s=d.getElementsByTagName("script");for(var t=0;t<s.length;t++){var v=s[t].src;if(v&&v.indexOf(u)>=0){return v.substr(0,v.indexOf(u))}}return""};h.utils.deepReplaceKeyName=function(z,u,s){switch(h.utils.typeOf(z)){case"array":for(var w=0;w<z.length;w++){z[w]=h.utils.deepReplaceKeyName(z[w],u,s)}break;case"object":for(var v in z){var y,x;if(u instanceof Array&&s instanceof Array){if(u.length!=s.length){continue}else{y=u;x=s}}else{y=[u];x=[s]}var t=v;for(var w=0;w<y.length;w++){t=t.replace(new RegExp(u[w],"g"),s[w])}z[t]=h.utils.deepReplaceKeyName(z[v],u,s);if(v!=t){delete z[v]}}break}return z}})(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){var b=a.exists;a.scale=function(f,e,d,h,i){var g;if(!b(e)){e=1}if(!b(d)){d=1}if(!b(h)){h=0}if(!b(i)){i=0}if(e==1&&d==1&&h==0&&i==0){g=""}else{g="scale("+e+","+d+") translate("+h+"px,"+i+"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(l,q,p,i,n,j){if(!q){return}if(!p||!i||!n||!j){return}var e=p/n,h=i/j,o=0,k=0,d={},f=(q.tagName.toLowerCase()=="video"),g=false,m;if(f){a.transform(q)}m="jw"+l.toLowerCase();switch(l.toLowerCase()){case c.FILL:if(e>h){n=n*e;j=j*e}else{n=n*h;j=j*h}case c.NONE:e=h=1;case c.EXACTFIT:g=true;break;case c.UNIFORM:if(e>h){n=n*h;j=j*h;if(n/p>0.95){g=true;m="jwexactfit";e=Math.ceil(100*p/n)/100;h=1}}else{n=n*e;j=j*e;if(j/i>0.95){g=true;m="jwexactfit";h=Math.ceil(100*i/j)/100;e=1}}break;default:return;break}if(f){if(g){q.style.width=n+"px";q.style.height=j+"px";o=((p-n)/2)/e;k=((i-j)/2)/h;a.scale(q,e,h,o,k)}else{q.style.width="";q.style.height=""}}else{q.className=q.className.replace(/\s*jw(none|exactfit|uniform|fill)/g,"");q.className+=" "+m}};var c=a.stretching={NONE:"none",FILL:"fill",UNIFORM:"uniform",EXACTFIT:"exactfit"}})(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.serialize=function(b){if(b==null){return null}else{if(b=="true"){return true}else{if(b=="false"){return false}else{if(isNaN(Number(b))||b.length>5||b.length==0){return b}else{return Number(b)}}}}};a.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()}}})(jwplayer.utils);(function(b){var d=new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/);b.typechecker=function(g,f){f=!b.exists(f)?c(g):f;return e(g,f)};function c(f){var g=["true","false","t","f"];if(g.toString().indexOf(f.toLowerCase().replace(" ",""))>=0){return"boolean"}else{if(d.test(f)){return"color"}else{if(!isNaN(parseInt(f,10))&&parseInt(f,10).toString().length==f.length){return"integer"}else{if(!isNaN(parseFloat(f))&&parseFloat(f).toString().length==f.length){return"float"}}}}return"string"}function e(g,f){if(!b.exists(f)){return g}switch(f){case"color":if(g.length>0){return a(g)}return null;case"integer":return parseInt(g,10);case"float":return parseFloat(g);case"boolean":if(g.toLowerCase()=="true"){return true}else{if(g=="1"){return true}}return false}return g}function a(f){f=f.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(f.length==3){f=f.charAt(0)+f.charAt(0)+f.charAt(1)+f.charAt(1)+f.charAt(2)+f.charAt(2)}return parseInt(f,16)}})(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 n=0;n<g.modes.length;n++){if(g.modes[n].type&&d[g.modes[n].type]){var p=g.modes[n].config;var t=g;if(p){t=b.extend(b.clone(g),p);var s=["file","levels","playlist"];for(var m=0;m<s.length;m++){var q=s[m];if(b.exists(p[q])){for(var l=0;l<s.length;l++){if(l!=m){var o=s[l];if(b.exists(t[o])&&!b.exists(p[o])){delete t[o]}}}}}}var r=new d[g.modes[n].type](k,g.modes[n],t,i,h);if(r.supportsConfig()){r.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(b){var a=b.utils;function c(d,g,e,h){var f={html5:{type:"html5",src:e?e:g+"jwplayer.html5.js"},flash:{type:"flash",src:h?h:g+"jwplayer.flash.swf"}};if(d=="flash"){return[f.flash,f.html5]}else{return[f.html5,f.flash]}}b.embed.config=function(d){var e={fallback:true,height:300,primary:"html5",width:400,base:undefined},f=a.extend(e,d);if(!f.base){f.base=a.getScriptPath("jwplayer.js")}if(!f.modes){f.modes=c(f.primary,f.base,f.html5player,f.flashplayer)}return f}})(jwplayer);(function(d){var f=d.embed,i=d.utils,g=i.css,h="pointer",c="none",a="block",e="100%",b="absolute";f.download=function(k,u){var n=i.extend({},u),r,l=n.width?n.width:480,o=n.height?n.height:320,v,p,j=u.logo?u.logo:{prefix:"http://l.longtailvideo.com/download/",file:"logo.png",margin:10};function t(){if(n.playlist&&n.playlist.length){try{v=n.playlist[0].sources[0].file;p=n.playlist[0].image}catch(w){return}}else{return}if(j.prefix){j.prefix+=d.version.split(/\W/).splice(0,2).join("/")+"/"}m();q()}function q(){if(k){r=s("a","display",k);s("div","iconbackground",r);s("div","icon",r);s("div","logo",r);if(v){r.setAttribute("href",i.getAbsolutePath(v))}}}function m(){var w="#"+k.id+" .jwdownload";g(w+"display",{width:l,height:o,background:"black center no-repeat "+(p?"url("+p+")":""),"background-size":"contain",position:b,border:c,display:a});g(w+"display div",{position:b,width:e,height:e});g(w+"logo",{bottom:j.margin,left:j.margin,background:"bottom left no-repeat url("+j.prefix+j.file+")"});g(w+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg==)"});g(w+"iconbackground",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC)"})}function s(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 t=document.getElementById(k.id).getPluginConfig("display");p.resize(t.width,t.height);var s={left:t.x,top:t.y};a.css(q,s)}}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 C;var t=a.extend({},m);var p=t.width;var A=t.height;if(h.id+"_wrapper"==h.parentNode.id){C=document.getElementById(h.id+"_wrapper")}else{C=document.createElement("div");C.id=h.id+"_wrapper";a.wrap(h,C);a.css("#"+C.id,{position:"relative",width:p,height:A})}var q=g.setupPlugins(k,t,l);if(q.length>0){a.extend(t,d(q.plugins))}else{delete t.plugins}var u=["height","width","modes","events","primary","base","fallback"];for(var x=0;x<u.length;x++){delete t[u[x]]}var r="opaque";if(t.wmode){r=t.wmode}j(t,"components");j(t,"providers");if(typeof t["dock.position"]!="undefined"){if(t["dock.position"].toString().toLowerCase()=="false"){t.dock=t["dock.position"];delete t["dock.position"]}}var z=a.getCookies();for(var o in z){if(typeof(t[o])=="undefined"){t[o]=z[o]}}var B="#000000",w,s=e(t);if(a.isIE()){var y='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="'+B+'" width="100%" height="100%" id="'+h.id+'" name="'+h.id+'" tabindex=0"">';y+='<param name="movie" value="'+i.src+'">';y+='<param name="allowfullscreen" value="true">';y+='<param name="allowscriptaccess" value="always">';y+='<param name="seamlesstabbing" value="true">';y+='<param name="wmode" value="'+r+'">';y+='<param name="flashvars" value="'+s+'">';y+="</object>";a.setOuterHTML(h,y);w=document.getElementById(h.id)}else{var v=document.createElement("object");v.setAttribute("type","application/x-shockwave-flash");v.setAttribute("data",i.src);v.setAttribute("width","100%");v.setAttribute("height","100%");v.setAttribute("bgcolor","#000000");v.setAttribute("id",h.id);v.setAttribute("name",h.id);v.setAttribute("tabindex",0);n(v,"allowfullscreen","true");n(v,"allowscriptaccess","always");n(v,"seamlesstabbing","true");n(v,"wmode",r);n(v,"flashvars",s);h.parentNode.replaceChild(v,h);w=v}k.container=w;k.setPlayer(w,"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])&&!a.exists(a.extensionmap[r].flash)){return false}return true}}})(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 true}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{this.container.width=x;this.container.height=w;var y=document.getElementById(this.id+"_wrapper");if(y){y.style.width=x+"px";y.style.height=w+"px"}}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)}; 
     1if(typeof jwplayer=="undefined"){jwplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a)}};var $jw=jwplayer;jwplayer.version="6.0.2197";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)}; 
  • branches/jw6/src/flash/com/longtailvideo/jwplayer/media/SoundMediaProvider.as

    r2192 r2197  
    33 **/ 
    44package com.longtailvideo.jwplayer.media { 
    5         import com.jeroenwijering.events.*; 
    6         import com.longtailvideo.jwplayer.events.MediaEvent; 
     5        import com.longtailvideo.jwplayer.events.*; 
    76        import com.longtailvideo.jwplayer.model.PlayerConfig; 
    87        import com.longtailvideo.jwplayer.model.PlaylistItem; 
  • branches/jw6/src/flash/com/longtailvideo/jwplayer/player/PlayerVersion.as

    r2196 r2197  
    33         
    44        public class PlayerVersion { 
    5                 protected static var _version:String = '6.0.2196'; 
     5                protected static var _version:String = '6.0.2197'; 
    66                 
    77                public static function get version():String { 
  • branches/jw6/src/flash/com/longtailvideo/jwplayer/utils/Configger.as

    r2192 r2197  
    11package com.longtailvideo.jwplayer.utils { 
    2         import flash.events.ErrorEvent; 
    3         import flash.events.Event; 
    4         import flash.events.EventDispatcher; 
    5         import flash.events.IOErrorEvent; 
    6         import flash.events.SecurityErrorEvent; 
     2        import flash.events.*; 
    73        import flash.net.SharedObject; 
    8         import flash.net.URLLoader; 
    9         import flash.net.URLRequest; 
    104 
    115        /** 
     
    2620                private var _config:Object = {}; 
    2721 
    28                 /** The loaded config object; can an XML object or a hash map. **/ 
     22                /** The loaded config object; must be a hash map (XML configuration no longer supported). **/ 
    2923                public function get config():Object { 
    3024                        return _config; 
     
    3731                public function loadConfig():void { 
    3832                        loadCookies(); 
    39                         if (this.xmlConfig) { 
    40                                 loadXML(this.xmlConfig); 
    41                         } else { 
    42                                 loadFlashvars(RootReference.root.loaderInfo.parameters); 
    43                         } 
    44                 } 
    45  
    46                 /** Whether the "config" flashvar is set **/ 
    47                 public function get xmlConfig():String { 
    48                         return RootReference.root.loaderInfo.parameters['config']; 
    49                 } 
    50  
    51                 /** 
    52                  * Loads a config block from an XML file 
    53                  * @param url The location of the config file.  Can be absolute URL or path relative to the player SWF. 
    54                  */ 
    55                 public function loadXML(url:String):void { 
    56                         var xmlLoader:URLLoader = new URLLoader(); 
    57                         xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlFail); 
    58                         xmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, xmlFail); 
    59                         xmlLoader.addEventListener(Event.COMPLETE, loadComplete); 
    60                         xmlLoader.load(new URLRequest(url)); 
     33                        loadFlashvars(RootReference.root.loaderInfo.parameters); 
    6134                } 
    6235 
     
    7851                public static function saveCookie(param:String, value:*):void { 
    7952                        try { 
    80                                 var cookie:SharedObject = SharedObject.getLocal('com.jeroenwijering','/'); 
     53                                var cookie:SharedObject = SharedObject.getLocal('com.longtailvideo.jwplayer','/'); 
    8154                                cookie.data[param] = value; 
    8255                                cookie.flush(); 
     
    8659                private function loadCookies():void { 
    8760                        try { 
    88                                 var cookie:SharedObject = SharedObject.getLocal('com.jeroenwijering','/'); 
     61                                var cookie:SharedObject = SharedObject.getLocal('com.longtailvideo.jwplayer','/'); 
    8962                                writeCookieData(cookie.data); 
    9063                        } catch (err:Error) {} 
     
    9871                } 
    9972 
    100                 private function loadComplete(evt:Event):void { 
    101                         var loadedXML:XML = XML((evt.target as URLLoader).data); 
    102                         if (loadedXML &&  
    103                                 loadedXML.name() && 
    104                                 loadedXML.name().toString().toLowerCase() == "config" &&  
    105                                 loadedXML.children().length() > 0 
    106                         ) { 
    107                                 parseXML(loadedXML); 
    108                         } else { 
    109                                 Logger.log("Config XML was empty"); 
    110                         } 
    111                         loadFlashvars(RootReference.root.loaderInfo.parameters); 
    112                 } 
    113  
    114                 private function xmlFail(evt:ErrorEvent):void { 
    115                         dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, evt.text)); 
    116                 } 
    117  
    118                 private function parseXML(xml:XML):void { 
    119                         for each(var item:XML in xml.children()) { 
    120                                 if (item.name() == "pluginconfig") { 
    121                                         parsePluginConfig(item); 
    122                                 } else { 
    123                                         setConfigParam(item.name().toString(), item.toString()); 
    124                                 } 
    125                         } 
    126                 } 
    127                  
    128                 private function parsePluginConfig(pluginconfig:XML):void { 
    129                         for each(var plugin:XML in pluginconfig.plugin) { 
    130                                 for each(var pluginParam:XML in plugin.children()) { 
    131                                         setConfigParam(plugin.@name + "." + pluginParam.name(), pluginParam.toString());  
    132                                 }   
    133                         } 
    134                 } 
    135                  
    13673                private function setConfigParam(name:String, value:String):void { 
    13774                        if (name != "fullscreen") { 
  • branches/jw6/src/js/api/jwplayer.api.js

    r2196 r2197  
    198198                                _player.jwResize(width, height); 
    199199                        } else { 
    200                                 this.container.width = width; 
    201                                 this.container.height = height; 
    202200                                var wrapper = document.getElementById(this.id + "_wrapper"); 
    203201                                if (wrapper) { 
    204                                         wrapper.style.width = width + "px"; 
    205                                         wrapper.style.height = height + "px"; 
     202                                        wrapper.style.width = utils.styleDimension(width); 
     203                                        wrapper.style.height = utils.styleDimension(height); 
    206204                                } 
    207205                        } 
  • branches/jw6/src/js/embed/jwplayer.embed.config.js

    r2196 r2197  
    66 */ 
    77(function(jwplayer) { 
    8         var utils = jwplayer.utils; 
     8        var utils = jwplayer.utils, 
     9                embed = jwplayer.embed, 
     10                UNDEFINED = undefined; 
    911 
    10         function _playerDefaults(primary, base, html5player, flashplayer) { 
    11                 var modes = { 
    12                         html5: { 
    13                                 type: "html5", 
    14                                 src: html5player ? html5player: base + "jwplayer.html5.js" 
    15                         },  
    16                         flash: { 
    17                                 type: "flash", 
    18                                 src: flashplayer ? flashplayer : base + "jwplayer.flash.swf"  
     12        var config = embed.config = function(config) { 
     13                 
     14                function _setSources(modes, base, players) { 
     15                        for (var i=0; i<modes.length; i++) { 
     16                                var mode = modes[i].type; 
     17                                modes[i].src = players[mode] ? players[mode] : base + "jwplayer." + mode + (mode == "flash" ? ".swf" : ".js"); 
    1918                        } 
    2019                } 
    21                 if (primary == "flash") { 
    22                         return [modes.flash, modes.html5]; 
    23                 } else { 
    24                         return [modes.html5, modes.flash]; 
    25                 } 
    26         } 
    27  
    28         jwplayer.embed.config = function(config) { 
     20                 
    2921                var _defaults = { 
    3022                                fallback: true, 
     
    3224                                primary: "html5", 
    3325                                width: 400, 
    34                                 base: undefined 
     26                                base: UNDEFINED 
    3527                        }, 
    36                         parsedConfig = utils.extend(_defaults, config); 
     28                        _modes = { 
     29                            html5: { type: "html5" }, 
     30                                flash: { type: "flash" } 
     31                        }, 
     32                        _config = utils.extend(_defaults, config); 
    3733 
    38                 if (!parsedConfig.base) { 
    39                         parsedConfig.base = utils.getScriptPath("jwplayer.js"); 
     34                if (!_config.base) { 
     35                        _config.base = utils.getScriptPath("jwplayer.js"); 
    4036                } 
    4137                 
    42                 if (!parsedConfig.modes) { 
    43                         parsedConfig.modes = _playerDefaults( 
    44                                         parsedConfig.primary, 
    45                                         parsedConfig.base,  
    46                                         parsedConfig.html5player,  
    47                                         parsedConfig.flashplayer); 
     38                if (!_config.modes) { 
     39                        _config.modes = (_config.primary == "flash") ? [_modes.flash, _modes.html5] : [_modes.html5, _modes.flash];  
    4840                } 
    4941                 
    50                 return parsedConfig; 
     42                _setSources(_config.modes, _config.base, { html5: _config.html5player, flash: _config.flashplayer }) 
     43                 
     44                _normalizePlaylist(_config); 
     45                 
     46                return _config; 
    5147        }; 
     48 
     49        /** Appends a new configuration onto an old one; used for mode configuration **/ 
     50        config.addConfig = function(oldConfig, newConfig) { 
     51                _normalizePlaylist(newConfig); 
     52                return utils.extend(oldConfig, newConfig); 
     53        } 
    5254         
     55        /** Construct a playlist from base-level config elements **/ 
     56        function _normalizePlaylist(config) { 
     57                if (!config.playlist) { 
     58                        var singleItem = {}; 
     59                        _moveProperty(config, singleItem, "sources"); 
     60                        _moveProperty(config, singleItem, "image"); 
    5361 
     62                        if (!config.sources) { 
     63                                if (config.levels) { 
     64                                        singleItem.sources = config.levels; 
     65                                        delete config.levels; 
     66                                } else { 
     67                                        var singleSource = {}; 
     68                                        _moveProperty(config, singleSource, "file"); 
     69                                        _moveProperty(config, singleSource, "type"); 
     70                                        singleItem.sources = [singleSource]; 
     71                                } 
     72                        } 
     73                                 
     74                        config.playlist = [singleItem]; 
     75                } 
     76        } 
     77         
     78        function _moveProperty(sourceObj, destObj, property) { 
     79                if (utils.exists(sourceObj[property])) { 
     80                        destObj[property] = sourceObj[property]; 
     81                        delete sourceObj[property]; 
     82                } 
     83        } 
    5484         
    5585         
  • branches/jw6/src/js/embed/jwplayer.embed.download.js

    r2192 r2197  
    77        var embed = jwplayer.embed, 
    88                _utils = jwplayer.utils, 
    9                 _css = _utils.css, 
    109                 
    1110                JW_CSS_CURSOR = "pointer", 
     
    4544                        } 
    4645                         
     46                        _buildElements(); 
    4747                        _styleElements(); 
    48                         _buildElements(); 
    4948                } 
    5049                 
     
    6160                } 
    6261                 
     62                function _css(selector, style) { 
     63                        var elements = document.querySelectorAll(selector); 
     64                        for (var i=0; i<elements.length; i++) { 
     65                                for (var prop in style) { 
     66                                        elements[i].style[prop] = style[prop]; 
     67                                } 
     68                        } 
     69                } 
     70                 
    6371                function _styleElements() { 
    64                          
    6572                        var _prefix = "#" + _container.id + " .jwdownload"; 
    6673 
    6774                        _css(_prefix+"display", { 
    68                                 width: _width, 
    69                                 height: _height, 
     75                                width: utils.styleDimension(_width), 
     76                                height: utils.styleDimension(_height), 
    7077                                background: "black center no-repeat " + (_image ? 'url('+_image+')' : ""), 
    71                                 'background-size': "contain", 
     78                                backgroundSize: "contain", 
    7279                                position: JW_CSS_ABSOLUTE, 
    7380                                border: JW_CSS_NONE, 
     
    8289 
    8390                        _css(_prefix+"logo", { 
    84                                 bottom: _logo.margin, 
    85                                 left: _logo.margin, 
     91                                bottom: _logo.margin + "px", 
     92                                left: _logo.margin + "px", 
    8693                                background: "bottom left no-repeat url(" + _logo.prefix + _logo.file + ")" 
    8794                        }); 
  • branches/jw6/src/js/embed/jwplayer.embed.flash.js

    r2193 r2197  
    2323                                var display = document.getElementById(_api.id).getPluginConfig("display"); 
    2424                                plugin.resize(display.width, display.height); 
    25                                 var style = { 
    26                                         left: display.x, 
    27                                         top: display.y 
    28                                 } 
    29                                 utils.css(div, style); 
     25                                div.style.left = display.x; 
     26                                div.style.top = display.h; 
    3027                        } 
    3128                } 
     
    112109                        var params = utils.extend({}, _options); 
    113110                         
    114                         var width = params.width;        
    115                         var height = params.height; 
    116                          
    117111                        // Hack for when adding / removing happens too quickly 
    118112                        if (_container.id + "_wrapper" == _container.parentNode.id) { 
     
    121115                                _wrapper = document.createElement("div"); 
    122116                                _wrapper.id = _container.id + "_wrapper"; 
     117                                _wrapper.style.position = "relative"; 
     118                                _wrapper.style.width = utils.styleDimension(params.width); 
     119                                _wrapper.style.height= utils.styleDimension(params.height); 
    123120                                utils.wrap(_container, _wrapper); 
    124                                 utils.css('#'+_wrapper.id, { 
    125                                         position: "relative", 
    126                                         width: width, 
    127                                         height: height 
    128                                 }); 
    129121                        } 
    130122                         
     
    266258                        } 
    267259                         
    268                         // Extension is in the extension map, but not supported by Flash - fail 
    269                         if (utils.exists(utils.extensionmap[extension]) && 
    270                                         !utils.exists(utils.extensionmap[extension].flash)) { 
    271                                 return false; 
    272                         } 
    273                         return true; 
    274                 }; 
    275         }; 
     260                        // Extension is in the extension map 
     261                        if (utils.exists(utils.extensionmap[extension])) { 
     262                                // Return true if the extension has a flash mapping 
     263                                return utils.exists(utils.extensionmap[extension].flash); 
     264                        } 
     265                        return false; 
     266                } 
     267        } 
    276268         
    277269})(jwplayer); 
  • branches/jw6/src/js/embed/jwplayer.embed.html5.js

    r2193 r2197  
    105105                        type = type ? type : extension; 
    106106                         
    107                         // If no type or unrecognized type, allow to play 
     107                        // If no type or unrecognized type, don't allow to play 
    108108                        if ((!type) || !extensionmap[type]) { 
    109                                 return true; 
     109                                return false; 
    110110                        } 
     111                         
    111112                                                 
    112113                        // Last, but not least, we ask the browser  
  • branches/jw6/src/js/embed/jwplayer.embed.js

    r2192 r2197  
    3131                                        if (_config.modes[mode].type && embed[_config.modes[mode].type]) { 
    3232                                                var modeconfig = _config.modes[mode].config; 
    33                                                 var configClone = _config; 
    34                                                 if (modeconfig) { 
    35                                                         configClone = _utils.extend(_utils.clone(_config), modeconfig); 
    36  
    37                                                         /** Remove fields from top-level config which are overridden in mode config **/  
    38                                                         var overrides = ["file", "levels", "playlist"]; 
    39                                                         for (var i=0; i < overrides.length; i++) { 
    40                                                                 var field = overrides[i]; 
    41                                                                 if (_utils.exists(modeconfig[field])) { 
    42                                                                         for (var j=0; j < overrides.length; j++) { 
    43                                                                                 if (j != i) { 
    44                                                                                         var other = overrides[j]; 
    45                                                                                         if (_utils.exists(configClone[other]) && !_utils.exists(modeconfig[other])) { 
    46                                                                                                 delete configClone[other]; 
    47                                                                                         } 
    48                                                                                 } 
    49                                                                         } 
    50                                                                 } 
    51                                                         } 
    52                                                 } 
     33                                                var configClone = _utils.extend({}, modeconfig ? embed.config.addConfig(_config, modeconfig) : _config); 
    5334                                                var embedder = new embed[_config.modes[mode].type](container, _config.modes[mode], configClone, _pluginloader, playerApi); 
    5435                                                if (embedder.supportsConfig()) { 
  • branches/jw6/src/js/html5/jwplayer.html5.controlbar.js

    r2196 r2197  
    211211                        _position = evt.position; 
    212212                         
    213                         if (refreshRequired) _resize(); 
     213                        if (refreshRequired) _redraw(); 
    214214                } 
    215215                 
     
    272272                                _css(_internalSelector(".jwprev"), { display: undefined }); 
    273273                        } 
    274                         _resize(); 
     274                        _redraw(); 
    275275                } 
    276276 
     
    688688                } 
    689689 
    690                 var _resize = this.resize = function(width, height) { 
     690                var _redraw = this.redraw = function() { 
    691691                        _createStyles(); 
    692692                        _css(_internalSelector('.jwgroup.jwcenter'), { 
  • branches/jw6/src/js/html5/jwplayer.html5.display.js

    r2195 r2197  
    222222                        _imageWidth = this.width; 
    223223                        _imageHeight = this.height; 
    224                         _resize(); 
     224                        _redraw(); 
    225225                        if (_image) { 
    226226                                _css(_internalSelector(D_PREVIEW_CLASS), { 
     
    238238                } 
    239239                 
    240                 function _resize() { 
     240                function _redraw() { 
    241241                        _utils.stretch(_api.jwGetStretching(), _preview, _display.clientWidth, _display.clientHeight, _imageWidth, _imageHeight); 
    242242                } 
    243243 
    244                 this.resize = _resize; 
     244                this.redraw = _redraw; 
    245245                 
    246246                function _setVisibility(selector, state) { 
  • branches/jw6/src/js/html5/jwplayer.html5.instream.js

    r2192 r2197  
    257257                        if (_cbar) { 
    258258//                              var originalBar = _model.plugins.object.controlbar.getDisplayElement().style; 
    259                                 _cbar.resize(); 
     259                                _cbar.redraw(); 
    260260                                //_cbar.resize(_utils.parseDimension(originalDisp.width), _utils.parseDimension(originalDisp.height)); 
    261261//                              _css(_cbar.getDisplayElement(), _utils.extend({}, originalBar, { zIndex: 1001, opacity: 1 })); 
     
    264264//                               
    265265//                              _disp.resize(_utils.parseDimension(originalDisp.width), _utils.parseDimension(originalDisp.height)); 
    266                                 _disp.resize(); 
     266                                _disp.redraw(); 
    267267//                              _css(_disp.getDisplayElement(), _utils.extend({}, originalDisp, { zIndex: 1000 })); 
    268268                        } 
  • branches/jw6/src/js/html5/jwplayer.html5.js

    r2196 r2197  
    77(function(jwplayer) { 
    88        jwplayer.html5 = {}; 
    9         jwplayer.html5.version = '6.0.2196'; 
     9        jwplayer.html5.version = '6.0.2197'; 
    1010})(jwplayer); 
  • branches/jw6/src/js/html5/jwplayer.html5.model.js

    r2195 r2197  
    2828                                icons: true, 
    2929                                item: 0, 
     30                                mobilecontrols: false, 
    3031                                mute: false, 
    3132                                playlist: [], 
     
    4849                function _init() { 
    4950                        utils.extend(_model, new events.eventdispatcher()); 
    50                         _model.config = utils.extend({}, _defaults, _cookies, _parseConfig(config)); 
     51                        _model.config = _parseConfig(utils.extend({}, _defaults, _cookies, config)); 
    5152                        utils.extend(_model, { 
    5253                                id: config.id, 
  • branches/jw6/src/js/html5/jwplayer.html5.playlistcomponent.js

    r2195 r2197  
    4646                        _settings = _utils.extend({}, _defaults, _api.skin.getComponentSettings("playlist"), config), 
    4747                        _wrapper, 
    48                         _width, 
    49                         _height, 
    5048                        _playlist, 
    5149                        _items, 
     
    6462                }; 
    6563                 
    66                 this.resize = function(width, height) { 
    67                         _width = width; 
    68                         _height = height; 
     64                this.redraw = function() { 
     65                        // not needed 
    6966                }; 
    7067                 
  • branches/jw6/src/js/html5/jwplayer.html5.skinloader.js

    r2177 r2197  
    6565                                                var name = settings[settingIndex].getAttribute("name"); 
    6666                                                var value = settings[settingIndex].getAttribute("value"); 
    67                                                 var type = /color$/.test(name) ? "color" : null; 
    68                                                 _skin[componentName].settings[name] = _utils.typechecker(value, type); 
     67                                                if(/color$/.test(name)) { value = _utils.stringToColor(value); } 
     68                                                _skin[componentName].settings[name] = value; 
    6969                                        } 
    7070                                } 
  • branches/jw6/src/js/html5/jwplayer.html5.view.js

    r2196 r2197  
    133133                        } 
    134134 
    135                         if (!_utils.isMobile()) { 
     135                        if (!_utils.isMobile() || (_model.mobilecontrols && _utils.isMobile())) { 
    136136                                // TODO: allow override for showing HTML controlbar on iPads 
    137137                                _controlbar = new html5.controlbar(_api, cbSettings); 
     
    192192 
    193193                        if (_display) { 
    194                                 _display.resize(width, height); 
     194                                _display.redraw(); 
    195195                        } 
    196196                        if (_controlbar) { 
    197                                 _controlbar.resize(width, height); 
     197                                _controlbar.redraw(); 
    198198                        } 
    199199                        var playlistSize = _model.playlistsize, 
     
    201201                         
    202202                        if (_playlist && playlistSize && playlistPos) { 
    203                                 _playlist.resize(width, height); 
     203                                _playlist.redraw(); 
    204204                                 
    205205                                var playlistStyle = { display: "block" }, containerStyle = {}; 
     
    228228                        if (_audioMode) { 
    229229                                _model.componentConfig('controlbar').margin = 0; 
    230                                 _controlbar.resize(); 
     230                                _controlbar.redraw(); 
    231231                                _showControlbar(); 
    232232                                _hideDisplay(); 
  • branches/jw6/src/js/html5/utils/jwplayer.html5.utils.js

    r2179 r2197  
    55 * @version 6.0 
    66 */ 
    7 (function(html5) { 
    8         html5.utils = {}; 
    9 })(jwplayer.html5); 
     7(function(utils) { 
     8 
     9        /** 
     10         * Basic serialization: string representations of booleans and numbers are returned typed 
     11         * 
     12         * @param {String} val  String value to serialize. 
     13         * @return {Object}             The original value in the correct primitive type. 
     14         */ 
     15        utils.serialize = function(val) { 
     16                if (val == null) { 
     17                        return null; 
     18                } else if (val == 'true') { 
     19                        return true; 
     20                } else if (val == 'false') { 
     21                        return false; 
     22                } else if (isNaN(Number(val)) || val.length > 5 || val.length == 0) { 
     23                        return val; 
     24                } else { 
     25                        return Number(val); 
     26                } 
     27        } 
     28         
     29 
     30         
     31})(jwplayer.utils); 
  • branches/jw6/src/js/jwplayer.js

    r2196 r2197  
    1111var $jw = jwplayer; 
    1212 
    13 jwplayer.version = '6.0.2196'; 
     13jwplayer.version = '6.0.2197'; 
    1414 
    1515// "Shiv" method for older IE browsers; required for parsing media tags 
  • branches/jw6/src/js/utils/jwplayer.utils.js

    r2193 r2197  
    66 */ 
    77(function(jwplayer) { 
    8         var DOCUMENT = document; 
    9         var WINDOW = window; 
     8        var DOCUMENT = document, WINDOW = window; 
    109         
    1110        //Declare namespace 
     
    3231        } 
    3332 
    34         var _styleSheets={}, 
    35                 _styleSheet, 
    36                 _rules = {}; 
    37  
    38         function _createStylesheet() { 
    39                 var styleSheet = DOCUMENT.createElement("style"); 
    40                 styleSheet.type = "text/css"; 
    41                 DOCUMENT.getElementsByTagName('head')[0].appendChild(styleSheet); 
    42                 return styleSheet; 
    43         } 
    44          
    45         utils.css = function(selector, styles, important) { 
    46                 if (!utils.exists(important)) important = false; 
    47                  
    48                 if (utils.isIE()) { 
    49                         if (!_styleSheet) { 
    50                                 _styleSheet = _createStylesheet(); 
    51                         } 
    52                 } else if (!_styleSheets[selector]) { 
    53                         _styleSheets[selector] = _createStylesheet(); 
    54                 } 
    55  
    56                 if (!_rules[selector]) { 
    57                         _rules[selector] = {}; 
    58                 } 
    59  
    60                 for (var style in styles) { 
    61                         var val = _styleValue(style, styles[style], important); 
    62                         if (utils.exists(_rules[selector][style]) && !utils.exists(val)) { 
    63                                 delete _rules[selector][style]; 
    64                         } else { 
    65                                 _rules[selector][style] = val; 
    66                         } 
    67                 } 
    68  
    69                 // IE9 limits the number of style tags in the head, so we need to update the entire stylesheet each time 
    70                 if (utils.isIE()) { 
    71                         _updateAllStyles(); 
    72                 } else { 
    73                         _updateStylesheet(selector, _styleSheets[selector]); 
    74                 } 
    75         } 
    76          
    77         function _styleValue(style, value, important) { 
    78                 if (typeof value === "undefined") { 
    79                         return undefined; 
    80                 }  
    81                  
    82                 var importantString = important ? " !important" : ""; 
    83  
    84                 if (typeof value == "number") { 
    85                         if (isNaN(value)) { 
    86                                 return undefined; 
    87                         } 
    88                         switch (style) { 
    89                         case "z-index": 
    90                         case "opacity": 
    91                                 return value + importantString; 
    92                                 break; 
    93                         default: 
    94                                 if (style.match(/color/i)) { 
    95                                         return "#" + utils.pad(value.toString(16), 6); 
    96                                 } else { 
    97                                         return Math.ceil(value) + "px" + importantString; 
    98                                 } 
    99                                 break; 
    100                         } 
    101                 } else { 
    102                         return value + importantString; 
    103                 } 
    104         } 
    105  
    106         function _updateAllStyles() { 
    107                 var ruleText = "\n"; 
    108                 for (var rule in _rules) { 
    109                         ruleText += _getRuleText(rule); 
    110                 } 
    111                 _styleSheet.innerHTML = ruleText; 
    112         } 
    113          
    114         function _updateStylesheet(selector, sheet) { 
    115                 if (sheet) { 
    116                         sheet.innerHTML = _getRuleText(selector); 
    117                 } 
    118         } 
    119          
    120         function _getRuleText(selector) { 
    121                 var ruleText = selector + "{\n"; 
    122                 var styles = _rules[selector]; 
    123                 for (var style in styles) { 
    124                         ruleText += "  "+style + ": " + styles[style] + ";\n"; 
    125                 } 
    126                 ruleText += "}\n"; 
    127                 return ruleText; 
    128         } 
    129          
    130          
    131         /** 
    132          * Removes all css elements which match a particular style 
    133          */ 
    134         utils.clearCss = function(filter) { 
    135                 for (var rule in _rules) { 
    136                         if (rule.indexOf(filter) >= 0) { 
    137                                 delete _rules[rule]; 
    138                         } 
    139                 } 
    140                 for (var selector in _styleSheets) { 
    141                         if (selector.indexOf(filter) >= 0) { 
    142                                 _styleSheets[selector].innerHTML = ''; 
    143                         } 
    144                 } 
    145         } 
     33        /** Used for styling dimensions in CSS -- return the string unchanged if it's a percentage width; add 'px' otherwise **/  
     34        utils.styleDimension = function(dimension) { 
     35                return dimension + (dimension.toString().indexOf("%") > 0 ? "" : "px"); 
     36        } 
     37 
    14638         
    14739        /** Gets an absolute file path based on a relative filepath * */ 
     
    295187                        var split = cookies[i].split('='); 
    296188                        if (split[0].indexOf("jwplayer.") == 0) { 
    297                                 jwCookies[split[0].substring(9, split[0].length)] = utils.serialize(split[1]); 
     189                                jwCookies[split[0].substring(9, split[0].length)] = split[1]; 
    298190                        } 
    299191                } 
  • branches/jw6/src/js/utils/jwplayer.utils.strings.js

    r2192 r2197  
    2525                return string; 
    2626        } 
    27          
    28                 /** 
    29          * Basic serialization: string representations of booleans and numbers are returned typed; 
    30          * strings are returned urldecoded. 
    31          * 
    32          * @param {String} val  String value to serialize. 
    33          * @return {Object}             The original value in the correct primitive type. 
    34          */ 
    35         utils.serialize = function(val) { 
    36                 if (val == null) { 
    37                         return null; 
    38                 } else if (val == 'true') { 
    39                         return true; 
    40                 } else if (val == 'false') { 
    41                         return false; 
    42                 } else if (isNaN(Number(val)) || val.length > 5 || val.length == 0) { 
    43                         return val; 
    44                 } else { 
    45                         return Number(val); 
    46                 } 
    47         } 
    48          
    4927         
    5028        /** 
     
    10078                var JSON = JSON || {} 
    10179                if (JSON && JSON.stringify) { 
    102                                 return JSON.stringify(obj); 
     80                        return JSON.stringify(obj); 
    10381                } 
    10482 
     
    159137                } 
    160138        }; 
     139         
     140        /** Convert a string representation of a string to an integer **/ 
     141        utils.stringToColor = function(value) { 
     142                value = value.replace(/(#|0x)?([0-9A-F]{3,6})$/gi, "$2"); 
     143                if (value.length == 3) { 
     144                        value = value.charAt(0) + value.charAt(0) + value.charAt(1) + value.charAt(1) + value.charAt(2) + value.charAt(2); 
     145                } 
     146                return parseInt(value, 16); 
     147        } 
     148 
    161149 
    162150})(jwplayer.utils); 
  • branches/jw6/test/controller.html

    r2192 r2197  
    5050                                                      }], 
    5151                                                      */ 
    52                           playlist: "/testing/files/trailers.xml", 
     52                          playlist: "http://playertest.longtailvideo.com/trailers.xml", 
    5353                      playlistsize: 300, 
    5454                      width: "100%", 
  • branches/jw6/test/embedder.html

    r2196 r2197  
    88                .wrapper { 
    99             width: 720px; 
    10              height: 470px; 
     10             height: 370px; 
    1111             position: relative; 
    1212                } 
     
    3838                      width: "100%", 
    3939                      height: "100%", 
    40                       playlistsize: "375", 
     40                      playlistsize: "300", 
    4141                      playlistposition: "right", 
    4242                      primary: form.mode.options[form.mode.selectedIndex].value 
Note: See TracChangeset for help on using the changeset viewer.