function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
}
});
    group.height(tallest);
}

function stretch_portal_content() {
	if( $(window).height() > $('body').height() ) {
		$( '#strona' ).height(
		$(window).height() - ( $('body').height() - $('#strona').height() )
		);}
 }



function initMenu(sel) {
  $(sel +' ul ul').hide();
   $(sel +' a.selected').parents('#menu ul').show('slow',function () {

 	$('#menu a.selected').parent('#menu li').children('ul').show('slow');
  // $(sel +' li:has(ul)').children('a').removeAttr('href');
   });
  $(sel +' li a').click(
    function() {
        $(this).next().slideToggle('normal');
		
		
      }
    );
  }



 $(document).ready(function(){
  	
	
	initMenu('#menu');
	//stretch_portal_content();
	//$(window).resize( stretch_portal_content );
	equalHeight($(".eqkol"));
   $("#tabMaraton tr:even").addClass("even");

$("#tabMaraton tr td").parent().hover(
   function()
   {
    $(this).addClass("highlight");
   },
   function()
   {
    $(this).removeClass("highlight");
   }
  )
   
	$('#form-maraton').append('<iframe style="border:1px solid #000000" frameborder="0" id="commentiframe" />');
	$('#commentiframe').attr('src', '/form-maraton/form.php');
	$('#commentiframe').attr('width', '100%');
	$('#commentiframe').attr('height', '900px');
	$('#commentiframe').css('border', 'none');
	$('#commentiframe').attr('frameborder', '0');
	$('#commentiframe').attr('border', '0');
    $('#main a.lightbox').lightBox();
	$('#bottom a.lightbox').lightBox();
	$('#right a.lightbox').lightBox();
 
 
 
 
 });

