$(document).ready(function() {        

// tooltip display
    $("a[title]").tooltip({
        position: 'top center',
        offset: [0,75]        
    });
    

// Adding code for hide and show details
    $('#hide-contact-details').hide();   
    $('#click-show').click(function() {
        $('#hide-contact-details').toggle('slow');
    });    
    
    var number_of_loops = 2;
    var current_loop = 0;
    function bindSlider() {
        current_loop = current_loop + 1;   
     
        if (current_loop <= number_of_loops) {
            $('#slide-show').nivoSlider({
               effect: 'slideInRight',
               animSpeed: 500,
               pauseTime: 7000,
               directionNav:false,
               directionNavHide:false,
               controlNav: false,
               stop: false,
               lastSlide: function(){               
                   bindSlider();    // recursive callback to bind this thing twice.
               }
            }) 
        } else {
            $('#slide-show').data('nivo:vars').stop = true;
            $('#slide-show-container').empty().append('<img src="images/slide-silverballs.jpg" border="0" alt="The Formula Group Web Design Company" />');
        }               
    }
    bindSlider();   // bind first time;
/*

          $('#slide-show').nivoSlider({
           effect: 'sliceUpDown',
           animSpeed: 500,
           pauseTime: 7000,
           directionNav:false,
           directionNavHide:false,
           controlNav: false
                  
            
        }); 
        
        setTimeout(function() {$('#slide-show').data('nivo:vars').stop = true;}, 61000);
*/
  });
function addToFav() {
    if(window.sidebar){
        window.sidebar.addPanel(document.title, this.location,"");
    }
    else{
        window.external.AddFavorite(this.location,document.title);
    }
}   
