﻿var omni = {};

(function() {
    omni = {
        init: function() {
            /** Homepage links **/
            // hero
            /*$('#track_hp_hero_1').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });
            $('#track_hp_hero_2').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });
            $('#track_hp_hero_3').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });
            $('#track_hp_hero_4').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });*/

            // more tweets link
            $('#track_hp_twitter').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });

            // newsletter link
            $('#track_hp_news').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });

            // facebook link
            /*$('#track_hp_facebook').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });

            // facebook fan link
            $('#track_hp_facebook_fan').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });

            // spotify link
            $('#track_hp_spotify_1').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });
            $('#track_hp_spotify_2').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('id');
                s.tl(this, "o", event);
            });*/
        },

        HTSelected: function(lista) {
            try {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'hct_' + $(this).attr('title');
                s.tl(this, "o", event);
            }
            catch (e) { }
        },

        OTNSelected: function() {
            try {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'otn_' + $(this).attr('title');
                s.tl(this, "o", event);
            }
            catch (e) { }
        },

        HeroSelected: function() {
            try {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'hi_' + $(this).attr('title');
                s.tl(this, "o", event);
            }
            catch (e) { }
        },

        FESelected: function() {
            try {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'fe_' + $(this).attr('title');
                s.tl(this, "o", event);
            }
            catch (e) { }
        },

        EventSelected: function() {
            try {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'ev_' + $(this).attr('title');
                s.tl(this, "o", event);
            }
            catch (e) { }
        }

    };
})();