
$(document).ready(function() {
	var add_p = $('<p align="right" class="continue" id="createcommentlink"><span style="color: #cc0000; cursor: pointer;">Jetzt einen Kommentar erstellen...</span></p>');
	$("dd[class^='continue_to_']").append(add_p);
	$("dd[class^='continue_to_']").children('.continue').click(function() {
		var parent = $(this).parent().get(0);
		var box = $(parent).attr('class').substr(12);
		$(this).hide();
		$('#box_'+box).show("slow");
	});;
	
	
	var add_p = $('<p align="right" class="closer"><span style="color: #cc0000; cursor: pointer;">Hinweis schlie&szlig;en...</span></p>');
	$("dd.closebox").append(add_p);
	$("dd.closebox").children('.closer').click(function() {
		var parent = $(this).parent().get(0);
		var parent2 = $(parent).parent().get(0);
		$(parent2).hide("slow");
	});;
	
	
	
	$(".votelinkimg").mouseover(function() {
		var position = $(this).attr('id').substr(11,1);
		var type = $(this).attr('id').substr(12);
		for (var i = 1; i <= 5; i++) {
			if (i <= position) {
				$('#votelinkimg'+i+type).children("img").eq(0).attr("src","../images/cigstar_on.gif");
			} else {
				$('#votelinkimg'+i+type).children("img").eq(0).attr("src","../images/cigstar_off.gif");
			}
		}
	});
	
	$(".votelinkbox").bind("mouseleave",function(){
		var type = $(this).attr('id').substr(11);
      	for (var i = 1; i <= 5; i++) {
      		var chimg = $('#votelinkimg'+i+type).children("img").eq(0);
      		if ($(chimg).attr('alt')=="X") {
      			$(chimg).attr("src","../images/cigstar_on.gif");
      		} else {
      			$(chimg).attr("src","../images/cigstar_off.gif");
      		}
      	}
    });
    
    $('.goto_comment').click(function() { $('#box_createcomment').show(); $('#createcommentlink').hide(); });
});




