function init_autocomplete(http_path){
    $("#global_keyword").autocomplete(http_path+"/search/complete_keyword/keyword", {
    	 selectFirst: false,
         minChars:1,
         cacheLength:1,
         maxItemsToShow:10,
         formatItem: function(row, i, max, value) {
        	 var html = "<div><img src="+row[3]+" width='25' height='25' class='autocomplete_img' /><p>"+value+" - "+row[1]+"</p></div>";
             return html;
         }
	}).result(function(event, item) {
        $("#global_keyword").val(item[0]);
		$("#get_platform").val(item[1]);
		$('form[name=global_search_form]').submit();
 	   //location.href = item[2];
	});
}

function count_click(http_path,ref_banner,banner_url){
	$.post(http_path+"/banner_statistics/"+ref_banner, function(data){
		$(location).attr('href',banner_url);
	}, "text");
}

function init_nyro_modal(){
	$(function() {
		$('.nyroModal').nyroModal();
	});
}
