$(function() { var options = { serviceUrl:'/xml/search.php?lang=', dataType : 'json', onSelect : function(s) { window.location.href=s.link; } }; $('#search').autocomplete(options); $('#site_submit').click( function(){newSite()} ); var eucookie=getCookie("eu"); if( eucookie == null || eucookie == '' ) { d = document.createElement('div'); d.id = "cookie-info"; var $el = $(d).append( $('AccountKiller.com uses cookies. More infoclose') ); $('body').append($el); $('#cookie-info-close').click(function(){ setCookie('eu',1,3650); $('#cookie-info').remove(); }); } }); var addthis_config = { services_exclude : 'print,twitter', data_use_cookies:false, data_use_flash:false } function getCookie(c_name) { var c_value = document.cookie; var c_start = c_value.indexOf(" " + c_name + "="); if (c_start == -1) { c_start = c_value.indexOf(c_name + "="); } if (c_start == -1) { c_value = null; } else { c_start = c_value.indexOf("=", c_start) + 1; var c_end = c_value.indexOf(";", c_start); if (c_end == -1) { c_end = c_value.length; } c_value = unescape(c_value.substring(c_start,c_end)); } return c_value; } function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value; }