/* webandana.com: the art of climbing in Friuli */

if( top.location != self.location ){
 top.location = self.location;
}

$(document).ready(function(){

 luogo = function (){
     var topos = $(this).scrollTop();

     if( topos == '0'|| topos <= '450'){
        return '450px';
      }else {return topos + 101;}
   }

  $('#boxNav').animate( {top: luogo()}, {duration:1500, easing:'easeOutBack', queue:false} );


   $(window).scroll( function(){


   $('#boxNav')
   .stop()
   .animate( {top: luogo()}, {duration:1500, easing:'easeOutBack', queue:false} );
    

    });
    
   $('#boxNav a').hover( function(){
   $('#boxNav')
    .animate({left: $(this).position().left + 460}, {duration:'slow' ,easing:'easeOutBack', queue: false });
     }, function(){
        $('#boxNav')
         .stop(true)
         .animate({left: $(this).position().left + 315 },{ duration:'slow', easing:'easeOutBack', queue:false });
  });



visuBar.frase(1);

});

// set status bar

var visuBar = {
a1: ' Welcome to... Friuli !',
a2: ' Mandi a ducj !',
a0: ' the art of climbing in Friuli',
total: 3,
frase : function(numa){
var num = numa;
num = num % this.total;
var scelta = 'a'+ num;
window.defaultStatus = this[scelta];
setTimeout( function(){ visuBar.frase(++num); }, 3000 );
}
};








