/**
 * ruzne funkce, utf8 (ěščřžýáíéúů)
 */
$(document).ready(function(){
  init();
});

/**
 * Marks all  additional forms inactive on registrace.php, waiting for user input to utilize activating them by registrationFormChange()
 * 
 * @author: JiDo
 * @since - 2.7.2007
 */
// function hideAdditionalForms(){
// 	if($("#registrace").length) {
// 		document.getElementById("additionalMedia").className="inv";
// 		document.getElementById("additionalEfekt").className="inv";
// 		registrationFormChange();
//   }
// }

/**
 * Deactivates and activates forms depending on group of services user selected during registration on registrace.php
 * 
 * @author: JiDo
 * @since - 2.7.2007
 */
// function registrationFormChange(){
//     if (document.getElementById("efektChoice").checked)	{
//   		document.getElementById("additionalEfekt").className="additionalInfo";
//   		document.getElementById("additionalMedia").className="inv";
//     }
//     if (document.getElementById("mediaChoice").checked)	{
//   		document.getElementById("additionalMedia").className="additionalInfo";
//   		document.getElementById("additionalEfekt").className="inv";
//     }
// }

/**
 * Returns false if user didn't choose anything on registrace.php and alerts him to choose something
 * 
 * @author: JiDo
 * @since - 2.7.2007
 */
// function isAnyChecked() {
//   if(document.getElementById("efektChoice").checked) {
// 		var	inputs = document.getElementById("additionalEfekt").getElementsByTagName("input");
// 		for(var i=0;i<inputs.length;i++) {
// 				if(inputs[i].checked) {
// 				  inputs[i].style.borderColor = "red";
// 					return true;
// 				}
// 		}
// 	}
//   if(document.getElementById("mediaChoice").checked) {
// 		var	inputs = document.getElementById("additionalMedia").getElementsByTagName("input");
// 		for (var i=0;i<inputs.length;i++) {
// 				if(inputs[i].checked) {
// 						return true;
// 				}
// 		}
// 	}
//   alert('Zvolte o jaký typ služeb máte zájem, zvolte prosím alespoň jednu z možností.');
//   return false;
// }

// inicializace
var init = function() {
  $('li.hidable').addClass('hidden').find('h4').click(function() {
    $(this).parent().toggleClass('hidden');
  }).append('<span class="show">Zobrazit</span><span class="hide">Skrýt</span>');
  // hideAdditionalForms();
}

