// Parses the the variable page from the url to determine which side nav link will be highlighted

function getQueryVariable(variable) { 
  var query = window.location.search.substring(1); 
  var vars = query.split("&"); 
  for (var i=0;i<vars.length;i++) { 
    var pair = vars[i].split("="); 
    if (pair[0] == variable) { 
      return pair[1]; 
    } 
  } 
  defaultPlay(); 
} 

$(function() { 
		$f("player", "player/flowplayer-3.0.1.swf", {
		 clip: {
		url: 'http://www.easyatmcard.com/movies/' +  getQueryVariable("mov") ,
		baseUrl: 'http://www.easyatmcard.com/movies/'
		 }
        });
}); 

     	function defaultPlay() { 
		$f("player", "player/flowplayer-3.0.1.swf", {
		 clip: {
		 url: 'http://www.easyatmcard.com/movies/Activate.flv',
		 baseUrl: 'http://www.easyatmcard.com/movies/'
		 }
		});
		}

// Highlights the side nav link determined by the variable page 
/*
function activeLink(active) {
    if (active == "easyatmcard") {
        document.getElementById("nav1").className="active";
        defaultPlay();
    }
    else if (active == "easyatmcardLoan") {
        document.getElementById("nav2").className="active";
    }
     else if (active == "easyatmcardEducation") {
        document.getElementById("nav3").className="active";
    }
    else if (active == "easyatmcardLifeInsur") {
        document.getElementById("nav4").className="active";
    }
    else if (active == "easyatmcardAutoWarranty") {
        document.getElementById("nav5").className="active";
    }
}

*/
