// Self executing block
/**
* @const
* @type {!string}
*/
CONFIG.CardId = (function() {
var IVG = new iVG();
var cardID = "";
cardID += IVG['UserProfile']['CardID'];
cardID += IVG['UserProfile']['CardIDCheckDigit'];
while(cardID.length < 12) {
cardID = "0" + cardID;
};
return cardID;
})();
// List classes/Encapsulation
function BaseNode(nodeId, nodeType, domId){
this.nodeId = nodeId;
this.nodeType = nodeType;
(typeof(domId) === "undefined") ? this.domId=nodeId : this.domId=domId;
};
BaseNode.prototype.onFocus = function(){
if(!!$(this.domId) ){
$(this.domId).addClass("selected");
}
};
BaseNode.prototype.lostFocus = function(){
if(!!$(this.domId) ){
$(this.domId).removeClass("selected");
}
};
function NavNode(nodeId,navName,domId){
(typeof(domId) === "undefined") ? domId=nodeId : domId=domId;
BaseNode.call(this,nodeId,CONST.NODETYPE_NAV,domId);
this.navName = navName;
}
NavNode.prototype = new BaseNode();
NavNode.prototype.constructor = NavNode;
NavNode.prototype.onFocus = function(){
if(!!$(this.domId) ){
var navDesc = $(this.domId).innerHTML;
$(this.domId).addClass("selected");
$(this.domId).removeClass("inSelected");
$("sectionTitle").innerHTML=navDesc;
}
};
NavNode.prototype.lostFocus = function(){
if(!!$(this.domId) ){
$(this.domId).removeClass("selected");
if(!!$("nextMenuItemAudio") && typeof($("nextMenuItemAudio").play) == "function" && !!Core.Config.AudioFeedback ){
$("nextMenuItemAudio").play();
}
}
};
function PlaylistNode(nodeId, playlistItem, domId){
(typeof(domId) === "undefined") ? domId=nodeId : domId=domId;
BaseNode.call(this,nodeId,CONST.NODETYPE_PLAYLIST_ITEM,domId);
this.img_src = playlistItem.boxart;
this.movie_title = playlistItem.title;
}
PlaylistNode.prototype = new BaseNode();
PlaylistNode.prototype.constructor = PlaylistNode;
delete PlaylistNode.prototype.nodeId;
delete PlaylistNode.prototype.nodeType;
delete PlaylistNode.prototype.domId;
PlaylistNode.prototype.performAction = function(){
if(!!this.img_src)
alert(this.img_src);
};
PlaylistNode.prototype.lostFocus = function(){
if(!!$(this.domId) ){
$(this.domId).removeClass("selected");
if(!!$("nextPlaylistItemAudio")
&& typeof($("nextPlaylistItemAudio").play) == "function"
&& !!Core.Config.AudioFeedback ){
$("nextPlaylistItemAudio").play();
}
}
};