﻿$(document).ready(
    function() {
        $("#pageSubHeader .mytvg-share-obj-w").supersleight({ shim: "/images/global/spacer.gif" });

        //is favorite - snap.js
        getFaveStatus(iTvObjectID, strTvObjectName);

        //5 friend like this show...
        if (isLoggedInX && snapIdentityProviderID == "1") {
            $.ajax({
                url: "/FBC/HTTPHandler/HNDObjectData.ashx?tvobjectname=" + escape(strTvObjectName) + "&tvobjectid=" + iTvObjectID + "&actiontype=1",
                type: "GET",
                cache: true,
                success: function(results) {
                    $("#tvo_facebook_ajax").html(results);
                    $(document).ready(function() {
                        $("#tvo_facebook_ajax a[rel*=facebox]").facebox();
                    })
                }
            });
        }
    });

function getObjDVR() {
    var isFave = (dvrTVObjectIDs.indexOf(iTvObjectID) >= 0);
    $.ajax({
        url: "/FBC/HTTPHandler/HNDDVR.ashx?actiontype=4&tvobjectid=" + iTvObjectID + "&tvobjectname=" + escape(strTvObjectName) + "&isLoggedIn=" + isLoggedInX + "&isFave=" + isFave + "&loc=" + escape(window.location),
        type: "GET",
        success: function(results) {
            document.getElementById("dvr-bna-obj").innerHTML = results;
        }
    });
}
