// tinymce adds unwanted <br> tags when blogging video- strip these from the blog entry body only when blog entry contains a blogged video
var stripBlogBodyBR = function() {
	var blogEntryBodies = $$('.blog-entry-body-content','#post-blog .blog-body');
	if(blogEntryBodies) {
		blogEntryBodies.each(function(be) {
			be.cleanWhitespace();
			var beHTML = be.innerHTML;
			/*
				Only remove the extra <br> tags if blog post contains a video
				check to see if a video has been embedded & has bloggedVideo=true in the flashvars
			*/
			if(beHTML.indexOf('bloggedVideo=true') > -1) {
				if(beHTML.indexOf('<br>') > -1 || beHTML.indexOf('<BR>') > -1) {
					var newBE = beHTML.replace(/<br>/g,' ');
					newBE = newBE.replace(/<BR>/g,' ');
					be.update(newBE);
				}
			}
		});
	}
};