// Omniture JQuery hooks for event tracking
$(document).ready(function(){

	// Rating
	$(".star").mouseup(function() {
		s.linkTrackVars="events";
		s.linkTrackEvents="event7";
		s.events="event7";
		void(s.tl(true, 'o', 'Rate'));
	});

	// Send to a Friend
	$("[href^='/printmail']").mouseup(function() {
		s.linkTrackVars="events";
		s.linkTrackEvents="event8";
		s.events="event8";
		void(s.tl(true, 'o', 'Send to a Friend'));
	});

	// Homepage Links 
	if (location.pathname == '/') {
		// Ticker
		$("#ticker a").each(function() {
			this.href = this.href + '?intcmp=Homepage+Ticker';
		});
		// Hero Slot 
		$("#featured-promo a").each(function() {
			this.href = this.href + '?intcmp=Homepage+Hero';
		});
		// Featured Promotion
        	$("#secondary-promos #bespoke-advert a").each(function() {
			this.href = this.href + '?intcmp=Homepage+Featured+Promotion';
        	});
		// Teaser
		$(".teaser a").each(function() {
			this.href = this.href + '?intcmp=Homepage+Teaser';
		});
	}

	// Drop-Down Selectors
	if (location.pathname == '/games') {
		$(".dropdown a").each(function() {
			this.href = this.href + '?intcmp=Games+Show+Dropdown';
		});
	}
	if (location.pathname == '/activities') {
		$(".dropdown a").each(function() {
			this.href = this.href + '?intcmp=Activities+Show+Dropdown';
		});
	}

});

