diff --git a/demos/js-webshim/dev/shims/combos/10.js b/demos/js-webshim/dev/shims/combos/10.js index 66b5ee23..db72b6b3 100644 --- a/demos/js-webshim/dev/shims/combos/10.js +++ b/demos/js-webshim/dev/shims/combos/10.js @@ -1689,6 +1689,14 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -1712,17 +1720,22 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -1835,14 +1848,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/12.js b/demos/js-webshim/dev/shims/combos/12.js index 74907f6e..f0e754bf 100644 --- a/demos/js-webshim/dev/shims/combos/12.js +++ b/demos/js-webshim/dev/shims/combos/12.js @@ -887,6 +887,14 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -910,17 +918,22 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -1033,14 +1046,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/16.js b/demos/js-webshim/dev/shims/combos/16.js index d1d97965..4947f826 100644 --- a/demos/js-webshim/dev/shims/combos/16.js +++ b/demos/js-webshim/dev/shims/combos/16.js @@ -887,6 +887,14 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -910,17 +918,22 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -1033,14 +1046,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/17.js b/demos/js-webshim/dev/shims/combos/17.js index 56737e7b..4aacf5fc 100644 --- a/demos/js-webshim/dev/shims/combos/17.js +++ b/demos/js-webshim/dev/shims/combos/17.js @@ -887,6 +887,14 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -910,17 +918,22 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -1033,14 +1046,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/20.js b/demos/js-webshim/dev/shims/combos/20.js index a2b7f1c9..956e7dd7 100644 --- a/demos/js-webshim/dev/shims/combos/20.js +++ b/demos/js-webshim/dev/shims/combos/20.js @@ -4,6 +4,14 @@ var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -27,17 +35,22 @@ var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -150,14 +163,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/22.js b/demos/js-webshim/dev/shims/combos/22.js index 6c4e4d64..8ab184a1 100644 --- a/demos/js-webshim/dev/shims/combos/22.js +++ b/demos/js-webshim/dev/shims/combos/22.js @@ -806,6 +806,14 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || ! var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -829,17 +837,22 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || ! var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -952,14 +965,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/23.js b/demos/js-webshim/dev/shims/combos/23.js index d85fca8f..e62b4bf8 100644 --- a/demos/js-webshim/dev/shims/combos/23.js +++ b/demos/js-webshim/dev/shims/combos/23.js @@ -4,6 +4,14 @@ var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -27,17 +35,22 @@ var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -150,14 +163,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/24.js b/demos/js-webshim/dev/shims/combos/24.js index 6ce7a582..24936597 100644 --- a/demos/js-webshim/dev/shims/combos/24.js +++ b/demos/js-webshim/dev/shims/combos/24.js @@ -2225,6 +2225,14 @@ jQuery.webshims.register('form-core', function($, webshims, window, document, un var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -2248,17 +2256,22 @@ jQuery.webshims.register('form-core', function($, webshims, window, document, un var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -2371,14 +2384,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/8.js b/demos/js-webshim/dev/shims/combos/8.js index 4fb32e11..fe3b84ab 100644 --- a/demos/js-webshim/dev/shims/combos/8.js +++ b/demos/js-webshim/dev/shims/combos/8.js @@ -887,6 +887,14 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -910,17 +918,22 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -1033,14 +1046,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/combos/9.js b/demos/js-webshim/dev/shims/combos/9.js index 337f91c7..e1221e27 100644 --- a/demos/js-webshim/dev/shims/combos/9.js +++ b/demos/js-webshim/dev/shims/combos/9.js @@ -887,6 +887,14 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -910,17 +918,22 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -1033,14 +1046,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/dev/shims/mediaelement-core.js b/demos/js-webshim/dev/shims/mediaelement-core.js index d38f49ed..8f76ac39 100644 --- a/demos/js-webshim/dev/shims/mediaelement-core.js +++ b/demos/js-webshim/dev/shims/mediaelement-core.js @@ -4,6 +4,14 @@ var supportsLoop = false; var options = webshims.cfg.mediaelement; var bugs = webshims.bugs; + var loadSwf = function(){ + webshims.ready('mediaelement-swf', function(){ + if(!webshims.mediaelement.createSWF){ + webshims.modules["mediaelement-swf"].test = $.noop; + webshims.reTest(["mediaelement-swf"], hasNative); + } + }); + }; var hasSwf; if(hasNative){ var videoElem = document.createElement('video'); @@ -27,17 +35,22 @@ var switchOptions = function(e){ var parent = e.target.parentNode; if(!options.preferFlash && ($(e.target).is('audio, video') || (parent && $('source:last', parent)[0] == e.target)) ){ - webshims.ready('mediaelement-swf', function(){ - setTimeout(function(){ - if(hasSwf && !options.preferFlash && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ - options.preferFlash = true; - document.removeEventListener('error', switchOptions, true); - $('audio, video').mediaLoad(); - webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); - } else if(!hasSwf){ - document.removeEventListener('error', switchOptions, true); - } - }, 20); + webshims.ready('DOM mediaelement', function(){ + if(hasSwf){ + loadSwf(); + } + webshims.ready('WINDOWLOAD mediaelement-swf', function(){ + setTimeout(function(){ + if(hasSwf && !options.preferFlash && webshims.mediaelement.createSWF && !$(e.target).closest('audio, video').is('.nonnative-api-active')){ + options.preferFlash = true; + document.removeEventListener('error', switchOptions, true); + $('audio, video').mediaLoad(); + webshims.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+e.target.src); + } else if(!hasSwf){ + document.removeEventListener('error', switchOptions, true); + } + }, 20); + }); }); } }; @@ -150,14 +163,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u var hasYt = !hasSwf && ('postMessage' in window) && hasNative; - var loadSwf = function(){ - webshims.ready('mediaelement-swf', function(){ - if(!mediaelement.createSWF){ - webshims.modules["mediaelement-swf"].test = $.noop; - webshims.reTest(["mediaelement-swf"], hasNative); - } - }); - }; + var loadYt = (function(){ var loaded; return function(){ diff --git a/demos/js-webshim/minified/shims/combos/10.js b/demos/js-webshim/minified/shims/combos/10.js index 24e9e6f2..7443e91f 100644 --- a/demos/js-webshim/minified/shims/combos/10.js +++ b/demos/js-webshim/minified/shims/combos/10.js @@ -1,84 +1,84 @@ -(function(){var a=Function.prototype.call,b=Object.prototype,h=Array.prototype.slice,l,m;if(!Function.prototype.bind)Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var e=h.call(arguments,1),d=function(){if(this instanceof d){var c=function(){};c.prototype=b.prototype;var c=new c,g=b.apply(c,e.concat(h.call(arguments)));return null!==g&&Object(g)===g?g:c}return b.apply(a,e.concat(h.call(arguments)))};return d};m=a.bind(b.toString);l=a.bind(b.hasOwnProperty); -if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==m(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){var e=q(this),d=0,c=e.length>>>0;if("[object Function]"!=m(a))throw new TypeError;for(;d>>0,c=Array(d);if("[object Function]"!=m(a))throw new TypeError;for(var g=0;g>>0,c=[];if("[object Function]"!=m(a))throw new TypeError;for(var g=0;g>>0;if("[object Function]"!=m(a))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=m(a))throw new TypeError; -for(var c=0;c>>0;if("[object Function]"!=m(a))throw new TypeError;if(!e&&1==arguments.length)throw new TypeError;var d=0,c;if(2<=arguments.length)c=arguments[1];else{do{if(d in b){c=b[d++];break}if(++d>=e)throw new TypeError;}while(1)}for(;d>>0;if("[object Function]"!=m(a))throw new TypeError;if(!e&&1==arguments.length)throw new TypeError;var d,e=e-1;if(2<=arguments.length)d=arguments[1];else{do{if(e in b){d=b[e--];break}if(0>--e)throw new TypeError;}while(1)}do e in this&&(d=a.call(void 0,d,b[e],e,b));while(e--);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var b=q(this),e=b.length>>>0;if(!e)return-1;var d=0;1>>0;if(!e)return-1;var d=e-1;1>>0;if("[object Function]"!=m(a))throw new TypeError;for(;d>>0,c=Array(d);if("[object Function]"!=m(a))throw new TypeError;for(var h=0;h>>0,c=[];if("[object Function]"!=m(a))throw new TypeError;for(var h=0;h>>0;if("[object Function]"!=m(a))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=m(a))throw new TypeError; +for(var c=0;c>>0;if("[object Function]"!=m(a))throw new TypeError;if(!e&&1==arguments.length)throw new TypeError;var d=0,c;if(2<=arguments.length)c=arguments[1];else{do{if(d in b){c=b[d++];break}if(++d>=e)throw new TypeError;}while(1)}for(;d>>0;if("[object Function]"!=m(a))throw new TypeError;if(!e&&1==arguments.length)throw new TypeError;var d,e=e-1;if(2<=arguments.length)d=arguments[1];else{do{if(e in b){d=b[e--];break}if(0>--e)throw new TypeError;}while(1)}do e in this&&(d=a.call(void 0,d,b[e],e,b));while(e--);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var b=k(this),e=b.length>>>0;if(!e)return-1;var d=0;1>>0;if(!e)return-1;var d=e-1;1e&&(a[b]="0"+e);return a.slice(0,3).join("-")+"T"+a.slice(3).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};if(!Date.now)Date.now=function(){return(new Date).getTime()};if(!Date.prototype.toJSON)Date.prototype.toJSON=function(){if("function"!=typeof this.toISOString)throw new TypeError;return this.toISOString()};a="\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"; -if(!String.prototype.trim||a.trim()){var a="["+a+"]",s=RegExp("^"+a+a+"*"),x=RegExp(a+a+"*$");String.prototype.trim=function(){return(""+this).replace(s,"").replace(x,"")}}if("0".split(void 0,0).length){var C=String.prototype.split;String.prototype.split=function(a,b){return void 0===a&&0===b?[]:C.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var D=String.prototype.substr;String.prototype.substr=function(a,b){return D.call(this,0>a?0>(a=this.length+a)?0:a:a,b)}}var w=function(a){a=+a; -a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0h&&7")[0].readyState;if(!f.track)try{new TextTrackCue(2,3,"")}catch(b){try{new TextTrackCue("",2,3,"","",!1);var x=TextTrackCue;window.TextTrackCue=function(a,b,e,d,c,f){3!=arguments.length&&h.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4=b.duration||b.duration===b._lastDuration)b.duration=d}catch(e){}b.duration&& -b.duration!=b._lastDuration?(p(b._elem,"durationchange"),("audio"==b._elemNodeName||b._callMeta)&&f.jwEvents.Model.META(a.extend({duration:b.duration},c),b),b._durationCalcs--):b._durationCalcs++}},c=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,p(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){c(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,p(b._elem,"canplaythrough");b.readyState=a};a.extend(a.event.customEvent, -{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});f.jwEvents={View:{PLAY:function(a){var b=j(a.id);if(b&&!b.stopPlayPause&&(b._ppFlag=!0,b.paused==a.state)){b.paused=!a.state;if(b.ended)b.ended=!1;p(b._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(b){var v=j(b.id);if(v&&"percentage"in b&&v._bufferedEnd!=b.percentage){v.networkState=100==b.percentage?1:2;(isNaN(v.duration)||5b.percentage||100===b.percentage)&&d(v,b);if(v.ended)v.ended= -!1;if(v.duration){2b.percentage?c(3,v):20b.percentage)v._bufferedStart=v.currentTime||0;v._bufferedEnd=b.percentage;v.buffered.length=1;if(100==b.percentage)v.networkState=1,c(4,v);a.event.trigger("progress",m,v._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:j(a.id))if("duration"in a){if(!b._metadata||!((!a.height||b.videoHeight==a.height)&&a.duration===b.duration)){b._metadata=!0;var d=b.duration;if(a.duration)b.duration= -a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&c(1,b);b.duration&&d!==b.duration&&p(b._elem,"durationchange");p(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=j(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.durationb.readyState&&c(2,b);if(b.ended)b.ended=!1;p(b._elem,"timeupdate")}},STATE:function(a){var b= -j(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;c(1,b);p(b._elem,"waiting");break;case "PLAYING":b.paused=!1;b._ppFlag=!0;b.duration||d(b,a);3>b.readyState&&c(3,b);if(b.ended)b.ended=!1;p(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,p(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&c(4,b),b.ended=!0,p(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=j(a.id);b&&f.setError(b._elem,a.message)},SEEK:function(a){var b= -j(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,p(b._elem,"timeupdate")}},VOLUME:function(a){var b=j(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,p(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=j(a.id);if(b&&b.muted!=a.state)b.muted=a.state,p(b._elem,"volumechange")}}}};var g=function(b){var c=!0;a.each(f.jwEvents,function(d,e){a.each(e,function(a){try{b.jwapi["add"+d+"Listener"](a, -"jQuery.webshims.mediaelement.jwEvents."+d+"."+a)}catch(e){return c=!1}})});return c},i=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},u=function(b){b&&(b._ppFlag===m&&a.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("third"==b.isActive&&(b._ppFlag===m||!b.paused))try{a(b._elem).play()}catch(c){}},1)},G=function(b){if(b&& -"video"==b._elemNodeName){var c,d,e,f,g,h,i,j,k=function(k,l){if(l&&k&&!(1>l||1>k||"third"!=b.isActive))if(c&&(c.remove(),c=!1),f=k,g=l,clearTimeout(i),d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e){h=h||a(b._elem).getShadowElement();var m;d&&!e?(m=h.height(),k*=m/l,l=m):!d&&e&&(m=h.width(),l*=m/k,k=m);j=!0;setTimeout(function(){j=!1},9);h.css({width:k,height:l})}},l=function(){if(!("third"!=b.isActive||a.prop(b._elem,"readyState")&&a.prop(this,"videoWidth"))){var f=a.prop(b._elem, -"poster");if(f&&(d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e))c&&(c.remove(),c=!1),c=a(''),c.bind("load error alreadycomplete",function(){clearTimeout(i);var b=this,d=b.naturalWidth||b.width||b.offsetWidth,e=b.naturalHeight||b.height||b.offsetHeight;e&&d?(k(d,e),b=null):setTimeout(function(){d=b.naturalWidth||b.width||b.offsetWidth;e=b.naturalHeight||b.height||b.offsetHeight; -k(d,e);c&&(c.remove(),c=!1);b=null},9);a(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete||this.error?a(this).triggerHandler("alreadycomplete"):(clearTimeout(i),i=setTimeout(function(){a(b._elem).triggerHandler("error")},9999))})}};a(b._elem).bind("loadedmetadata",function(){k(a.prop(this,"videoWidth"),a.prop(this,"videoHeight"))}).bind("emptied",l).bind("swfstageresize updatemediaelementdimensions",function(){j||k(f,g)}).bind("emptied",function(){f=void 0;g=void 0}).triggerHandler("swfstageresize"); -l();a.prop(b._elem,"readyState")&&k(a.prop(b._elem,"videoWidth"),a.prop(b._elem,"videoHeight"))}};f.playerResize=function(b){b&&(b=l.getElementById(b.replace(w,"")))&&a(b).triggerHandler("swfstageresize")};a(l).bind("emptied",function(a){a=q(a.target);u(a)});var t;f.jwPlayerReady=function(c){var d=j(c.id),e=0,f=function(){if(!(9h||6<=h)&&b.warn("mediaelement-swf is only testet with jwplayer 5.6+")}d.wasSwfReady= -!0;d.tryedReframeing=0;i(d);u(d)}else clearTimeout(d.reframeTimer),d.reframeTimer=setTimeout(f,9*e),2d.tryedReframeing&&(d.tryedReframeing++,d.shadowElem.css({overflow:"visible"}),setTimeout(function(){d.shadowElem.css({overflow:"hidden"})},16))};if(d&&d.jwapi){if(!d.tryedReframeing)d.tryedReframeing=0;clearTimeout(t);d.jwData=c;d.shadowElem.removeClass("flashblocker-assumed");a.prop(d._elem,"volume",d.volume);a.prop(d._elem,"muted",d.muted);f()}};var y=a.noop;if(k){var A={play:1,playing:1}, -B="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),I=B.map(function(a){return a+".webshimspolyfill"}).join(" "),J=function(c){var d=b.data(c.target,"mediaelement");d&&(c.originalEvent&&c.originalEvent.type===c.type)==("third"==d.activating)&&(c.stopImmediatePropagation(),A[c.type]&&d.isActive!=d.activating&&a(c.target).pause())},y=function(c){a(c).unbind(I).bind(I,J);B.forEach(function(a){b.moveToFirstEvent(c,a)})};y(l)}f.setActive=function(c,d, +if(!String.prototype.trim||a.trim()){var a="["+a+"]",v=RegExp("^"+a+a+"*"),y=RegExp(a+a+"*$");String.prototype.trim=function(){return(""+this).replace(v,"").replace(y,"")}}if("0".split(void 0,0).length){var z=String.prototype.split;String.prototype.split=function(a,b){return void 0===a&&0===b?[]:z.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var D=String.prototype.substr;String.prototype.substr=function(a,b){return D.call(this,0>a?0>(a=this.length+a)?0:a:a,b)}}var x=function(a){a=+a; +a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0g&&7")[0].readyState;if(!f.track)try{new TextTrackCue(2,3,"")}catch(b){try{new TextTrackCue("",2,3,"","",!1);var j=TextTrackCue; +window.TextTrackCue=function(a,b,d,c,f,i){3!=arguments.length&&g.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4=b.duration||b.duration===b._lastDuration)b.duration=d}catch(e){}b.duration&& +b.duration!=b._lastDuration?(o(b._elem,"durationchange"),("audio"==b._elemNodeName||b._callMeta)&&f.jwEvents.Model.META(a.extend({duration:b.duration},c),b),b._durationCalcs--):b._durationCalcs++}},c=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,o(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){c(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,o(b._elem,"canplaythrough");b.readyState=a};a.extend(a.event.customEvent, +{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});f.jwEvents={View:{PLAY:function(a){var b=n(a.id);if(b&&!b.stopPlayPause&&(b._ppFlag=!0,b.paused==a.state)){b.paused=!a.state;if(b.ended)b.ended=!1;o(b._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(b){var w=n(b.id);if(w&&"percentage"in b&&w._bufferedEnd!=b.percentage){w.networkState=100==b.percentage?1:2;(isNaN(w.duration)||5b.percentage||100===b.percentage)&&d(w,b);if(w.ended)w.ended= +!1;if(w.duration){2b.percentage?c(3,w):20b.percentage)w._bufferedStart=w.currentTime||0;w._bufferedEnd=b.percentage;w.buffered.length=1;if(100==b.percentage)w.networkState=1,c(4,w);a.event.trigger("progress",m,w._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:n(a.id))if("duration"in a){if(!b._metadata||!((!a.height||b.videoHeight==a.height)&&a.duration===b.duration)){b._metadata=!0;var d=b.duration;if(a.duration)b.duration= +a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&c(1,b);b.duration&&d!==b.duration&&o(b._elem,"durationchange");o(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=n(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.durationb.readyState&&c(2,b);if(b.ended)b.ended=!1;o(b._elem,"timeupdate")}},STATE:function(a){var b= +n(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;c(1,b);o(b._elem,"waiting");break;case "PLAYING":b.paused=!1;b._ppFlag=!0;b.duration||d(b,a);3>b.readyState&&c(3,b);if(b.ended)b.ended=!1;o(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,o(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&c(4,b),b.ended=!0,o(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=n(a.id);b&&f.setError(b._elem,a.message)},SEEK:function(a){var b= +n(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,o(b._elem,"timeupdate")}},VOLUME:function(a){var b=n(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,o(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=n(a.id);if(b&&b.muted!=a.state)b.muted=a.state,o(b._elem,"volumechange")}}}};var h=function(b){var c=!0;a.each(f.jwEvents,function(d,e){a.each(e,function(a){try{b.jwapi["add"+d+"Listener"](a, +"jQuery.webshims.mediaelement.jwEvents."+d+"."+a)}catch(e){return c=!1}})});return c},i=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},s=function(b){b&&(b._ppFlag===m&&a.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("third"==b.isActive&&(b._ppFlag===m||!b.paused))try{a(b._elem).play()}catch(c){}},1)},I=function(b){if(b&& +"video"==b._elemNodeName){var c,d,e,f,g,h,i,k,j=function(j,l){if(l&&j&&!(1>l||1>j||"third"!=b.isActive))if(c&&(c.remove(),c=!1),f=j,g=l,clearTimeout(i),d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e){h=h||a(b._elem).getShadowElement();var m;d&&!e?(m=h.height(),j*=m/l,l=m):!d&&e&&(m=h.width(),l*=m/j,j=m);k=!0;setTimeout(function(){k=!1},9);h.css({width:j,height:l})}},l=function(){if(!("third"!=b.isActive||a.prop(b._elem,"readyState")&&a.prop(this,"videoWidth"))){var f=a.prop(b._elem, +"poster");if(f&&(d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e))c&&(c.remove(),c=!1),c=a(''),c.bind("load error alreadycomplete",function(){clearTimeout(i);var b=this,d=b.naturalWidth||b.width||b.offsetWidth,e=b.naturalHeight||b.height||b.offsetHeight;e&&d?(j(d,e),b=null):setTimeout(function(){d=b.naturalWidth||b.width||b.offsetWidth;e=b.naturalHeight||b.height||b.offsetHeight; +j(d,e);c&&(c.remove(),c=!1);b=null},9);a(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete||this.error?a(this).triggerHandler("alreadycomplete"):(clearTimeout(i),i=setTimeout(function(){a(b._elem).triggerHandler("error")},9999))})}};a(b._elem).bind("loadedmetadata",function(){j(a.prop(this,"videoWidth"),a.prop(this,"videoHeight"))}).bind("emptied",l).bind("swfstageresize updatemediaelementdimensions",function(){k||j(f,g)}).bind("emptied",function(){f=void 0;g=void 0}).triggerHandler("swfstageresize"); +l();a.prop(b._elem,"readyState")&&j(a.prop(b._elem,"videoWidth"),a.prop(b._elem,"videoHeight"))}};f.playerResize=function(b){b&&(b=l.getElementById(b.replace(x,"")))&&a(b).triggerHandler("swfstageresize")};a(l).bind("emptied",function(a){a=k(a.target);s(a)});var q;f.jwPlayerReady=function(c){var d=n(c.id),e=0,f=function(){if(!(9g||6<=g)&&b.warn("mediaelement-swf is only testet with jwplayer 5.6+")}d.wasSwfReady= +!0;d.tryedReframeing=0;i(d);s(d)}else clearTimeout(d.reframeTimer),d.reframeTimer=setTimeout(f,9*e),2d.tryedReframeing&&(d.tryedReframeing++,d.shadowElem.css({overflow:"visible"}),setTimeout(function(){d.shadowElem.css({overflow:"hidden"})},16))};if(d&&d.jwapi){if(!d.tryedReframeing)d.tryedReframeing=0;clearTimeout(q);d.jwData=c;d.shadowElem.removeClass("flashblocker-assumed");a.prop(d._elem,"volume",d.volume);a.prop(d._elem,"muted",d.muted);f()}};var A=a.noop;if(j){var B={play:1,playing:1}, +C="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),H=C.map(function(a){return a+".webshimspolyfill"}).join(" "),J=function(c){var d=b.data(c.target,"mediaelement");d&&(c.originalEvent&&c.originalEvent.type===c.type)==("third"==d.activating)&&(c.stopImmediatePropagation(),B[c.type]&&d.isActive!=d.activating&&a(c.target).pause())},A=function(c){a(c).unbind(H).bind(H,J);C.forEach(function(a){b.moveToFirstEvent(c,a)})};A(l)}f.setActive=function(c,d, e){e||(e=b.data(c,"mediaelement"));if(e&&e.isActive!=d){"html5"!=d&&"third"!=d&&b.warn("wrong type for mediaelement activating: "+d);var f=b.data(c,"shadowData");e.activating=d;a(c).pause();e.isActive=d;"third"==d?(f.shadowElement=f.shadowFocusElement=e.shadowElem[0],a(c).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(a(c).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),f.shadowElement=f.shadowFocusElement=!1);a(c).trigger("mediaelementapichange")}}; -var K=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(d){if(d){var e=b,f=d.networkState;for(c(0,d);--e;)delete d[a[e]];d.actionQueue=[];d.buffered.length=0;f&&p(d._elem,"emptied")}}}(),H=function(b,c){var d=b._elem,e=b.shadowElem;a(d)[c?"addClass":"removeClass"]("webshims-controls");"audio"==b._elemNodeName&&!c?e.css({width:0,height:0}):e.css({width:d.style.width|| -a(d).width(),height:d.style.height||a(d).height()})};f.createSWF=function(c,d,g){if(r){1>s?s=1:s++;var h=a.extend({},n.jwVars,{image:a.prop(c,"poster")||"",file:d.srcProp}),i=a(c).data("jwvars")||{};g||(g=b.data(c,"mediaelement"));if(g&&g.swfCreated)f.setActive(c,"third",g),K(g),g.currentSrc=d.srcProp,a.extend(h,i),n.changeJW(h,c,d,g,"load"),E(c,"sendEvent",["LOAD",h]);else{var j=a.prop(c,"controls"),F="jwplayer-"+b.getID(c),l=a.extend({},n.jwParams,a(c).data("jwparams")),m=c.nodeName.toLowerCase(), -p=a.extend({},n.jwAttrs,{name:F,id:F},a(c).data("jwattrs")),q=a('
').css({position:"relative",overflow:"hidden"}),g=b.data(c,"mediaelement",b.objectCreate(D,{actionQueue:{value:[]},shadowElem:{value:q},_elemNodeName:{value:m},_elem:{value:c},currentSrc:{value:d.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=g.buffered.length)b.error("buffered index size error");else return 0},end:function(a){if(a>= -g.buffered.length)b.error("buffered index size error");else return(g.duration-g._bufferedStart)*g._bufferedEnd/100+g._bufferedStart},length:0}}}));H(g,j);q.insertBefore(c);k&&a.extend(g,{volume:a.prop(c,"volume"),muted:a.prop(c,"muted")});a.extend(h,{id:F,controlbar:j?n.jwVars.controlbar||("video"==m?"over":"bottom"):"video"==m?"none":"bottom",icons:""+(j&&"video"==m)},i,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});h.plugins=h.plugins?h.plugins+(","+e):e;b.addShadowDom(c,q);y(c);f.setActive(c, -"third",g);n.changeJW(h,c,d,g,"embed");a(c).bind("updatemediaelementdimensions updateshadowdom",function(){H(g,a.prop(c,"controls"))});G(g);o.embedSWF(z,F,"100%","100%","9.0.0",!1,h,l,p,function(d){if(d.success)g.jwapi=d.ref,j||a(d.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!d.ref.parentNode&&q[0].parentNode||"none"==d.ref.style.display)q.addClass("flashblocker-assumed"),a(c).trigger("flashblocker"),b.warn("flashblocker assumed");a(d.ref).css({minHeight:"2px",minWidth:"2px", -display:"block"})},9),t||(clearTimeout(t),t=setTimeout(function(){var c=a(d.ref);1c[0].offsetWidth||2>c[0].offsetHeight)&&b.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){a(c).mediaLoad()}, -1)};var E=function(a,b,c,d){return(d=d||q(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10a||100b.browserVersion,N={object:1,OBJECT:1};a.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&s)for(b=0;bv?v=1:v++;var h=a.extend({},r.jwVars,{image:a.prop(c,"poster")||"",file:d.srcProp}),i=a(c).data("jwvars")||{};g||(g=b.data(c,"mediaelement"));if(g&&g.swfCreated)f.setActive(c,"third",g),K(g),g.currentSrc=d.srcProp,a.extend(h,i),r.changeJW(h,c,d,g,"load"),E(c,"sendEvent",["LOAD",h]);else{var k=a.prop(c,"controls"),F="jwplayer-"+b.getID(c),l=a.extend({},r.jwParams,a(c).data("jwparams")),m=c.nodeName.toLowerCase(), +o=a.extend({},r.jwAttrs,{name:F,id:F},a(c).data("jwattrs")),n=a('
').css({position:"relative",overflow:"hidden"}),g=b.data(c,"mediaelement",b.objectCreate(D,{actionQueue:{value:[]},shadowElem:{value:n},_elemNodeName:{value:m},_elem:{value:c},currentSrc:{value:d.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=g.buffered.length)b.error("buffered index size error");else return 0},end:function(a){if(a>= +g.buffered.length)b.error("buffered index size error");else return(g.duration-g._bufferedStart)*g._bufferedEnd/100+g._bufferedStart},length:0}}}));G(g,k);n.insertBefore(c);j&&a.extend(g,{volume:a.prop(c,"volume"),muted:a.prop(c,"muted")});a.extend(h,{id:F,controlbar:k?r.jwVars.controlbar||("video"==m?"over":"bottom"):"video"==m?"none":"bottom",icons:""+(k&&"video"==m)},i,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});h.plugins=h.plugins?h.plugins+(","+e):e;b.addShadowDom(c,n);A(c);f.setActive(c, +"third",g);r.changeJW(h,c,d,g,"embed");a(c).bind("updatemediaelementdimensions updateshadowdom",function(){G(g,a.prop(c,"controls"))});I(g);t.embedSWF(u,F,"100%","100%","9.0.0",!1,h,l,o,function(d){if(d.success)g.jwapi=d.ref,k||a(d.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!d.ref.parentNode&&n[0].parentNode||"none"==d.ref.style.display)n.addClass("flashblocker-assumed"),a(c).trigger("flashblocker"),b.warn("flashblocker assumed");a(d.ref).css({minHeight:"2px",minWidth:"2px", +display:"block"})},9),q||(clearTimeout(q),q=setTimeout(function(){var c=a(d.ref);1c[0].offsetWidth||2>c[0].offsetHeight)&&b.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){a(c).mediaLoad()}, +1)};var E=function(a,b,c,d){return(d=d||k(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10a||100b.browserVersion,N={object:1,OBJECT:1};a.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&v)for(b=0;bl&&7")[0].readyState;if(!r.track)try{new TextTrackCue(2,3,"")}catch(f){try{new TextTrackCue("",2,3,"","",!1);var e=TextTrackCue;window.TextTrackCue=function(d,f,i,b,a,c){3!=arguments.length&&l.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4');h.moveToFirstEvent(this, -"click")}});var s;h.defineNodeNamesBooleanProperty("details","open",function(j){var f=d(d.data(this,"summaryElement"));if(f){var e=j?"removeClass":"addClass",h=d(this);if(!s&&v.animate){h.stop().css({width:"",height:""});var l={width:h.width(),height:h.height()}}f.attr("aria-expanded",""+j);h[e]("closed-details-summary").children().not(f[0])[e]("closed-details-child");!s&&v.animate&&(j={width:h.width(),height:h.height()},h.css(l).animate(j,{complete:function(){d(this).css({width:"",height:""})}}))}}); -h.createElement("details",function(){s=!0;var h=d.data(this,"summaryElement");h||(h=d("> summary:first-child",this),h[0]?m(h,this):(d(this).prependPolyfill(''+v.text+""),d.data(this,"summaryElement")));d.prop(this,"open",d.prop(this,"open"));s=!1})}); +jQuery.webshims.register("dom-extend",function(d,h,i,n,q){var w=h.modules,r=/\s*,\s*/,s={},m={},j={},v={},f={},g=d.fn.val,E=function(b,a,c,e,p){return p?g.call(d(b)):g.call(d(b),c)};d.fn.val=function(b){var a=this[0];arguments.length&&null==b&&(b="");if(!arguments.length)return!a||1!==a.nodeType?g.call(this):d.prop(a,"value",b,"val",!0);if(d.isArray(b))return g.apply(this,arguments);var c=d.isFunction(b);return this.each(function(e){a=this;1===a.nodeType&&(c?(e=b.call(a,e,d.prop(a,"value",q,"val", +!0)),null==e&&(e=""),d.prop(a,"value",e,"val")):d.prop(a,"value",b,"val"))})};var x="_webshimsLib"+Math.round(1E3*Math.random()),C=function(b,a,c){b=b.jquery?b[0]:b;if(!b)return c||{};var e=d.data(b,x);c!==q&&(e||(e=d.data(b,x,{})),a&&(e[a]=c));return a?e&&e[a]:e};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(b){d.fn[b.name]=function(){return this.map(function(){var a=C(this, +"shadowData");return a&&a[b.prop]||this})}});["removeAttr","prop","attr"].forEach(function(b){s[b]=d[b];d[b]=function(a,c,e,p,A){var k="val"==p,t=!k?s[b]:E;if(!a||!m[c]||1!==a.nodeType||!k&&p&&"attr"==b&&d.attrFn[c])return t(a,c,e,p,A);var o=(a.nodeName||"").toLowerCase(),z=j[o],B="attr"==b&&(!1===e||null===e)?"removeAttr":b,g,h,l;z||(z=j["*"]);z&&(z=z[c]);z&&(g=z[B]);if(g){if("value"==c)h=g.isVal,g.isVal=k;if("removeAttr"===B)return g.value.call(a);if(e===q)return g.get?g.get.call(a):g.value;g.set&& +("attr"==b&&!0===e&&(e=c),l=g.set.call(a,e));if("value"==c)g.isVal=h}else l=t(a,c,e,p,A);if((e!==q||"removeAttr"===B)&&f[o]&&f[o][c]){var i;i="removeAttr"==B?!1:"prop"==B?!!e:!0;f[o][c].forEach(function(c){if(!c.only||(c.only="prop"==b)||"attr"==c.only&&"prop"!=b)c.call(a,e,i,k?"val":B,b)})}return l};v[b]=function(a,c,e){j[a]||(j[a]={});j[a][c]||(j[a][c]={});var p=j[a][c][b],f=function(a,d,o){return d&&d[a]?d[a]:o&&o[a]?o[a]:"prop"==b&&"value"==c?function(a){return e.isVal?E(this,c,a,!1,0===arguments.length): +s[b](this,c,a)}:"prop"==b&&"value"==a&&e.value.apply?function(a){var o=s[b](this,c);o&&o.apply&&(o=o.apply(this,arguments));return o}:function(a){return s[b](this,c,a)}};j[a][c][b]=e;if(e.value===q){if(!e.set)e.set=e.writeable?f("set",e,p):h.cfg.useStrict&&"prop"==c?function(){throw c+" is readonly on "+a;}:d.noop;if(!e.get)e.get=f("get",e,p)}["value","get","set"].forEach(function(a){e[a]&&(e["_sup"+a]=f(a,p))})}});var l=!d.browser.msie||8i&&7")[0].readyState;if(!r.track)try{new TextTrackCue(2,3,"")}catch(f){try{new TextTrackCue("",2,3,"","",!1);var g=TextTrackCue; +window.TextTrackCue=function(d,f,b,a,c,e){3!=arguments.length&&i.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4');h.moveToFirstEvent(this, +"click")}});var m;h.defineNodeNamesBooleanProperty("details","open",function(h){var i=d(d.data(this,"summaryElement"));if(i){var f=h?"removeClass":"addClass",g=d(this);if(!m&&w.animate){g.stop().css({width:"",height:""});var n={width:g.width(),height:g.height()}}i.attr("aria-expanded",""+h);g[f]("closed-details-summary").children().not(i[0])[f]("closed-details-child");!m&&w.animate&&(h={width:g.width(),height:g.height()},g.css(n).animate(h,{complete:function(){d(this).css({width:"",height:""})}}))}}); +h.createElement("details",function(){m=!0;var h=d.data(this,"summaryElement");h||(h=d("> summary:first-child",this),h[0]?s(h,this):(d(this).prependPolyfill(''+w.text+""),d.data(this,"summaryElement")));d.prop(this,"open",d.prop(this,"open"));m=!1})}); diff --git a/demos/js-webshim/minified/shims/combos/16.js b/demos/js-webshim/minified/shims/combos/16.js index bd3c0ecc..face8789 100644 --- a/demos/js-webshim/minified/shims/combos/16.js +++ b/demos/js-webshim/minified/shims/combos/16.js @@ -1,61 +1,61 @@ -jQuery.webshims.register("dom-extend",function(a,h,j,k,m){var u=h.modules,p=/\s*,\s*/,n={},r={},o={},q={},g={},B=a.fn.val,z=function(c,b,d,i,y){return y?B.call(a(c)):B.call(a(c),d)};a.fn.val=function(c){var b=this[0];arguments.length&&null==c&&(c="");if(!arguments.length)return!b||1!==b.nodeType?B.call(this):a.prop(b,"value",c,"val",!0);if(a.isArray(c))return B.apply(this,arguments);var d=a.isFunction(c);return this.each(function(i){b=this;1===b.nodeType&&(d?(i=c.call(b,i,a.prop(b,"value",m,"val", -!0)),null==i&&(i=""),a.prop(b,"value",i,"val")):a.prop(b,"value",c,"val"))})};var v="_webshimsLib"+Math.round(1E3*Math.random()),l=function(c,b,d){c=c.jquery?c[0]:c;if(!c)return d||{};var i=a.data(c,v);d!==m&&(i||(i=a.data(c,v,{})),b&&(i[b]=d));return b?i&&i[b]:i};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(c){a.fn[c.name]=function(){return this.map(function(){var a=l(this, -"shadowData");return a&&a[c.prop]||this})}});["removeAttr","prop","attr"].forEach(function(c){n[c]=a[c];a[c]=function(b,d,i,y,e){var s="val"==y,w=!s?n[c]:z;if(!b||!r[d]||1!==b.nodeType||!s&&y&&"attr"==c&&a.attrFn[d])return w(b,d,i,y,e);var t=(b.nodeName||"").toLowerCase(),f=o[t],h="attr"==c&&(!1===i||null===i)?"removeAttr":c,q,x,j;f||(f=o["*"]);f&&(f=f[d]);f&&(q=f[h]);if(q){if("value"==d)x=q.isVal,q.isVal=s;if("removeAttr"===h)return q.value.call(b);if(i===m)return q.get?q.get.call(b):q.value;q.set&& -("attr"==c&&!0===i&&(i=d),j=q.set.call(b,i));if("value"==d)q.isVal=x}else j=w(b,d,i,y,e);if((i!==m||"removeAttr"===h)&&g[t]&&g[t][d]){var l;l="removeAttr"==h?!1:"prop"==h?!!i:!0;g[t][d].forEach(function(a){if(!a.only||(a.only="prop"==c)||"attr"==a.only&&"prop"!=c)a.call(b,i,l,s?"val":h,c)})}return j};q[c]=function(b,d,i){o[b]||(o[b]={});o[b][d]||(o[b][d]={});var e=o[b][d][c],f=function(a,b,t){return b&&b[a]?b[a]:t&&t[a]?t[a]:"prop"==c&&"value"==d?function(a){return i.isVal?z(this,d,a,!1,0===arguments.length): -n[c](this,d,a)}:"prop"==c&&"value"==a&&i.value.apply?function(a){var b=n[c](this,d);b&&b.apply&&(b=b.apply(this,arguments));return b}:function(a){return n[c](this,d,a)}};o[b][d][c]=i;if(i.value===m){if(!i.set)i.set=i.writeable?f("set",i,e):h.cfg.useStrict&&"prop"==d?function(){throw d+" is readonly on "+b;}:a.noop;if(!i.get)i.get=f("get",i,e)}["value","get","set"].forEach(function(a){i[a]&&(i["_sup"+a]=f(a,e))})}});var C=!a.browser.msie||8j&&7")[0].readyState;if(!p.track)try{new TextTrackCue(2,3,"")}catch(h){try{new TextTrackCue("",2,3,"","",!1);var g=TextTrackCue;window.TextTrackCue=function(a,f,h,c,b,d){3!=arguments.length&&j.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4'),u=function(){if(m[0].querySelector)try{k.findRequired=!m[0].querySelector("select:required")}catch(a){k.findRequired=!1}};k.findRequired=!1;k.validationMessage=!1;k.valueAsNumberSet=!1;j.capturingEventPrevented=function(g){if(!g._isPolyfilled){var h=g.isDefaultPrevented, -j=g.preventDefault;g.preventDefault=function(){clearTimeout(a.data(g.target,g.type+"DefaultPrevented"));a.data(g.target,g.type+"DefaultPrevented",setTimeout(function(){a.removeData(g.target,g.type+"DefaultPrevented")},30));return j.apply(this,arguments)};g.isDefaultPrevented=function(){return!(!h.apply(this,arguments)&&!a.data(g.target,g.type+"DefaultPrevented"))};g._isPolyfilled=!0}};if(!h.formvalidation||k.bustedValidity)u();else if(j.capturingEvents(["input"]),j.capturingEvents(["invalid"],!0), -h.bugfreeformvalidation=!0,window.opera||a.browser.webkit||window.testGoodWithFix){var p=a("input",m).eq(0),n,r=function(a){j.loader.loadList(["dom-extend"]);j.ready("dom-extend",a)},o=function(g){var k=["form-extend","form-message","form-native-fix"];g&&(g.preventDefault(),g.stopImmediatePropagation());clearTimeout(n);setTimeout(function(){m&&(m.remove(),m=p=null)},9);if(!h.bugfreeformvalidation)j.addPolyfill("form-native-fix",{f:"forms",d:["form-extend"]}),j.modules["form-extend"].test=a.noop;j.isReady("form-number-date-api")&& -k.push("form-number-date-api");j.reTest(k);if(p)try{p.prop({disabled:!0,value:""}).prop("disabled",!1).is(":valid")&&r(function(){j.onNodeNamesPropertyModify(["input","textarea"],["disabled","readonly"],{set:function(g){!g&&this&&a.prop(this,"value",a.prop(this,"value"))}});j.onNodeNamesPropertyModify(["select"],["disabled","readonly"],{set:function(g){if(!g&&this)g=a(this).val(),(a("option:last-child",this)[0]||{}).selected=!0,a(this).val(g)}})})}catch(o){}(a.browser.opera||window.testGoodWithFix)&& -r(function(){var g=function(a){a.preventDefault()};["form","input","textarea","select"].forEach(function(h){var k=j.defineNodeNameProperty(h,"checkValidity",{prop:{value:function(){j.fromSubmit||a(this).bind("invalid.checkvalidity",g);j.fromCheckValidity=!0;var e=k.prop._supvalue.apply(this,arguments);j.fromSubmit||a(this).unbind("invalid.checkvalidity",g);j.fromCheckValidity=!1;return e}}})})})};m.appendTo("head");if(window.opera||window.testGoodWithFix){u();k.validationMessage=!p.prop("validationMessage"); -if((h.inputtypes||{}).date){try{p.prop("valueAsNumber",0)}catch(q){}k.valueAsNumberSet="1970-01-01"!=p.prop("value")}p.prop("value","")}m.bind("submit",function(a){h.bugfreeformvalidation=!1;o(a)});n=setTimeout(function(){m&&m.triggerHandler("submit")},9);a("input, select",m).bind("invalid",o).filter('[type="submit"]').bind("click",function(a){a.stopImmediatePropagation()}).trigger("click");a.browser.webkit&&h.bugfreeformvalidation&&!j.bugs.bustedValidity&&function(){var g=/^(?:textarea|input)$/i, -h=!1;document.addEventListener("contextmenu",function(a){g.test(a.target.nodeName||"")&&(h=a.target.form)&&setTimeout(function(){h=!1},1)},!1);a(window).bind("invalid",function(a){if(a.originalEvent&&h&&h==a.target.form)a.wrongWebkitInvalid=!0,a.stopImmediatePropagation()})}()}})(jQuery); -jQuery.webshims.register("form-core",function(a,h,j,k,m,u){var p={radio:1},n={checkbox:1,radio:1},r=a([]),o=h.bugs,q=function(e){var e=a(e),f,g;f=r;if(p[e[0].type])g=e.prop("form"),f=(f=e[0].name)?g?a(g[f]):a(k.getElementsByName(f)).filter(function(){return!a.prop(this,"form")}):e,f=f.filter('[type="radio"]');return f},g=h.getContentValidationMessage=function(e,f,g){var c=a(e).data("errormessage")||e.getAttribute("x-moz-errormessage")||"";g&&c[g]&&(c=c[g]);"object"==typeof c&&(f=f||a.prop(e,"validity")|| -{valid:1},f.valid||a.each(f,function(a,d){if(d&&"valid"!=a&&c[a])return c=c[a],!1}));if("object"==typeof c)c=c.defaultMessage;return c||""},B={number:1,range:1,date:1};a.extend(a.expr.filters,{"valid-element":function(e){return!(!a.prop(e,"willValidate")||!(a.prop(e,"validity")||{valid:1}).valid)},"invalid-element":function(e){return!(!a.prop(e,"willValidate")||(a.prop(e,"validity")||{valid:1}).valid)},"required-element":function(e){return!(!a.prop(e,"willValidate")||!a.prop(e,"required"))},"optional-element":function(e){return!!(a.prop(e, -"willValidate")&&!1===a.prop(e,"required"))},"in-range":function(e){if(!B[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||e.rangeOverflow||e.rangeUnderflow)},"out-of-range":function(e){if(!B[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||!e.rangeOverflow&&!e.rangeUnderflow)}});["valid","invalid","required","optional"].forEach(function(e){a.expr.filters[e]=a.expr.filters[e+"-element"]});a.expr.filters.focus=function(a){try{var f= -a.ownerDocument;return a===f.activeElement&&(!f.hasFocus||f.hasFocus())}catch(g){}return!1};var z=a.event.customEvent||{};(o.bustedValidity||o.findRequired||!Modernizr.bugfreeformvalidation)&&function(){var e=a.find,f=a.find.matchesSelector,g=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,c=function(a){return a+"-element"};a.find=function(){var a=Array.prototype.slice,d=function(d){var f=arguments,f=a.call(f,1,f.length);f.unshift(d.replace(g,c));return e.apply(this, -f)},f;for(f in e)e.hasOwnProperty(f)&&(d[f]=e[f]);return d}();if(!Modernizr.prefixed||Modernizr.prefixed("matchesSelector",k.documentElement))a.find.matchesSelector=function(a,d){d=d.replace(g,c);return f.call(this,a,d)}}();var v=a.prop,l={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};a.prop=function(e,f,g){var c=v.apply(this,arguments);if(e&&"form"in e&&l[f]&&g!==m&&a(e).hasClass("form-ui-invalid")&&(a.prop(e,"validity")||{valid:1}).valid)a(e).getShadowElement().removeClass("form-ui-invalid"), -"checked"==f&&g&&q(e).not(e).removeClass("form-ui-invalid").removeAttr("aria-invalid");return c};var C=function(e,f){var g;a.each(e,function(c,b){if(b)return g="customError"==c?a.prop(f,"validationMessage"):c,!1});return g};a(k).bind(u.validityUIEvents||"focusout change refreshvalidityui",function(e){var f,g;if(e.target&&(f=a(e.target).getNativeElement()[0],"submit"!=f.type&&a.prop(f,"willValidate"))){g=a.data(f,"webshimsswitchvalidityclass");var c=function(){var b=a.prop(f,"validity"),c=a(f).getShadowElement(), -g,h,j,k;a(f).trigger("refreshCustomValidityRules");b.valid?c.hasClass("form-ui-valid")||(g="form-ui-valid",h="form-ui-invalid",k="changedvaliditystate",j="changedvalid",n[f.type]&&f.checked&&q(f).not(f).removeClass(h).addClass(g).removeAttr("aria-invalid"),a.removeData(f,"webshimsinvalidcause")):(b=C(b,f),a.data(f,"webshimsinvalidcause")!=b&&(a.data(f,"webshimsinvalidcause",b),k="changedvaliditystate"),c.hasClass("form-ui-invalid")||(g="form-ui-invalid",h="form-ui-valid",n[f.type]&&!f.checked&&q(f).not(f).removeClass(h).addClass(g), -j="changedinvalid"));g&&(c.addClass(g).removeClass(h),setTimeout(function(){a(f).trigger(j)},0));k&&setTimeout(function(){a(f).trigger(k)},0);a.removeData(e.target,"webshimsswitchvalidityclass")};g&&clearTimeout(g);"refreshvalidityui"==e.type?c():a.data(e.target,"webshimsswitchvalidityclass",setTimeout(c,9))}});z.changedvaliditystate=!0;z.refreshCustomValidityRules=!0;z.changedvalid=!0;z.changedinvalid=!0;z.refreshvalidityui=!0;h.triggerInlineForm=function(e,f){a(e).trigger(f)};h.modules["form-core"].getGroupElements= -q;o=function(){h.scrollRoot=a.browser.webkit||"BackCompat"==k.compatMode?a(k.body):a(k.documentElement)};o();h.ready("DOM",o);h.getRelOffset=function(e,f){var e=a(e),g=a(f).offset(),c;a.swap(a(e)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){c=e.offset()});g.top-=c.top;g.left-=c.left;return g};h.validityAlert=function(){var e=!a.browser.msie||7l&&(h.scrollRoot.animate({scrollTop:l-5},{queue:!1,duration:Math.max(Math.min(600,1.5*(j-l)),80)}),m=!0);try{g[0].focus()}catch(n){}m&&(h.scrollRoot.scrollTop(j),setTimeout(function(){h.scrollRoot.scrollTop(j)},0));setTimeout(function(){a(k).bind("focusout.validityalert",b)},10)},getMessage:function(b,c){c||(c=g(b[0])||b.prop("validationMessage"));c?a("span.va-box", -f).text(c):this.hide()},position:function(b,c){c=c?a.extend({},c):d.getOffsetFromBody(b);c.top+=b.outerHeight();f.css(c)},show:function(){"none"===f.css("display")&&f.css({opacity:0}).show();f.addClass("va-visible").fadeTo(400,1)},hide:function(){f.removeClass("va-visible").fadeOut()},clear:function(){clearTimeout(!1);clearTimeout(l);a(k).unbind(".validityalert");a(j).unbind(".validityalert");f.stop().removeAttr("for")},_create:function(){if(!f)f=d.errorBubble=a("<"+e+' class="validity-alert-wrapper" role="alert">").css({position:"absolute",display:"none"}),h.ready("DOM",function(){f.appendTo("body");a.fn.bgIframe&&a.browser.msie&&7>parseInt(a.browser.version,10)&&f.bgIframe()})}};b=a.proxy(d,"hide");return d}();(function(){var e,f=[],g;a(k).bind("invalid",function(c){if(!c.wrongWebkitInvalid){var b=a(c.target),d=b.getShadowElement();d.hasClass("form-ui-invalid")||(d.addClass("form-ui-invalid").removeClass("form-ui-valid"),setTimeout(function(){a(c.target).trigger("changedinvalid").trigger("changedvaliditystate")}, +jQuery.webshims.register("dom-extend",function(a,g,i,k,m){var v=g.modules,o=/\s*,\s*/,r={},q={},n={},w={},p={},j=a.fn.val,B=function(c,b,d,h,s){return s?j.call(a(c)):j.call(a(c),d)};a.fn.val=function(c){var b=this[0];arguments.length&&null==c&&(c="");if(!arguments.length)return!b||1!==b.nodeType?j.call(this):a.prop(b,"value",c,"val",!0);if(a.isArray(c))return j.apply(this,arguments);var d=a.isFunction(c);return this.each(function(h){b=this;1===b.nodeType&&(d?(h=c.call(b,h,a.prop(b,"value",m,"val", +!0)),null==h&&(h=""),a.prop(b,"value",h,"val")):a.prop(b,"value",c,"val"))})};var x="_webshimsLib"+Math.round(1E3*Math.random()),A=function(c,b,d){c=c.jquery?c[0]:c;if(!c)return d||{};var h=a.data(c,x);d!==m&&(h||(h=a.data(c,x,{})),b&&(h[b]=d));return b?h&&h[b]:h};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(c){a.fn[c.name]=function(){return this.map(function(){var a=A(this, +"shadowData");return a&&a[c.prop]||this})}});["removeAttr","prop","attr"].forEach(function(c){r[c]=a[c];a[c]=function(b,d,h,s,e){var t="val"==s,y=!t?r[c]:B;if(!b||!q[d]||1!==b.nodeType||!t&&s&&"attr"==c&&a.attrFn[d])return y(b,d,h,s,e);var u=(b.nodeName||"").toLowerCase(),f=n[u],g="attr"==c&&(!1===h||null===h)?"removeAttr":c,j,i,z;f||(f=n["*"]);f&&(f=f[d]);f&&(j=f[g]);if(j){if("value"==d)i=j.isVal,j.isVal=t;if("removeAttr"===g)return j.value.call(b);if(h===m)return j.get?j.get.call(b):j.value;j.set&& +("attr"==c&&!0===h&&(h=d),z=j.set.call(b,h));if("value"==d)j.isVal=i}else z=y(b,d,h,s,e);if((h!==m||"removeAttr"===g)&&p[u]&&p[u][d]){var k;k="removeAttr"==g?!1:"prop"==g?!!h:!0;p[u][d].forEach(function(a){if(!a.only||(a.only="prop"==c)||"attr"==a.only&&"prop"!=c)a.call(b,h,k,t?"val":g,c)})}return z};w[c]=function(b,d,h){n[b]||(n[b]={});n[b][d]||(n[b][d]={});var s=n[b][d][c],f=function(a,b,u){return b&&b[a]?b[a]:u&&u[a]?u[a]:"prop"==c&&"value"==d?function(a){return h.isVal?B(this,d,a,!1,0===arguments.length): +r[c](this,d,a)}:"prop"==c&&"value"==a&&h.value.apply?function(a){var b=r[c](this,d);b&&b.apply&&(b=b.apply(this,arguments));return b}:function(a){return r[c](this,d,a)}};n[b][d][c]=h;if(h.value===m){if(!h.set)h.set=h.writeable?f("set",h,s):g.cfg.useStrict&&"prop"==d?function(){throw d+" is readonly on "+b;}:a.noop;if(!h.get)h.get=f("get",h,s)}["value","get","set"].forEach(function(a){h[a]&&(h["_sup"+a]=f(a,s))})}});var l=!a.browser.msie||8i&&7")[0].readyState;if(!o.track)try{new TextTrackCue(2,3,"")}catch(p){try{new TextTrackCue("",2,3,"","",!1);var g=TextTrackCue; +window.TextTrackCue=function(a,e,c,b,d,h){3!=arguments.length&&i.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4'),v=function(){if(m[0].querySelector)try{k.findRequired=!m[0].querySelector("select:required")}catch(a){k.findRequired=!1}};k.findRequired=!1;k.validationMessage=!1;k.valueAsNumberSet=!1;i.capturingEventPrevented=function(g){if(!g._isPolyfilled){var i=g.isDefaultPrevented, +k=g.preventDefault;g.preventDefault=function(){clearTimeout(a.data(g.target,g.type+"DefaultPrevented"));a.data(g.target,g.type+"DefaultPrevented",setTimeout(function(){a.removeData(g.target,g.type+"DefaultPrevented")},30));return k.apply(this,arguments)};g.isDefaultPrevented=function(){return!(!i.apply(this,arguments)&&!a.data(g.target,g.type+"DefaultPrevented"))};g._isPolyfilled=!0}};if(!g.formvalidation||k.bustedValidity)v();else if(i.capturingEvents(["input"]),i.capturingEvents(["invalid"],!0), +g.bugfreeformvalidation=!0,window.opera||a.browser.webkit||window.testGoodWithFix){var o=a("input",m).eq(0),r,q=function(a){i.loader.loadList(["dom-extend"]);i.ready("dom-extend",a)},n=function(k){var j=["form-extend","form-message","form-native-fix"];k&&(k.preventDefault(),k.stopImmediatePropagation());clearTimeout(r);setTimeout(function(){m&&(m.remove(),m=o=null)},9);if(!g.bugfreeformvalidation)i.addPolyfill("form-native-fix",{f:"forms",d:["form-extend"]}),i.modules["form-extend"].test=a.noop;i.isReady("form-number-date-api")&& +j.push("form-number-date-api");i.reTest(j);if(o)try{o.prop({disabled:!0,value:""}).prop("disabled",!1).is(":valid")&&q(function(){i.onNodeNamesPropertyModify(["input","textarea"],["disabled","readonly"],{set:function(g){!g&&this&&a.prop(this,"value",a.prop(this,"value"))}});i.onNodeNamesPropertyModify(["select"],["disabled","readonly"],{set:function(g){if(!g&&this)g=a(this).val(),(a("option:last-child",this)[0]||{}).selected=!0,a(this).val(g)}})})}catch(n){}(a.browser.opera||window.testGoodWithFix)&& +q(function(){var g=function(a){a.preventDefault()};["form","input","textarea","select"].forEach(function(j){var k=i.defineNodeNameProperty(j,"checkValidity",{prop:{value:function(){i.fromSubmit||a(this).bind("invalid.checkvalidity",g);i.fromCheckValidity=!0;var e=k.prop._supvalue.apply(this,arguments);i.fromSubmit||a(this).unbind("invalid.checkvalidity",g);i.fromCheckValidity=!1;return e}}})})})};m.appendTo("head");if(window.opera||window.testGoodWithFix){v();k.validationMessage=!o.prop("validationMessage"); +if((g.inputtypes||{}).date){try{o.prop("valueAsNumber",0)}catch(w){}k.valueAsNumberSet="1970-01-01"!=o.prop("value")}o.prop("value","")}m.bind("submit",function(a){g.bugfreeformvalidation=!1;n(a)});r=setTimeout(function(){m&&m.triggerHandler("submit")},9);a("input, select",m).bind("invalid",n).filter('[type="submit"]').bind("click",function(a){a.stopImmediatePropagation()}).trigger("click");a.browser.webkit&&g.bugfreeformvalidation&&!i.bugs.bustedValidity&&function(){var g=/^(?:textarea|input)$/i, +i=!1;document.addEventListener("contextmenu",function(a){g.test(a.target.nodeName||"")&&(i=a.target.form)&&setTimeout(function(){i=!1},1)},!1);a(window).bind("invalid",function(a){if(a.originalEvent&&i&&i==a.target.form)a.wrongWebkitInvalid=!0,a.stopImmediatePropagation()})}()}})(jQuery); +jQuery.webshims.register("form-core",function(a,g,i,k,m,v){var o={radio:1},r={checkbox:1,radio:1},q=a([]),n=g.bugs,w=function(e){var e=a(e),f,g;f=q;if(o[e[0].type])g=e.prop("form"),f=(f=e[0].name)?g?a(g[f]):a(k.getElementsByName(f)).filter(function(){return!a.prop(this,"form")}):e,f=f.filter('[type="radio"]');return f},p=g.getContentValidationMessage=function(e,f,g){var c=a(e).data("errormessage")||e.getAttribute("x-moz-errormessage")||"";g&&c[g]&&(c=c[g]);"object"==typeof c&&(f=f||a.prop(e,"validity")|| +{valid:1},f.valid||a.each(f,function(a,d){if(d&&"valid"!=a&&c[a])return c=c[a],!1}));if("object"==typeof c)c=c.defaultMessage;return c||""},j={number:1,range:1,date:1};a.extend(a.expr.filters,{"valid-element":function(e){return!(!a.prop(e,"willValidate")||!(a.prop(e,"validity")||{valid:1}).valid)},"invalid-element":function(e){return!(!a.prop(e,"willValidate")||(a.prop(e,"validity")||{valid:1}).valid)},"required-element":function(e){return!(!a.prop(e,"willValidate")||!a.prop(e,"required"))},"optional-element":function(e){return!!(a.prop(e, +"willValidate")&&!1===a.prop(e,"required"))},"in-range":function(e){if(!j[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||e.rangeOverflow||e.rangeUnderflow)},"out-of-range":function(e){if(!j[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||!e.rangeOverflow&&!e.rangeUnderflow)}});["valid","invalid","required","optional"].forEach(function(e){a.expr.filters[e]=a.expr.filters[e+"-element"]});a.expr.filters.focus=function(a){try{var f= +a.ownerDocument;return a===f.activeElement&&(!f.hasFocus||f.hasFocus())}catch(g){}return!1};var B=a.event.customEvent||{};(n.bustedValidity||n.findRequired||!Modernizr.bugfreeformvalidation)&&function(){var e=a.find,f=a.find.matchesSelector,g=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,c=function(a){return a+"-element"};a.find=function(){var a=Array.prototype.slice,d=function(d){var f=arguments,f=a.call(f,1,f.length);f.unshift(d.replace(g,c));return e.apply(this, +f)},f;for(f in e)e.hasOwnProperty(f)&&(d[f]=e[f]);return d}();if(!Modernizr.prefixed||Modernizr.prefixed("matchesSelector",k.documentElement))a.find.matchesSelector=function(a,d){d=d.replace(g,c);return f.call(this,a,d)}}();var x=a.prop,A={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};a.prop=function(e,f,g){var c=x.apply(this,arguments);if(e&&"form"in e&&A[f]&&g!==m&&a(e).hasClass("form-ui-invalid")&&(a.prop(e,"validity")||{valid:1}).valid)a(e).getShadowElement().removeClass("form-ui-invalid"), +"checked"==f&&g&&w(e).not(e).removeClass("form-ui-invalid").removeAttr("aria-invalid");return c};var l=function(e,f){var g;a.each(e,function(c,b){if(b)return g="customError"==c?a.prop(f,"validationMessage"):c,!1});return g};a(k).bind(v.validityUIEvents||"focusout change refreshvalidityui",function(e){var f,g;if(e.target&&(f=a(e.target).getNativeElement()[0],"submit"!=f.type&&a.prop(f,"willValidate"))){g=a.data(f,"webshimsswitchvalidityclass");var c=function(){var b=a.prop(f,"validity"),c=a(f).getShadowElement(), +g,i,k,j;a(f).trigger("refreshCustomValidityRules");b.valid?c.hasClass("form-ui-valid")||(g="form-ui-valid",i="form-ui-invalid",j="changedvaliditystate",k="changedvalid",r[f.type]&&f.checked&&w(f).not(f).removeClass(i).addClass(g).removeAttr("aria-invalid"),a.removeData(f,"webshimsinvalidcause")):(b=l(b,f),a.data(f,"webshimsinvalidcause")!=b&&(a.data(f,"webshimsinvalidcause",b),j="changedvaliditystate"),c.hasClass("form-ui-invalid")||(g="form-ui-invalid",i="form-ui-valid",r[f.type]&&!f.checked&&w(f).not(f).removeClass(i).addClass(g), +k="changedinvalid"));g&&(c.addClass(g).removeClass(i),setTimeout(function(){a(f).trigger(k)},0));j&&setTimeout(function(){a(f).trigger(j)},0);a.removeData(e.target,"webshimsswitchvalidityclass")};g&&clearTimeout(g);"refreshvalidityui"==e.type?c():a.data(e.target,"webshimsswitchvalidityclass",setTimeout(c,9))}});B.changedvaliditystate=!0;B.refreshCustomValidityRules=!0;B.changedvalid=!0;B.changedinvalid=!0;B.refreshvalidityui=!0;g.triggerInlineForm=function(e,f){a(e).trigger(f)};g.modules["form-core"].getGroupElements= +w;n=function(){g.scrollRoot=a.browser.webkit||"BackCompat"==k.compatMode?a(k.body):a(k.documentElement)};n();g.ready("DOM",n);g.getRelOffset=function(e,f){var e=a(e),g=a(f).offset(),c;a.swap(a(e)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){c=e.offset()});g.top-=c.top;g.left-=c.left;return g};g.validityAlert=function(){var e=!a.browser.msie||7l&&(g.scrollRoot.animate({scrollTop:l-5},{queue:!1,duration:Math.max(Math.min(600,1.5*(j-l)),80)}),m=!0);try{i[0].focus()}catch(n){}m&&(g.scrollRoot.scrollTop(j),setTimeout(function(){g.scrollRoot.scrollTop(j)},0));setTimeout(function(){a(k).bind("focusout.validityalert",b)},10)},getMessage:function(b,c){c||(c=p(b[0])||b.prop("validationMessage"));c?a("span.va-box", +f).text(c):this.hide()},position:function(b,c){c=c?a.extend({},c):d.getOffsetFromBody(b);c.top+=b.outerHeight();f.css(c)},show:function(){"none"===f.css("display")&&f.css({opacity:0}).show();f.addClass("va-visible").fadeTo(400,1)},hide:function(){f.removeClass("va-visible").fadeOut()},clear:function(){clearTimeout(!1);clearTimeout(j);a(k).unbind(".validityalert");a(i).unbind(".validityalert");f.stop().removeAttr("for")},_create:function(){if(!f)f=d.errorBubble=a("<"+e+' class="validity-alert-wrapper" role="alert">").css({position:"absolute",display:"none"}),g.ready("DOM",function(){f.appendTo("body");a.fn.bgIframe&&a.browser.msie&&7>parseInt(a.browser.version,10)&&f.bgIframe()})}};b=a.proxy(d,"hide");return d}();(function(){var e,f=[],g;a(k).bind("invalid",function(c){if(!c.wrongWebkitInvalid){var b=a(c.target),d=b.getShadowElement();d.hasClass("form-ui-invalid")||(d.addClass("form-ui-invalid").removeClass("form-ui-valid"),setTimeout(function(){a(c.target).trigger("changedinvalid").trigger("changedvaliditystate")}, 0));if(!e)e=a.Event("firstinvalid"),e.isInvalidUIPrevented=c.isDefaultPrevented,d=a.Event("firstinvalidsystem"),a(k).triggerHandler(d,{element:c.target,form:c.target.form,isInvalidUIPrevented:c.isDefaultPrevented}),b.trigger(e);e&&e.isDefaultPrevented()&&c.preventDefault();f.push(c.target);c.extraData="fix";clearTimeout(g);g=setTimeout(function(){var b={type:"lastinvalid",cancelable:!1,invalidlist:a(f)};e=!1;f=[];a(c.target).trigger(b,b)},9);d=b=null}})})();a.fn.getErrorMessage=function(){var e="", -f=this[0];f&&(e=g(f)||a.prop(f,"customValidationMessage")||a.prop(f,"validationMessage"));return e};u.replaceValidationUI&&h.ready("DOM forms",function(){a(k).bind("firstinvalid",function(e){e.isInvalidUIPrevented()||(e.preventDefault(),a.webshims.validityAlert.showFor(e.target,a(e.target).prop("customValidationMessage")))})})}); +f=this[0];f&&(e=p(f)||a.prop(f,"customValidationMessage")||a.prop(f,"validationMessage"));return e};v.replaceValidationUI&&g.ready("DOM forms",function(){a(k).bind("firstinvalid",function(e){e.isInvalidUIPrevented()||(e.preventDefault(),a.webshims.validityAlert.showFor(e.target,a(e.target).prop("customValidationMessage")))})})}); diff --git a/demos/js-webshim/minified/shims/combos/17.js b/demos/js-webshim/minified/shims/combos/17.js index 4cdaf95e..ce541c4d 100644 --- a/demos/js-webshim/minified/shims/combos/17.js +++ b/demos/js-webshim/minified/shims/combos/17.js @@ -1,69 +1,69 @@ -jQuery.webshims.register("dom-extend",function(a,h,j,l,o){var r=h.modules,i=/\s*,\s*/,n={},p={},q={},s={},g={},A=a.fn.val,y=function(c,b,d,k,x){return x?A.call(a(c)):A.call(a(c),d)};a.fn.val=function(c){var b=this[0];arguments.length&&null==c&&(c="");if(!arguments.length)return!b||1!==b.nodeType?A.call(this):a.prop(b,"value",c,"val",!0);if(a.isArray(c))return A.apply(this,arguments);var d=a.isFunction(c);return this.each(function(k){b=this;1===b.nodeType&&(d?(k=c.call(b,k,a.prop(b,"value",o,"val", -!0)),null==k&&(k=""),a.prop(b,"value",k,"val")):a.prop(b,"value",c,"val"))})};var w="_webshimsLib"+Math.round(1E3*Math.random()),m=function(c,b,d){c=c.jquery?c[0]:c;if(!c)return d||{};var k=a.data(c,w);d!==o&&(k||(k=a.data(c,w,{})),b&&(k[b]=d));return b?k&&k[b]:k};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(c){a.fn[c.name]=function(){return this.map(function(){var a=m(this, -"shadowData");return a&&a[c.prop]||this})}});["removeAttr","prop","attr"].forEach(function(c){n[c]=a[c];a[c]=function(b,d,k,x,e){var t="val"==x,v=!t?n[c]:y;if(!b||!p[d]||1!==b.nodeType||!t&&x&&"attr"==c&&a.attrFn[d])return v(b,d,k,x,e);var u=(b.nodeName||"").toLowerCase(),f=q[u],s="attr"==c&&(!1===k||null===k)?"removeAttr":c,h,j,i;f||(f=q["*"]);f&&(f=f[d]);f&&(h=f[s]);if(h){if("value"==d)j=h.isVal,h.isVal=t;if("removeAttr"===s)return h.value.call(b);if(k===o)return h.get?h.get.call(b):h.value;h.set&& -("attr"==c&&!0===k&&(k=d),i=h.set.call(b,k));if("value"==d)h.isVal=j}else i=v(b,d,k,x,e);if((k!==o||"removeAttr"===s)&&g[u]&&g[u][d]){var m;m="removeAttr"==s?!1:"prop"==s?!!k:!0;g[u][d].forEach(function(a){if(!a.only||(a.only="prop"==c)||"attr"==a.only&&"prop"!=c)a.call(b,k,m,t?"val":s,c)})}return i};s[c]=function(b,d,k){q[b]||(q[b]={});q[b][d]||(q[b][d]={});var e=q[b][d][c],f=function(a,b,u){return b&&b[a]?b[a]:u&&u[a]?u[a]:"prop"==c&&"value"==d?function(a){return k.isVal?y(this,d,a,!1,0===arguments.length): -n[c](this,d,a)}:"prop"==c&&"value"==a&&k.value.apply?function(a){var b=n[c](this,d);b&&b.apply&&(b=b.apply(this,arguments));return b}:function(a){return n[c](this,d,a)}};q[b][d][c]=k;if(k.value===o){if(!k.set)k.set=k.writeable?f("set",k,e):h.cfg.useStrict&&"prop"==d?function(){throw d+" is readonly on "+b;}:a.noop;if(!k.get)k.get=f("get",k,e)}["value","get","set"].forEach(function(a){k[a]&&(k["_sup"+a]=f(a,e))})}});var B=!a.browser.msie||8j&&7")[0].readyState;if(!i.track)try{new TextTrackCue(2,3,"")}catch(h){try{new TextTrackCue("",2,3,"","",!1);var g=TextTrackCue;window.TextTrackCue=function(a,f,h,c,b,d){3!=arguments.length&&j.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4'),r=function(){if(o[0].querySelector)try{l.findRequired=!o[0].querySelector("select:required")}catch(a){l.findRequired=!1}};l.findRequired=!1;l.validationMessage=!1;l.valueAsNumberSet=!1;j.capturingEventPrevented=function(g){if(!g._isPolyfilled){var h=g.isDefaultPrevented, -j=g.preventDefault;g.preventDefault=function(){clearTimeout(a.data(g.target,g.type+"DefaultPrevented"));a.data(g.target,g.type+"DefaultPrevented",setTimeout(function(){a.removeData(g.target,g.type+"DefaultPrevented")},30));return j.apply(this,arguments)};g.isDefaultPrevented=function(){return!(!h.apply(this,arguments)&&!a.data(g.target,g.type+"DefaultPrevented"))};g._isPolyfilled=!0}};if(!h.formvalidation||l.bustedValidity)r();else if(j.capturingEvents(["input"]),j.capturingEvents(["invalid"],!0), -h.bugfreeformvalidation=!0,window.opera||a.browser.webkit||window.testGoodWithFix){var i=a("input",o).eq(0),n,p=function(a){j.loader.loadList(["dom-extend"]);j.ready("dom-extend",a)},q=function(g){var l=["form-extend","form-message","form-native-fix"];g&&(g.preventDefault(),g.stopImmediatePropagation());clearTimeout(n);setTimeout(function(){o&&(o.remove(),o=i=null)},9);if(!h.bugfreeformvalidation)j.addPolyfill("form-native-fix",{f:"forms",d:["form-extend"]}),j.modules["form-extend"].test=a.noop;j.isReady("form-number-date-api")&& -l.push("form-number-date-api");j.reTest(l);if(i)try{i.prop({disabled:!0,value:""}).prop("disabled",!1).is(":valid")&&p(function(){j.onNodeNamesPropertyModify(["input","textarea"],["disabled","readonly"],{set:function(g){!g&&this&&a.prop(this,"value",a.prop(this,"value"))}});j.onNodeNamesPropertyModify(["select"],["disabled","readonly"],{set:function(g){if(!g&&this)g=a(this).val(),(a("option:last-child",this)[0]||{}).selected=!0,a(this).val(g)}})})}catch(q){}(a.browser.opera||window.testGoodWithFix)&& -p(function(){var g=function(a){a.preventDefault()};["form","input","textarea","select"].forEach(function(h){var i=j.defineNodeNameProperty(h,"checkValidity",{prop:{value:function(){j.fromSubmit||a(this).bind("invalid.checkvalidity",g);j.fromCheckValidity=!0;var e=i.prop._supvalue.apply(this,arguments);j.fromSubmit||a(this).unbind("invalid.checkvalidity",g);j.fromCheckValidity=!1;return e}}})})})};o.appendTo("head");if(window.opera||window.testGoodWithFix){r();l.validationMessage=!i.prop("validationMessage"); -if((h.inputtypes||{}).date){try{i.prop("valueAsNumber",0)}catch(s){}l.valueAsNumberSet="1970-01-01"!=i.prop("value")}i.prop("value","")}o.bind("submit",function(a){h.bugfreeformvalidation=!1;q(a)});n=setTimeout(function(){o&&o.triggerHandler("submit")},9);a("input, select",o).bind("invalid",q).filter('[type="submit"]').bind("click",function(a){a.stopImmediatePropagation()}).trigger("click");a.browser.webkit&&h.bugfreeformvalidation&&!j.bugs.bustedValidity&&function(){var g=/^(?:textarea|input)$/i, -h=!1;document.addEventListener("contextmenu",function(a){g.test(a.target.nodeName||"")&&(h=a.target.form)&&setTimeout(function(){h=!1},1)},!1);a(window).bind("invalid",function(a){if(a.originalEvent&&h&&h==a.target.form)a.wrongWebkitInvalid=!0,a.stopImmediatePropagation()})}()}})(jQuery); -jQuery.webshims.register("form-core",function(a,h,j,l,o,r){var i={radio:1},n={checkbox:1,radio:1},p=a([]),q=h.bugs,s=function(e){var e=a(e),f,g;f=p;if(i[e[0].type])g=e.prop("form"),f=(f=e[0].name)?g?a(g[f]):a(l.getElementsByName(f)).filter(function(){return!a.prop(this,"form")}):e,f=f.filter('[type="radio"]');return f},g=h.getContentValidationMessage=function(e,f,g){var c=a(e).data("errormessage")||e.getAttribute("x-moz-errormessage")||"";g&&c[g]&&(c=c[g]);"object"==typeof c&&(f=f||a.prop(e,"validity")|| -{valid:1},f.valid||a.each(f,function(a,d){if(d&&"valid"!=a&&c[a])return c=c[a],!1}));if("object"==typeof c)c=c.defaultMessage;return c||""},A={number:1,range:1,date:1};a.extend(a.expr.filters,{"valid-element":function(e){return!(!a.prop(e,"willValidate")||!(a.prop(e,"validity")||{valid:1}).valid)},"invalid-element":function(e){return!(!a.prop(e,"willValidate")||(a.prop(e,"validity")||{valid:1}).valid)},"required-element":function(e){return!(!a.prop(e,"willValidate")||!a.prop(e,"required"))},"optional-element":function(e){return!!(a.prop(e, -"willValidate")&&!1===a.prop(e,"required"))},"in-range":function(e){if(!A[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||e.rangeOverflow||e.rangeUnderflow)},"out-of-range":function(e){if(!A[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||!e.rangeOverflow&&!e.rangeUnderflow)}});["valid","invalid","required","optional"].forEach(function(e){a.expr.filters[e]=a.expr.filters[e+"-element"]});a.expr.filters.focus=function(a){try{var f= -a.ownerDocument;return a===f.activeElement&&(!f.hasFocus||f.hasFocus())}catch(g){}return!1};var y=a.event.customEvent||{};(q.bustedValidity||q.findRequired||!Modernizr.bugfreeformvalidation)&&function(){var e=a.find,f=a.find.matchesSelector,g=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,c=function(a){return a+"-element"};a.find=function(){var a=Array.prototype.slice,d=function(d){var f=arguments,f=a.call(f,1,f.length);f.unshift(d.replace(g,c));return e.apply(this, -f)},f;for(f in e)e.hasOwnProperty(f)&&(d[f]=e[f]);return d}();if(!Modernizr.prefixed||Modernizr.prefixed("matchesSelector",l.documentElement))a.find.matchesSelector=function(a,d){d=d.replace(g,c);return f.call(this,a,d)}}();var w=a.prop,m={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};a.prop=function(e,f,g){var c=w.apply(this,arguments);if(e&&"form"in e&&m[f]&&g!==o&&a(e).hasClass("form-ui-invalid")&&(a.prop(e,"validity")||{valid:1}).valid)a(e).getShadowElement().removeClass("form-ui-invalid"), -"checked"==f&&g&&s(e).not(e).removeClass("form-ui-invalid").removeAttr("aria-invalid");return c};var B=function(e,f){var g;a.each(e,function(c,b){if(b)return g="customError"==c?a.prop(f,"validationMessage"):c,!1});return g};a(l).bind(r.validityUIEvents||"focusout change refreshvalidityui",function(e){var f,g;if(e.target&&(f=a(e.target).getNativeElement()[0],"submit"!=f.type&&a.prop(f,"willValidate"))){g=a.data(f,"webshimsswitchvalidityclass");var c=function(){var b=a.prop(f,"validity"),c=a(f).getShadowElement(), -g,h,j,i;a(f).trigger("refreshCustomValidityRules");b.valid?c.hasClass("form-ui-valid")||(g="form-ui-valid",h="form-ui-invalid",i="changedvaliditystate",j="changedvalid",n[f.type]&&f.checked&&s(f).not(f).removeClass(h).addClass(g).removeAttr("aria-invalid"),a.removeData(f,"webshimsinvalidcause")):(b=B(b,f),a.data(f,"webshimsinvalidcause")!=b&&(a.data(f,"webshimsinvalidcause",b),i="changedvaliditystate"),c.hasClass("form-ui-invalid")||(g="form-ui-invalid",h="form-ui-valid",n[f.type]&&!f.checked&&s(f).not(f).removeClass(h).addClass(g), -j="changedinvalid"));g&&(c.addClass(g).removeClass(h),setTimeout(function(){a(f).trigger(j)},0));i&&setTimeout(function(){a(f).trigger(i)},0);a.removeData(e.target,"webshimsswitchvalidityclass")};g&&clearTimeout(g);"refreshvalidityui"==e.type?c():a.data(e.target,"webshimsswitchvalidityclass",setTimeout(c,9))}});y.changedvaliditystate=!0;y.refreshCustomValidityRules=!0;y.changedvalid=!0;y.changedinvalid=!0;y.refreshvalidityui=!0;h.triggerInlineForm=function(e,f){a(e).trigger(f)};h.modules["form-core"].getGroupElements= -s;q=function(){h.scrollRoot=a.browser.webkit||"BackCompat"==l.compatMode?a(l.body):a(l.documentElement)};q();h.ready("DOM",q);h.getRelOffset=function(e,f){var e=a(e),g=a(f).offset(),c;a.swap(a(e)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){c=e.offset()});g.top-=c.top;g.left-=c.left;return g};h.validityAlert=function(){var e=!a.browser.msie||7i&&(h.scrollRoot.animate({scrollTop:i-5},{queue:!1,duration:Math.max(Math.min(600,1.5*(j-i)),80)}),p=!0);try{g[0].focus()}catch(m){}p&&(h.scrollRoot.scrollTop(j),setTimeout(function(){h.scrollRoot.scrollTop(j)},0));setTimeout(function(){a(l).bind("focusout.validityalert",b)},10)},getMessage:function(b,c){c||(c=g(b[0])||b.prop("validationMessage"));c?a("span.va-box", -f).text(c):this.hide()},position:function(b,c){c=c?a.extend({},c):d.getOffsetFromBody(b);c.top+=b.outerHeight();f.css(c)},show:function(){"none"===f.css("display")&&f.css({opacity:0}).show();f.addClass("va-visible").fadeTo(400,1)},hide:function(){f.removeClass("va-visible").fadeOut()},clear:function(){clearTimeout(!1);clearTimeout(i);a(l).unbind(".validityalert");a(j).unbind(".validityalert");f.stop().removeAttr("for")},_create:function(){if(!f)f=d.errorBubble=a("<"+e+' class="validity-alert-wrapper" role="alert">").css({position:"absolute",display:"none"}),h.ready("DOM",function(){f.appendTo("body");a.fn.bgIframe&&a.browser.msie&&7>parseInt(a.browser.version,10)&&f.bgIframe()})}};b=a.proxy(d,"hide");return d}();(function(){var e,f=[],g;a(l).bind("invalid",function(c){if(!c.wrongWebkitInvalid){var b=a(c.target),d=b.getShadowElement();d.hasClass("form-ui-invalid")||(d.addClass("form-ui-invalid").removeClass("form-ui-valid"),setTimeout(function(){a(c.target).trigger("changedinvalid").trigger("changedvaliditystate")}, +jQuery.webshims.register("dom-extend",function(a,g,h,l,o){var u=g.modules,k=/\s*,\s*/,r={},n={},q={},v={},m={},j=a.fn.val,z=function(c,b,d,i,s){return s?j.call(a(c)):j.call(a(c),d)};a.fn.val=function(c){var b=this[0];arguments.length&&null==c&&(c="");if(!arguments.length)return!b||1!==b.nodeType?j.call(this):a.prop(b,"value",c,"val",!0);if(a.isArray(c))return j.apply(this,arguments);var d=a.isFunction(c);return this.each(function(i){b=this;1===b.nodeType&&(d?(i=c.call(b,i,a.prop(b,"value",o,"val", +!0)),null==i&&(i=""),a.prop(b,"value",i,"val")):a.prop(b,"value",c,"val"))})};var y="_webshimsLib"+Math.round(1E3*Math.random()),A=function(c,b,d){c=c.jquery?c[0]:c;if(!c)return d||{};var i=a.data(c,y);d!==o&&(i||(i=a.data(c,y,{})),b&&(i[b]=d));return b?i&&i[b]:i};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(c){a.fn[c.name]=function(){return this.map(function(){var a=A(this, +"shadowData");return a&&a[c.prop]||this})}});["removeAttr","prop","attr"].forEach(function(c){r[c]=a[c];a[c]=function(b,d,i,s,e){var t="val"==s,B=!t?r[c]:z;if(!b||!n[d]||1!==b.nodeType||!t&&s&&"attr"==c&&a.attrFn[d])return B(b,d,i,s,e);var w=(b.nodeName||"").toLowerCase(),f=q[w],g="attr"==c&&(!1===i||null===i)?"removeAttr":c,j,h,k;f||(f=q["*"]);f&&(f=f[d]);f&&(j=f[g]);if(j){if("value"==d)h=j.isVal,j.isVal=t;if("removeAttr"===g)return j.value.call(b);if(i===o)return j.get?j.get.call(b):j.value;j.set&& +("attr"==c&&!0===i&&(i=d),k=j.set.call(b,i));if("value"==d)j.isVal=h}else k=B(b,d,i,s,e);if((i!==o||"removeAttr"===g)&&m[w]&&m[w][d]){var x;x="removeAttr"==g?!1:"prop"==g?!!i:!0;m[w][d].forEach(function(a){if(!a.only||(a.only="prop"==c)||"attr"==a.only&&"prop"!=c)a.call(b,i,x,t?"val":g,c)})}return k};v[c]=function(b,d,i){q[b]||(q[b]={});q[b][d]||(q[b][d]={});var s=q[b][d][c],f=function(a,b,w){return b&&b[a]?b[a]:w&&w[a]?w[a]:"prop"==c&&"value"==d?function(a){return i.isVal?z(this,d,a,!1,0===arguments.length): +r[c](this,d,a)}:"prop"==c&&"value"==a&&i.value.apply?function(a){var b=r[c](this,d);b&&b.apply&&(b=b.apply(this,arguments));return b}:function(a){return r[c](this,d,a)}};q[b][d][c]=i;if(i.value===o){if(!i.set)i.set=i.writeable?f("set",i,s):g.cfg.useStrict&&"prop"==d?function(){throw d+" is readonly on "+b;}:a.noop;if(!i.get)i.get=f("get",i,s)}["value","get","set"].forEach(function(a){i[a]&&(i["_sup"+a]=f(a,s))})}});var p=!a.browser.msie||8h&&7")[0].readyState;if(!k.track)try{new TextTrackCue(2,3,"")}catch(m){try{new TextTrackCue("",2,3,"","",!1);var g=TextTrackCue; +window.TextTrackCue=function(a,e,c,b,d,i){3!=arguments.length&&h.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4'),u=function(){if(o[0].querySelector)try{l.findRequired=!o[0].querySelector("select:required")}catch(a){l.findRequired=!1}};l.findRequired=!1;l.validationMessage=!1;l.valueAsNumberSet=!1;h.capturingEventPrevented=function(g){if(!g._isPolyfilled){var j=g.isDefaultPrevented, +h=g.preventDefault;g.preventDefault=function(){clearTimeout(a.data(g.target,g.type+"DefaultPrevented"));a.data(g.target,g.type+"DefaultPrevented",setTimeout(function(){a.removeData(g.target,g.type+"DefaultPrevented")},30));return h.apply(this,arguments)};g.isDefaultPrevented=function(){return!(!j.apply(this,arguments)&&!a.data(g.target,g.type+"DefaultPrevented"))};g._isPolyfilled=!0}};if(!g.formvalidation||l.bustedValidity)u();else if(h.capturingEvents(["input"]),h.capturingEvents(["invalid"],!0), +g.bugfreeformvalidation=!0,window.opera||a.browser.webkit||window.testGoodWithFix){var k=a("input",o).eq(0),r,n=function(a){h.loader.loadList(["dom-extend"]);h.ready("dom-extend",a)},q=function(m){var j=["form-extend","form-message","form-native-fix"];m&&(m.preventDefault(),m.stopImmediatePropagation());clearTimeout(r);setTimeout(function(){o&&(o.remove(),o=k=null)},9);if(!g.bugfreeformvalidation)h.addPolyfill("form-native-fix",{f:"forms",d:["form-extend"]}),h.modules["form-extend"].test=a.noop;h.isReady("form-number-date-api")&& +j.push("form-number-date-api");h.reTest(j);if(k)try{k.prop({disabled:!0,value:""}).prop("disabled",!1).is(":valid")&&n(function(){h.onNodeNamesPropertyModify(["input","textarea"],["disabled","readonly"],{set:function(g){!g&&this&&a.prop(this,"value",a.prop(this,"value"))}});h.onNodeNamesPropertyModify(["select"],["disabled","readonly"],{set:function(g){if(!g&&this)g=a(this).val(),(a("option:last-child",this)[0]||{}).selected=!0,a(this).val(g)}})})}catch(l){}(a.browser.opera||window.testGoodWithFix)&& +n(function(){var g=function(a){a.preventDefault()};["form","input","textarea","select"].forEach(function(j){var m=h.defineNodeNameProperty(j,"checkValidity",{prop:{value:function(){h.fromSubmit||a(this).bind("invalid.checkvalidity",g);h.fromCheckValidity=!0;var e=m.prop._supvalue.apply(this,arguments);h.fromSubmit||a(this).unbind("invalid.checkvalidity",g);h.fromCheckValidity=!1;return e}}})})})};o.appendTo("head");if(window.opera||window.testGoodWithFix){u();l.validationMessage=!k.prop("validationMessage"); +if((g.inputtypes||{}).date){try{k.prop("valueAsNumber",0)}catch(v){}l.valueAsNumberSet="1970-01-01"!=k.prop("value")}k.prop("value","")}o.bind("submit",function(a){g.bugfreeformvalidation=!1;q(a)});r=setTimeout(function(){o&&o.triggerHandler("submit")},9);a("input, select",o).bind("invalid",q).filter('[type="submit"]').bind("click",function(a){a.stopImmediatePropagation()}).trigger("click");a.browser.webkit&&g.bugfreeformvalidation&&!h.bugs.bustedValidity&&function(){var g=/^(?:textarea|input)$/i, +j=!1;document.addEventListener("contextmenu",function(a){g.test(a.target.nodeName||"")&&(j=a.target.form)&&setTimeout(function(){j=!1},1)},!1);a(window).bind("invalid",function(a){if(a.originalEvent&&j&&j==a.target.form)a.wrongWebkitInvalid=!0,a.stopImmediatePropagation()})}()}})(jQuery); +jQuery.webshims.register("form-core",function(a,g,h,l,o,u){var k={radio:1},r={checkbox:1,radio:1},n=a([]),q=g.bugs,v=function(e){var e=a(e),f,g;f=n;if(k[e[0].type])g=e.prop("form"),f=(f=e[0].name)?g?a(g[f]):a(l.getElementsByName(f)).filter(function(){return!a.prop(this,"form")}):e,f=f.filter('[type="radio"]');return f},m=g.getContentValidationMessage=function(e,f,g){var c=a(e).data("errormessage")||e.getAttribute("x-moz-errormessage")||"";g&&c[g]&&(c=c[g]);"object"==typeof c&&(f=f||a.prop(e,"validity")|| +{valid:1},f.valid||a.each(f,function(a,d){if(d&&"valid"!=a&&c[a])return c=c[a],!1}));if("object"==typeof c)c=c.defaultMessage;return c||""},j={number:1,range:1,date:1};a.extend(a.expr.filters,{"valid-element":function(e){return!(!a.prop(e,"willValidate")||!(a.prop(e,"validity")||{valid:1}).valid)},"invalid-element":function(e){return!(!a.prop(e,"willValidate")||(a.prop(e,"validity")||{valid:1}).valid)},"required-element":function(e){return!(!a.prop(e,"willValidate")||!a.prop(e,"required"))},"optional-element":function(e){return!!(a.prop(e, +"willValidate")&&!1===a.prop(e,"required"))},"in-range":function(e){if(!j[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||e.rangeOverflow||e.rangeUnderflow)},"out-of-range":function(e){if(!j[a.prop(e,"type")]||!a.prop(e,"willValidate"))return!1;e=a.prop(e,"validity");return!(!e||!e.rangeOverflow&&!e.rangeUnderflow)}});["valid","invalid","required","optional"].forEach(function(e){a.expr.filters[e]=a.expr.filters[e+"-element"]});a.expr.filters.focus=function(a){try{var f= +a.ownerDocument;return a===f.activeElement&&(!f.hasFocus||f.hasFocus())}catch(g){}return!1};var z=a.event.customEvent||{};(q.bustedValidity||q.findRequired||!Modernizr.bugfreeformvalidation)&&function(){var e=a.find,f=a.find.matchesSelector,g=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,c=function(a){return a+"-element"};a.find=function(){var a=Array.prototype.slice,d=function(d){var f=arguments,f=a.call(f,1,f.length);f.unshift(d.replace(g,c));return e.apply(this, +f)},f;for(f in e)e.hasOwnProperty(f)&&(d[f]=e[f]);return d}();if(!Modernizr.prefixed||Modernizr.prefixed("matchesSelector",l.documentElement))a.find.matchesSelector=function(a,d){d=d.replace(g,c);return f.call(this,a,d)}}();var y=a.prop,A={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};a.prop=function(e,f,g){var c=y.apply(this,arguments);if(e&&"form"in e&&A[f]&&g!==o&&a(e).hasClass("form-ui-invalid")&&(a.prop(e,"validity")||{valid:1}).valid)a(e).getShadowElement().removeClass("form-ui-invalid"), +"checked"==f&&g&&v(e).not(e).removeClass("form-ui-invalid").removeAttr("aria-invalid");return c};var p=function(e,f){var g;a.each(e,function(c,b){if(b)return g="customError"==c?a.prop(f,"validationMessage"):c,!1});return g};a(l).bind(u.validityUIEvents||"focusout change refreshvalidityui",function(e){var f,g;if(e.target&&(f=a(e.target).getNativeElement()[0],"submit"!=f.type&&a.prop(f,"willValidate"))){g=a.data(f,"webshimsswitchvalidityclass");var c=function(){var b=a.prop(f,"validity"),c=a(f).getShadowElement(), +g,j,h,n;a(f).trigger("refreshCustomValidityRules");b.valid?c.hasClass("form-ui-valid")||(g="form-ui-valid",j="form-ui-invalid",n="changedvaliditystate",h="changedvalid",r[f.type]&&f.checked&&v(f).not(f).removeClass(j).addClass(g).removeAttr("aria-invalid"),a.removeData(f,"webshimsinvalidcause")):(b=p(b,f),a.data(f,"webshimsinvalidcause")!=b&&(a.data(f,"webshimsinvalidcause",b),n="changedvaliditystate"),c.hasClass("form-ui-invalid")||(g="form-ui-invalid",j="form-ui-valid",r[f.type]&&!f.checked&&v(f).not(f).removeClass(j).addClass(g), +h="changedinvalid"));g&&(c.addClass(g).removeClass(j),setTimeout(function(){a(f).trigger(h)},0));n&&setTimeout(function(){a(f).trigger(n)},0);a.removeData(e.target,"webshimsswitchvalidityclass")};g&&clearTimeout(g);"refreshvalidityui"==e.type?c():a.data(e.target,"webshimsswitchvalidityclass",setTimeout(c,9))}});z.changedvaliditystate=!0;z.refreshCustomValidityRules=!0;z.changedvalid=!0;z.changedinvalid=!0;z.refreshvalidityui=!0;g.triggerInlineForm=function(e,f){a(e).trigger(f)};g.modules["form-core"].getGroupElements= +v;q=function(){g.scrollRoot=a.browser.webkit||"BackCompat"==l.compatMode?a(l.body):a(l.documentElement)};q();g.ready("DOM",q);g.getRelOffset=function(e,f){var e=a(e),g=a(f).offset(),c;a.swap(a(e)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){c=e.offset()});g.top-=c.top;g.left-=c.left;return g};g.validityAlert=function(){var e=!a.browser.msie||7n&&(g.scrollRoot.animate({scrollTop:n-5},{queue:!1,duration:Math.max(Math.min(600,1.5*(h-n)),80)}),m=!0);try{j[0].focus()}catch(k){}m&&(g.scrollRoot.scrollTop(h),setTimeout(function(){g.scrollRoot.scrollTop(h)},0));setTimeout(function(){a(l).bind("focusout.validityalert",b)},10)},getMessage:function(b,c){c||(c=m(b[0])||b.prop("validationMessage"));c?a("span.va-box", +f).text(c):this.hide()},position:function(b,c){c=c?a.extend({},c):d.getOffsetFromBody(b);c.top+=b.outerHeight();f.css(c)},show:function(){"none"===f.css("display")&&f.css({opacity:0}).show();f.addClass("va-visible").fadeTo(400,1)},hide:function(){f.removeClass("va-visible").fadeOut()},clear:function(){clearTimeout(!1);clearTimeout(j);a(l).unbind(".validityalert");a(h).unbind(".validityalert");f.stop().removeAttr("for")},_create:function(){if(!f)f=d.errorBubble=a("<"+e+' class="validity-alert-wrapper" role="alert">").css({position:"absolute",display:"none"}),g.ready("DOM",function(){f.appendTo("body");a.fn.bgIframe&&a.browser.msie&&7>parseInt(a.browser.version,10)&&f.bgIframe()})}};b=a.proxy(d,"hide");return d}();(function(){var e,f=[],g;a(l).bind("invalid",function(c){if(!c.wrongWebkitInvalid){var b=a(c.target),d=b.getShadowElement();d.hasClass("form-ui-invalid")||(d.addClass("form-ui-invalid").removeClass("form-ui-valid"),setTimeout(function(){a(c.target).trigger("changedinvalid").trigger("changedvaliditystate")}, 0));if(!e)e=a.Event("firstinvalid"),e.isInvalidUIPrevented=c.isDefaultPrevented,d=a.Event("firstinvalidsystem"),a(l).triggerHandler(d,{element:c.target,form:c.target.form,isInvalidUIPrevented:c.isDefaultPrevented}),b.trigger(e);e&&e.isDefaultPrevented()&&c.preventDefault();f.push(c.target);c.extraData="fix";clearTimeout(g);g=setTimeout(function(){var b={type:"lastinvalid",cancelable:!1,invalidlist:a(f)};e=!1;f=[];a(c.target).trigger(b,b)},9);d=b=null}})})();a.fn.getErrorMessage=function(){var e="", -f=this[0];f&&(e=g(f)||a.prop(f,"customValidationMessage")||a.prop(f,"validationMessage"));return e};r.replaceValidationUI&&h.ready("DOM forms",function(){a(l).bind("firstinvalid",function(e){e.isInvalidUIPrevented()||(e.preventDefault(),a.webshims.validityAlert.showFor(e.target,a(e.target).prop("customValidationMessage")))})})}); -jQuery.webshims.register("form-message",function(a,h,j,l,o,r){var i=h.validityMessages,j=r.overrideMessages||r.customMessages?["customValidationMessage"]:[];i.en=a.extend(!0,{typeMismatch:{email:"Please enter an email address.",url:"Please enter a URL.",number:"Please enter a number.",date:"Please enter a date.",time:"Please enter a time.",range:"Invalid input.","datetime-local":"Please enter a datetime."},rangeUnderflow:{defaultMessage:"Value must be greater than or equal to {%min}."},rangeOverflow:{defaultMessage:"Value must be less than or equal to {%max}."}, -stepMismatch:"Invalid input.",tooLong:"Please enter at most {%maxlength} character(s). You entered {%valueLen}.",patternMismatch:"Invalid input. {%title}",valueMissing:{defaultMessage:"Please fill out this field.",checkbox:"Please check this box if you want to proceed."}},i.en||i["en-US"]||{});["select","radio"].forEach(function(a){i.en.valueMissing[a]="Please select an option."});["date","time","datetime-local"].forEach(function(a){i.en.rangeUnderflow[a]="Value must be at or after {%min}."});["date", -"time","datetime-local"].forEach(function(a){i.en.rangeOverflow[a]="Value must be at or before {%max}."});i["en-US"]=i["en-US"]||i.en;i[""]=i[""]||i["en-US"];i.de=a.extend(!0,{typeMismatch:{email:"{%value} ist keine zul\u00e4ssige E-Mail-Adresse",url:"{%value} ist keine zul\u00e4ssige Webadresse",number:"{%value} ist keine Nummer!",date:"{%value} ist kein Datum",time:"{%value} ist keine Uhrzeit",range:"{%value} ist keine Nummer!","datetime-local":"{%value} ist kein Datum-Uhrzeit Format."},rangeUnderflow:{defaultMessage:"{%value} ist zu niedrig. {%min} ist der unterste Wert, den Sie benutzen k\u00f6nnen."}, +f=this[0];f&&(e=m(f)||a.prop(f,"customValidationMessage")||a.prop(f,"validationMessage"));return e};u.replaceValidationUI&&g.ready("DOM forms",function(){a(l).bind("firstinvalid",function(e){e.isInvalidUIPrevented()||(e.preventDefault(),a.webshims.validityAlert.showFor(e.target,a(e.target).prop("customValidationMessage")))})})}); +jQuery.webshims.register("form-message",function(a,g,h,l,o,u){var k=g.validityMessages,h=u.overrideMessages||u.customMessages?["customValidationMessage"]:[];k.en=a.extend(!0,{typeMismatch:{email:"Please enter an email address.",url:"Please enter a URL.",number:"Please enter a number.",date:"Please enter a date.",time:"Please enter a time.",range:"Invalid input.","datetime-local":"Please enter a datetime."},rangeUnderflow:{defaultMessage:"Value must be greater than or equal to {%min}."},rangeOverflow:{defaultMessage:"Value must be less than or equal to {%max}."}, +stepMismatch:"Invalid input.",tooLong:"Please enter at most {%maxlength} character(s). You entered {%valueLen}.",patternMismatch:"Invalid input. {%title}",valueMissing:{defaultMessage:"Please fill out this field.",checkbox:"Please check this box if you want to proceed."}},k.en||k["en-US"]||{});["select","radio"].forEach(function(a){k.en.valueMissing[a]="Please select an option."});["date","time","datetime-local"].forEach(function(a){k.en.rangeUnderflow[a]="Value must be at or after {%min}."});["date", +"time","datetime-local"].forEach(function(a){k.en.rangeOverflow[a]="Value must be at or before {%max}."});k["en-US"]=k["en-US"]||k.en;k[""]=k[""]||k["en-US"];k.de=a.extend(!0,{typeMismatch:{email:"{%value} ist keine zul\u00e4ssige E-Mail-Adresse",url:"{%value} ist keine zul\u00e4ssige Webadresse",number:"{%value} ist keine Nummer!",date:"{%value} ist kein Datum",time:"{%value} ist keine Uhrzeit",range:"{%value} ist keine Nummer!","datetime-local":"{%value} ist kein Datum-Uhrzeit Format."},rangeUnderflow:{defaultMessage:"{%value} ist zu niedrig. {%min} ist der unterste Wert, den Sie benutzen k\u00f6nnen."}, rangeOverflow:{defaultMessage:"{%value} ist zu hoch. {%max} ist der oberste Wert, den Sie benutzen k\u00f6nnen."},stepMismatch:"Der Wert {%value} ist in diesem Feld nicht zul\u00e4ssig. Hier sind nur bestimmte Werte zul\u00e4ssig. {%title}",tooLong:"Der eingegebene Text ist zu lang! Sie haben {%valueLen} Zeichen eingegeben, dabei sind {%maxlength} das Maximum.",patternMismatch:"{%value} hat f\u00fcr dieses Eingabefeld ein falsches Format! {%title}",valueMissing:{defaultMessage:"Bitte geben Sie einen Wert ein", -checkbox:"Bitte aktivieren Sie das K\u00e4stchen"}},i.de||{});["select","radio"].forEach(function(a){i.de.valueMissing[a]="Bitte w\u00e4hlen Sie eine Option aus"});["date","time","datetime-local"].forEach(function(a){i.de.rangeUnderflow[a]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."});["date","time","datetime-local"].forEach(function(a){i.de.rangeOverflow[a]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."}); -var n=i[""];h.createValidationMessage=function(h,j){var i=n[j];i&&"string"!==typeof i&&(i=i[a.prop(h,"type")]||i[(h.nodeName||"").toLowerCase()]||i.defaultMessage);i&&"value,min,max,title,maxlength,label".split(",").forEach(function(g){if(-1!==i.indexOf("{%"+g)){var j=("label"==g?a.trim(a('label[for="'+h.id+'"]',h.form).text()).replace(/\*$|:$/,""):a.attr(h,g))||"";i=i.replace("{%"+g+"}",j);"value"==g&&(i=i.replace("{%valueLen}",j.length))}});return i||""};(h.bugs.validationMessage||!Modernizr.formvalidation|| -h.bugs.bustedValidity)&&j.push("validationMessage");h.activeLang({langObj:i,module:"form-core",callback:function(a){n=a}});j.forEach(function(i){h.defineNodeNamesProperty(["fieldset","output","button"],i,{prop:{value:"",writeable:!1}});["input","select","textarea"].forEach(function(j){var l=h.defineNodeNameProperty(j,i,{prop:{get:function(){var g=this,i="";if(!a.prop(g,"willValidate"))return i;var j=a.prop(g,"validity")||{valid:1};if(j.valid||(i=h.getContentValidationMessage(g,j)))return i;if(j.customError&& -g.nodeName&&(i=Modernizr.formvalidation&&!h.bugs.bustedValidity&&l.prop._supget?l.prop._supget.call(g):h.data(g,"customvalidationMessage")))return i;a.each(j,function(a,j){if("valid"!=a&&j&&(i=h.createValidationMessage(g,a)))return!1});return i||""},writeable:!1}})})})}); +checkbox:"Bitte aktivieren Sie das K\u00e4stchen"}},k.de||{});["select","radio"].forEach(function(a){k.de.valueMissing[a]="Bitte w\u00e4hlen Sie eine Option aus"});["date","time","datetime-local"].forEach(function(a){k.de.rangeUnderflow[a]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."});["date","time","datetime-local"].forEach(function(a){k.de.rangeOverflow[a]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."}); +var r=k[""];g.createValidationMessage=function(g,h){var k=r[h];k&&"string"!==typeof k&&(k=k[a.prop(g,"type")]||k[(g.nodeName||"").toLowerCase()]||k.defaultMessage);k&&"value,min,max,title,maxlength,label".split(",").forEach(function(h){if(-1!==k.indexOf("{%"+h)){var j=("label"==h?a.trim(a('label[for="'+g.id+'"]',g.form).text()).replace(/\*$|:$/,""):a.attr(g,h))||"";k=k.replace("{%"+h+"}",j);"value"==h&&(k=k.replace("{%valueLen}",j.length))}});return k||""};(g.bugs.validationMessage||!Modernizr.formvalidation|| +g.bugs.bustedValidity)&&h.push("validationMessage");g.activeLang({langObj:k,module:"form-core",callback:function(a){r=a}});h.forEach(function(h){g.defineNodeNamesProperty(["fieldset","output","button"],h,{prop:{value:"",writeable:!1}});["input","select","textarea"].forEach(function(k){var l=g.defineNodeNameProperty(k,h,{prop:{get:function(){var h=this,j="";if(!a.prop(h,"willValidate"))return j;var k=a.prop(h,"validity")||{valid:1};if(k.valid||(j=g.getContentValidationMessage(h,k)))return j;if(k.customError&& +h.nodeName&&(j=Modernizr.formvalidation&&!g.bugs.bustedValidity&&l.prop._supget?l.prop._supget.call(h):g.data(h,"customvalidationMessage")))return j;a.each(k,function(a,k){if("valid"!=a&&k&&(j=g.createValidationMessage(h,a)))return!1});return j||""},writeable:!1}})})})}); diff --git a/demos/js-webshim/minified/shims/combos/20.js b/demos/js-webshim/minified/shims/combos/20.js index 450653c8..493dd286 100644 --- a/demos/js-webshim/minified/shims/combos/20.js +++ b/demos/js-webshim/minified/shims/combos/20.js @@ -1,47 +1,47 @@ -(function(c,d,i){var m=d.audio&&d.video,v=!1,l=i.cfg.mediaelement,o=i.bugs,q;if(m){var t=document.createElement("video");d.videoBuffered="buffered"in t;v="loop"in t;i.capturingEvents("play,playing,waiting,paused,ended,durationchange,loadedmetadata,canplay,volumechange".split(","));d.videoBuffered||(i.addPolyfill("mediaelement-native-fix",{f:"mediaelement",test:d.videoBuffered,d:["dom-support"]}),i.reTest("mediaelement-native-fix"))}if(m&&!l.preferFlash){var u=function(p){var d=p.target.parentNode; -!l.preferFlash&&(c(p.target).is("audio, video")||d&&c("source:last",d)[0]==p.target)&&i.ready("mediaelement-swf",function(){setTimeout(function(){q&&!l.preferFlash&&!c(p.target).closest("audio, video").is(".nonnative-api-active")?(l.preferFlash=!0,document.removeEventListener("error",u,!0),c("audio, video").mediaLoad(),i.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+p.target.src)):q||document.removeEventListener("error",u,!0)},20)})};document.addEventListener("error", -u,!0);c("audio, video").each(function(){this.error&&u({target:this})})}o.track=!1;d.track&&function(){if(!o.track)o.track="number"!=typeof c("")[0].readyState;if(!o.track)try{new TextTrackCue(2,3,"")}catch(p){try{new TextTrackCue("",2,3,"","",!1);var d=TextTrackCue;window.TextTrackCue=function(c,p,f,l,o,m){3!=arguments.length&&i.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4=a.duration||a.duration===a._lastDuration)a.duration=d}catch(e){}a.duration&& -a.duration!=a._lastDuration?(h(a._elem,"durationchange"),("audio"==a._elemNodeName||a._callMeta)&&o.jwEvents.Model.META(c.extend({duration:a.duration},b),a),a._durationCalcs--):a._durationCalcs++}},n=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,h(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){n(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,h(b._elem,"canplaythrough");b.readyState=a};c.extend(c.event.customEvent, -{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});o.jwEvents={View:{PLAY:function(a){var b=f(a.id);if(b&&!b.stopPlayPause&&(b._ppFlag=!0,b.paused==a.state)){b.paused=!a.state;if(b.ended)b.ended=!1;h(b._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(a){var b=f(a.id);if(b&&"percentage"in a&&b._bufferedEnd!=a.percentage){b.networkState=100==a.percentage?1:2;(isNaN(b.duration)||5a.percentage||100===a.percentage)&&w(b,a);if(b.ended)b.ended= -!1;if(b.duration){2a.percentage?n(3,b):20a.percentage)b._bufferedStart=b.currentTime||0;b._bufferedEnd=a.percentage;b.buffered.length=1;if(100==a.percentage)b.networkState=1,n(4,b);c.event.trigger("progress",v,b._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:f(a.id))if("duration"in a){if(!b._metadata||!((!a.height||b.videoHeight==a.height)&&a.duration===b.duration)){b._metadata=!0;var c=b.duration;if(a.duration)b.duration= -a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&n(1,b);b.duration&&c!==b.duration&&h(b._elem,"durationchange");h(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=f(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.durationb.readyState&&n(2,b);if(b.ended)b.ended=!1;h(b._elem,"timeupdate")}},STATE:function(a){var b= -f(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;n(1,b);h(b._elem,"waiting");break;case "PLAYING":b.paused=!1;b._ppFlag=!0;b.duration||w(b,a);3>b.readyState&&n(3,b);if(b.ended)b.ended=!1;h(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,h(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&n(4,b),b.ended=!0,h(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=f(a.id);b&&o.setError(b._elem,a.message)},SEEK:function(a){var b= -f(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,h(b._elem,"timeupdate")}},VOLUME:function(a){var b=f(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,h(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=f(a.id);if(b&&b.muted!=a.state)b.muted=a.state,h(b._elem,"volumechange")}}}};var B=function(a){var b=!0;c.each(o.jwEvents,function(d,e){c.each(e,function(c){try{a.jwapi["add"+d+"Listener"](c, -"jQuery.webshims.mediaelement.jwEvents."+d+"."+c)}catch(e){return b=!1}})});return b},z=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},C=function(a){a&&(a._ppFlag===v&&c.prop(a._elem,"autoplay")||!a.paused)&&setTimeout(function(){if("third"==a.isActive&&(a._ppFlag===v||!a.paused))try{c(a._elem).play()}catch(b){}},1)},A=function(a){if(a&& -"video"==a._elemNodeName){var b,d,e,g,f,s,k,j,h=function(h,i){if(i&&h&&!(1>i||1>h||"third"!=a.isActive))if(b&&(b.remove(),b=!1),g=h,f=i,clearTimeout(k),d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e){s=s||c(a._elem).getShadowElement();var l;d&&!e?(l=s.height(),h*=l/i,i=l):!d&&e&&(l=s.width(),i*=l/h,h=l);j=!0;setTimeout(function(){j=!1},9);s.css({width:h,height:i})}},i=function(){if(!("third"!=a.isActive||c.prop(a._elem,"readyState")&&c.prop(this,"videoWidth"))){var g=c.prop(a._elem, -"poster");if(g&&(d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e))b&&(b.remove(),b=!1),b=c(''),b.bind("load error alreadycomplete",function(){clearTimeout(k);var a=this,d=a.naturalWidth||a.width||a.offsetWidth,e=a.naturalHeight||a.height||a.offsetHeight;e&&d?(h(d,e),a=null):setTimeout(function(){d=a.naturalWidth||a.width||a.offsetWidth;e=a.naturalHeight||a.height||a.offsetHeight; -h(d,e);b&&(b.remove(),b=!1);a=null},9);c(this).unbind()}).prop("src",g).appendTo("body").each(function(){this.complete||this.error?c(this).triggerHandler("alreadycomplete"):(clearTimeout(k),k=setTimeout(function(){c(a._elem).triggerHandler("error")},9999))})}};c(a._elem).bind("loadedmetadata",function(){h(c.prop(this,"videoWidth"),c.prop(this,"videoHeight"))}).bind("emptied",i).bind("swfstageresize updatemediaelementdimensions",function(){j||h(g,f)}).bind("emptied",function(){g=void 0;f=void 0}).triggerHandler("swfstageresize"); -i();c.prop(a._elem,"readyState")&&h(c.prop(a._elem,"videoWidth"),c.prop(a._elem,"videoHeight"))}};o.playerResize=function(a){a&&(a=m.getElementById(a.replace(I,"")))&&c(a).triggerHandler("swfstageresize")};c(m).bind("emptied",function(a){a=r(a.target);C(a)});var g;o.jwPlayerReady=function(a){var b=f(a.id),e=0,h=function(){if(!(9g||6<=g)&&d.warn("mediaelement-swf is only testet with jwplayer 5.6+")}b.wasSwfReady= -!0;b.tryedReframeing=0;z(b);C(b)}else clearTimeout(b.reframeTimer),b.reframeTimer=setTimeout(h,9*e),2b.tryedReframeing&&(b.tryedReframeing++,b.shadowElem.css({overflow:"visible"}),setTimeout(function(){b.shadowElem.css({overflow:"hidden"})},16))};if(b&&b.jwapi){if(!b.tryedReframeing)b.tryedReframeing=0;clearTimeout(g);b.jwData=a;b.shadowElem.removeClass("flashblocker-assumed");c.prop(b._elem,"volume",b.volume);c.prop(b._elem,"muted",b.muted);h()}};var e=c.noop;if(t){var K={play:1,playing:1}, -j="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),J=j.map(function(a){return a+".webshimspolyfill"}).join(" "),L=function(a){var b=d.data(a.target,"mediaelement");b&&(a.originalEvent&&a.originalEvent.type===a.type)==("third"==b.activating)&&(a.stopImmediatePropagation(),K[a.type]&&b.isActive!=b.activating&&c(a.target).pause())},e=function(a){c(a).unbind(J).bind(J,L);j.forEach(function(b){d.moveToFirstEvent(a,b)})};e(m)}o.setActive=function(a,b, -e){e||(e=d.data(a,"mediaelement"));if(e&&e.isActive!=b){"html5"!=b&&"third"!=b&&d.warn("wrong type for mediaelement activating: "+b);var g=d.data(a,"shadowData");e.activating=b;c(a).pause();e.isActive=b;"third"==b?(g.shadowElement=g.shadowFocusElement=e.shadowElem[0],c(a).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(c(a).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),g.shadowElement=g.shadowFocusElement=!1);c(a).trigger("mediaelementapichange")}}; -var O=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(c){if(c){var d=b,e=c.networkState;for(n(0,c);--d;)delete c[a[d]];c.actionQueue=[];c.buffered.length=0;e&&h(c._elem,"emptied")}}}(),F=function(a,b){var d=a._elem,e=a.shadowElem;c(d)[b?"addClass":"removeClass"]("webshims-controls");"audio"==a._elemNodeName&&!b?e.css({width:0,height:0}):e.css({width:d.style.width|| -c(d).width(),height:d.style.height||c(d).height()})};o.createSWF=function(a,b,f){if(u){1>p?p=1:p++;var h=c.extend({},l.jwVars,{image:c.prop(a,"poster")||"",file:b.srcProp}),i=c(a).data("jwvars")||{};f||(f=d.data(a,"mediaelement"));if(f&&f.swfCreated)o.setActive(a,"third",f),O(f),f.currentSrc=b.srcProp,c.extend(h,i),l.changeJW(h,a,b,f,"load"),x(a,"sendEvent",["LOAD",h]);else{var D=c.prop(a,"controls"),s="jwplayer-"+d.getID(a),k=c.extend({},l.jwParams,c(a).data("jwparams")),j=a.nodeName.toLowerCase(), -m=c.extend({},l.jwAttrs,{name:s,id:s},c(a).data("jwattrs")),n=c('
').css({position:"relative",overflow:"hidden"}),f=d.data(a,"mediaelement",d.objectCreate(H,{actionQueue:{value:[]},shadowElem:{value:n},_elemNodeName:{value:j},_elem:{value:a},currentSrc:{value:b.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=f.buffered.length)d.error("buffered index size error");else return 0},end:function(a){if(a>= -f.buffered.length)d.error("buffered index size error");else return(f.duration-f._bufferedStart)*f._bufferedEnd/100+f._bufferedStart},length:0}}}));F(f,D);n.insertBefore(a);t&&c.extend(f,{volume:c.prop(a,"volume"),muted:c.prop(a,"muted")});c.extend(h,{id:s,controlbar:D?l.jwVars.controlbar||("video"==j?"over":"bottom"):"video"==j?"none":"bottom",icons:""+(D&&"video"==j)},i,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});h.plugins=h.plugins?h.plugins+(","+y):y;d.addShadowDom(a,n);e(a);o.setActive(a, -"third",f);l.changeJW(h,a,b,f,"embed");c(a).bind("updatemediaelementdimensions updateshadowdom",function(){F(f,c.prop(a,"controls"))});A(f);q.embedSWF(E,s,"100%","100%","9.0.0",!1,h,k,m,function(b){if(b.success)f.jwapi=b.ref,D||c(b.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!b.ref.parentNode&&n[0].parentNode||"none"==b.ref.style.display)n.addClass("flashblocker-assumed"),c(a).trigger("flashblocker"),d.warn("flashblocker assumed");c(b.ref).css({minHeight:"2px",minWidth:"2px", -display:"block"})},9),g||(clearTimeout(g),g=setTimeout(function(){var a=c(b.ref);1a[0].offsetWidth||2>a[0].offsetHeight)&&d.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){c(a).mediaLoad()}, -1)};var x=function(a,b,c,d){return(d=d||r(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10a||100d.browserVersion,P={object:1,OBJECT:1};c.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&p)for(b=0;b")[0].readyState;if(!n.track)try{new TextTrackCue(2,3,"")}catch(d){try{new TextTrackCue("",2,3,"","",!1);var k=TextTrackCue; +window.TextTrackCue=function(c,d,t,g,j,m){3!=arguments.length&&i.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4=a.duration||a.duration===a._lastDuration)a.duration=d}catch(e){}a.duration&& +a.duration!=a._lastDuration?(j(a._elem,"durationchange"),("audio"==a._elemNodeName||a._callMeta)&&n.jwEvents.Model.META(c.extend({duration:a.duration},b),a),a._durationCalcs--):a._durationCalcs++}},p=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,j(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){p(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,j(b._elem,"canplaythrough");b.readyState=a};c.extend(c.event.customEvent, +{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});n.jwEvents={View:{PLAY:function(a){var b=l(a.id);if(b&&!b.stopPlayPause&&(b._ppFlag=!0,b.paused==a.state)){b.paused=!a.state;if(b.ended)b.ended=!1;j(b._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(a){var b=l(a.id);if(b&&"percentage"in a&&b._bufferedEnd!=a.percentage){b.networkState=100==a.percentage?1:2;(isNaN(b.duration)||5a.percentage||100===a.percentage)&&y(b,a);if(b.ended)b.ended= +!1;if(b.duration){2a.percentage?p(3,b):20a.percentage)b._bufferedStart=b.currentTime||0;b._bufferedEnd=a.percentage;b.buffered.length=1;if(100==a.percentage)b.networkState=1,p(4,b);c.event.trigger("progress",u,b._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:l(a.id))if("duration"in a){if(!b._metadata||!((!a.height||b.videoHeight==a.height)&&a.duration===b.duration)){b._metadata=!0;var c=b.duration;if(a.duration)b.duration= +a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&p(1,b);b.duration&&c!==b.duration&&j(b._elem,"durationchange");j(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=l(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.durationb.readyState&&p(2,b);if(b.ended)b.ended=!1;j(b._elem,"timeupdate")}},STATE:function(a){var b= +l(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;p(1,b);j(b._elem,"waiting");break;case "PLAYING":b.paused=!1;b._ppFlag=!0;b.duration||y(b,a);3>b.readyState&&p(3,b);if(b.ended)b.ended=!1;j(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,j(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&p(4,b),b.ended=!0,j(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=l(a.id);b&&n.setError(b._elem,a.message)},SEEK:function(a){var b= +l(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,j(b._elem,"timeupdate")}},VOLUME:function(a){var b=l(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,j(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=l(a.id);if(b&&b.muted!=a.state)b.muted=a.state,j(b._elem,"volumechange")}}}};var D=function(a){var b=!0;c.each(n.jwEvents,function(d,e){c.each(e,function(c){try{a.jwapi["add"+d+"Listener"](c, +"jQuery.webshims.mediaelement.jwEvents."+d+"."+c)}catch(e){return b=!1}})});return b},B=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},E=function(a){a&&(a._ppFlag===u&&c.prop(a._elem,"autoplay")||!a.paused)&&setTimeout(function(){if("third"==a.isActive&&(a._ppFlag===u||!a.paused))try{c(a._elem).play()}catch(b){}},1)},C=function(a){if(a&& +"video"==a._elemNodeName){var b,d,e,f,w,s,g,i,h=function(h,j){if(j&&h&&!(1>j||1>h||"third"!=a.isActive))if(b&&(b.remove(),b=!1),f=h,w=j,clearTimeout(g),d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e){s=s||c(a._elem).getShadowElement();var k;d&&!e?(k=s.height(),h*=k/j,j=k):!d&&e&&(k=s.width(),j*=k/h,h=k);i=!0;setTimeout(function(){i=!1},9);s.css({width:h,height:j})}},j=function(){if(!("third"!=a.isActive||c.prop(a._elem,"readyState")&&c.prop(this,"videoWidth"))){var f=c.prop(a._elem, +"poster");if(f&&(d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e))b&&(b.remove(),b=!1),b=c(''),b.bind("load error alreadycomplete",function(){clearTimeout(g);var a=this,d=a.naturalWidth||a.width||a.offsetWidth,e=a.naturalHeight||a.height||a.offsetHeight;e&&d?(h(d,e),a=null):setTimeout(function(){d=a.naturalWidth||a.width||a.offsetWidth;e=a.naturalHeight||a.height||a.offsetHeight; +h(d,e);b&&(b.remove(),b=!1);a=null},9);c(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete||this.error?c(this).triggerHandler("alreadycomplete"):(clearTimeout(g),g=setTimeout(function(){c(a._elem).triggerHandler("error")},9999))})}};c(a._elem).bind("loadedmetadata",function(){h(c.prop(this,"videoWidth"),c.prop(this,"videoHeight"))}).bind("emptied",j).bind("swfstageresize updatemediaelementdimensions",function(){i||h(f,w)}).bind("emptied",function(){f=void 0;w=void 0}).triggerHandler("swfstageresize"); +j();c.prop(a._elem,"readyState")&&h(c.prop(a._elem,"videoWidth"),c.prop(a._elem,"videoHeight"))}};n.playerResize=function(a){a&&(a=q.getElementById(a.replace(I,"")))&&c(a).triggerHandler("swfstageresize")};c(q).bind("emptied",function(a){a=g(a.target);E(a)});var f;n.jwPlayerReady=function(a){var b=l(a.id),e=0,g=function(){if(!(9f||6<=f)&&d.warn("mediaelement-swf is only testet with jwplayer 5.6+")}b.wasSwfReady= +!0;b.tryedReframeing=0;B(b);E(b)}else clearTimeout(b.reframeTimer),b.reframeTimer=setTimeout(g,9*e),2b.tryedReframeing&&(b.tryedReframeing++,b.shadowElem.css({overflow:"visible"}),setTimeout(function(){b.shadowElem.css({overflow:"hidden"})},16))};if(b&&b.jwapi){if(!b.tryedReframeing)b.tryedReframeing=0;clearTimeout(f);b.jwData=a;b.shadowElem.removeClass("flashblocker-assumed");c.prop(b._elem,"volume",b.volume);c.prop(b._elem,"muted",b.muted);g()}};var e=c.noop;if(o){var K={play:1,playing:1}, +h="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),J=h.map(function(a){return a+".webshimspolyfill"}).join(" "),L=function(a){var b=d.data(a.target,"mediaelement");b&&(a.originalEvent&&a.originalEvent.type===a.type)==("third"==b.activating)&&(a.stopImmediatePropagation(),K[a.type]&&b.isActive!=b.activating&&c(a.target).pause())},e=function(a){c(a).unbind(J).bind(J,L);h.forEach(function(b){d.moveToFirstEvent(a,b)})};e(q)}n.setActive=function(a,b, +e){e||(e=d.data(a,"mediaelement"));if(e&&e.isActive!=b){"html5"!=b&&"third"!=b&&d.warn("wrong type for mediaelement activating: "+b);var f=d.data(a,"shadowData");e.activating=b;c(a).pause();e.isActive=b;"third"==b?(f.shadowElement=f.shadowFocusElement=e.shadowElem[0],c(a).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(c(a).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),f.shadowElement=f.shadowFocusElement=!1);c(a).trigger("mediaelementapichange")}}; +var O=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(c){if(c){var d=b,e=c.networkState;for(p(0,c);--d;)delete c[a[d]];c.actionQueue=[];c.buffered.length=0;e&&j(c._elem,"emptied")}}}(),F=function(a,b){var d=a._elem,e=a.shadowElem;c(d)[b?"addClass":"removeClass"]("webshims-controls");"audio"==a._elemNodeName&&!b?e.css({width:0,height:0}):e.css({width:d.style.width|| +c(d).width(),height:d.style.height||c(d).height()})};n.createSWF=function(a,b,g){if(v){1>r?r=1:r++;var h=c.extend({},m.jwVars,{image:c.prop(a,"poster")||"",file:b.srcProp}),i=c(a).data("jwvars")||{};g||(g=d.data(a,"mediaelement"));if(g&&g.swfCreated)n.setActive(a,"third",g),O(g),g.currentSrc=b.srcProp,c.extend(h,i),m.changeJW(h,a,b,g,"load"),z(a,"sendEvent",["LOAD",h]);else{var w=c.prop(a,"controls"),s="jwplayer-"+d.getID(a),j=c.extend({},m.jwParams,c(a).data("jwparams")),k=a.nodeName.toLowerCase(), +p=c.extend({},m.jwAttrs,{name:s,id:s},c(a).data("jwattrs")),l=c('
').css({position:"relative",overflow:"hidden"}),g=d.data(a,"mediaelement",d.objectCreate(H,{actionQueue:{value:[]},shadowElem:{value:l},_elemNodeName:{value:k},_elem:{value:a},currentSrc:{value:b.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=g.buffered.length)d.error("buffered index size error");else return 0},end:function(a){if(a>= +g.buffered.length)d.error("buffered index size error");else return(g.duration-g._bufferedStart)*g._bufferedEnd/100+g._bufferedStart},length:0}}}));F(g,w);l.insertBefore(a);o&&c.extend(g,{volume:c.prop(a,"volume"),muted:c.prop(a,"muted")});c.extend(h,{id:s,controlbar:w?m.jwVars.controlbar||("video"==k?"over":"bottom"):"video"==k?"none":"bottom",icons:""+(w&&"video"==k)},i,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});h.plugins=h.plugins?h.plugins+(","+G):G;d.addShadowDom(a,l);e(a);n.setActive(a, +"third",g);m.changeJW(h,a,b,g,"embed");c(a).bind("updatemediaelementdimensions updateshadowdom",function(){F(g,c.prop(a,"controls"))});C(g);A.embedSWF(x,s,"100%","100%","9.0.0",!1,h,j,p,function(b){if(b.success)g.jwapi=b.ref,w||c(b.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!b.ref.parentNode&&l[0].parentNode||"none"==b.ref.style.display)l.addClass("flashblocker-assumed"),c(a).trigger("flashblocker"),d.warn("flashblocker assumed");c(b.ref).css({minHeight:"2px",minWidth:"2px", +display:"block"})},9),f||(clearTimeout(f),f=setTimeout(function(){var a=c(b.ref);1a[0].offsetWidth||2>a[0].offsetHeight)&&d.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){c(a).mediaLoad()}, +1)};var z=function(a,b,c,d){return(d=d||g(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10a||100d.browserVersion,P={object:1,OBJECT:1};c.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&r)for(b=0;b>>0;if("[object Function]"!=h(f))throw new TypeError;for(;l>>0,a=Array(l);if("[object Function]"!=h(f))throw new TypeError;for(var c=0;c>>0,a=[];if("[object Function]"!=h(f))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=h(f))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=h(b))throw new TypeError; -for(var e=0;e>>0;if("[object Function]"!=h(b))throw new TypeError;if(!a&&1==arguments.length)throw new TypeError;var l=0,e;if(2<=arguments.length)e=arguments[1];else{do{if(l in c){e=c[l++];break}if(++l>=a)throw new TypeError;}while(1)}for(;l>>0;if("[object Function]"!=h(b))throw new TypeError;if(!a&&1==arguments.length)throw new TypeError;var e,a=a-1;if(2<=arguments.length)e=arguments[1];else{do{if(a in c){e=c[a--];break}if(0>--a)throw new TypeError;}while(1)}do a in this&&(e=b.call(void 0,e,c[a],a,c));while(a--);return e};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(b){var a=o(this),c=a.length>>>0;if(!c)return-1;var e=0;1>>0;if(!c)return-1;var e=c-1;1e&&(b[a]="0"+e);return b.slice(0,3).join("-")+"T"+b.slice(3).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};if(!Date.now)Date.now=function(){return(new Date).getTime()};if(!Date.prototype.toJSON)Date.prototype.toJSON=function(){if("function"!=typeof this.toISOString)throw new TypeError;return this.toISOString()};b="\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"; -if(!String.prototype.trim||b.trim()){var b="["+b+"]",e=RegExp("^"+b+b+"*"),w=RegExp(b+b+"*$");String.prototype.trim=function(){return(""+this).replace(e,"").replace(w,"")}}if("0".split(void 0,0).length){var B=String.prototype.split;String.prototype.split=function(b,a){return void 0===b&&0===a?[]:B.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var C=String.prototype.substr;String.prototype.substr=function(b,a){return C.call(this,0>b?0>(b=this.length+b)?0:b:b,a)}}var u=function(b){b=+b; -b!==b?b=-1:0!==b&&b!==1/0&&b!==-(1/0)&&(b=(0>>0;if("[object Function]"!=k(g))throw new TypeError;for(;m>>0,c=Array(m);if("[object Function]"!=k(b))throw new TypeError;for(var e=0;e>>0,c=[];if("[object Function]"!=k(b))throw new TypeError;for(var e=0;e>>0;if("[object Function]"!=k(b))throw new TypeError;for(var e=0;e>>0;if("[object Function]"!=k(b))throw new TypeError; +for(var c=0;c>>0;if("[object Function]"!=k(b))throw new TypeError;if(!h&&1==arguments.length)throw new TypeError;var e=0,c;if(2<=arguments.length)c=arguments[1];else{do{if(e in a){c=a[e++];break}if(++e>=h)throw new TypeError;}while(1)}for(;e>>0;if("[object Function]"!=k(b))throw new TypeError;if(!a&&1==arguments.length)throw new TypeError;var c,a=a-1;if(2<=arguments.length)c=arguments[1];else{do{if(a in e){c=e[a--];break}if(0>--a)throw new TypeError;}while(1)}do a in this&&(c=b.call(void 0,c,e[a],a,e));while(a--);return c};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(b){var a=f(this),e=a.length>>>0;if(!e)return-1;var c=0;1>>0;if(!e)return-1;var c=e-1;1a&&(b[c]="0"+a);return b.slice(0,3).join("-")+"T"+b.slice(3).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};if(!Date.now)Date.now=function(){return(new Date).getTime()};if(!Date.prototype.toJSON)Date.prototype.toJSON=function(){if("function"!=typeof this.toISOString)throw new TypeError;return this.toISOString()};b="\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"; +if(!String.prototype.trim||b.trim()){var b="["+b+"]",q=RegExp("^"+b+b+"*"),e=RegExp(b+b+"*$");String.prototype.trim=function(){return(""+this).replace(q,"").replace(e,"")}}if("0".split(void 0,0).length){var C=String.prototype.split;String.prototype.split=function(b,c){return void 0===b&&0===c?[]:C.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var D=String.prototype.substr;String.prototype.substr=function(b,c){return D.call(this,0>b?0>(b=this.length+b)?0:b:b,c)}}var y=function(b){b=+b; +b!==b?b=-1:0!==b&&b!==1/0&&b!==-(1/0)&&(b=(0")[0].readyState;if(!c.track)try{new TextTrackCue(2,3,"")}catch(a){try{new TextTrackCue("",2,3,"","",!1);var w=TextTrackCue;window.TextTrackCue=function(b,a,c,e,g,h){3!=arguments.length&&d.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4=a.duration||a.duration===a._lastDuration)a.duration=d}catch(e){}a.duration&& -a.duration!=a._lastDuration?(f(a._elem,"durationchange"),("audio"==a._elemNodeName||a._callMeta)&&c.jwEvents.Model.META(b.extend({duration:a.duration},m),a),a._durationCalcs--):a._durationCalcs++}},p=function(b,a){3>b&&clearTimeout(a._canplaythroughTimer);if(3<=b&&3>a.readyState)a.readyState=b,f(a._elem,"canplay"),clearTimeout(a._canplaythroughTimer),a._canplaythroughTimer=setTimeout(function(){p(4,a)},4E3);if(4<=b&&4>a.readyState)a.readyState=b,f(a._elem,"canplaythrough");a.readyState=b};b.extend(b.event.customEvent, -{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});c.jwEvents={View:{PLAY:function(b){var a=g(b.id);if(a&&!a.stopPlayPause&&(a._ppFlag=!0,a.paused==b.state)){a.paused=!b.state;if(a.ended)a.ended=!1;f(a._elem,b.state?"play":"pause")}}},Model:{BUFFER:function(a){var m=g(a.id);if(m&&"percentage"in a&&m._bufferedEnd!=a.percentage){m.networkState=100==a.percentage?1:2;(isNaN(m.duration)||5a.percentage||100===a.percentage)&&l(m,a);if(m.ended)m.ended= -!1;if(m.duration){2a.percentage?p(3,m):20a.percentage)m._bufferedStart=m.currentTime||0;m._bufferedEnd=a.percentage;m.buffered.length=1;if(100==a.percentage)m.networkState=1,p(4,m);b.event.trigger("progress",h,m._elem,!0)}}},META:function(b,a){if(a=a&&a.networkState?a:g(b.id))if("duration"in b){if(!a._metadata||!((!b.height||a.videoHeight==b.height)&&b.duration===a.duration)){a._metadata=!0;var c=a.duration;if(b.duration)a.duration= -b.duration;a._lastDuration=a.duration;if(b.height||b.width)a.videoHeight=b.height||0,a.videoWidth=b.width||0;if(!a.networkState)a.networkState=2;1>a.readyState&&p(1,a);a.duration&&c!==a.duration&&f(a._elem,"durationchange");f(a._elem,"loadedmetadata")}}else a._callMeta=!0},TIME:function(a){var b=g(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.durationb.readyState&&p(2,b);if(b.ended)b.ended=!1;f(b._elem,"timeupdate")}},STATE:function(b){var a= -g(b.id);if(a)switch(b.newstate){case "BUFFERING":if(a.ended)a.ended=!1;p(1,a);f(a._elem,"waiting");break;case "PLAYING":a.paused=!1;a._ppFlag=!0;a.duration||l(a,b);3>a.readyState&&p(3,a);if(a.ended)a.ended=!1;f(a._elem,"playing");break;case "PAUSED":if(!a.paused&&!a.stopPlayPause)a.paused=!0,a._ppFlag=!0,f(a._elem,"pause");break;case "COMPLETED":4>a.readyState&&p(4,a),a.ended=!0,f(a._elem,"ended")}}},Controller:{ERROR:function(a){var b=g(a.id);b&&c.setError(b._elem,a.message)},SEEK:function(a){var b= -g(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,f(b._elem,"timeupdate")}},VOLUME:function(a){var b=g(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,f(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=g(a.id);if(b&&b.muted!=a.state)b.muted=a.state,f(b._elem,"volumechange")}}}};var A=function(a){var m=!0;b.each(c.jwEvents,function(c,d){b.each(d,function(b){try{a.jwapi["add"+c+"Listener"](b, -"jQuery.webshims.mediaelement.jwEvents."+c+"."+b)}catch(d){return m=!1}})});return m},y=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},E=function(a){a&&(a._ppFlag===h&&b.prop(a._elem,"autoplay")||!a.paused)&&setTimeout(function(){if("third"==a.isActive&&(a._ppFlag===h||!a.paused))try{b(a._elem).play()}catch(c){}},1)},z=function(a){if(a&& -"video"==a._elemNodeName){var c,d,e,g,v,t,f,j,i=function(i,h){if(h&&i&&!(1>h||1>i||"third"!=a.isActive))if(c&&(c.remove(),c=!1),g=i,v=h,clearTimeout(f),d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e){t=t||b(a._elem).getShadowElement();var k;d&&!e?(k=t.height(),i*=k/h,h=k):!d&&e&&(k=t.width(),h*=k/i,i=k);j=!0;setTimeout(function(){j=!1},9);t.css({width:i,height:h})}},h=function(){if(!("third"!=a.isActive||b.prop(a._elem,"readyState")&&b.prop(this,"videoWidth"))){var t=b.prop(a._elem, -"poster");if(t&&(d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e))c&&(c.remove(),c=!1),c=b(''),c.bind("load error alreadycomplete",function(){clearTimeout(f);var a=this,d=a.naturalWidth||a.width||a.offsetWidth,F=a.naturalHeight||a.height||a.offsetHeight;F&&d?(i(d,F),a=null):setTimeout(function(){d=a.naturalWidth||a.width||a.offsetWidth;F=a.naturalHeight||a.height||a.offsetHeight; -i(d,F);c&&(c.remove(),c=!1);a=null},9);b(this).unbind()}).prop("src",t).appendTo("body").each(function(){this.complete||this.error?b(this).triggerHandler("alreadycomplete"):(clearTimeout(f),f=setTimeout(function(){b(a._elem).triggerHandler("error")},9999))})}};b(a._elem).bind("loadedmetadata",function(){i(b.prop(this,"videoWidth"),b.prop(this,"videoHeight"))}).bind("emptied",h).bind("swfstageresize updatemediaelementdimensions",function(){j||i(g,v)}).bind("emptied",function(){g=void 0;v=void 0}).triggerHandler("swfstageresize"); -h();b.prop(a._elem,"readyState")&&i(b.prop(a._elem,"videoWidth"),b.prop(a._elem,"videoHeight"))}};c.playerResize=function(a){a&&(a=n.getElementById(a.replace(u,"")))&&b(a).triggerHandler("swfstageresize")};b(n).bind("emptied",function(a){a=o(a.target);E(a)});var D;c.jwPlayerReady=function(c){var d=g(c.id),e=0,f=function(){if(!(9g||6<=g)&&a.warn("mediaelement-swf is only testet with jwplayer 5.6+")}d.wasSwfReady= -!0;d.tryedReframeing=0;y(d);E(d)}else clearTimeout(d.reframeTimer),d.reframeTimer=setTimeout(f,9*e),2d.tryedReframeing&&(d.tryedReframeing++,d.shadowElem.css({overflow:"visible"}),setTimeout(function(){d.shadowElem.css({overflow:"hidden"})},16))};if(d&&d.jwapi){if(!d.tryedReframeing)d.tryedReframeing=0;clearTimeout(D);d.jwData=c;d.shadowElem.removeClass("flashblocker-assumed");b.prop(d._elem,"volume",d.volume);b.prop(d._elem,"muted",d.muted);f()}};var H=b.noop;if(j){var K={play:1,playing:1}, -q="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),J=q.map(function(a){return a+".webshimspolyfill"}).join(" "),L=function(c){var d=a.data(c.target,"mediaelement");d&&(c.originalEvent&&c.originalEvent.type===c.type)==("third"==d.activating)&&(c.stopImmediatePropagation(),K[c.type]&&d.isActive!=d.activating&&b(c.target).pause())},H=function(c){b(c).unbind(J).bind(J,L);q.forEach(function(b){a.moveToFirstEvent(c,b)})};H(n)}c.setActive=function(c,d, -e){e||(e=a.data(c,"mediaelement"));if(e&&e.isActive!=d){"html5"!=d&&"third"!=d&&a.warn("wrong type for mediaelement activating: "+d);var g=a.data(c,"shadowData");e.activating=d;b(c).pause();e.isActive=d;"third"==d?(g.shadowElement=g.shadowFocusElement=e.shadowElem[0],b(c).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(b(c).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),g.shadowElement=g.shadowFocusElement=!1);b(c).trigger("mediaelementapichange")}}; -var O=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(c){if(c){var d=b,e=c.networkState;for(p(0,c);--d;)delete c[a[d]];c.actionQueue=[];c.buffered.length=0;e&&f(c._elem,"emptied")}}}(),I=function(a,c){var d=a._elem,e=a.shadowElem;b(d)[c?"addClass":"removeClass"]("webshims-controls");"audio"==a._elemNodeName&&!c?e.css({width:0,height:0}):e.css({width:d.style.width|| -b(d).width(),height:d.style.height||b(d).height()})};c.createSWF=function(d,g,f){if(r){1>e?e=1:e++;var h=b.extend({},k.jwVars,{image:b.prop(d,"poster")||"",file:g.srcProp}),l=b(d).data("jwvars")||{};f||(f=a.data(d,"mediaelement"));if(f&&f.swfCreated)c.setActive(d,"third",f),O(f),f.currentSrc=g.srcProp,b.extend(h,l),k.changeJW(h,d,g,f,"load"),x(d,"sendEvent",["LOAD",h]);else{var v=b.prop(d,"controls"),t="jwplayer-"+a.getID(d),o=b.extend({},k.jwParams,b(d).data("jwparams")),n=d.nodeName.toLowerCase(), -p=b.extend({},k.jwAttrs,{name:t,id:t},b(d).data("jwattrs")),q=b('
').css({position:"relative",overflow:"hidden"}),f=a.data(d,"mediaelement",a.objectCreate(C,{actionQueue:{value:[]},shadowElem:{value:q},_elemNodeName:{value:n},_elem:{value:d},currentSrc:{value:g.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(b){if(b>=f.buffered.length)a.error("buffered index size error");else return 0},end:function(b){if(b>= -f.buffered.length)a.error("buffered index size error");else return(f.duration-f._bufferedStart)*f._bufferedEnd/100+f._bufferedStart},length:0}}}));I(f,v);q.insertBefore(d);j&&b.extend(f,{volume:b.prop(d,"volume"),muted:b.prop(d,"muted")});b.extend(h,{id:t,controlbar:v?k.jwVars.controlbar||("video"==n?"over":"bottom"):"video"==n?"none":"bottom",icons:""+(v&&"video"==n)},l,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});h.plugins=h.plugins?h.plugins+(","+i):i;a.addShadowDom(d,q);H(d);c.setActive(d, -"third",f);k.changeJW(h,d,g,f,"embed");b(d).bind("updatemediaelementdimensions updateshadowdom",function(){I(f,b.prop(d,"controls"))});z(f);s.embedSWF(G,t,"100%","100%","9.0.0",!1,h,o,p,function(c){if(c.success)f.jwapi=c.ref,v||b(c.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!c.ref.parentNode&&q[0].parentNode||"none"==c.ref.style.display)q.addClass("flashblocker-assumed"),b(d).trigger("flashblocker"),a.warn("flashblocker assumed");b(c.ref).css({minHeight:"2px",minWidth:"2px", -display:"block"})},9),D||(clearTimeout(D),D=setTimeout(function(){var d=b(c.ref);1d[0].offsetWidth||2>d[0].offsetHeight)&&a.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){b(d).mediaLoad()}, -1)};var x=function(a,b,c,d){return(d=d||o(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10b||100a.browserVersion,P={object:1,OBJECT:1};b.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&e)for(b=0;b")[0].readyState;if(!c.track)try{new TextTrackCue(2,3,"")}catch(a){try{new TextTrackCue("",2,3,"","",!1);var i=TextTrackCue; +window.TextTrackCue=function(b,a,c,e,f,g){3!=arguments.length&&d.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4=a.duration||a.duration===a._lastDuration)a.duration=d}catch(e){}a.duration&& +a.duration!=a._lastDuration?(g(a._elem,"durationchange"),("audio"==a._elemNodeName||a._callMeta)&&c.jwEvents.Model.META(b.extend({duration:a.duration},l),a),a._durationCalcs--):a._durationCalcs++}},p=function(b,a){3>b&&clearTimeout(a._canplaythroughTimer);if(3<=b&&3>a.readyState)a.readyState=b,g(a._elem,"canplay"),clearTimeout(a._canplaythroughTimer),a._canplaythroughTimer=setTimeout(function(){p(4,a)},4E3);if(4<=b&&4>a.readyState)a.readyState=b,g(a._elem,"canplaythrough");a.readyState=b};b.extend(b.event.customEvent, +{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});c.jwEvents={View:{PLAY:function(b){var a=o(b.id);if(a&&!a.stopPlayPause&&(a._ppFlag=!0,a.paused==b.state)){a.paused=!b.state;if(a.ended)a.ended=!1;g(a._elem,b.state?"play":"pause")}}},Model:{BUFFER:function(a){var l=o(a.id);if(l&&"percentage"in a&&l._bufferedEnd!=a.percentage){l.networkState=100==a.percentage?1:2;(isNaN(l.duration)||5a.percentage||100===a.percentage)&&m(l,a);if(l.ended)l.ended= +!1;if(l.duration){2a.percentage?p(3,l):20a.percentage)l._bufferedStart=l.currentTime||0;l._bufferedEnd=a.percentage;l.buffered.length=1;if(100==a.percentage)l.networkState=1,p(4,l);b.event.trigger("progress",k,l._elem,!0)}}},META:function(b,a){if(a=a&&a.networkState?a:o(b.id))if("duration"in b){if(!a._metadata||!((!b.height||a.videoHeight==b.height)&&b.duration===a.duration)){a._metadata=!0;var c=a.duration;if(b.duration)a.duration= +b.duration;a._lastDuration=a.duration;if(b.height||b.width)a.videoHeight=b.height||0,a.videoWidth=b.width||0;if(!a.networkState)a.networkState=2;1>a.readyState&&p(1,a);a.duration&&c!==a.duration&&g(a._elem,"durationchange");g(a._elem,"loadedmetadata")}}else a._callMeta=!0},TIME:function(b){var a=o(b.id);if(a&&a.currentTime!==b.position){a.currentTime=b.position;a.duration&&a.durationa.readyState&&p(2,a);if(a.ended)a.ended=!1;g(a._elem,"timeupdate")}},STATE:function(b){var a= +o(b.id);if(a)switch(b.newstate){case "BUFFERING":if(a.ended)a.ended=!1;p(1,a);g(a._elem,"waiting");break;case "PLAYING":a.paused=!1;a._ppFlag=!0;a.duration||m(a,b);3>a.readyState&&p(3,a);if(a.ended)a.ended=!1;g(a._elem,"playing");break;case "PAUSED":if(!a.paused&&!a.stopPlayPause)a.paused=!0,a._ppFlag=!0,g(a._elem,"pause");break;case "COMPLETED":4>a.readyState&&p(4,a),a.ended=!0,g(a._elem,"ended")}}},Controller:{ERROR:function(a){var b=o(a.id);b&&c.setError(b._elem,a.message)},SEEK:function(a){var b= +o(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,g(b._elem,"timeupdate")}},VOLUME:function(a){var b=o(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,g(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=o(a.id);if(b&&b.muted!=a.state)b.muted=a.state,g(b._elem,"volumechange")}}}};var B=function(a){var l=!0;b.each(c.jwEvents,function(c,d){b.each(d,function(b){try{a.jwapi["add"+c+"Listener"](b, +"jQuery.webshims.mediaelement.jwEvents."+c+"."+b)}catch(d){return l=!1}})});return l},z=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},F=function(a){a&&(a._ppFlag===k&&b.prop(a._elem,"autoplay")||!a.paused)&&setTimeout(function(){if("third"==a.isActive&&(a._ppFlag===k||!a.paused))try{b(a._elem).play()}catch(c){}},1)},A=function(a){if(a&& +"video"==a._elemNodeName){var c,d,e,f,v,s,i,h,g=function(g,j){if(j&&g&&!(1>j||1>g||"third"!=a.isActive))if(c&&(c.remove(),c=!1),f=g,v=j,clearTimeout(i),d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e){s=s||b(a._elem).getShadowElement();var k;d&&!e?(k=s.height(),g*=k/j,j=k):!d&&e&&(k=s.width(),j*=k/g,g=k);h=!0;setTimeout(function(){h=!1},9);s.css({width:g,height:j})}},j=function(){if(!("third"!=a.isActive||b.prop(a._elem,"readyState")&&b.prop(this,"videoWidth"))){var f=b.prop(a._elem, +"poster");if(f&&(d="auto"==a._elem.style.width,e="auto"==a._elem.style.height,d||e))c&&(c.remove(),c=!1),c=b(''),c.bind("load error alreadycomplete",function(){clearTimeout(i);var a=this,d=a.naturalWidth||a.width||a.offsetWidth,G=a.naturalHeight||a.height||a.offsetHeight;G&&d?(g(d,G),a=null):setTimeout(function(){d=a.naturalWidth||a.width||a.offsetWidth;G=a.naturalHeight||a.height||a.offsetHeight; +g(d,G);c&&(c.remove(),c=!1);a=null},9);b(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete||this.error?b(this).triggerHandler("alreadycomplete"):(clearTimeout(i),i=setTimeout(function(){b(a._elem).triggerHandler("error")},9999))})}};b(a._elem).bind("loadedmetadata",function(){g(b.prop(this,"videoWidth"),b.prop(this,"videoHeight"))}).bind("emptied",j).bind("swfstageresize updatemediaelementdimensions",function(){h||g(f,v)}).bind("emptied",function(){f=void 0;v=void 0}).triggerHandler("swfstageresize"); +j();b.prop(a._elem,"readyState")&&g(b.prop(a._elem,"videoWidth"),b.prop(a._elem,"videoHeight"))}};c.playerResize=function(a){a&&(a=j.getElementById(a.replace(y,"")))&&b(a).triggerHandler("swfstageresize")};b(j).bind("emptied",function(a){a=f(a.target);F(a)});var E;c.jwPlayerReady=function(c){var d=o(c.id),e=0,f=function(){if(!(9i||6<=i)&&a.warn("mediaelement-swf is only testet with jwplayer 5.6+")}d.wasSwfReady= +!0;d.tryedReframeing=0;z(d);F(d)}else clearTimeout(d.reframeTimer),d.reframeTimer=setTimeout(f,9*e),2d.tryedReframeing&&(d.tryedReframeing++,d.shadowElem.css({overflow:"visible"}),setTimeout(function(){d.shadowElem.css({overflow:"hidden"})},16))};if(d&&d.jwapi){if(!d.tryedReframeing)d.tryedReframeing=0;clearTimeout(E);d.jwData=c;d.shadowElem.removeClass("flashblocker-assumed");b.prop(d._elem,"volume",d.volume);b.prop(d._elem,"muted",d.muted);f()}};var H=b.noop;if(i){var K={play:1,playing:1}, +t="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),J=t.map(function(a){return a+".webshimspolyfill"}).join(" "),L=function(c){var d=a.data(c.target,"mediaelement");d&&(c.originalEvent&&c.originalEvent.type===c.type)==("third"==d.activating)&&(c.stopImmediatePropagation(),K[c.type]&&d.isActive!=d.activating&&b(c.target).pause())},H=function(c){b(c).unbind(J).bind(J,L);t.forEach(function(b){a.moveToFirstEvent(c,b)})};H(j)}c.setActive=function(c,d, +e){e||(e=a.data(c,"mediaelement"));if(e&&e.isActive!=d){"html5"!=d&&"third"!=d&&a.warn("wrong type for mediaelement activating: "+d);var f=a.data(c,"shadowData");e.activating=d;b(c).pause();e.isActive=d;"third"==d?(f.shadowElement=f.shadowFocusElement=e.shadowElem[0],b(c).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(b(c).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),f.shadowElement=f.shadowFocusElement=!1);b(c).trigger("mediaelementapichange")}}; +var O=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(c){if(c){var d=b,e=c.networkState;for(p(0,c);--d;)delete c[a[d]];c.actionQueue=[];c.buffered.length=0;e&&g(c._elem,"emptied")}}}(),I=function(a,c){var d=a._elem,e=a.shadowElem;b(d)[c?"addClass":"removeClass"]("webshims-controls");"audio"==a._elemNodeName&&!c?e.css({width:0,height:0}):e.css({width:d.style.width|| +b(d).width(),height:d.style.height||b(d).height()})};c.createSWF=function(d,e,f){if(r){1>q?q=1:q++;var g=b.extend({},n.jwVars,{image:b.prop(d,"poster")||"",file:e.srcProp}),j=b(d).data("jwvars")||{};f||(f=a.data(d,"mediaelement"));if(f&&f.swfCreated)c.setActive(d,"third",f),O(f),f.currentSrc=e.srcProp,b.extend(g,j),n.changeJW(g,d,e,f,"load"),x(d,"sendEvent",["LOAD",g]);else{var v=b.prop(d,"controls"),s="jwplayer-"+a.getID(d),k=b.extend({},n.jwParams,b(d).data("jwparams")),m=d.nodeName.toLowerCase(), +p=b.extend({},n.jwAttrs,{name:s,id:s},b(d).data("jwattrs")),o=b('
').css({position:"relative",overflow:"hidden"}),f=a.data(d,"mediaelement",a.objectCreate(D,{actionQueue:{value:[]},shadowElem:{value:o},_elemNodeName:{value:m},_elem:{value:d},currentSrc:{value:e.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(b){if(b>=f.buffered.length)a.error("buffered index size error");else return 0},end:function(b){if(b>= +f.buffered.length)a.error("buffered index size error");else return(f.duration-f._bufferedStart)*f._bufferedEnd/100+f._bufferedStart},length:0}}}));I(f,v);o.insertBefore(d);i&&b.extend(f,{volume:b.prop(d,"volume"),muted:b.prop(d,"muted")});b.extend(g,{id:s,controlbar:v?n.jwVars.controlbar||("video"==m?"over":"bottom"):"video"==m?"none":"bottom",icons:""+(v&&"video"==m)},j,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});g.plugins=g.plugins?g.plugins+(","+h):h;a.addShadowDom(d,o);H(d);c.setActive(d, +"third",f);n.changeJW(g,d,e,f,"embed");b(d).bind("updatemediaelementdimensions updateshadowdom",function(){I(f,b.prop(d,"controls"))});A(f);u.embedSWF(w,s,"100%","100%","9.0.0",!1,g,k,p,function(c){if(c.success)f.jwapi=c.ref,v||b(c.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!c.ref.parentNode&&o[0].parentNode||"none"==c.ref.style.display)o.addClass("flashblocker-assumed"),b(d).trigger("flashblocker"),a.warn("flashblocker assumed");b(c.ref).css({minHeight:"2px",minWidth:"2px", +display:"block"})},9),E||(clearTimeout(E),E=setTimeout(function(){var d=b(c.ref);1d[0].offsetWidth||2>d[0].offsetHeight)&&a.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){b(d).mediaLoad()}, +1)};var x=function(a,b,c,d){return(d=d||f(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10b||100a.browserVersion,P={object:1,OBJECT:1};b.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&q)for(b=0;b")[0].readyState;if(!i.track)try{new TextTrackCue(2,3,"")}catch(d){try{new TextTrackCue("",2,3,"","",!1);var h=TextTrackCue;window.TextTrackCue=function(a,c,f,d,o,q){3!=arguments.length&&m.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4")[0].readyState;if(!g.track)try{new TextTrackCue(2,3,"")}catch(c){try{new TextTrackCue("",2,3,"","",!1);var i=TextTrackCue; +window.TextTrackCue=function(a,b,c,o,q,y){3!=arguments.length&&f.warn("TextTrackCue has 3 arguments: startTime, endTime and text. everything else is deprecated");return 4b[0].selectedIndex))b=b[0],c="select-one"==b.type&&2>b.size?!!a("> option:first-child",b).prop("selected"):!1;b=c}else b=s[f.type]?"checkbox"==f.type?!b.is(":checked"):!d.modules["form-core"].getGroupElements(b).filter(":checked")[0]:!c;return b},tooLong:function(){return!1},typeMismatch:function(a,c,f){if(""===c||"select"==f.nodeName)return!1;var d=!1;if(!("type"in f))f.type=(a[0].getAttribute("type")||a[0].type||"").toLowerCase(); -if(i[f.type]&&i[f.type].mismatch)d=i[f.type].mismatch(c,a);else if("validity"in a[0])d=a[0].validity.typeMismatch;return d},patternMismatch:function(a,c,f){if(""===c||"select"==f.nodeName)return!1;a=a.attr("pattern");if(!a)return!1;try{a=RegExp("^(?:"+a+")$")}catch(g){d.error('invalid pattern value: "'+a+'" | '+g),a=!1}return!a?!1:!a.test(c)}};d.addValidityRule=function(a,c){v[a]=c};a.event.special.invalid={add:function(){a.event.special.invalid.setup.call(this.form||this)},setup:function(){var b= -this.form||this;if(!a.data(b,"invalidEventShim")&&(a(b).data("invalidEventShim",!0).bind("submit",a.event.special.invalid.handler),d.moveToFirstEvent(b,"submit"),d.bugs.bustedValidity&&a.nodeName(b,"form"))){var c=b.getAttribute("novalidate");b.setAttribute("novalidate","novalidate");d.data(b,"bustedNoValidate",null==c?null:c)}},teardown:a.noop,handler:function(b){if(!("submit"!=b.type||b.testedValidity||!b.originalEvent||!a.nodeName(b.target,"form")||a.prop(b.target,"noValidate"))){r=!0;b.testedValidity= -!0;if(!a(b.target).checkValidity())return b.stopImmediatePropagation(),r=!1;r=!1}}};var A=function(b){if(!a.support.submitBubbles&&b&&"object"==typeof b&&!b._submit_attached)a.event.add(b,"submit._submit",function(a){a._submit_bubble=!0}),b._submit_attached=!0};if(!a.support.submitBubbles&&a.event.special.submit)a.event.special.submit.setup=function(){if(a.nodeName(this,"form"))return!1;a.event.add(this,"click._submit keypress._submit",function(b){b=b.target;b=a.nodeName(b,"input")||a.nodeName(b, -"button")?a.prop(b,"form"):void 0;A(b)})};a.event.special.submit=a.event.special.submit||{setup:function(){return!1}};var h=a.event.special.submit.setup;a.extend(a.event.special.submit,{setup:function(){a.nodeName(this,"form")?a(this).bind("invalid",a.noop):a("form",this).bind("invalid",a.noop);return h.apply(this,arguments)}});a(m).bind("invalid",a.noop);d.addInputType("email",{mismatch:function(){var a=w.emailReg||/^[a-zA-Z0-9.!#$%&'*+-\/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;return function(c){return!a.test(c)}}()}); -d.addInputType("url",{mismatch:function(){var a=w.urlReg||/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i; -return function(c){return!a.test(c)}}()});d.defineNodeNameProperty("input","type",{prop:{get:function(){var a=(this.getAttribute("type")||"").toLowerCase();return d.inputTypes[a]?a:this.type}}});d.defineNodeNamesProperties(["button","fieldset","output"],{checkValidity:{value:function(){return!0}},willValidate:{value:!1},setCustomValidity:{value:a.noop},validity:{writeable:!1,get:function(){return a.extend({},u)}}},"prop");var x=function(b){var c,f=a.prop(b,"validity");if(f)a.data(b,"cachedValidity", -f);else return!0;if(!f.valid){c=a.Event("invalid");var g=a(b).trigger(c);if(r&&!x.unhandledInvalids&&!c.isDefaultPrevented())d.validityAlert.showFor(g),x.unhandledInvalids=!0}a.removeData(b,"cachedValidity");return f.valid},C=/^(?:select|textarea|input)/i;d.defineNodeNameProperty("form","checkValidity",{prop:{value:function(){var b=!0,c=a(a.prop(this,"elements")).filter(function(){if(!C.test(this.nodeName))return!1;var a=d.data(this,"shadowData");return!a||!a.nativeElement||a.nativeElement===this}); -x.unhandledInvalids=!1;for(var f=0,g=c.length;fc&&b>d&&(b=Math.max(c,d),f.prop("value",a.substr(0,b)));c=b},q=function(){clearTimeout(b);f.unbind(".maxlengthconstraint")}; -return function(g,y){q();if(-1a)throw"INDEX_SIZE_ERR";a=parseInt(a,10);this.setAttribute("maxlength",a);t.update(this,a)}else this.setAttribute("maxlength","0"),t.update(this,0)},get:function(){var a=this.getAttribute("maxlength");return("number"== -typeof a||a&&a==1*a)&&0<=a?parseInt(a,10):-1}}});d.defineNodeNameProperty("textarea","maxLength",{prop:{set:function(b){a.prop(this,"maxlength",b)},get:function(){return a.prop(this,"maxlength")}}})}var l={submit:1,button:1,image:1},n={};[{name:"enctype",limitedTo:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},defaultProp:"application/x-www-form-urlencoded",proptype:"enum"},{name:"method",limitedTo:{get:1,post:1},defaultProp:"get",proptype:"enum"},{name:"action",proptype:"url"}, -{name:"target"},{name:"novalidate",propName:"noValidate",proptype:"boolean"}].forEach(function(b){var c="form"+(b.propName||b.name).replace(/^[a-z]/,function(a){return a.toUpperCase()}),f="form"+b.name,d=b.name,o="click.webshimssubmittermutate"+d,q=function(){if("form"in this&&l[this.type]){var q=a.prop(this,"form");if(q){var p=a.attr(this,f);if(null!=p&&(!b.limitedTo||p.toLowerCase()===a.prop(this,c))){var j=a.attr(q,d);a.attr(q,d,p);setTimeout(function(){if(null!=j)a.attr(q,d,j);else try{a(q).removeAttr(d)}catch(b){q.removeAttribute(d)}}, -9)}}}};switch(b.proptype){case "url":var h=g.createElement("form");n[c]={prop:{set:function(b){a.attr(this,f,b)},get:function(){var b=a.attr(this,f);if(null==b)return"";h.setAttribute("action",b);return h.action}}};break;case "boolean":n[c]={prop:{set:function(b){b?a.attr(this,"formnovalidate","formnovalidate"):a(this).removeAttr("formnovalidate")},get:function(){return null!=a.attr(this,"formnovalidate")}}};break;case "enum":n[c]={prop:{set:function(b){a.attr(this,f,b)},get:function(){var c=a.attr(this, -f);return!c||(c=c.toLowerCase())&&!b.limitedTo[c]?b.defaultProp:c}}};break;default:n[c]={prop:{set:function(b){a.attr(this,f,b)},get:function(){var b=a.attr(this,f);return null!=b?b:""}}}}n[f]||(n[f]={});n[f].attr={set:function(b){n[f].attr._supset.call(this,b);a(this).unbind(o).bind(o,q)},get:function(){return n[f].attr._supget.call(this)}};n[f].initAttr=!0;n[f].removeAttr={value:function(){a(this).unbind(o);n[f].removeAttr._supvalue.call(this)}}});d.defineNodeNamesProperties(["input","button"], -n);!a.support.getSetAttribute&&null==a("
").attr("novalidate")?d.defineNodeNameProperty("form","novalidate",{attr:{set:function(a){this.setAttribute("novalidate",""+a)},get:function(){var a=this.getAttribute("novalidate");return null==a?void 0:a}}}):d.bugs.bustedValidity&&(d.defineNodeNameProperty("form","novalidate",{attr:{set:function(a){d.data(this,"bustedNoValidate",""+a)},get:function(){var a=d.data(this,"bustedNoValidate");return null==a?void 0:a}},removeAttr:{value:function(){d.data(this, -"bustedNoValidate",null)}}}),a.each(["rangeUnderflow","rangeOverflow","stepMismatch"],function(a,c){v[c]=function(a){return(a[0].validity||{})[c]||!1}}));d.defineNodeNameProperty("form","noValidate",{prop:{set:function(b){b?a.attr(this,"novalidate","novalidate"):a(this).removeAttr("novalidate")},get:function(){return null!=a.attr(this,"novalidate")}}});a.browser.webkit&&Modernizr.inputtypes.date&&function(){var b={updateInput:1,input:1},c={date:1,time:1,"datetime-local":1},f={focusout:1,blur:1},h= -{updateInput:1,change:1},o=function(a){var c,d=!0,p=a.prop("value"),j=p,k=function(c){if(a){var f=a.prop("value");f!==p&&(p=f,(!c||!b[c.type])&&a.trigger("input"));c&&h[c.type]&&(j=f);!d&&f!==j&&a.trigger("change")}},g,o=function(b){clearInterval(c);setTimeout(function(){b&&f[b.type]&&(d=!1);a&&(a.unbind("focusout blur",o).unbind("input change updateInput",k),k());a=null},1)};clearInterval(c);c=setInterval(k,160);clearTimeout(g);g=setTimeout(k,9);a.unbind("focusout blur",o).unbind("input change updateInput", -k);a.bind("focusout blur",o).bind("input updateInput change",k)};if(a.event.customEvent)a.event.customEvent.updateInput=!0;(function(){var b=function(b){var c=1,f,d;if("date"==b.type&&(r||!a(b).is(":focus")))if((d=b.value)&&10>d.length&&(d=d.split("-"))&&3==d.length){for(;3>c;c++)if(1==d[c].length)d[c]="0"+d[c];else if(2!=d[c].length){f=!0;break}if(!f)return d=d.join("-"),a.prop(b,"value",d),d}},c,f,p,j;c=d.defineNodeNameProperty("input","checkValidity",{prop:{value:function(){b(this);return c.prop._supvalue.apply(this, -arguments)}}});f=d.defineNodeNameProperty("form","checkValidity",{prop:{value:function(){a("input",this).each(function(){b(this)});return f.prop._supvalue.apply(this,arguments)}}});p=d.defineNodeNameProperty("input","value",{prop:{set:function(){return p.prop._supset.apply(this,arguments)},get:function(){return b(this)||p.prop._supget.apply(this,arguments)}}});j=d.defineNodeNameProperty("input","validity",{prop:{writeable:!1,get:function(){b(this);return j.prop._supget.apply(this,arguments)}}});a(g).bind("change", -function(a){isChangeSubmit=!0;b(a.target);isChangeSubmit=!1})})();a(g).bind("focusin",function(b){b.target&&c[b.target.type]&&!b.target.readOnly&&!b.target.disabled&&o(a(b.target))})}();d.addReady(function(b,c){var d;a("form",b).add(c.filter("form")).bind("invalid",a.noop);try{if(b==g&&!("form"in(g.activeElement||{})))(d=a("input[autofocus], select[autofocus], textarea[autofocus]",b).eq(0).getShadowFocusElement()[0])&&d.offsetHeight&&d.offsetWidth&&d.focus()}catch(h){}});(!Modernizr.formattribute|| -!Modernizr.fieldsetdisabled)&&function(){(function(b,c){a.prop=function(d,f,p){var j;if(d&&1==d.nodeType&&p===c&&a.nodeName(d,"form")&&d.id){j=g.getElementsByName(f);if(!j||!j.length)j=g.getElementById(f);if(j&&(j=a(j).filter(function(){return a.prop(this,"form")==d}).get(),j.length))return 1==j.length?j[0]:j}return b.apply(this,arguments)}})(a.prop,void 0);var b=function(b){var c=a.data(b,"webshimsAddedElements");c&&(c.remove(),a.removeData(b,"webshimsAddedElements"))},c=/\r?\n/g,f=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, -h=/^(?:select|textarea)/i;Modernizr.formattribute||(d.defineNodeNamesProperty(["input","textarea","select","button","fieldset"],"form",{prop:{get:function(){var b=d.contentAttr(this,"form");b&&(b=g.getElementById(b))&&!a.nodeName(b,"form")&&(b=null);return b||this.form},writeable:!1}}),d.defineNodeNamesProperty(["form"],"elements",{prop:{get:function(){var b=this.id,c=a.makeArray(this.elements);b&&(c=a(c).add('input[form="'+b+'"], select[form="'+b+'"], textarea[form="'+b+'"], button[form="'+b+'"], fieldset[form="'+ -b+'"]').not(".webshims-visual-hide > *").get());return c},writeable:!1}}),a(function(){var c=function(a){a.stopPropagation()};a(g).bind("submit",function(c){if(!c.isDefaultPrevented()){var d=c.target;if(c=d.id)b(d),c=a('input[form="'+c+'"], select[form="'+c+'"], textarea[form="'+c+'"]').filter(function(){return!this.disabled&&this.name&&this.form!=d}).clone(),c.length&&(a.data(d,"webshimsAddedElements",a('
').append(c).appendTo(d)),setTimeout(function(){b(d)},9)), -c=null}});a(g).bind("click",function(b){if(!b.isDefaultPrevented()&&a(b.target).is('input[type="submit"][form], button[form], input[type="button"][form], input[type="image"][form], input[type="reset"][form]')){var d=a.prop(b.target,"form"),f=b.target.form,p;d&&d!=f&&(p=a(b.target).clone().removeAttr("form").addClass("webshims-visual-hide").bind("click",c).appendTo(d),f&&b.preventDefault(),A(d),p.trigger("click"),setTimeout(function(){p.remove();p=null},9))}})}));Modernizr.fieldsetdisabled||d.defineNodeNamesProperty(["fieldset"], -"elements",{prop:{get:function(){return a("input, select, textarea, button, fieldset",this).get()||[]},writeable:!1}});a.fn.serializeArray=function(){return this.map(function(){var b=a.prop(this,"elements");return b?a.makeArray(b):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||h.test(this.nodeName)||f.test(this.type))}).map(function(b,d){var f=a(this).val();return null==f?null:a.isArray(f)?a.map(f,function(a){return{name:d.name,value:a.replace(c,"\r\n")}}):{name:d.name, -value:f.replace(c,"\r\n")}}).get()}}();(function(){Modernizr.textareaPlaceholder=!!("placeholder"in a("