﻿
$(document).ready(function () {

    //TEAM
    initColorBox_Team_View();

    //NEWS
    initColorBox_News_View();
    initColorBox_News_Edit();

    //TRACKRECORD
    initColorBox_TrackRecord_Edit();

    //LINKS
    initColorBox_Links_Edit();

    //CATEGORIES
    initColorBox_Categories_Edit();

    initColorBox_Delete();

});

    //TEAM
    function initColorBox_Team_View() { $(".iframeTeamView").colorbox({ width: "540px", height: "800px", iframe: true }); }

    //NEWS
    function initColorBox_News_View() { $(".iframeNewsView").colorbox({ width: "440px", height: "570px", iframe: true }); }
    function initColorBox_News_Edit() { $(".iframeNewsEdit").colorbox({ width: "612px", height: "800px", iframe: true }); }

    //TRACKRECORD
    function initColorBox_TrackRecord_Edit() { $(".iframeTrackRecordEdit").colorbox({ width: "440px", height: "700px", iframe: true }); }

    //LINKS
    function initColorBox_Links_Edit() { $(".iframeLinksEdit").colorbox({ width: "440px", height: "400px", iframe: true }); }

    //CATEGORIES
    function initColorBox_Categories_Edit() { $(".iframeCategoriesEdit").colorbox({ width: "440px", height: "280px", iframe: true }); }

    //DELETE
    function initColorBox_Delete() {
        $(".iframeDelete").colorbox({ width: "400px", height: "200px", iframe: true });
    }

    //Rebind Gridviews
    function newsUpdated() {
        $.fn.colorbox.close();
        (GetObj('RebindNews_GW_Btn')).click();
    }

    function teamUpdated() {
        $.fn.colorbox.close();
        (GetObj('RebindTeam_GW_Btn')).click();
    }

    function trackRecordUpdated() {
        $.fn.colorbox.close();
        (GetObj('RebindTrackRecord_GW_Btn')).click();
    }

    function linksUpdated() {
        $.fn.colorbox.close();
        (GetObj_Links('RebindLinks_GW_Btn')).click();
    }

    function categoriesUpdated() {
        $.fn.colorbox.close();
        (GetObj_Categories('RebindCategories_GW_Btn')).click();
    }




    function closeColorbox() {
        $.fn.colorbox.close();
    }
