  var favicon = "http://www.bocajuniors.com.ar/favicon.ico", currentPage = window.location.href, pageTitle = document.title;

    var btnOne, btnTwo;

   

    function initApp(){

        try {

                if ( window.external.msIsSiteMode()) {

                  //Si la aplicación esta corriendo desde el taskbar enotnces:

                  //Agrego links al jump list

                    addJumpList();

                  //Agrego botones al thumbnail

                    addButtons();

                }

        }

        catch (err){}

    }  
//Agrego cosas al jump list

    function addJumpList() {

        try {

                window.external.msSiteModeClearJumpList();

            //Creamos la categoría 

                window.external.msSiteModeCreateJumplist("Boca Juniors");

            //Agregamos los links

                window.external.msSiteModeAddJumpListItem("Canal de TV", "http://www.bocajuniors.com.ar/canal-de-tv", "http://imagenes.bocajuniorsonline.com/img/common/microsoft/ie9/bullet_boca_16-x-16.ico");

                window.external.msSiteModeAddJumpListItem("Ultimas Noticias", "http://www.bocajuniors.com.ar/noticias", "http://imagenes.bocajuniorsonline.com/img/common/microsoft/ie9/bullet_boca_16-x-16.ico");

                window.external.msSiteModeAddJumpListItem("Fútbol", "http://www.bocajuniors.com.ar/futbol", "http://imagenes.bocajuniorsonline.com/img/common/microsoft/ie9/bullet_boca_16-x-16.ico");

                window.external.msSiteModeShowJumpList();

               

        }

        catch (err){alert(err)}

    }

   



//Agregamos botones al thmbnail preview, en este caso links a twitter y facebook y como

    function addButtons() { 

        try {

            btnOne = window.external.msSiteModeAddThumbBarButton("http://imagenes.bocajuniorsonline.com/img/common/microsoft/ie9/logo-facebook_boca_48-x-48.ico", "Facebook");

            btnTwo = window.external.msSiteModeAddThumbBarButton("http://imagenes.bocajuniorsonline.com/img/common/microsoft/ie9/twitter-logo-boca-16x16.ico", "Twitter");

           

            if (document.addEventListener) {

                document.addEventListener('msthumbnailclick', thumbnailclick, false);

            }

            else {

                document.attachEvent('onmsthumbnailclick', thumbnailclick);

            }

            window.external.msSiteModeShowThumbBar();

        }

        catch (err){alert(err)}             

    } 
    function thumbnailclick(btn) {

        if (btn.buttonID == btnOne) {

                window.location("http://www.facebook.com/pages/Club-Atletico-Boca-Juniors/71948513452");        

        }

        else if (btn.buttonID == btnTwo) {

                window.location("http://twitter.com/bocajrsoficial");  

        }

    }
	
	initApp();
