(function(g){var d={};d.ytplayers={};d.inits=[];d.iframeScriptInited=false;d.inited=false;g.tubeplayer={};g.tubeplayer.defaults={afterReady:function(){},stateChange:function(a){var b=this.onPlayer;return function(c){if(typeof c=="object")c=c.data;switch(c){case -1:return b.unstarted[a]();case 0:return b.ended[a]();case 1:return b.playing[a]();case 2:return b.paused[a]();case 3:return b.buffering[a]();case 5:return b.cued[a]();default:return null}}},onError:function(a){var b=this.onErr;return function(c){if(typeof c== "object")c=c.data;switch(c){case 2:return b.invalidParameter[a]();case 100:return b.notFound[a]();case 101:case 150:return b.notEmbeddable[a]();default:return null}}},qualityChange:function(a){var b=this;return function(c){if(typeof c=="object")c=c.data;return b.onQualityChange[a](c)}},onQualityChange:{},onPlayer:{unstarted:{},ended:{},playing:{},paused:{},buffering:{},cued:{}},onErr:{notFound:{},notEmbeddable:{},invalidParameter:{}}};var j={width:425,height:355,allowFullScreen:"true",initialVideo:"DkoeNLuMbcI", start:0,preferredQuality:"default",showControls:true,showRelated:false,autoPlay:false,autoHide:true,theme:"dark",color:"red",showinfo:false,modestbranding:true,wmode:"transparent",swfobjectURL:"http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",loadSWFObject:true,allowScriptAccess:"always",playerID:"tubeplayer-player-container",iframed:true,onPlay:function(){},onPause:function(){},onStop:function(){},onSeek:function(){},onMute:function(){},onUnMute:function(){},onPlayerUnstarted:function(){}, onPlayerEnded:function(){},onPlayerPlaying:function(){},onPlayerPaused:function(){},onPlayerBuffering:function(){},onPlayerCued:function(){},onQualityChange:function(){},onErrorNotFound:function(){},onErrorNotEmbeddable:function(){},onErrorInvalidParameter:function(){}};g.fn.tubeplayer=function(a,b){var c=g(this),f=typeof a;if(arguments.length==0||f=="object")return c.each(function(){d.init(g(this),a)});else if(f=="string")return c.triggerHandler(a+".tubeplayer",b||null)};var h=function(a){return function(b, c){var f=d.getPkg(b);if(f.ytplayer){b=a(b,c,f);if(typeof b=="undefined")b=f.$player;return b}return f.$player}};g.tubeplayer.getPlayers=function(){return d.ytplayers};d.init=function(a,b){if(a.hasClass("jquery-youtube-tubeplayer"))return a;b=g.extend({},j,b);b.playerID+=(new Date).valueOf();a.addClass("jquery-youtube-tubeplayer").data("opts.tubeplayer",b);for(e in i)a.bind(e+".tubeplayer",a,i[e]);d.initDefaults(g.tubeplayer.defaults,b);jQuery("
").attr("id",b.playerID).appendTo(a);d.initPlayer(a, b);return a};d.getPkg=function(a){a=a.data;var b=a.data("opts.tubeplayer");return{$player:a,opts:b,ytplayer:d.ytplayers[b.playerID]}};d.iframeReady=function(a){d.inits.push(function(){new YT.Player(a.playerID,{videoId:a.initialVideo,width:a.width,height:a.height,playerVars:{autoplay:a.autoPlay?1:0,autohide:a.autoHide?1:0,controls:a.showControls?1:0,rel:a.showRelated?1:0,fs:a.allowFullScreen?1:0,wmode:a.wmode,showinfo:a.showinfo?1:0,modestbranding:a.modestbranding?1:0,start:a.start,theme:a.theme,color:a.color}, events:{onReady:function(b){d.ytplayers[a.playerID]=b.target;b=g(b.target).parents(".jquery-youtube-tubeplayer");g.tubeplayer.defaults.afterReady(b)},onPlaybackQualityChange:g.tubeplayer.defaults.qualityChange(a.playerID),onStateChange:g.tubeplayer.defaults.stateChange(a.playerID),onError:g.tubeplayer.defaults.onError(a.playerID)}})});if(d.inits.length>=1&&!d.inited)return function(){for(var b=0;b