﻿
var omni = {};

(function() {
    omni = {
        init: function() {

            //news
            $('#news ul li a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'n_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //concert tickets homepage
            $('#concert-tickets ul li a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'ct_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //featured events
            $('#featuredEvents div a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'fe_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //hero player
            $('#heroPlayerv23 ul a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'hi_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //on sale now
            $('#tabs ul li div a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'osn_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //home featured
            $('#home-featured a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'ex_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //serp zero results hot tickets
            $('#seachHotTickets a').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'serp_ht_' + $(this).attr('title');
                s.tl(this, "o", event);
            });

            //send to a friend
            $('#sendtoafriend').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'staf_' + s.pageName;
                s.tl(this, "o", event);
            });

            //where to stay
            $('.whereToStayLink').click(function() {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'wts_' + $("#CityName").val();
                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) { }
        },

        ViewAllSearchResults: function() {
            try {
                var s = s_gi(getGurrentOmnitureAccount());
                var event = 'vasr';
                s.tl(this, "o", event);
            }
            catch (e) { }
        }
    };
})();
