/* Loading jQuery and CSS dynamically comes straight from Alex Marandon http://alexmarandon.com/articles/web_widget_jquery/
Other useful articles in addition to the one above for JSONP requests: http://1080d.com/lang/en-us/2009/10/converting-php-to-jsonp- with-json_encode/, though note first comment and http://remysharp.com/2007/10/08/what-is-jsonp/
ncpedia functionality by Dean Farrell 11-9-10 State Library of North Carolina */
(function(){function d(){b=window.jQuery.noConflict(true);e()}function e(){b(document).ready(function(a){var g=a("<link>",{rel:"stylesheet",type:"text/css",href:"http://ncpedia.org/widgets/ncpedia_widget_style.css"}),h=a("<img>",{src:"http://ncpedia.org/widgets/ncpedia.png",alt:"NCpedia logo"}),i=a("<p><strong>Search NCpedia.org</strong><br />An online encyclopedia</p>"),j=a("<form></form>",{id:"search-form",action:"http://ncpedia.org/search/node",method:"post",target:"_blank"}),k=a("<input>",{type:"text",name:"keys",id:"edit-keys",val:""}),l=a("<input>",{type:"hidden",value:"",id:"",name:"form_build_id"}),m=a("<input>",{type:"hidden",value:"search_form",id:"edit-search-form",name:"form_id"}),n=a("<input>",{type:"submit",name:"op",id:"edit-submit",value:"Search"});g.appendTo("head");a("#NCpediaSearchDiv").append(h,i,j);a("#search-form").append(k,
l,m,n);});b("input[name=form_build_id]");b.getJSON("http://ncpedia.org/widgets/hidden_field_num_gen.php?callback=?",function(a){b("input[name=form_build_id]").val("form-"+a[0]).attr("id","form-"+a[0])})}var b;if(window.jQuery===undefined||window.jQuery.fn.jquery!=="1.4.4"){var c=document.createElement("script");c.setAttribute("type","text/javascript");c.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js");c.onload=d;c.onreadystatechange=
function(){if(this.readyState=="complete"||this.readyState=="loaded")d()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(c)}else{b=window.jQuery;e()}})();
