function createCheckFeedLink(){$("#feed").after(' <div id="checkfeed"></div>').after(' <a href="#" id="checkfeedlink" onclick="checkFeed(); return false;">Zkontroluj feed</a>');}function toggleInfoAndNote(a){$("#info-"+a).toggle();$("#note-"+a).toggle();}function checkFeed(a){$("#checkfeed").html("");$("#checkfeed").removeClass("error");if(0==$("#feed").val().length){$("#checkfeed").attr("class","error").append("<p>Toto pole nesmí být prázdné</p>");return;}$("#checkfeed").append('<p id="loading"><img src="'+staticDomain+'/img/indicator.gif" /> Kontroluji feed. Doba kontroly závisí na velikosti feedu.</p>');$("#checkfeedlink").hide();$.getJSON("/ajax/feed-check?u="+$("#feed").val(),function(b){$("#loading").remove();$("#checkfeedlink").show();if("undefined"!=typeof(b[0])){$("#checkfeed").attr("class","ok").append("<p>"+b[0]+"</p>");}else{$("#checkfeed").addClass("error");$.each(b,function(c,e){$("#checkfeed").append("<p>"+e+' <sup> <a href="/validator#help-'+c+'">?</a></sup></p>');});}});return false;}function getCompanies(a){var b=$(".mediatelCompanies");$.getJSON("/firmy-json?q="+a,function(f){if(f.result==true){b.append("<h2>Hledání ve firmách</h2>");$(f.companies).each(function(g,h){d=$('<div class="company" id="'+h.id+'">');d.append('<h3><a href="'+h.link+'">'+h.title+"</a></h3>");d.append("<address>"+h.address+"</address>");if(h.web){d.append('<a href="'+h.web+'" class="web">'+h.web+"</a>");}d.append("</div>");b.append(d);});if(f.categories){var e=$('<ul id="categories-firmy">');$(f.categories).each(function(g,h){e.append('<li><a href="'+h.link+'">'+h.name+"</a> ("+h.count+")</li>");});b.append(e);}listingInfo=f.listingInfo;var c=s.t();if(c){document.write(c);}$(document).ready(function(){$(".mediatelCompanies .web").click(function(){return omnitureListing(this,$(this).parents(".company").attr("id"),"click website");});});}});}
