diff --git a/js/jquery.anythingslider.video.js b/js/jquery.anythingslider.video.js
index e7c99a5..5c4e3a0 100644
--- a/js/jquery.anythingslider.video.js
+++ b/js/jquery.anythingslider.video.js
@@ -22,7 +22,7 @@
video.options = $.extend({}, defaults, options);
// check if SWFObject is loaded
- video.hasSwfo = (typeof(swfobject) !== 'undefined' && swfobject.hasOwnProperty('embedSWF') && typeof(swfobject.embedSWF) === 'function') ? true : false;
+ video.hasSwfo = (typeof(swfobject) !== 'undefined' && swfobject.hasOwnProperty('embedSWF') && typeof(swfobject.embedSWF) === 'function' && swfobject.hasFlashPlayerVersion('1'));
video.list = {};
video.hasVid = false;
diff --git a/js/jquery.anythingslider.video.min.js b/js/jquery.anythingslider.video.min.js
index 5cc5874..540e542 100644
--- a/js/jquery.anythingslider.video.min.js
+++ b/js/jquery.anythingslider.video.min.js
@@ -5,4 +5,4 @@
* Dual licensed under the MIT and GPL licenses.
*/
-(function(d){d.fn.anythingSliderVideo=function(b){var c={videoID:"asvideo"};return this.each(function(){var a,e,h,g,f=d(this).data("AnythingSlider");if(f){a=f.video={};a.options=d.extend({},c,b);a.hasSwfo=typeof swfobject!=="undefined"&&swfobject.hasOwnProperty("embedSWF")&&typeof swfobject.embedSWF==="function"?true:false;a.list={};a.hasVid=false;a.hasEmbed=false;a.services=d.fn.anythingSliderVideo.services;a.len=0;a.hasEmbedCount=0;a.hasiframeCount=0;a.$items=f.$items.filter(":not(.cloned)");for(h in a.services)if(typeof h=== "string")g=a.services[h].selector,a.$items.find(g).each(function(){e=d(this);e.attr("id",a.options.videoID+a.len);a.list[a.len]={id:a.options.videoID+a.len++,panel:e.closest(".panel")[0],service:h,selector:g,status:-1};a.hasVid=true;g.match("embed|object")?(a.hasEmbed=true,a.hasEmbedCount++):g.match("iframe")&&a.hasiframeCount++});d.each(a.list,function(b,c){var l,e,i,g,h=d(c.panel).find(c.selector),j=a.services[c.service],k=j.initAPI||"";a.hasEmbed&&a.hasSwfo&&c.selector.match("embed|object")?h.each(function(){e= d(this).parent()[0].tagName==="OBJECT"?d(this).parent():d(this);i=e[0].tagName==="EMBED"?e.attr("src"):e.find("embed").attr("src")||e.children().filter("[name=movie]").attr("value");g=d.extend(true,{},{flashvars:null,params:{allowScriptAccess:"always",wmode:f.options.addWmodeToObject,allowfullscreen:true},attr:{"class":e.attr("class"),style:e.attr("style"),"data-url":i}},j.embedOpts);e.wrap('
');swfobject.embedSWF(i+(k===""?"":k+c.id),c.id,e.attr("width"),e.attr("height"), "10",null,g.flashvars,g.params,g.attr,function(){if(j.hasOwnProperty("init"))a.list[b].player=j.init(f,c.id,b);b>=a.hasEmbedCount&&f.$el.trigger("swf_completed",f)})}):c.selector.match("iframe")&&h.each(function(){i=d(this).attr("src");l=(i.match(/\?/g)?"":"?")+"&wmode="+f.options.addWmodeToObject;d(this).attr("src",function(a,b){return b+l+(k===""?"":k+c.id)})})});a.gup=function(a,b){var a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),c=RegExp("[\\?&]"+a+"=([^]*)").exec(b||window.location.href); return c===null?"":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){a.services[a.list[b].service].hasOwnProperty("message")&&a.services[a.list[b].service].message(f,c)})}};a.control=function(b){var c,d=a.list,e=b==="pause"?f.$lastPage[0]:f.$currentPage[0],g=false;for(c=0;c 0&&!a[0].ended&&a[0].play()},pause:function(){d("video").each(function(){typeof this.pause!=="undefined"&&this.pause()})},isPlaying:function(b,c){var a=d("#"+c);return a.length&&typeof a[0].pause!=="undefined"&&!a[0].paused&&!a[0].ended?true:false}},vimeo1:{selector:"iframe[src*=vimeo]",initAPI:"&api=1&player_id=",cont:function(b,c,a){b.options.resumeOnVisible&&b.video.list[a].status==="pause"&&b.video.postMsg('{"method":"play"}',c)},pause:function(b){d("iframe[src*=vimeo]").each(function(){b.video.postMsg('{"method":"pause"}', this.id)})},message:function(b,c){var a,d=c.player_id||"";if(d!==""&&(a=d.replace(b.video.options.videoID,""),c.event==="ready"&&(b.video.postMsg('{"method":"addEventListener","value":"play"}',d),b.video.postMsg('{"method":"addEventListener","value":"pause"}',d),b.video.postMsg('{"method":"addEventListener","value":"finish"}',d)),b.video.list[a]))b.video.list[a].status=c.event},isPlaying:function(b,c,a){return b.video.list[a].status==="play"?true:false}},vimeo2:{selector:"object[data-url*=vimeo], embed[src*=vimeo]", embedOpts:{flashvars:{api:1}},cont:function(b,c){if(b.options.resumeOnVisible){var a=d("#"+c);typeof a[0].api_play==="function"&&a[0].api_paused()&&a[0].api_getCurrentTime()!==0&&a[0].api_getDuration()-a[0].api_getCurrentTime()>2&&a[0].api_play()}},pause:function(){d("object[data-url*=vimeo], embed[src*=vimeo]").each(function(){var b=this.tagName==="EMBED"?d(this).parent()[0]:this;typeof b.api_pause==="function"&&b.api_pause()})},isPlaying:function(b,c){var a=d("#"+c);return typeof a[0].api_paused=== "function"&&!a[0].api_paused()?true:false}},youtube1:{selector:"iframe[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&playerapiid=",cont:function(b,c,a){b.options.resumeOnVisible&&b.video.list[a].status===2&&b.video.postMsg('{"event":"command","func":"playVideo"}',c)},pause:function(b,c){d("iframe[src*=youtube]").each(function(){b.video.postMsg('{"event":"command","func":"pauseVideo"}',c)})},message:function(b,c){if(c.event!=="infoDelivery"&&c.info&&c.info.videoUrl){var a=b.video.gup("v", c.info.videoUrl),a=d("iframe[src*="+a+"]"),e;if(a.length&&(a=a[0].id,e=a.replace(b.video.options.videoID,""),c.event==="onReady"&&b.video.postMsg('{"event":"listening","func":"onStateChange"}',a),c.event==="onStateChange"&&b.video.list[e]))b.video.list[e].status=c.info.playerState}},isPlaying:function(b,c,a){b=b.video.list[a].status;return b===1||b>2?true:false}},youtube2:{selector:"object[data-url*=youtube], embed[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&version=3&playerapiid=",cont:function(b, c){if(b.options.resumeOnVisible){var a=d("#"+c);a.length&&typeof a[0].getPlayerState==="function"&&a[0].getPlayerState()>0&&a[0].playVideo()}},pause:function(){d("object[data-url*=youtube], embed[src*=youtube]").each(function(){var b=this.tagName==="EMBED"?d(this).parent()[0]:this;typeof b.getPlayerState==="function"&&b.getPlayerState()>0&&b.pauseVideo()})},isPlaying:function(b,c){var a=d("#"+c);return typeof a[0].getPlayerState==="function"&&(a[0].getPlayerState()===1||a[0].getPlayerState()>2)?true: false}}}})(jQuery);jQuery(window).load(function(){jQuery(".anythingBase").anythingSliderVideo()});
+(function(a){a.fn.anythingSliderVideo=function(b){var c={videoID:"asvideo"};return this.each(function(){var f,e,d,h,g=a(this).data("AnythingSlider");if(!g){return}f=g.video={};f.options=a.extend({},c,b);f.hasSwfo=(typeof(swfobject)!=="undefined"&&swfobject.hasOwnProperty("embedSWF")&&typeof(swfobject.embedSWF)==="function"&&swfobject.hasFlashPlayerVersion("1"));f.list={};f.hasVid=false;f.hasEmbed=false;f.services=a.fn.anythingSliderVideo.services;f.len=0;f.hasEmbedCount=0;f.hasiframeCount=0;f.$items=g.$items.filter(":not(.cloned)");for(d in f.services){if(typeof(d)==="string"){h=f.services[d].selector;f.$items.find(h).each(function(){e=a(this);e.attr("id",f.options.videoID+f.len);f.list[f.len]={id:f.options.videoID+f.len++,panel:e.closest(".panel")[0],service:d,selector:h,status:-1};f.hasVid=true;if(h.match("embed|object")){f.hasEmbed=true;f.hasEmbedCount++}else{if(h.match("iframe")){f.hasiframeCount++}}})}}a.each(f.list,function(m,q){var n,k,r,j,l=a(q.panel).find(q.selector),p=f.services[q.service],o=p.initAPI||"";if(f.hasEmbed&&f.hasSwfo&&q.selector.match("embed|object")){l.each(function(){k=(a(this).parent()[0].tagName==="OBJECT")?a(this).parent():a(this);r=(k[0].tagName==="EMBED")?k.attr("src"):k.find("embed").attr("src")||k.children().filter("[name=movie]").attr("value");j=a.extend(true,{},{flashvars:null,params:{allowScriptAccess:"always",wmode:g.options.addWmodeToObject,allowfullscreen:true},attr:{"class":k.attr("class"),style:k.attr("style"),"data-url":r}},p.embedOpts);k.wrap('');swfobject.embedSWF(r+(o===""?"":o+q.id),q.id,k.attr("width"),k.attr("height"),"10",null,j.flashvars,j.params,j.attr,function(){if(p.hasOwnProperty("init")){f.list[m].player=p.init(g,q.id,m)}if(m>=f.hasEmbedCount){g.$el.trigger("swf_completed",g)}})})}else{if(q.selector.match("iframe")){l.each(function(t,s){r=a(this).attr("src");n=(r.match(/\?/g)?"":"?")+"&wmode="+g.options.addWmodeToObject;a(this).attr("src",function(u,v){return v+n+(o===""?"":o+q.id)})})}}});f.gup=function(k,i){k=k.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var j=(new RegExp("[\\?&]"+k+"=([^]*)")).exec(i||window.location.href);return(j===null)?"":j[1]};f.postMsg=function(k,i){var j=a("#"+i);if(j.length){j[0].contentWindow.postMessage(k,j.attr("src").split("?")[0])}};f.message=function(j){if(j.data){if(/infoDelivery/g.test(j.data)){return}var i=a.parseJSON(j.data);a.each(f.list,function(k,l){if(f.services[f.list[k].service].hasOwnProperty("message")){f.services[f.list[k].service].message(g,i)}})}};f.control=function(k){var l,m=f.list,j=(k==="pause")?g.$lastPage[0]:g.$currentPage[0],n=false;for(l=0;l0&&!c[0].ended){c[0].play()}},pause:function(c,b){a("video").each(function(){if(typeof(this.pause)!=="undefined"){this.pause()}})},isPlaying:function(e,b,d){var c=a("#"+b);return(c.length&&typeof(c[0].pause)!=="undefined"&&!c[0].paused&&!c[0].ended)?true:false}},vimeo1:{selector:"iframe[src*=vimeo]",initAPI:"&api=1&player_id=",cont:function(d,b,c){if(d.options.resumeOnVisible&&d.video.list[c].status==="pause"){d.video.postMsg('{"method":"play"}',b)}},pause:function(c,b){a("iframe[src*=vimeo]").each(function(){c.video.postMsg('{"method":"pause"}',this.id)})},message:function(e,d){var c,b=d.player_id||"";if(b!==""){c=b.replace(e.video.options.videoID,"");if(d.event==="ready"){e.video.postMsg('{"method":"addEventListener","value":"play"}',b);e.video.postMsg('{"method":"addEventListener","value":"pause"}',b);e.video.postMsg('{"method":"addEventListener","value":"finish"}',b)}if(e.video.list[c]){e.video.list[c].status=d.event}}},isPlaying:function(d,b,c){return(d.video.list[c].status==="play")?true:false}},vimeo2:{selector:"object[data-url*=vimeo], embed[src*=vimeo]",embedOpts:{flashvars:{api:1}},cont:function(e,b,d){if(e.options.resumeOnVisible){var c=a("#"+b);if(typeof(c[0].api_play)==="function"&&c[0].api_paused()&&c[0].api_getCurrentTime()!==0&&(c[0].api_getDuration()-c[0].api_getCurrentTime())>2){c[0].api_play()}}},pause:function(c,b){a("object[data-url*=vimeo], embed[src*=vimeo]").each(function(){var d=(this.tagName==="EMBED")?a(this).parent()[0]:this;if(typeof(d.api_pause)==="function"){d.api_pause()}})},isPlaying:function(e,b,d){var c=a("#"+b);return(typeof(c[0].api_paused)==="function"&&!c[0].api_paused())?true:false}},youtube1:{selector:"iframe[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&playerapiid=",cont:function(d,b,c){if(d.options.resumeOnVisible&&d.video.list[c].status===2){d.video.postMsg('{"event":"command","func":"playVideo"}',b)}},pause:function(d,b,c){a("iframe[src*=youtube]").each(function(){d.video.postMsg('{"event":"command","func":"pauseVideo"}',b)})},message:function(g,f){if(f.event==="infoDelivery"){return}if(f.info&&f.info.videoUrl){var e=g.video.gup("v",f.info.videoUrl),c=a("iframe[src*="+e+"]"),b,d;if(c.length){b=c[0].id;d=b.replace(g.video.options.videoID,"");if(f.event==="onReady"){g.video.postMsg('{"event":"listening","func":"onStateChange"}',b)}if(f.event==="onStateChange"&&g.video.list[d]){g.video.list[d].status=f.info.playerState}}}},isPlaying:function(e,b,d){var c=e.video.list[d].status;return(c===1||c>2)?true:false}},youtube2:{selector:"object[data-url*=youtube], embed[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&version=3&playerapiid=",cont:function(e,b,d){if(e.options.resumeOnVisible){var c=a("#"+b);if(c.length&&typeof(c[0].getPlayerState)==="function"&&c[0].getPlayerState()>0){c[0].playVideo()}}},pause:function(c,b){a("object[data-url*=youtube], embed[src*=youtube]").each(function(){var d=(this.tagName==="EMBED")?a(this).parent()[0]:this;if(typeof(d.getPlayerState)==="function"&&d.getPlayerState()>0){d.pauseVideo()}})},isPlaying:function(d,b){var c=a("#"+b);return(typeof(c[0].getPlayerState)==="function"&&(c[0].getPlayerState()===1||c[0].getPlayerState()>2))?true:false}}}})(jQuery);jQuery(window).load(function(){jQuery(".anythingBase").anythingSliderVideo()});