/* Conversion Test
 * CasinoTop10 US, Review Design, Pulse 1 - Q4_09
 */

var ConvTest122 = {
	init: function()
	{
		if ( $('#pt-generaltoplist, #pt-flashgame').is('*') ) {
			//var conv_122_version = 'b';
			if ( typeof (conv_122_version) !== 'undefined' )
			{
                ConvTest122.conversion(conv_122_version);

				/* Tracking
				 * name, the name or ID of the test
				 * selector, the css selector to find the element
				 * link_type, one of int, ext or all. ( Internal, External or All )
				 */
				if ( conv_122_version == 'b' ) {
					ActiveTests.add_test( 'de-review-design-toplist', '#mod-toplist-adv','ext' );
					//ActiveTests.add_test( 'us-review-design-review', '#mod-toplist-adv','int' );
					ActiveTests.add_test( 'de-review-design-trainer', '#blackjack-trainerBox','int' );
					ActiveTests.add_test( 'de-review-design-freebj-casinos', '#freeblackjackBox','ext' );
					ActiveTests.add_test( 'de-review-design-freebj', '#freeblackjackBox','int' );
					ActiveTests.add_test( 'de-review-design-main', '#mainBox','int' );
					ActiveTests.add_test( 'de-review-design-slots-tournaments', '#tournamentsBox','all' );
					ActiveTests.add_test( 'de-review-design-slots-jackpots', '#jackpotsBox','int' );
					ActiveTests.add_test( 'de-review-design-slots-winners', '#slotwinnersBox','int' );
					//ActiveTests.add_test( 'us-review-design-freeslots-flashgame', '#play-free-slots', 'int' );
					ActiveTests.add_test( 'de-review-design-freeslots-flashgameoffer', '.flash-game-offer', 'ext' );
					ActiveTests.add_test( 'de-review-design-freeslots-games', '#slotgamesBox', 'ext' );
					ActiveTests.add_test( 'de-review-design-rushmore-casino-promo', '#rushmoreBox', 'ext' );
				} else {
					//ActiveTests.add_test( 'us-review-design-blackjack-reviewlist', '#mod-review-list', 'int' ); // Blackjack - Casino Reviews
					//ActiveTests.add_test( 'us-review-design-blackjack-quickguides', '#mod-quick-guide', 'int' ); // Blackjack - Casino Games Quick Guide
					ActiveTests.add_test( 'de-review-design-blackjack-bonusoffers', '#mod-best-bonus', 'ext' ); // Blackjack - Top Casino Bonus Offers
					//ActiveTests.add_test( 'us-review-design-blackjack-maintext', '#mod-intro', 'int'); // Blackjack - Main Text
					ActiveTests.add_test( 'de-review-design-toplist', '#mod-toplist-adv','ext' ); // Toplist

					ActiveTests.add_test( 'de-review-design-freeslots-maintext', '#flash-game-text', 'all'); // Free Slots Text
					ActiveTests.add_test( 'de-review-design-freeslots-maintext', '#flash-game-nav', 'int'); // Free Slots Text
				}

			} else {
                $('#conv-027-original').show();
			}
		}
	},

	conversion: function (conv_version)
	{
		var page_url = document.location.pathname;

		switch (conv_version)
		{
		case 'b': // Version B

			if ( page_url == '/blackjack-toplist.shtml' )
			{
				$('body').addClass('conv-027-b');
				// Move intro image
				$('#games-intro-images').remove().prependTo('#main p:first');
				$('<br /><a href="' + page_url + '#readfull">Den ganzen Text lesen</a>').appendTo('#mod-intro p:eq(1)');
				// Insert a new box in main
				var $mainBox = ConvTest122.makeBox('mainBox');
                $("#mod-intro p:eq(0)").after($mainBox.html());
				$('#mainBox .hd h3').html('Die beliebtesten Black Jack Artikel');
				// content in mainBox
				var mainBoxContent = '';
				mainBoxContent += '<img class="right" src="http://www.casinotop10.net/content-media/articles/Strategy_main_blackjack.jpg" alt="" />';
				mainBoxContent += '<h4>Black Jack Strategie</h4>';
				mainBoxContent += '<p class="ft-border">Wenn Sie beim Black Jack gewinnen m&ouml;chten, ist es wichtig, Ihre Chancen gut zu kennen. Spieler, die beim Black Jack erfolgreich sind, k&ouml;nnen die Chancen zu ihren Gunsten manipulieren. Sie tun das... <a href="/blackjack-chancen.shtml" class="readFull">Den ganzen Text lesen</a></p>';
				mainBoxContent += '<h4>Black Jack Regeln</h4>';
				mainBoxContent += '<p class="ft-border">Black Jack ist ein Spiel, das bekanntlich sehr Spielerfreundlich ist. Wenn Sie die Regeln gr&uuml;ndlich verstehen und wenn Sie wissen, wie man richtig spielt, dann k&ouml;nnen Sie den Hausvorteil drastisch senken und Ihre Gewinnchancen erh&ouml;hen... <a href="/blackjack-regeln.shtml" class="readFull">Den ganzen Text lesen</a></p>';
				mainBoxContent += '<p>Weitere Black Jack <a href="/strategie-artikel.shtml">Strategie</a> <a href="/andere-artikel.shtml">Artikel</a></p>';
				$('#mainBox').addClass('complex flow').find('.bd').html( mainBoxContent );

				$('<a name="readfull"></a>').insertAfter('#mainBox');

				// Convert all links to just text
				$('#mod-intro h3 ~p').find('a').each( function () {
					$(this).replaceWith( $(this).text() );
				});

				// remove div with text about free...
				$('#main h3:contains("Den Vorteil der Bank minimieren")').prev().remove();
				$('#main h3:contains("Den Vorteil der Bank minimieren")').next().remove();
				$('#main h3:contains("Den Vorteil der Bank minimieren")').remove();
				$('#main #mod-intro h3:last').css({ 'font-size':'20px', 'text-transform':'none' });

				var $bottomBox = ConvTest122.makeBox('bottomBox');
				$( $bottomBox.html() ).insertAfter('#mainBox');

				var $toplist = ConvTest122.makeBox('toplistBox');
				$('#sub').html( $toplist.html() );
				$('#sub .mod').addClass('complex flow');

				// Blackjack Trainer
				var $blackjacktrainer = ConvTest122.makeBox('blackjack-trainerBox');
				$('#sub').append( $blackjacktrainer.html() );
				var blackjacktrainerContent = '';
				blackjacktrainerContent += '<h5>Der CasinoTop10 Black Jack Trainer - Gratis!</h5>';
				blackjacktrainerContent += '<p>Lernen Sie in Ruhe die richtige Black Jack Strategie - Der CasinoTop10 Black Jack Trainer verhilft Ihnen zu besserem Spiel und gr&ouml;&szlig;eren Gewinnen.';
				blackjacktrainerContent += '<br /><a href="/black-jack-strategie-trainer.shtml">Black Jack Trainer</a></p>';
				$('#blackjack-trainerBox').addClass('complex flow').find('.bd').html( blackjacktrainerContent );
				$('#blackjack-trainerBox .hd h3').html('Black Jack Trainer');
				$('#blackjack-trainerBox .hd').append('<a href="/black-jack-strategie-trainer.shtml"><img src="/css/60-conversion/conv-027/blackjack-trainer.jpg" alt="Black Jack Trainer" /></a>');

				// Rushmore "add" (We recommend)
				var $rushmore = ConvTest122.makeBox('rushmoreBox');
				$('#sub').append( $rushmore.html() );
				var rushmoreContent = '';
				rushmoreContent += '<a href="/goto/rushmore-casino.shtml" target="_blank"><img src="images/mini-toplist-article.jpg" alt="We recommend" style="margin: -10px 0 22px 9px" /></a>';
				$('#rushmoreBox').html( rushmoreContent );
				//$('#blackjack-trainerBox .hd h3').html('Blackjack trainer');
				//$('#blackjack-trainerBox .hd').append('<a href="/black-jack-strategy-trainer.shtml"><img src="/css/60-conversion/conv-027/blackjack-trainer.jpg" alt="Blackjack Trainer" /></a>');

				// Play Free Blackjack
				var $freeblackjack = ConvTest122.makeBox('freeblackjackBox');
				$('#sub').append( $freeblackjack.html() );
				var freeblackjackContent = '';
				freeblackjackContent += '<h5>Spielen Sie hier bei CasinoTop10 gratis Black Jack</h5>';
				freeblackjackContent += '<p>Take some time to study the strategies in blackjack - the CasinoTop10 blackjack trainer will help along the way to a better game and bigger winnings.';
				freeblackjackContent += '<br /><a href="/gratis-casinospiele/blackjack.shtml">Gratis Black Jack spielen</a></p>';
				freeblackjackContent += '<h5>Oder spielen Sie kostenlos in den Big Casinos</h5>';
				freeblackjackContent += '<p>Registrieren Sie sich und spielen Sie alle Spiele gratis</p>';
				// Europa Casino
				freeblackjackContent += '<p><a href="/goto/europa-casino.shtml"><img style="float:left;padding-right:10px;" src="/css/60-conversion/conv-027/screenshot-europa-casino.jpg" alt="Europa Casino" /></a>';
				freeblackjackContent += '<a class="logo" href="/goto/europa-casino.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/europa-casino/_resampled/SetWidth60-promotion.jpg" alt="Europa Casino"/>';
				freeblackjackContent += 'Europa Casino</a><br/>';
				freeblackjackContent += 'Erstellen Sie kostenlos Ihr Spielkonto.';
				freeblackjackContent += '<a class="play" href="/goto/europa-casino.shtml">Spielen Sie umsonst im Europa Casino</a></p>';
				// Bellini Casino
				freeblackjackContent += '<p style="clear:left"><a href="/goto/casino-bellini.shtml"><img style="float:left;padding-right:10px;" src="/css/60-conversion/conv-027/screenshot-bellini-casino.jpg" alt="Bellini Casino" /></a>';
				freeblackjackContent += '<a class="logo" href="/goto/europa-casino.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/casino-bellini/_resampled/SetWidth60-promotion.jpg" alt="Bellini Casino"/>';
				freeblackjackContent += 'Bellini Casino</a><br/>';
				freeblackjackContent += 'Erstellen Sie kostenlos Ihr Spielkonto.';
				freeblackjackContent += '<a class="play" href="/goto/casino-bellini.shtml">Spielen Sie umsonst im Bellini Casino</a></p>';
				// Casino Tropez
				freeblackjackContent += '<p style="clear:left"><a href="/goto/casino-tropez.shtml"><img style="float:left;padding-right:10px;" src="/css/60-conversion/conv-027/screenshot-casino-tropez.jpg" alt="Casino Tropez" /></a>';
				freeblackjackContent += '<a class="logo" href="/goto/casino-tropez.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/casino-tropez/_resampled/SetWidth60-promotion.jpg" alt="Casino Tropez"/>';
				freeblackjackContent += 'Casino Tropez</a><br/>';
				freeblackjackContent += 'Erstellen Sie kostenlos Ihr Spielkonto.';
				freeblackjackContent += '<a class="play" href="/goto/casino-tropez.shtml">Spielen Sie umsonst im Casino Tropez</a></p>';

				$('#freeblackjackBox').addClass('complex flow').find('.bd').html( freeblackjackContent );
				$('#freeblackjackBox .hd h3').html('Gratis Black Jack spielen');
				$('#freeblackjackBox .hd').append('<a href="/gratis-casinospiele/blackjack.shtml"><img src="/css/60-conversion/conv-027/free-blackjack.jpg" alt="Gratis Black Jack spielen" /></a>');

                //Remove add for Rushmore
                $("#rushmoreBox").remove();

				// Put a timer here and check for ajax content to load...
				load = function()
				{
				    load.tryReady(0);
				}
				load.tryReady = function(time_elapsed)
				{
					if ( $('.currency-selector').is('*') )
					{
						// Content is loaded so let's make some changes...
						$('#mod-toplist-adv').removeClass('mod-2');
						$('#mod-toplist-adv .head').remove();
						$('#extraContent h3').remove();
						$('.currency-selector').remove();
						$('#mod-toplist-adv #h-us').remove();
						$('#mod-toplist-adv #h-rating').remove();
						$('#mod-toplist-adv #c-us').remove();
						$('#mod-toplist-adv #c-rating').remove();
						$('#mod-toplist-adv .c-us').remove();
						$('#mod-toplist-adv .c-rating').remove();

						$('#toplistBox .hd h3').addClass('section').text('Online Black Jack Top 10');
						$('th#h-match').text('Match');
						$('th#h-review').text('');

						$('#extraContent thead tr th:first-child').replaceWith('<th class="h-logo" colspan="3">Online Casino</th>');
						$('#extraContent tbody tr td:first-child').after('<td class="k-room"></td>');
						$('#extraContent .c-logo').each(function (i){
							$('a:nth-child(2)', this).remove().appendTo('.k-room:eq('+ i +')');
						});

						$('#extraContent td.c-logo').each( function (i){
							var count = i + 1;
							$(this).before('<td class="c-num">'+ count +'.</td>');
						});

						// Just run this on localhost when coding/testing - since logos only exists on the live server (database)
						//$('#extraContent .c-logo a:first-child').html('<img alt="Europa Casino" src="http://www.casinotop10.net/assets/casino-rooms/europa-casino/_resampled/SetWidth60-promotion.jpg"/>');

						$('#sub #toplistBox .c-play-now a:first-child span').text('Spielen');
						$('#sub #toplistBox .c-play-now a.normal span').text('Rezension');
						$('#extraContent').remove().appendTo('#sub #toplistBox .bd');
						$('#toplistBox #extraContent').css('display','block');

                        $("td.c-play-now").each( function(){
                            $(this).find("a:eq(1) span").text('Rezension');
                        });

						// Update tracker since it's loaded with AJAX
						// ClickTracker.init( '#mod-toplist-adv a' );
					}
					else
					{
						if (time_elapsed <= 5000)
						{
							setTimeout("load.tryReady(" + (time_elapsed + 200) + ")", 200);
						}
						return false;
					}
				}
				load();
			} // ************************************************* end blackjack.shtml
			else if ( page_url == '/spielautomaten.shtml' )
			{
				$('body').addClass('conv-027-b');

				// Insert read full link
				$('<br /><a href="' + page_url + '#readfull">Den ganzen Text lesen</a>').appendTo('#mod-intro p:eq(1)');
				// Insert a new box in main
				var $mainBox = ConvTest122.makeBox('mainBox');
				//$( $mainBox.html() ).insertAfter('#main p:eq(1)');
                $('#mod-intro p:eq(0)').after($mainBox.html());
				$('#mainBox .hd h3').html('Die meistgelesenen Slots-Artikel');
				// content in mainBox
				var mainBoxContent = '';
				mainBoxContent += '<img class="right" src="http://www.casinotop10.net/content-media/articles/Strategy_main_slots.jpg" alt="" />';
				mainBoxContent += '<h4>Tipps f&uuml;r die richtige Spielautomaten-Strategie</h4>';
				mainBoxContent += '<p class="ft-border">Ob in richtigen oder Online-Casinos - Millionen von Euro wurden an Spielautomaten schon gewonnen. Slotmaschinen zu spielen ist aber nicht gleichbedeutend mit einer Freikarte in ein sorgenfreies Leben! Es... <a href="/spielautomaten-strategietipps.shtml" class="readFull">Zum Artikel</a></p>';
				mainBoxContent += '<h4>Spielautomaten: Regeln und Varianten</h4>';
				mainBoxContent += '<p class="ft-border">Die Regeln f&uuml;r das Spielen an Slots sind ganz einfach, aber es gibt ein paar Spielvarianten, die Sie vielleicht noch nicht (gut genug) kennen. Wenn Sie zum ersten Mal in ein Kasino gehen, oder Sie versuchen sich an... <a href="/spielautomaten-regeln-und-variationen.shtml" class="readFull">Zum Artikel</a></p>';
				mainBoxContent += '<p>Weitere <a href="/andere-artikel.shtml">Artikel</a> und <a href="/strategie-artikel.shtml">Slot-Strategien</a></p>';
				$('#mainBox').addClass('complex flow').find('.bd').html( mainBoxContent );

				$('<a name="readfull"></a>').insertAfter('#mainBox');

				// Create toplist box
				var $toplist = ConvTest122.makeBox('toplistBox');
				$('#sub').html( $toplist.html() );
				$('#sub .mod').addClass('complex flow');

				$('#mod-intro h4:contains("Did you know")').parent().remove();

				// Create tournaments box and get content
				var $tournaments = ConvTest122.makeBox('tournamentsBox');
				$('#sub').append( $tournaments.html() );
				$('#tournamentsBox').addClass('complex flow');
				$('#SlotsTournaments').remove().appendTo('#tournamentsBox .bd').css('display','block');
				$('#tournamentsBox .hd h3').addClass('section').text('Heute stattfindende Slot-Turniere');

				// USE THIS ONLY IN DEV
				// Add domain to image links
/*				$('#SlotsTournaments img').each( function () {
					$(this).attr('src', "http://www.casinotop10.net" + $(this).attr('src') );
				});
*/

				// Create progressive jackpots box
				var $jackpots = ConvTest122.makeBox('jackpotsBox');
				$('#sub').append( $jackpots.html() );
				$('#jackpotsBox').addClass('complex flow');
				$('#ProgressiveJackpots').remove().appendTo('#jackpotsBox .bd').css('display','block');
				$('#jackpotsBox .hd h3').text('Progressive Jackpots');
				// Hack the height of the jackpot logos wich sometimes are uneven in height
				$('.progressive-jackpot .progressiveImg').css( { 'height':'60px','width':'80px' } );

				// Create latest slots winners
				var $slotwinners = ConvTest122.makeBox('slotwinnersBox');
				$('#sub').append( $slotwinners.html() );
				$('#slotwinnersBox').addClass('complex flow');
				$('#LatestJackpotWinners').remove().appendTo('#slotwinnersBox .bd').css('display','block');
				$('#slotwinnersBox .hd h3').text('Die letzten Slots-Gewinner');


				// Put a timer here and check for ajax content to load...
				// The toplist
				load = function()
				{
				    load.tryReady(0);
				}
				load.tryReady = function(time_elapsed)
				{
					if ( $('.currency-selector').is('*') )
					{
						// Content is loaded so let's make some changes...
						$('#mod-toplist-adv').removeClass('mod-2');
						$('#mod-toplist-adv .head').remove();
						$('#extraContent h3').remove();
						$('.currency-selector').remove();
						$('#mod-toplist-adv #h-us').remove();
						$('#mod-toplist-adv #h-rating').remove();
						$('#mod-toplist-adv #c-us').remove();
						$('#mod-toplist-adv #c-rating').remove();
						$('#mod-toplist-adv .c-us').remove();
						$('#mod-toplist-adv .c-rating').remove();

						$('#toplistBox .hd h3').addClass('section').text('Online slots Top 10');
						$('th#h-match').text('Match');
						$('th#h-review').text('');

						$('#extraContent thead tr th:first-child').replaceWith('<th class="h-logo" colspan="3">Online Casino</th>');
						$('#extraContent tbody tr td:first-child').after('<td class="k-room"></td>');
						$('#extraContent .c-logo').each(function (i){
							$('a:nth-child(2)', this).remove().appendTo('.k-room:eq('+ i +')');
						});

						$('#extraContent td.c-logo').each( function (i){
							var count = i + 1;
							$(this).before('<td class="c-num">'+ count +'.</td>');
						});

						// Just run this on localhost when coding/testing - since logos only exists on the live server (database)
						//$('#extraContent .c-logo a:first-child').html('<img alt="Europa Casino" src="http://www.casinotop10.net/assets/casino-rooms/europa-casino/_resampled/SetWidth60-promotion.jpg"/>');

						$('#sub #toplistBox .c-play-now a:first-child span').text('Play Now');
						$('#sub #toplistBox .c-play-now a.normal span').text('Review');
						$('#extraContent').remove().appendTo('#sub #toplistBox .bd');
						$('#toplistBox #extraContent').css('display','block');

						//ClickTracker.init( '#mod-toplist-adv a' );
					}
					else
					{
						if (time_elapsed <= 5000)
						{
							setTimeout("load.tryReady(" + (time_elapsed + 200) + ")", 200);
						}
						return false;
					}
				}
				load();

                $("td.c-play-now").each( function(){
                    $(this).find("a:eq(1) span").text('Rezension');
                });

                $("#SlotsTournaments th:eq(0)").text('Kasino, Start, Name');
                $("#SlotsTournaments th:eq(1)").html('Startgeb&uuml;hr, Preis, Rebuy');
                $("#SlotsTournaments th:eq(2)").text('Teilnehmen');
                $("#SlotsTournaments p.section").html('Alle <a href="slots-turniere.shtml">Slot-Turniere</a>');

                //Translation of Progressive Jackpots-box, first paragraf
                $("#ProgressiveJackpots p:eq(0)").html('Die progressiven Jackpots der einzelnen Kasinos wachsen ununterbrochen. Die gr&ouml;&szlig;ten finden Sie immer hier.');
                //Translation of Progressive Jackpots-box, second paragraf
                $("#ProgressiveJackpots p:eq(1)").html('An Slots mit progressiven Jackpots k&ouml;nnen Sie schnell mehrere tausend Dollar gewinnen. Treffen Sie Ihre Wahl und los geht\'s. Sie k&ouml;nnten der n&auml;chste sein, der den Jackpot knackt.<br />Alle progressiven <a href="progressive-casino-jackpots.shtml">Jackpots ansehen</a>');

                //Translation of headline to latest jackpot winners
                $("#LatestJackpotWinners th").text('Start, Name, Kasino');

                $("#LatestJackpotWinners p.section").html('Alle <a href="jackpot-gewinner.shtml">Slot-Gewinner ansehen</a>');


			} // ************************************************* end slots.shtml
			else if ( page_url == '/gratis-casinospiele/slots.shtml' || page_url == '/gratis-casinospiele/spielautomaten.shtml' )
			{
				$('body').addClass('conv-027-b');
				$('#flash-game-nav').remove();
				$('#flash-game-game').wrap('<div id="flash-game-game-wrapper"></div>')
				$('#flash-game-game-wrapper').hide();

				// Remove parts from the div containing "More free slots games"
				$('#main h4:contains("Weitere kostenlose Slots")').parent().hide();

				// Convert all links in #main to just text
				$('#flash-game-text h2 ~p').find('a').each( function () {
					$(this).replaceWith( $(this).text() );
				});

                var flashGameText = $("#flash-game-text");
                if(flashGameText.children("#flash-game-text").length > 0){
                    var tmpContent = flashGameText.children("#flash-game-text");
                    flashGameText.replaceWith(tmpContent);
                    //We've made changes, re-bind
                    ActiveTests.add_test( 'de-review-design-freeslots-maintext', '#flash-game-text', 'all'); // Free Slots Text
                }

				// Main column
				var $mainBox = ConvTest122.makeBox('mainBox');
				$( $mainBox.html() ).insertAfter('#main p:eq(2)');
				$('#mainBox .hd h3').html('Die meistgelesenen Slots-Artikel');
				// content in mainBox
				var mainBoxContent = '';
                mainBoxContent += '<img class="right" src="http://www.casinotop10.net/content-media/articles/Strategy_main_slots.jpg" alt="" />';
				mainBoxContent += '<h4>Tipps f&uuml;r die richtige Spielautomaten-Strategie</h4>';
				mainBoxContent += '<p class="ft-border">Ob in richtigen oder Online-Casinos - Millionen von Euro wurden an Spielautomaten schon gewonnen. Slotmaschinen zu spielen ist aber nicht gleichbedeutend mit einer Freikarte in ein sorgenfreies Leben! Es... <a href="/spielautomaten-strategietipps.shtml" class="readFull">Zum Artikel</a></p>';
				mainBoxContent += '<h4>Spielautomaten: Regeln und Varianten</h4>';
				mainBoxContent += '<p class="ft-border">Die Regeln f&uuml;r das Spielen an Slots sind ganz einfach, aber es gibt ein paar Spielvarianten, die Sie vielleicht noch nicht (gut genug) kennen. Wenn Sie zum ersten Mal in ein Kasino gehen, oder Sie versuchen sich an... <a href="/spielautomaten-regeln-und-variationen.shtml" class="readFull">Zum Artikel</a></p>';
				mainBoxContent += '<p>Weitere <a href="/andere-artikel.shtml">Artikel</a> und <a href="/strategie-artikel.shtml">Slot-Strategien</a></p>';
				$('#mainBox').addClass('complex flow').find('.bd').html( mainBoxContent );

				// Right column
				// Free flash game - no download
				var flashOffer = '';
				flashOffer += '<div class="flash-game-offer">';
				flashOffer += '<a href="/slots.shtml" class="help"></a>';
				flashOffer += '<a href="/goto/888.com-casino.shtml" class="play"></a>';
				flashOffer += '</div>';
				$(flashOffer).appendTo('#flash-game-game');
				//$('<strong>Free Flash Slots</strong>').appendTo('#TB_ajaxWindowTitle');

				var $flashgame = ConvTest122.makeBox('flashgameBox');
				$('#sub').html( $flashgame.html() );
				$('#sub .mod').addClass('complex flow');
				$('#sub .hd h3').html('Free Flash Game - Kein Download');
				$('#flashgameBox .hd').append('<a href="#TB_inline?height=570&width=550&inlineId=flash-game-game-wrapper&modal=false" id="play-slots-for-free-triggerImage" class="thickbox"><img src="/css/60-conversion/conv-027/freeflashgame.jpg" alt="Blackjack Trainer" /></a>');

				var freeflashContent = '';
				freeflashContent += '<h5>Spielen Sie gratis Slots hier auf CasinoTop10</h5>';
				freeflashContent += '<p id="play-free-slots">Jetzt k&ouml;nnen Sie kostenlos hier auf CasinoTop10 spielen, keine Verpflichtungen, keine Downloads - nur Spa&szlig;!';
				freeflashContent += '<br /><a href="#TB_inline?height=570&width=550&inlineId=flash-game-game-wrapper&modal=false" id="play-slots-for-free-triggerLink" class="thickbox">Slotmaschinen kostenlos spielen</a></p>';
				$('#flashgameBox .bd').html( freeflashContent );

				$('#play-slots-for-free-triggerImage, #play-slots-for-free-triggerLink').click(function(){
					var s=s_gi(s_account);
					tempVal = s.prop1;
					s.prop1 = "Conversion: casinotop10-play-slots-trigger-conv122";
					ClickTracker.track_sc_mbox( s );
					s.prop1 = tempVal;
				});

				// Right column
				// All free slots games
				var $slotgames = ConvTest122.makeBox('slotgamesBox');
				$('#sub').append( $slotgames.html() );
				$('#sub #slotgamesBox').addClass('complex flow');
				$('#sub #slotgamesBox .hd h3').html('Alle kostenfreien Slots');

				var freeslotsContent = '';
				// Europa Casino
				freeslotsContent += '<h5>Registrieren Sie sich und spielen Sie alle Spiele gratis</h5>';
				freeslotsContent += '<p><a href="/goto/europa-casino.shtml"><img style="float:left;padding-right:10px;" width="164" src="http://www.casinotop10.net/assets/casino-rooms/europa-casino/slots.jpg" alt="Europa Casino" /></a>';
				freeslotsContent += '<a class="logo" href="/goto/europa-casino.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/europa-casino/toplist.png" alt="Europa Casino"/>';
				freeslotsContent += 'Europa Casino</a><br/>';
				freeslotsContent += 'Europa Casino - Erstellen Sie kostenlos Ihr Spielkonto.</p>'
				freeslotsContent += '<a class="play" href="/goto/europa-casino.shtml">Spielen Sie umsonst im Europa</a>';
				// Euro Grand
				freeslotsContent += '<p style="clear:left;margin:15px 0;"><a href="/goto/eurogrand-casino.shtml"><img style="float:left;padding-right:10px;" width="164" src="http://www.casinotop10.net/assets/casino-rooms/eurogrand-casino/slots.jpg" alt="EuroGrand Casino" /></a>';
				freeslotsContent += '<a class="logo" href="/goto/eurogrand-casino.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/eurogrand-casino/toplist.png" alt="EuroGrand Casino"/>';
				freeslotsContent += 'EuroGrand Casino</a><br/>';
				freeslotsContent += 'EuroGrand - Erstellen Sie kostenlos Ihr Spielkonto.</p>';
				freeslotsContent += '<a class="play" href="/goto/eurogrand-casino.shtml">Spielen Sie umsonst im EuroGrand</a>';
				// Casino Tropez
				freeslotsContent += '<p style="clear:left;margin:15px 0;"><a href="/goto/casino-tropez.shtml"><img style="float:left;padding-right:10px;" width="164" src="http://www.casinotop10.net/assets/casino-rooms/casino-tropez/slots.jpg" alt="Casino Tropez" /></a>';
				freeslotsContent += '<a class="logo" href="/goto/casino-tropez.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/casino-tropez/toplist.gif" alt="Casino Tropez"/>';
				freeslotsContent += 'Casino Tropez</a><br/>';
				freeslotsContent += 'Tropez - Erstellen Sie kostenlos Ihr Spielkonto.</p>';
				freeslotsContent += '<a class="play" href="/goto/casino-tropez.shtml">Spielen Sie umsonst im Tropez</a>';
				// 	21 Nova Casino
				freeslotsContent += '<p style="clear:left;margin:15px 0;"><a href="/goto/21-nova-casino.shtml"><img style="float:left;padding-right:10px;" width="164" src="http://www.casinotop10.net/assets/casino-rooms/21-nova/21-Novan-Slots.jpg" alt="21 Nova Casino" /></a>';
				freeslotsContent += '<a class="logo" href="/goto/21-nova-casino.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/21-nova/CT1021novatoplist.gif" alt="21 Nova Casino"/>';
				freeslotsContent += '21 Nova Casino</a><br/>';
				freeslotsContent += '21 Nova - Erstellen Sie kostenlos Ihr Spielkonto.</p>';
				freeslotsContent += '<a class="play" href="/goto/21-nova-casino.shtml">Spielen Sie umsonst im 21 Nova</a>';
				// Casino770
				freeslotsContent += '<p style="clear:left;margin:15px 0;"><a href="/goto/casino770.shtml"><img style="float:left;padding-right:10px;" width="164" src="http://www.casinotop10.net/assets/casino-rooms/casino770/slots.jpg" alt="Casino770" /></a>';
				freeslotsContent += '<a class="logo" href="/goto/casino770.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/casino770/toplist.gif" alt="Casino770"/>';
				freeslotsContent += 'Casino770</a><br/>';
				freeslotsContent += 'Casino770 - Play instantly  for free</p>';
				freeslotsContent += '<a class="play" href="/goto/casino770.shtml">Spielen Sie umsonst im Casino770</a>';
				// William Hill Casino
				freeslotsContent += '<p style="clear:left;margin:15px 0;"><a href="/goto/william-hill-casino.shtml"><img style="float:left;padding-right:10px;" width="164" src="http://www.casinotop10.net/assets/casino-rooms/william-hill-casino/slots.jpg" alt="William Hill Casino" /></a>';
				freeslotsContent += '<a class="logo" href="/goto/william-hill-casino.shtml"><img src="http://www.casinotop10.net/assets/casino-rooms/william-hill-casino/toplist.gif" alt="William Hill Casino"/>';
				freeslotsContent += 'William Hill Casino</a></p>';
				freeslotsContent += '<p>William Hill - Erstellen Sie kostenlos Ihr Spielkonto.<br/>';
				freeslotsContent += '<a class="play" href="/goto/william-hill-casino.shtml">Spielen Sie umsonst im William Hill</a>';
				freeslotsContent += '<p style="clear:left;"/>';
				$('#slotgamesBox').addClass('complex flow').find('.bd').html( freeslotsContent );
				$('#slotgamesBox .hd h3').addClass('section');

                $(".conv-027-b #slotgamesBox .play").css( { 'font-size' : '11px' } );

				$("#TB_closeWindowButton").click(function(ev){
					ev.preventDefault();
				});

			} // ************************************************* end free-slots.shtml

			break;

		case 'a': // Version A: Original

		default:
			break;
		}



	},

	makeBox: function ( id_name )
	{
		box = '';
		box += '<div id="' + id_name + '" class="mod"> ';
		box += '<b class="top"><b class="tl"></b><b class="tr"></b></b> ';
		box += '<div class="inner">';
		box += '<div class="hd">';
		box += '<h3></h3>';
		box += '</div>';
		box += '<div class="bd">';
		box += '</div>';
		box += '</div>';
		box += '<b class="bottom"><b class="bl"></b><b class="br"></b></b> ';
		box += '</div>';
	  	return $( '<div>' ).html( box );
	}

};
