diff --git a/theme/templates/partials/search.html.nunj b/theme/templates/partials/search.html.nunj index 47b68e7498bf4239026593852c4884ffa54ef790..e8a08208b5540401e0c1680d3380c84f1bc017c3 100644 --- a/theme/templates/partials/search.html.nunj +++ b/theme/templates/partials/search.html.nunj @@ -31,18 +31,25 @@ }; }; + var csc; + var myCallback = function() { var doRender = function() { - var csc = new google.search.CustomSearchControl; - .setLinkTarget (google.search.Search.LINK_TARGET_SELF); - google.search.cse.element.render({ - div: "searchresults", - tag: 'searchresults-only', - gname: 'searchresults' - }); + var options = {}; + options[google.search.Search.RESTRICT_EXTENDED_ARGS] = { + 'as_sitesearch': 'nove.ok1kvk.cz' + }; + + csc = new google.search.CustomSearchControl('003089460452505374651:q5prtsadbio', options); + csc.setLinkTarget (google.search.Search.LINK_TARGET_SELF); + + var drawOptions = new google.search.DrawOptions(); + drawOptions.enableSearchResultsOnly(); + csc.draw("searchresults", drawOptions); + var s = $("#searchbox input").val() if(s != "") - google.search.cse.element.getElement('searchresults').execute(s); + csc.execute(s); } if (document.readyState == 'complete') { doRender(); @@ -74,7 +81,7 @@ $("#searchresults").html(""); myCallback(); } else - google.search.cse.element.getElement('searchresults').execute(s); + csc.execute(s); },250)); (function() {