//////////// MAIN PLAYER SCRIPTS ///////////

// define videos (large scale id; petatv/embed id (sans _high))
	videoList1 = new Array(
	'veggie_love_011609_high,chew_on_this_500_280_high&i=veggie-love_500x280_high', 'veggie_love_011609',
	'veggie_love_500_high,chew_on_this_500_280_high', 'veggie_love',
	'chew_on_this_500_280_high', 'chew_on_this',
	'Asparagus_500_high,chew_on_this_500_280_high', 'Asparagus',
	'Pumpkin_human_500_high,chew_on_this_500_280_high', 'Pumpkin_human',
	'Broccoli_spank_500_high,chew_on_this_500_280_high', 'Broccoli_spank',
	'Hot_tub_spank_500_high,chew_on_this_500_280_high', 'Hot_tub_spank',
	'MYM_update_500_high', 'MYM_update_500'
);

// play function
function playVideo1(vId) {
	// reset video links
	aEls = document.getElementById('videoList1Content').getElementsByTagName('A');
	for(i=0;i<aEls.length;i++) {
		aEl = aEls[i];
		// highlight the selected video thumbnail
		aEl.className = (vId==i) ? 'selected' : '';		
	}
	// identify video information
	playerLink = videoList1[(vId*2)];
	embedLink = videoList1[(vId*2)+1];
	// load large player
	document.getElementById('video1_iframe').src = 'http://www.petatv.com/swf/video_level3.swf?v='+playerLink+((document.getElementById('video1_iframe').src.indexOf('petatv.com')==-1)?'':'&ap=1');
	// set video option links
	optionsCode = "<a href='http://www.petatv.com/tvpopup/Prefs.asp?video="+embedLink+"' target='_blank'>Options</a> | ";
	optionsCode += "<a href='http://www.petatv.com/downloads/"+embedLink+".zip' target='_blank'>Download</a> | ";
	optionsCode += "<a href=\"javascript:showEmbedCode1('"+embedLink+"');void(0);\">Embed</a> | ";
	optionsCode += "<a href='share.aspx'>Share</a>";
	document.getElementById('video1_options').innerHTML = optionsCode;
}

// pop up dynamic embed code window for main player
function showEmbedCode1(v) {
	window.open('embed.aspx?vid='+v, '_blank', 'width=300,height=140,scrollbars=yes,resize=yes,status=yes');
}




////////////// SUB VIDEOS /////////////////


// define videos (small scale id/embed id (sans _high); petatv link; title; description)
videoList2 = new Array(
	'super_bowl_60', 'super_bowl_60', "Sexy Sausage: Director's Cut", "&quot;Sexy Sausage&quot; tackles one highly sensitive issue: impotence. The ad drew attention to the connection between erectile dysfunction and meat-eating&mdash;and it was considered too racy for the Super Bowl.",
	'abc_the_talk_psa', 'abc_the_talk_psa', "Sex Talk", "The Big Easy banned our ad about one not-so-easy talk that all parents eventually give&mdash;the sex talk. Yep, the city that is home to Mardi Gras and Bourbon Street said that an ad that tackles the overpopulation crisis was inappropriate for airing on several stations. <a href='http://www.peta.org/feat/abc/index.asp'>Learn more</a>.",
	'milk_gone_wild_mym', 'milk_gone_wild', "Milk Gone Wild", "PETA's video featuring a club full of unnaturally beautiful women was considered too wild for the Super Bowl. <a href='http://www.milkgonewild.com'>Learn more</a>.",
	'KFC_torture_camp', 'KFC_torture_camp', "Kentucky Fried Cruelty: The Movie", "Several stations in Louisville, Kentucky&mdash;home of <a href='http://www.kentuckyfriedcruelty.com' target='_b;ank'>KFC</a>&mdash;were not pleased with PETA's representation of their beloved Colonel in the trailers for Kentucky Fried Cruelty: The Movie. <a href='http://www.kentuckyfriedcruelty.com/f-kfc_fried_videos.asp' target='_b;ank'>Watch the other trailers</a>.",
	'fur_hairball_master', 'fur_hairball', "Hairball", "&quot;Hairball&quot; is one of a series of three banned videos that feature fur-wearing models mimicking the day-to-day actions of our feline friends. When our fur-licking model coughs up a huge fur ball, the revolting nature of humans who wear fur becomes clear. Also watch &quot;<a href='http://www.petatv.com/tvpopup/Prefs.asp?video=fur_litterbox' target='_blank'>Litterbox</a>&quot; and &quot;<a href='http://www.petatv.com/tvpopup/Prefs.asp?video=fur_toilet' target='_blank'>Drinking Out of a Toilet</a>.&quot;",
	'casey_graphic', 'casey_graphic', "Casey Affleck's 'Go Vegetarian' PSA", "Actor Casey Affleck's &quot;Go Vegetarian&quot; public service announcement was banned from numerous stations in Boston as well as from major networks such as E!, Food Network, MTV and others because of graphic content that is commonplace on factory farms. <a href='http://www.goveg.com/f-caseyaffleck.asp'>Learn more</a>.",
	'alicia_veg', 'alicia_veg', "Alicia Silverstone's Veggie PSA", "actress Alicia Silverstone bared all in PETA's first-ever naked <a href='hhttp://veggietestimonial.peta.org/psa.aspx?CID=8ce2420c-021c-49bc-91c5-b02a8775e2a2'>veggie testimonial</a> it was banned from the airwaves in Houston, Texas. The sexy video was directed by acclaimed director Dave Meyers.",
	'turkey_terrorism', 'turkey_terrorism', "Turkey Terror", "This PETA ad features a turkey who takes over a grocery store. Because of strong language, violence, and what some reviewers perceived as a negative portrayal of food, it was banned in Boston, Minneapolis, and Raleigh, North Carolina, and barred from the Food Network."
);

// play function
function playVideo2(vId) {
	// reset video links
	aEls = document.getElementById('subVideoList').getElementsByTagName('A');
	for(i=0;i<aEls.length;i++) {
		aEl = aEls[i];
		// highlight the selected video thumbnail
		aEl.className = (vId==i) ? 'selected' : '';		
	}
	// identify video information
	videoLink = videoList2[(vId*4)];
	videoPTVLink = videoList2[(vId*4)+1];
	videoName = videoList2[(vId*4)+2];
	videoTeaser = videoList2[(vId*4)+3];
	// load large player
	document.getElementById('video2_iframe').src = 'http://www.petatv.com/swf/video.swf?v='+videoLink+'_high'+((document.getElementById('video2_iframe').src.indexOf('petatv.com')==-1)?'':'&ap=1');
	// set video option links
	optionsCode = "<a href='http://www.petatv.com/tvpopup/Prefs.asp?video="+videoPTVLink+"' target='_blank'>Options</a> | ";
	optionsCode += "<a href='http://www.petatv.com/downloads/"+videoPTVLink+".zip' target='_blank'>Download</a> | ";
	optionsCode += "<a href=\"javascript:showEmbedCode2('"+videoLink+"');void(0);\">Embed</a> | ";
	optionsCode += "<a href='share.aspx'>Share</a>";
	document.getElementById('video2_options').innerHTML = optionsCode;
	document.getElementById('video2_name').innerHTML = videoName;
	document.getElementById('video2_teaser').innerHTML = videoTeaser;
}


// pop up dynamic embed code window for sub player
function showEmbedCode2(v) {
	window.open('embed2.aspx?vid='+v,'_blank', 'width=300,height=140,scrollbars=yes,resize=yes,status=yes');
}

