// CHOOSE A PRETTYPHOTO THEME

$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme: 'pp_dvox',
		horizontal_padding: 16,
		deeplinking: false,
		overlay_gallery: false,
		social_tools: '',
		markup: '<div class="pp_pic_holder"> \
					<div class="ppt">&nbsp;</div> \
					<div class="pp_top"> \
						<div class="pp_left"></div> \
						<div class="pp_middle"></div> \
						<div class="pp_right"></div> \
					</div> \
					<div class="pp_content_container"> \
						<div class="pp_left"> \
						<div class="pp_right"> \
							<div class="pp_content"> \
								<div class="pp_loaderIcon"></div> \
								<div class="pp_fade"> \
								<a class="pp_close" href="#">Close</a> \
									<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
									<div class="pp_hoverContainer"> \
										<a class="pp_next" href="#">next</a> \
										<a class="pp_previous" href="#">previous</a> \
									</div> \
									<div id="pp_full_res"></div> \
									<div class="pp_details"> \
										<div class="pp_nav"> \
											<a href="#" class="pp_arrow_previous">Previous</a> \
											<p class="currentTextHolder">0/0</p> \
											<a href="#" class="pp_arrow_next">Next</a> \
										</div> \
										<p class="pp_description"></p> \
										{pp_social} \
									</div> \
								</div> \
							</div> \
						</div> \
						</div> \
					</div> \
					<div class="pp_bottom"> \
						<div class="pp_left"></div> \
						<div class="pp_middle"></div> \
						<div class="pp_right"></div> \
					</div> \
				</div> \
				<div class="pp_overlay"></div>',
		flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>'
	});
});

var swfRoot = "/multimedia/swf/demos/";
var videoRoot = "http://media.dynavoxtech.com/dvox/";// This becomes dynamic when I start using resolution switching or pulling from the low-res folder instead.
var trackingAccount = 'dvoxmarketing'; // IMPORTANT — make sure report suite names are correct BEFORE COMMITTING THIS FILE! (test='dvoxdev' | live='dvoxmarketing')
var mediaPlayerName = 'DynaVox Centered PopUp Player';
var caption;

function launchDemo(prod) {
	// Set up an array later on as this gets unwieldy.
	var fileName;
	if (prod == 'maestro') {
		fileName = 'Demo-DynavoxMaestro-101004a.swf';
		caption = "DynaVox Maestro: Speak your mind and look good doing it!";
	} else if (prod == 'xpress') {
		fileName = 'Demo-DynavoxXpress-100813b.swf';
		caption = "DynaVox Xpress: Xpress yourself inside and out!";
	}
	theDemo = swfRoot+fileName;
	$.prettyPhoto.open('/multimedia/swf/controllers/demoPlayer.swf?width=922&height=411&flashvars=demoLocation='+theDemo,'',caption);
}

function playVideo(loc,caption,quality) { // <----- Specify 'high' quality to override (low by default)
	var filename;
	var format;
	if (quality != null) {
		if (quality == 'high') {
			filename = loc.substring(0,loc.length-4);
			format = loc.substring(loc.length-4,loc.length);
			loc = filename + "-HQ" + format;
		}
	} else {
		// do nothing (for now)
	}
	$.prettyPhoto.open('/multimedia/swf/controllers/videoPlayer.swf?width=640&height=360&flashvars=videoRoot='+videoRoot+'&videoID='+loc+'&trackingAccount='+trackingAccount+'&mediaPlayerName='+mediaPlayerName,'',caption);
}
