  $(function() {
    //Fancy Box gallery
	$("p#thumbs a").fancybox();
	//Accordion
	$("#accordion").accordion({ header: "div.title1", active: false,  alwaysOpen: false });
  });

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	function submitFrm(frm){
	   $('form#'+frm).submit();
	}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	function clearInput(id,value){
	   if($('input#'+id).val()==value){$('input#'+id).val('');}
	}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    function hideDiv(id){	  $("div#"+id).hide();}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    function showDiv(id){	  $("div#"+id).show();	}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    function switchLanguage(langid){
	  //ajax script to set new session language
	  $.get("language_switcher.php", {id:langid});
	  //reload page
	  location.reload(); 
	}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	function change2PassType(id, divid){
	   if($('input#'+id).attr('type')=='text'){
	      $('div#'+divid).html('<input type="password" name="'+id+'" id="'+id+'" value=""/>');
		  $('input#'+id).focus();
	   }
	}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

