$().ready(function(){

	$('#list1a').accordion({
		autoheight: false
	});
		
	$("#commentForm").validate();
	
	//$('#commentForm').ajaxForm(); 
	
	$('#commentForm').submit(function(){
		if ($('#commentForm').valid())
		{
			$('#message')
				.css('display', 'block');
			$(this).ajaxSubmit(); 	
			$('#message')
				.fadeIn('slow')
				.animate({opacity: 1.0}, 6000)
				.fadeOut('slow');
		}
		return false;
	});
	
	$("#ccomment").click(function(){
			$("#ccomment")
				.css('height', '250px');
	});
	
if($('select[name="pl"]').val()==8)$('#ratybox').css('display', 'none');
	
    $('select[name="pl"]').change(function () {
      var value = $(this).val();
        if(value==8)
			$('#ratybox').css('display', 'none');
		  else
		  	$('#ratybox').css('display', 'inline');	
    });


});

 function openSimulator(url)
  {		
    window.open('blank.html','newwin','');
  }

	
function validate_Lukas() {	
if (document.wnioseklukas.zgoda1.checked==false){alert ("Przed wypełnieniem wniosku o kredyt ratalny LUKAS Banku zapoznaj się z Warunkami udzielania kredytu ratalnego LUKAS Banku.");return false;} 
else 
{return true;}
}
