$(document).ready(function(){

	
	//  Begin next/prev rollovers
	$("#nextImgBtn").hover(
      function () {
		$(this).css ({ border:"1px solid #d1e1e6" });
        $("#nextImg").css({ display:"block" });
      }, 
      function () {
	   $(this).css ({ border:"1px solid #FFFFFF" });
       $("#nextImg").css({ display:"none" });
      }
    );
	
	
	$("#prevImgBtn").hover(
      function () {
		$(this).css ({ border:"1px solid #d1e1e6" });
        $("#prevImg").css({ display:"block" });
      }, 
      function () {
	   $(this).css ({ border:"1px solid #FFFFFF" });
       $("#prevImg").css({ display:"none" });
      }
    );
	// End next/prev rollovers

	//$('form.rating').rating();

	loadMedia();	

  });

function displayPhoto(responseBatch){
	var photoPage;
	if (responseBatch.Responses.length > 0) {        	
		photoPage=responseBatch.Responses[0].PhotoPage;
	}
	if ((photoId!='' && photo.PhotoKey.Key==photoId) || photoId=='') {
		if (document.getElementById('photoImage')!=null) {
			document.getElementById('photoImage').src=photoPage.Photos[0].Image.Large;
			if(document.getElementById('photoColumn')!=null){
				document.getElementById('photoColumn').style.display='';
			}
		}
	}
}

function setupVideoImage(playerId, lineupId, videoId, playerWidth, playerheight){
	var config = new Array();
	 /*
	 * feel free to edit these configurations
	 * to modify the player experience
	 */
	 config["videoId"] = videoId; //the default video loaded into the player
	 config["videoRef"] = null; //the default video loaded into the player by ref id specified in console
	 config["lineupId"] = lineupId; //the default lineup loaded into the player
	 config["playerTag"] = null; //player tag used for identifying this page in brightcove reporting
	 config["autoStart"] = false; //tells the player to start playing video on load
	 config["preloadBackColor"] = "#FFFFFF"; //background color while loading the player
	 config["wmode"] = "transparent"; //makes the dropdowns and overlayers appear on top of the video
	 config["suppressNoContentMessage"] = true;

	  /*
	 * set the player's size using the parameters below
	 * to make this player dynamically resizable, set the width and height as a percentage
	 */
		config["width"] = playerWidth;
		config["height"] = playerheight;
	 /* do not edit these config items */
	 config["playerId"] = playerId;

	 createExperience(config, 8);
}
function loadVideoImage(infoObj){
	callFlash("getTitleById", infoObj.parameters.lineup.videoIds[0]);                                   
}