// version 2.0
if (typeof vmmaplayer !== 'undefined' && vmmaplayer.videoUrl) {
	vmmaplayer.width = vmmaplayer.width || 400;
	vmmaplayer.height = vmmaplayer.height || 225;
	var src = 'http://jim.be/vmmaplayer/embed?videoUrl='+encodeURIComponent(vmmaplayer.videoUrl);
	if (vmmaplayer.width){src+="&amp;width="+encodeURIComponent(vmmaplayer.width);}
	if (vmmaplayer.height){src+="&amp;height="+encodeURIComponent(vmmaplayer.height);}
	if (vmmaplayer.imageUrl){src+="&amp;imageUrl="+encodeURIComponent(vmmaplayer.imageUrl);}
	if (vmmaplayer.title){src+="&amp;title="+encodeURIComponent(vmmaplayer.title);}
	if (vmmaplayer.url){src+="&amp;url="+encodeURIComponent(vmmaplayer.url);}
	if (vmmaplayer.iWatchUrl){src+="&amp;iWatchUrl="+encodeURIComponent(vmmaplayer.iWatchUrl);}
	if (vmmaplayer.showEmbed != null){src+="&amp;showEmbed="+encodeURIComponent(vmmaplayer.showEmbed);}
	if (vmmaplayer.subsiteUrl){
		src+="&amp;subsiteUrl="+encodeURIComponent(vmmaplayer.subsiteUrl);
	} else if (vmmaplayer.url) {
		src+="&amp;subsiteUrl="+encodeURIComponent(vmmaplayer.url);
	}
	if (vmmaplayer.relatedVideosFeedUrl){src+="&amp;relatedVideosFeedUrl="+encodeURIComponent(vmmaplayer.relatedVideosFeedUrl);}
	if (vmmaplayer.zoneId){src+="&amp;zoneId="+encodeURIComponent(vmmaplayer.zoneId);}
	document.write('<iframe src="'+src+'" width="'+vmmaplayer.width+'" height="'+vmmaplayer.height+'" scrolling="no" frameborder="0"></iframe>');
}
