';
$(document).ready(function() {
moveSearchBar();
});
}
$(document).ready(function() {
$(window).resize(function(){
moveSearchBar();
});
});
function moveSearchBar(){
$('.yui-skin-sam').remove();
$('.search-button').remove();
if($(window).width() >= 1025){
$('.search-box-width').append(getSearchBar);
}else{
$('.search-form-container-for-sm').append(getMobileSearchBar);
$('#q').focus().select();
}
var SAYTaccount = $("#SAYTaccount").val();
var acaccount = $("#ACAccount").val();
/* $('body').on('click', 'li.extra-aac', function(){
$('.tags').val($(this).data('label'));
});
$('body').on('keyup', '.tags', function(e){
console.log("I am clearing the cache");
$('.stringAC').hide();
$('.stringAC').empty();
});
$('.btn.search-position.globalsearch').click(function(){
searchVal= $('.tags').val();
event.preventDefault();
alert($("#globalsearchpath").val()+ '.html?searchrequested=' +finalVal);
window.location.href = $("#globalsearchpath").val()+ '.html?searchrequested=' +searchVal;
});
$("[name='searchrequested']").on('keydown',function(event){
searchVal= $('.tags').val();
if(event.which == 13){//Enter key pressed
//event.preventDefault();
window.location.href = $("#globalsearchpath").val()+ '.html?searchrequested=' +searchVal;
}
});
$( ".tags" ).autocomplete({
minLength: 1,
source: function(request, response) {
$.ajax({
url: $("#curentNode").val() + ".globalsearch.html",
data: { q: $(".tags").val()},
dataType: "json",
type: "POST",
dataFilter: function(data) { return data; },
success: function( data ) {
$('.stringAC').hide();
$('.stringAC').empty();
var suggestions = data.value;
for (var i = 0; i < suggestions.length;i++){
var item = suggestions[i];
var $li = $('
Please ensure Javascript is enabled for purposes of website accessibility