var selectBox = function() {
	if ($('player_select_box')) {
		$('player_submit').setStyle('display', 'none');
		$('player_select_form').addEvent('submit', function(e) { e.stop(); });
		$('js_player_select').addEvent('change', function() { window.location.href = '/player/' + $('js_player_select').get('value') + '/'; });
	}
}

window.addEvent('domready', function() {

	selectBox();

	if ($('js_map')) {

		var WitchBiog1 = new Tips($$('.wb1'), {
			className: 'witch witchBiog1'
		});
		$('WitchBiog1').store('tip:title', 'The One Thing Witch');
		$('WitchBiog1').store('tip:text', 'Pssst... Pssst... You... Yes you... Did you remember to lock the door when you left the house? You did? Are you sure... are you really sure? Or is that the One Thing Witch you forgot to do?');


		var WitchBiog2 = new Tips($$('.wb2'), {
			className: 'witch witchBiog2'
		});
		$('WitchBiog2').store('tip:title', 'The Shrunk Washing Witch');
		$('WitchBiog2').store('tip:text', 'Whenever you see a tornado on the news, that\'s her Spin Cycle.');

		var WitchBiog3 = new Tips($$('.wb3'), {
			className: 'witch witchBiog3'
		});
		$('WitchBiog3').store('tip:title', 'The Last Parking Space Witch');
		$('WitchBiog3').store('tip:text', 'Ever wondered how come there is always another car just a bit nearer the last parking space than you?');

		var WitchBiog4 = new Tips($$('.wb4'), {
			className: 'witch witchBiog4'
		});
		$('WitchBiog4').store('tip:title', 'The Giant Flip Flops Witch');
		$('WitchBiog4').store('tip:text', 'When you hear the horrible slapping sound of her enormous beach footwear coming closer like two wet haddocks having a hopping competition... RUUUUUUUUNNNNN!!');

		var WitchBiog5 = new Tips($$('.wb5'), {
			className: 'witch witchBiog5'
		});
		$('WitchBiog5').store('tip:title', 'The Burnt Tongue Witch');
		$('WitchBiog5').store('tip:text', 'You can blow on your food to ward off the Burnt Tongue Witch as often as you want, but you\'ll forget sooner or later, then she strikes.');

		var PlaceDetail1 = new Tips($$('.pd1'), {
			className: 'treeDetail'
		});
		$('PlaceDetail1').store('tip:title', 'Well of Emo Tears');
		$('PlaceDetail1').store('tip:text', '<strong>If you drink from the Well of Emo Tears you will be sad for ever even when it\'s sunny.</strong>');

		var PlaceDetail2 = new Tips($$('.pd2'), {
			className: 'place placeDetail2'
		});
		$('PlaceDetail2').store('tip:title', 'Graveyard of Milk Bottles');
		$('PlaceDetail2').store('tip:text', 'Ever wondered where all the milk bottles have gone now we buy all our milk in cartons?<span>&nbsp;</span>');

		var PlaceDetail3 = new Tips($$('.pd3'), {
			className: 'treeDetail'
		});
		$('PlaceDetail3').store('tip:title', 'Laughing Drain');
		$('PlaceDetail3').store('tip:text', '<strong>The Laughing Drain will always laugh at your jokes.</strong>');

		var PlaceDetail4 = new Tips($$('.pd4'), {
			className: 'place placeDetail4'
		});
		$('PlaceDetail4').store('tip:title', 'Down the Back of the Settee Mines');
		$('PlaceDetail4').store('tip:text', 'There is always treasure to be found in the Down the Back of the Settee Mines.<span>&nbsp;</span>');

		var PlaceDetail5 = new Tips($$('.pd5'), {
			className: 'treeDetail'
		});
		$('PlaceDetail5').store('tip:title', 'Wise Sheep');
		$('PlaceDetail5').store('tip:text', '<strong>All sheep follow the teachings of the Wise Sheep.</strong>');

		var PlaceDetail6 = new Tips($$('.pd6'), {
			className: 'place placeDetail6'
		});
		$('PlaceDetail6').store('tip:title', 'The Museum of Lost Things');
		$('PlaceDetail6').store('tip:text', 'No one is allowed in, because then you would find all the things you have lost and there would be nothing left in the museum.<span>&nbsp;</span>');

		var PlaceDetail7 = new Tips($$('.pd7'), {
			className: 'place placeDetail7'
		});
		$('PlaceDetail7').store('tip:title', 'The Hall of Witches');
		$('PlaceDetail7').store('tip:text', 'Where the witches go to brew potions, feast on buttered hedgehogs with puddle water and play darts.');

		var PlaceDetail8 = new Tips($$('.pd8'), {
			className: 'place placeDetail8'
		});
		$('PlaceDetail8').store('tip:title', 'Ancient Slide of Sprites');
		$('PlaceDetail8').store('tip:text', 'Made shiny by the sliding bums of all the Sprites who ever lived. This is where the sprites gather to make important decisions.<span>&nbsp;</span>');

		var PlaceDetail9 = new Tips($$('.pd9'), {
			className: 'place placeDetail9'
		});
		$('PlaceDetail9').store('tip:title', 'Hen\'s Teeth Beach');
		$('PlaceDetail9').store('tip:text', 'Luxury holiday hideaway for A list witches. Big Flip Flops Witch is often snapped here for Helloowoowoo magazine.<span>&nbsp;</span>');

		var TreeDetail1 = new Tips($$('.td1'), {
			className: 'treeDetail'
		});
		$('TreeDetail1').store('tip:title', 'The Arriving Tree');
		$('TreeDetail1').store('tip:text', 'Click to view full details');

		var TreeDetail2 = new Tips($$('.td2'), {
			className: 'treeDetail'
		});
		$('TreeDetail2').store('tip:title', 'The Tree of Amazing Facts');
		$('TreeDetail2').store('tip:text', 'Click to view full details');

		var TreeDetail3 = new Tips($$('.td3'), {
			className: 'treeDetail'
		});
		$('TreeDetail3').store('tip:title', 'The Climbing Tree');
		$('TreeDetail3').store('tip:text', 'Click to view full details');

		var TreeDetail4 = new Tips($$('.td4'), {
			className: 'treeDetail'
		});
		$('TreeDetail4').store('tip:title', 'The How To Tree');
		$('TreeDetail4').store('tip:text', 'Click to view full details');

		var TreeDetail5 = new Tips($$('.td5'), {
			className: 'treeDetail'
		});
		$('TreeDetail5').store('tip:title', 'The Ghost Tree');
		$('TreeDetail5').store('tip:text', 'Click to view full details');
	}
});