﻿var current; //Global, for current active item in slider

function getVideoObjects() {  
    //return $("#Video").get(0);
}

function stopVideo() {
    
    var videoObjects = $("object[id^='Video']");
    for(var x=0; x<videoObjects.length; x++) {
        try {
            videoObjects[x].VideoPlayerStop()
        } catch(e) { /* Not all video's are on the page yet */ }
    }        
}
function fullScreen() {

	stopVideo();
			
    var ID = current;
    $.nyroModalSettings({
		debug: false,
		height: 510,
		width: 950,
		bgColor: null
	});

    var pageURLWithPost = '/playVideo.aspx?ID=' + ID;
	$.nyroModalManual({
      url: pageURLWithPost
    });
}

$(document).ready(function() {
    $(".iconExpand a").click(function() {
        fullScreen();
        return false;
    });
});
