var bcExp;
var modCue;

function onTemplateLoaded(experienceId)
{
  bcExp = brightcove.getExperience(experienceId);
  modCue = bcExp.getModule(APIModules.CUE_POINTS);
  modCue.addEventListener(BCCuePointEvent.CUE, onCue);  
}

/**
 * Called when cue points are encountered in the video.
 */
function onCue(event)
{
  //var hso = document.getElementById("homesearch_link_out");
  jQuery('#homesearch_video_frame').addClass('hslo_shown');
  /*  // reference to the div which we'll put our links into
    var buylinksElem = document.getElementById("buylinks");

    // we're only concerned with code cue points (type 1)
    if (event.cuePoint.type == 1) 
    {
        // metadata is a series of name/value pairs which are | delimited so we need to split it up
        var metadata = event.cuePoint.metadata.split("|");
        var hash = {};
        for (var i = 0; i < metadata.length; i++)
        {
            var pair = metadata[i].split("=");
            hash[pair[0]] = pair[1];
        }

        // dynamically add a new link for the current cuepoint
        buylinksElem.innerHTML += "<p>" + hash["name"] + " -> <a href='cart.html?product=" + hash["product"]  + "'>Add to Cart</a>";
    }*/
}
