/*
 * minified version of jQuery SWFObject plugin
 * http://jquery.thewikies.com/swfobject/downloads
 */
(function(E,B){var C=function(G){var F,H=[];for(F in G){H.push(F+'="'+G[F]+'"')}return H.join("")},D=function(H){var F,J,I=[],G;for(F in H){if(typeof H[F]=="object"){G=[];for(J in H[F]){G.push([J,"=",encodeURIComponent(H[F][J])].join(""))}H[F]=G.join("&amp;")}I.push(['<param name="',F,'" value="',H[F],'" />'].join(""))}return I.join("")},A=false;E[B]=(function(){var F="0,0,0",G=navigator.plugins["Shockwave Flash"]||ActiveXObject;F=G.description||(function(){try{return(new G("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(H){}}());F=F.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+r|,)(\d+)/);return{available:F[1]>0,activeX:!G.name,version:{major:F[1]*1,minor:F[2]*1,release:F[3]*1},hasVersion:function(I){var L=this.version,J="major",K="minor",H="release";I=(/string|number/.test(typeof I))?I.toString().split("."):I||[0,0,0];I=[I[J]||I[0]||L[J],I[K]||I[1]||L[K],I[H]||I[2]||L[H]];return(I[0]<L[J])||(I[0]==L[J]&&I[1]<L[K])||(I[0]==L[J]&&I[1]==L[K]&&I[2]<=L[H])},expressInstall:"expressInstall.swf",create:function(H){if(!E[B].available||A||!typeof H=="object"||!H.swf){return false}if(H.hasVersion&&!E[B].hasVersion(H.hasVersion)){H={swf:H.expressInstall||E[B].expressInstall,attrs:{id:"SWFObjectExprInst",height:Math.max(H.height||137),width:Math.max(H.width||214)},params:{flashvars:{MMredirectURL:location.href,MMplayerType:(E[B].activeX)?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}};A=true}else{H=E.extend(true,{attrs:{height:H.height||180,width:H.width||320},params:{wmode:H.wmode||"opaque",flashvars:H.flashvars}},H)}return"<object "+(C(H.attrs))+(E[B].activeX?' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="'+H.swf+'" />':' type="application/x-shockwave-flash" data="'+H.swf+'">')+(D(H.params))+"</object>"}}}());E.fn[B]=function(F){if(typeof F=="object"){this.each(function(){var G=document.createElement(B);G.innerHTML=E[B].create(F);if(G.childNodes[0]){this.appendChild(G.childNodes[0])}})}else{if(typeof F=="function"){this.find("object").andSelf().filter("object").each(function(){var H=this,G="jsInteractionTimeoutMs";H[G]=H[G]||0;if(H[G]<660){if(H.clientWidth||H.clientHeight){F.call(this)}else{setTimeout(function(){E(H)[B](F)},H[G]+66)}}})}}return this}}(jQuery,"flash"));
/*
 * jQuery videoize
 * copyright 2009 justin talbott - justintalbott.com
 * released under the MIT and GPL licenses
 */
(function($){

$.fn.videoize = function(options) {
	var settings = $.extend({}, $.fn.videoize.settings, options);
	$(this).each(function(){
        var $o = $(this),
			$video = document.createElement("video");
		if (!$video.play) {
			if (!settings.quicktime) {
				$o.flash({
					swf: settings.flashplayer,
					params: {
						allowfullscreen: "true",
						allowscriptaccess: "always"
					},
					flashvars: {
						file: settings.mp4,
						image: settings.poster
					},
					height: settings.height,
					width: settings.width
				});
			} else {
				var video = $("<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" width=\""+ settings.width +"\" height=\""+ settings.height +"\"><param name=\"src\" value=\""+ settings.mp4 +"\" /><param name=\"controller\" value=\""+ settings.controls +"\" /><param name=\"autoplay\" value=\""+ settings.autoplay +"\" /><!--[if !IE]>--><object type=\"video/quicktime\" data=\""+ settings.mp4 +"\" width=\""+ settings.width +"\" height=\""+ settings.height +"\"><param name=\"autoplay\" value=\""+ settings.autoplay +"\" /><param name=\"controller\" value=\""+ settings.controls +"\" /></object><!--<![endif]--></object>");
				$o.html(video);
			}
		} else {
		  	var video = $("<video width=\""+ settings.width +"\" height=\""+ settings.height +"\" controls=\""+ settings.controls +"\">");
			if (settings.autoplay) { video.attr("autoplay",settings.autoplay) };
			if (settings.poster) { video.attr("poster",settings.poster) };
			var mp4 = $("<source src=\""+ settings.mp4 +"\" type=\"video/mp4\" />");
			var ogv = $("<source src=\""+ settings.ogg +"\" type=\"video/ogg\" />");
			video.append(ogv).append(mp4);
			$o.html(video);
		}
	});
	return this;
};
    
$.fn.videoize.settings = {
	mp4: "", 
	ogg: "",
	flashplayer: "/swf/player.swf",
	poster: "",
	height: "480",
	width: 	"720",
	autoplay: false,
	controls: true,
	quicktime: false
};
    
})(jQuery);
