function next_question(q_id)
	{
		var next = parseInt(q_id)+1;
		if(next==12) next=1;
		$('ul.questions #q'+q_id).slideDown().delay(4000).slideUp(20,function(){next_question(next)});
	}
	
$(function(){
    $('#f11 input').click(function(){
        if($('#opt_163_2').attr('checked')) $('.ic_164').show();
        else $('.ic_164').hide();
        
        if($('#opt_165_3').attr('checked')) $('.ic_166').show();
        else $('.ic_166').hide();
    });
    $('#f15 input').click(function(){
        if($('#opt_179_2').attr('checked')) $('.ic_180').show();
        else $('.ic_180').hide();
    });
    
    
    $('#f17 input').click(function(){
      var sel = $('#f17 input:checked').length;
      $('#f17_count').html(sel);
    });
    
    $('#f18 input').click(function(){
      var sel = $('#f18 input:checked').length;
      $('#f18_count').html(sel);
    });
    
    $('#f19 input').click(function(){
      var sel = $('#f19 input:checked').length;
      $('#f19_count').html(sel);
    });
    
  $('.linkbox_2 ul').jcarousel({vertical: true, scroll: 2, wrap: 'last'});
	
	$('ul.questions #q1').slideDown().delay(4000).slideUp(20,function(){next_question(2)});
	
	$('#tagcloud li').hover(
		function(){
			var currentFontSize = $(this).css('font-size');
    		var currentFontSizeNum = parseFloat(currentFontSize, 10);
    		var newFontSize = currentFontSizeNum*1.2;
			$(this).animate({fontSize: newFontSize});
		},
		function(){
			var currentFontSize = $(this).css('font-size');
    		var currentFontSizeNum = parseFloat(currentFontSize, 10);
    		var newFontSize = currentFontSizeNum*0.9;
			$(this).animate({fontSize: newFontSize});
			}
		);

	$("#com_tl_content_212").hide();
	$(".write-comment").click(function(){$("#com_tl_content_212").dialog({
				title: 'Kommentar schreiben',
				modal: true,
				width: 550
				})
			});
	$("#rueckruf-dialog").click(function(){$("#rueckruf-form").dialog({
				title: 'Rückruf anfordern',
				modal: true,
				width: 550
				})
			});
	$.datepicker.setDefaults($.datepicker.regional['']);
  $('#ctrl_61').datepicker($.datepicker.regional['de']);

	$(".image a").lightBox({
	overlayOpacity: 0.6,
	imageLoading: 'http://ichselbstag.de/tl_files/isag_2010/js/jquery-lightbox-0.5/images/lightbox-ico-loading.gif',
	imageBtnClose: 'http://ichselbstag.de/tl_files/isag_2010/js/jquery-lightbox-0.5/images/lightbox-btn-close.gif',
	imageBtnPrev: 'http://ichselbstag.de/tl_files/isag_2010/js/jquery-lightbox-0.5/images/lightbox-btn-prev.gif',
	imageBtnNext: 'http://ichselbstag.de/tl_files/isag_2010/js/jquery-lightbox-0.5/images/lightbox-btn-next.gif',
	containerResizeSpeed: 350,
	txtImage: 'Bild',
	txtOf: 'von'
  });
    
});
