/* Conversion Test
Id: conv-0001 (This id is made up for this test since the id system is not yet implemented in the backlog)
Name: PokerJunkie, Review - Pulse 1, Q1_09
Description: Two design/laout tests, "Clean" and "Spam" running on the review pages.
*/

var conv_0001 = {
	init: function () {
		if (typeof (conv_0001_version) !== 'undefined') {
			conv_0001.conversion(conv_0001_version);

			// Tracking
			$('#main a').click( function() {
				ActiveTests.add_test( 'toplist-winner', '#mod-toplist-smpl, #mod-toplist-adv', 'all' );	
			});
		}
	},
	
	conversion: function (conv_version) {

		var page_url = document.location.pathname;
		var restricted;

		// Restrict test to these pages/urls on the italian site
		if (page_url == '/casino-online-in-italiano.shtml' || page_url == '/casino-piu-popolari.shtml' || page_url == '/migliori-casino.shtml') {
			restricted = true;
		}
		// Restrict test to these pages/urls on the german site		
		if (page_url == '/deutsche-online-casinos.shtml' || page_url == '/beliebteste-casinos.shtml' || page_url == '/rangliste-gesamt.shtml') {
			restricted = true;
		}
		
		if (restricted) {
			$('html').addClass('conv-0001');	// For styling, use this class for scoping just this test
			switch (conv_version) {
			case 'b':
				// Version B
					$('#mod-toplist-smpl').remove();
					$('#mod-toplist-adv').css({'opacity':'1'});
				break;
			case 'a':
				
			default:
				break;
			}			

		}
	}
};

$(document).ready(conv_0001.init);

