Your code has some errors
first your search selector must be an ID or Class then it should be "#search" or ".search"
second variables in javascript do not have $ then the code should stay like this
var w = $(window);
w.on("scroll", function(){
if( w.scrollTop() > 100 ) {
$('.busca').css("position", "fixed");
}
else{
$('.busca').css("position", "static");
}
});
EDIT
Maybe it works better by setting top: 0 z-index one level above the rest
var w = $(window);
w.on("scroll", function(){
if( w.scrollTop() > 100 ) {
$('.busca').css({"position":"fixed", "top":"0px","z-index":"1"});
}
else{
$('.busca').css({"position": "static"});
}
});