//
// INPUT NAVIGATIE LOADER
//
function navigatie_loader(Provincie,LoadTime)
{
if (LoadTime != 0)
{
$('#navigatie-loader').html('
Bezig met het laden van
Provincie '+ Provincie +'

');
$('#navigatie-loader').load('/navigatie.gemeente.php?provincie='+ Provincie +'&LoadTime=1');
}
else
{
$('#navigatie-loader').load('/navigatie.gemeente.php?provincie='+ Provincie +'&LoadTime=0');
}
}
//
// INPUT AUTOCOMPLETE
//
$().ready(function()
{
function log(event, data, formatted)
{
$("").html( !data ? "No match!" : "Selected: " + data[0] + "/" + data[1]).appendTo("#result");
}
function formatItem(row)
{
return row[0] + "
" + row[1] + "";
}
function formatResult(row)
{
return row[0].replace(/(<.+?>)/gi, '');
}
$("#list-gemeente").autocomplete("/search.autocomplete.php",
{
width: 150,
multiple: false,
matchContains: true,
formatItem: formatItem,
formatResult: formatResult
});
$("#list-gemeente").result(function(event, data, formatted)
{
if (data)$(this).parent().next().find("input").val(data[1]);
});
$(":text, textarea").result(log).next().click(function() {
$(this).prev().search();
});
});
//
// POP BOX
//
$().ready(function()
{
$("#pop_box").hide();
$('#preferences').click(function()
{
$("#pop_box").show();
});
$('#close').click(function()
{
$("#pop_box").hide();
});
});