
$(document).ready(function(){$("form#vcp_form input:checkbox.checkbox_all").click(function(){var parent_div=$(this).parents("div.vpc_chckboxs_box")[0];$("input:checkbox:not(.checkbox_all)",parent_div).each(function(){$(this).removeAttr('checked');});});$("form#vcp_form input:checkbox:not(.checkbox_all)").click(function(){var parent_div=$(this).parents("div.vpc_chckboxs_box")[0];$("input:checkbox.checkbox_all",parent_div).removeAttr('checked');});$("form#vcp_form div.tooltip").bt({fill:'#E0E38C',overlap:50});$("button#vcp_print_selected_btn").live('click',function(){var hidden_rows=0;$('table#vcp_result input[name="print[]"]').each(function(){if(!$(this).attr('checked')){$(this).closest('tr').addClass('invisible');hidden_rows++;}});$('table#vcp_result tr.invisible').hide();if(hidden_rows){$('table#vcp_result tr[class!="invisible"]').removeClass('sudy');$('table#vcp_result tr[class!="invisible"]:even').addClass('sudy');}window.print();return false;});$("form#vsp_form input:checkbox.checkbox_all").click(function(){var parent_div=$(this).parents("div.vps_chckboxs_box")[0];$("input:checkbox:not(.checkbox_all)",parent_div).each(function(){$(this).removeAttr('checked');});});$("form#vsp_form input:checkbox:not(.checkbox_all)").click(function(){var parent_div=$(this).parents("div.vps_chckboxs_box")[0];$("input:checkbox.checkbox_all",parent_div).removeAttr('checked');});$("button#vsp_print_selected_btn").live('click',function(){var hidden_rows=0;$('table#vsp_result input[name="print[]"]').each(function(){if(!$(this).attr('checked')){$(this).closest('tr').addClass('invisible');hidden_rows++;}});$('table#vsp_result tr.invisible').hide();if(hidden_rows){$('table#vsp_result tr[class!="invisible"]').removeClass('sudy');$('table#vsp_result tr[class!="invisible"]:even').addClass('sudy');}window.print();return false;});$("a.cv_add_lang").live('click',function(){var select_p_obj=$("div#cv_jazyky p.jazyk:last");var cloned_p_obj=select_p_obj.clone();var select_j_obj=select_p_obj.children("select[name='jazyk_id[]']");var selected_j_opt_val=select_j_obj.children('option:selected').val();if(selected_j_opt_val!='0'){cloned_p_obj.children("select[name='jazyk_id[]']").children("option[value='"+selected_j_opt_val+"']").remove();}cloned_p_obj.children("select[name='ju_id[]']").children("option[value='0']").attr('selected',true);select_p_obj.children("a.cv_add_lang").remove();cloned_p_obj.insertAfter("div#cv_jazyky p.jazyk:last");return false;});if(!$("#budeme_vas_informovat_form input:radio[name='zakaznik_spp'][value='ano']:checked").length){$('#zakaznik_spp_cisla').css('display','none');}$("#budeme_vas_informovat_form input:radio[name='zakaznik_spp']").click(function(){if($(this).val()=='ano'){$('#zakaznik_spp_cisla').show();}else{$('#zakaznik_spp_cisla').hide();}});});function kalk_zp_refresh(){var typ_odberatela=$(":radio[name='typ_odberatela']:checked").val();var obec_id=$("#kalk_zp_obec").val();var spotreba=$("#kalk_zp_spotreba").val();var qs='ajax=ajax&form_sent=1';qs+='&typ_odberatela='+encodeURIComponent(typ_odberatela);qs+='&obec_id='+encodeURIComponent(obec_id);qs+='&spotreba='+encodeURIComponent(spotreba);$.getJSON('/includes/kalkulacka-zalohovych-plateb.inc.php?'+qs,function(data){$("#kalk_zp_doporuceny_tarif").val(data.typ_odberatela+data.tarif);$("#kalk_zp_opc").val(data.opc);$("#kalk_zp_mep").val(data.mep);$("#kalk_zp_result_container").html(data.html);});return false;}function vyber_certifikovaneho_partnera(){var segment=$(":radio[name='segment']:checked").val();var qs='ajax=ajax&form_sent=1';$(":checkbox[name='segmenty[]']:checked").each(function(){qs+='&segmenty[]='+encodeURIComponent($(this).val());});$("input[name='okresy[]']:checked").each(function(){qs+='&okresy[]='+encodeURIComponent($(this).val());});$("input[name='spotrebice[]']:checked").each(function(){qs+='&spotrebice[]='+encodeURIComponent($(this).val());});$("input[name='cinnosti_zakladni[]']:checked").each(function(){qs+='&cinnosti_zakladni[]='+encodeURIComponent($(this).val());});$("input[name='cinnosti[]']:checked").each(function(){qs+='&cinnosti[]='+encodeURIComponent($(this).val());});$.getJSON('/includes/vyber-certifikovaneho-partnera.inc.php?'+qs,function(data){$("#vcp_result_container").html(data.html);});return false;}function vyber_servisneho_partnera(){var qs='ajax=ajax&form_sent=1';$("input[name='okresy[]']:checked").each(function(){qs+='&okresy[]='+encodeURIComponent($(this).val());});$("input[name='spotrebice_kat[]']:checked").each(function(){qs+='&spotrebice_kat[]='+encodeURIComponent($(this).val());});$("input[name='spotrebice[]']:checked").each(function(){qs+='&spotrebice[]='+encodeURIComponent($(this).val());});$.getJSON('/includes/vyber-servisneho-partnera.inc.php?'+qs,function(data){$("#vsp_result_container").html(data.html);});return false;}
