$(document).ready(function() {

	// ########################################################
	$("a.send").live('click', function() {
		if($('#allow').attr('checked') == 'checked') {
			$("#checked").css('color', 'black');
			$(this).attr("href", "mailto:info@harzer-woelfe.de");
		} else {
			$("#checked").css('color', 'red');
			$(this).attr("href", "#null");
		}
	});

	// $(".allow").
	
	// ########################################################
	// FANFOTO
	var bild	= $("div.fanfoto .csc-textpic-image dt").html();						// Bild laden
	var cap		= $("div.fanfoto .csc-textpic-caption").html();
	cap = cap.replace("Diesmal von:", "");

	var getContentShot	=	'<div class="getShot">';
	getContentShot		+=		'<div class="content">';
	getContentShot		+=			'<div class="image">'+bild+'</div>';
	getContentShot		+=			'<div class="anmelden">';
	getContentShot		+=				'<i>W&ouml;lfe-Shot von '+cap+'</i>';
	getContentShot		+=				'<h3>Du hast auch einen starken W&ouml;lfe-Shot?</h3>';
	getContentShot		+=				'<p><b>Dann schicke ihn der Jury.</b></p>';
	getContentShot		+=				'<p id="checked">Hiermit best&auml;tige ich, dass ich &uuml;ber alle notwendigen Rechte an dem Foto '
	getContentShot		+=				'verf&uuml;ge und die Harzer W&ouml;lfe mein Foto ver&ouml;ffentlichen d&uuml;rfen:';
	getContentShot		+=				'<input type="checkbox" id="allow" value="1" /></p>';
	getContentShot		+=				'<p><a href="#null" class="send">Jetzt W&ouml;lfe-Shot vorschlagen</a></p>';
	getContentShot		+=			'</div>';
	getContentShot		+=			'<div class="clear"></div>';
	getContentShot		+=			'<a href="#null" class="close"></a>';
	getContentShot		+=		'</div>';
	getContentShot		+=	'</div>';

	// $('body#uid2').append('<div class="getShot"><div class="content"><div class="image">'+bild+'</div><div class="anmelden"><i>W&ouml;lfe-Shot von '+cap+'</i><h3>Teilnehmen</h3></div><div class="clear"></div><a href="#null" class="close"></a></div></div>');							
	
	$('body#uid2').append(getContentShot);
	$('div.fanfoto').append('<a href="#" class="shot">Jetzt auch teilnehmen</a>');	// Teilnahme-LINK hinzufügen

	// ########################################################

	$("div.fanfoto *").click(function() {
		$('div.getShot').fadeIn("slow");
	});

	$("a.close").click(function() {
		$('div.getShot').fadeOut("slow");
	});


});
