(function(c){var a=0;var b=0;c.youtubin=function(d,f){var d=d||{};if((typeof d.iphoneBoot=="undefined"||d.iphoneBoot)&&((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i)))){return false}if(!b){if(typeof(swfobject)=="undefined"){b="noScript"}else{b="2"}}if(typeof(f)=="undefined"||!f){d.scope=d.scope||c("body");c("a[href^=http://www.youtube.com/watch?v=]",d.scope).youtubin(d);return false}d.swfWidth=d.swfWidth||"425";d.swfHeight=d.swfHeight||"344";d.flashVersion=d.flashVersion||"8";d.expressInstall=d.expressInstall||"";d.flashvars=d.flashvars||{};d.params=d.params||{menu:"false",loop:"false",wmode:"opaque"};d.replaceTime=d.replaceTime||"auto";d.keepLink=d.keepLink||(d.replaceTime=="click");d.wrapper=d.wrapper||'<div class="youtubin-video"></div>';d.autoplay=typeof d.autoplay!="undefined"?d.autoplay:(d.replaceTime=="click");d.srcOptions=d.srcOptions||"?hl=en&fs=1"+(d.autoplay?"&autoplay=1":"");d.method=d.method||"href";d.target=d.target||false;var g=c(f);if(d.replaceTime=="auto"){e()}else{if(d.replaceTime=="click"){g.click(function(h){h.preventDefault();e()})}}function e(){function i(m){var n=m.attr("id");if(!n.length){n=l();m.attr("id",n)}return n}function l(){var m="youtubin-"+a;a++;return m}var k=g.attr(d.method);if(k.substr(0,31)=="http://www.youtube.com/watch?v="){k="http://www.youtube.com/v/"+k.substr(31)+d.srcOptions}if(d.target){var h=d.target;var j=i(h)}else{if(d.keepLink){var j=l();g.after(c('<div id="'+j+'"></div>'));var h=c("#"+j);h.css("clear","both")}else{var h=g;var j=i(h)}}switch(b){case"2":swfobject.embedSWF(k,j,d.swfWidth,d.swfHeight,d.flashVersion,d.expressInstall,d.flashvars,d.params);break;default:h.html('<object width="'+d.swfWidth+'" height="'+d.swfHeight+'"><param name="movie" value="'+k+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+k+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+d.swfWidth+'" height="'+d.swfHeight+'"></embed></object>');break}}};c.fn.youtubin=function(d){this.each(function(){new c.youtubin(d,this)});return this}})(jQuery);