/* * AnythingSlider Video Controller 1.5.3 beta minified * for AnythingSlider v1.6+ * By Rob Garrison (aka Mottie & Fudgey) * Dual licensed under the MIT and GPL licenses. */ ;(function(d){d.fn.anythingSliderVideo=function(b){var c={videoId:"asvideo",wmode:"opaque",youtubeAutoLoad:!0,youtubeParams:{modestbranding:1,iv_load_policy:3,fs:1}};return this.each(function(){var a,e,h,g,k,f=d(this).data("AnythingSlider");if(f){"undefined"==typeof f.video?(a=f.video={},a.options=d.extend({},c,b),a.hasSwfo="undefined"!==typeof swfobject&&swfobject.hasOwnProperty("embedSWF")&&"function"===typeof swfobject.embedSWF&&swfobject.hasFlashPlayerVersion("1"),a.list={},a.hasVid=!1,a.hasEmbed= !1,a.services=d.fn.anythingSliderVideo.services,a.hasEmbedCount=0,a.hasiframeCount=0):a=f.video;a.$items=f.$items.filter(":not(.cloned)");for(h in a.services)"string"===typeof h&&(g=a.services[h].selector,a.$items.find(g).each(function(){e=d(this);k=e.closest(".panel");1!=k.data("AnythingSliderVideoInitialized")&&(e.attr("id",a.options.videoId+d.fn.anythingSliderVideo.videoIndex),a.list[d.fn.anythingSliderVideo.videoIndex]={id:a.options.videoId+d.fn.anythingSliderVideo.videoIndex++,panel:k[0],service:h, selector:g,status:-1,isInitialized:!1},k.data("AnythingSliderVideoInitialized",!0),a.hasVid=!0,g.match("embed|object")?(a.hasEmbed=!0,a.hasEmbedCount++):g.match("iframe")&&a.hasiframeCount++)}));d.each(a.list,function(c,b){var m,e,g,h,k=d(b.panel).find(b.selector),l=a.services[b.service],p=l.api&&l.api.initParam||"",n=l.api&&l.api.playerId||"";a.hasEmbed&&a.hasSwfo&&b.selector.match("embed|object")&&!b.isInitialized?k.each(function(){m=d(this);e="OBJECT"===d(this).parent()[0].tagName?d(this).parent(): d(this);g="EMBED"===e[0].tagName?e.attr("src"):e.find("embed").attr("src")||e.children().filter("[name=movie]").attr("value");h=d.extend(!0,{},{flashvars:null,params:{allowScriptAccess:"always",wmode:a.options.wmode||f.options.addWmodeToObject,allowfullscreen:!0},attr:{"class":e.attr("class"),style:e.attr("style"),"data-url":g}},l.embedOpts);e.wrap('
');swfobject.embedSWF(g+p+(n?n+b.id:""),b.id,e.attr("width"),e.attr("height"),"10",null,h.flashvars,h.params,h.attr,function(){l.hasOwnProperty("init")&& l.init(f,m,c);c>=a.hasEmbedCount&&f.$el.trigger("swf_completed",f)})}):b.selector.match("iframe")&&!b.isInitialized&&k.each(function(){var a=d(this);l.hasOwnProperty("init")&&l.init(f,a,c)});b.isInitialized=!0});a.gup=function(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=(new RegExp("[\\?&]"+a+"=([^]*)")).exec(b||window.location.href);return null===c?"":c[1]};a.postMsg=function(a,b){var c=d("#"+b);c.length&&c[0].contentWindow.postMessage(a,c.attr("src").split("?")[0])};a.message=function(b){if(b.data&& !/infoDelivery/g.test(b.data)){var c=d.parseJSON(b.data);d.each(a.list,function(b,d){a.services[a.list[b].service].hasOwnProperty("message")&&a.services[a.list[b].service].message(f,c)})}};a.control=function(b){var c,e=a.list,g="pause"===b?f.$lastPage[0]:f.$currentPage[0],h=!1;for(c=0;c