﻿/*
*************************************************************************
* 
* CAPTUAL TECHNOLOGIES CONFIDENTIAL
* _________________________________
* 
*  2008 - 2011 Captual Technologies Inc. 
*  All Rights Reserved.
* 
* NOTICE:  All information contained herein is, and remains
* the property of Captual Technologies Incorporated and its suppliers,
* if any.  Dissemination of this information or reproduction of this 
* material is strictly forbidden unless prior written permission is 
* obtained from Captual Technologies Incorporated.
*
*************************************************************************
*/

$(document).ready(function () {
    $("#alt_video_access_controls button, #alt_video_access_controls a").focus(function () {
        $("#alt_video_access_controls").css("left", 0);
    });
    $("#alt_video_access_controls button, #alt_video_access_controls a").blur(function () {
        $("#alt_video_access_controls").css("left", -9999);
    });
});

function video_access_controls_play() {
    try { getPlayerSwfInternal().accessTogglePlayback(); } catch (e) { notLoaded(); }
}

function video_access_controls_seek_reverse() {
    try { getPlayerSwfInternal().accessSeekReverse(); } catch (e) { notLoaded(); }
}

function video_access_controls_seek_forward() {
    try { getPlayerSwfInternal().accessSeekForward(); } catch (e) { notLoaded(); }
}

function player_access_controls_volume_down() {
    try { getPlayerSwfInternal().accessVolumeDown(); } catch (e) { notLoaded(); }
}

function player_access_controls_volume_up() {
    try { getPlayerSwfInternal().accessVolumeUp(); } catch (e) { notLoaded(); }
}

function player_access_controls_focus() {
    getPlayerSwfInternal().focus();
}

function notLoaded() {
    alert(localization_videoNotLoaded);
}

function getPlayerSwfInternal() {
    if (window.player_iframe) {
        return getPlayerSwf();
    } else {
        return getMyApp("presentationUISwf");
    }
}

