function addVidPlayerOLD(vidID, vidSIZE) {
 //alert(vidID, vidSIZE);
	var sizes = vidSIZE.split('x');
      	var outerHeight = parseInt(sizes[1]);
       	var divString = "<div id='"+vidID+"OUTER' style='display:none;height:"+sizes[1]+"px;width:"+sizes[0]+"px'><div id='"+vidID+"' style='height:"+sizes[1]+"px;width:"+sizes[0]+"px;'></div></div>";
	$('#hiddenDiv').append(divString);
	flowplayer(vidID, "http://www.ad-dispatch.com/swf/flowplayer.swf",{clip:{base_url: 'rtmp://cw08i2ay72q.rtmphost.com/demo/',url:''+vidID,provider: 'influxis'},
plugins: {influxis: {url:"http://www.ad-dispatch.com/swf/flowplayer.rtmp.swf",netConnectionUrl:'rtmp://cw08i2ay72q.rtmphost.com/demo/'}}});
}

var activeVidID = "";

function addVidPlayer(vidID, vidSize, projectType, title) {

	var browser = $.browser;
	var browserMajorVersion = parseInt(browser.version, 10); // Parse as an int in base 10 number system.

	var sizes = vidSize.split('x');
	// The hiddenDiv element on the page should be set to an appropriate width.
	var divString = "<div id='"+vidID+"OUTER' style='display:none;background-color:black;margin-left:auto;margin-right:auto;text-align:center;height:"+sizes[1]+"px;width:inherit;'><div id='"+vidID+"' style='margin-left:auto;margin-right:auto;height:"+sizes[1]+"px;width:"+sizes[0]+"px;'></div></div>";
	$('#hiddenDiv').append(divString);

	// On IE 8 and earlier, open the video using openVidPlayer(), below.
	// Else, open the video using prettyPhoto.
	if(browser.msie && browserMajorVersion <= 8) {
		document.write("<a class='"+projectType+"' href='javascript:openVidPlayer(\""+vidID+"\");'>WATCH VIDEO</a>");
	} else {
		document.write("<a class='"+projectType+"' href='#"+vidID+"OUTER' rel='prettyPhoto' title='"+title+"'>WATCH VIDEO</a>");
	}
	
	$f(vidID, "http://www.ad-dispatch.com/swf/flowplayer.swf", {

		// this will enable pseudostreaming support 
		plugins: { 
			pseudo: { url: 'http://www.ad-dispatch.com/swf/flowplayer.pseudostreaming-3.2.7.swf' } 
		},

		// clip properties 
		clip: {

			// make this clip use pseudostreaming plugin with "provider" property
			provider: 'pseudo',				

			// all videos under this baseUrl support pseudostreaming on the server side		
			url: 'http://c579099.r99.cf2.rackcdn.com/'+vidID+'.flv'		
		}
	});
	$f(vidID).addClip('http://c579099.r99.cf2.rackcdn.com/'+vidID+'.flv', 0);
}

function addVidPlayerDEMO(vidID, vidSize, projectType, title, poster) {

	var browser = $.browser;
	var browserMajorVersion = parseInt(browser.version, 10); // Parse as an int in base 10 number system.

	var sizes = vidSize.split('x');
	// The hiddenDiv element on the page should be set to an appropriate width.
	var divString = "<div id='"+vidID+"OUTER' style='display:none;background-color:black;margin-left:auto;margin-right:auto;text-align:center;height:"+sizes[1]+"px;width:inherit;'><div id='"+vidID+"' style='margin-left:auto;margin-right:auto;height:"+sizes[1]+"px;width:"+sizes[0]+"px;'></div></div>";
	$('#hiddenDemoDiv').append(divString);
	//alert(divString);

	// On IE 8 and earlier, open the video using openVidPlayer(), below.
	// Else, open the video using prettyPhoto.
	if(browser.msie && browserMajorVersion <= 8) {
		document.write("<a class='"+projectType+"' href='javascript:openVidPlayer(\""+vidID+"\");'><img src='"+poster+"'></img> </a>");
	} else {
		document.write("<a class='"+projectType+"' href='#"+vidID+"OUTER' rel='prettyPhoto' title='"+title+"'><img src='"+poster+"'></img> </a>");
	}
	
	$f(vidID, "http://www.ad-dispatch.com/swf/flowplayer.swf", {

		// this will enable pseudostreaming support 
		plugins: { 
			pseudo: { url: 'http://www.ad-dispatch.com/swf/flowplayer.pseudostreaming-3.2.7.swf' } 
		},

		// clip properties 
		clip: {

			// make this clip use pseudostreaming plugin with "provider" property
			provider: 'pseudo',				

			// all videos under this baseUrl support pseudostreaming on the server side		
			url: 'http://c579099.r99.cf2.rackcdn.com/'+vidID+'.flv'		
		}
	});

}


function openVidPlayer(vidID) {
	$('#'+activeVidID+'OUTER').hide();
	activeVidID = vidID;
	$('#'+vidID+'OUTER').show();
}

