//Force Cognex favicon to be included in output.
$(document).ready(function(){
$('head').append ('<link rel="shortcut icon" href="Content/Global_Images/favicon.ico" type="image/x-icon" />');
});

//Switch the toolbar group from float left to float right when no other buttons are used.
$(document).ready(function(){ 
$(".button-group-container-left").attr('class', 'button-group-container-right');
});

window.onload = function () {
//Clear the search field when ESCAPE is pressed.
$("#search-field").keyup(function (e) {
if (e.keyCode == 27) { $("#search-field").val(""); }
});
}

$(document).ready(function () {
/* check if link is visible (:visible) and exists (has a length value) */
if (($('.MCWebHelpFramesetLink:visible').length))
{
/* reload using href attribute of link inside .MCWebHelpFramesetLink */
window.top.location = $('.MCWebHelpFramesetLink>a').attr('href');
}
});