
  
  $(document).ready( function()
  {
       
    var socialFB = 0;
    var socialGPlus = 0;
    var socialYT = 0;
    
    $('#socialFB a').mouseover(function() { $('#socialFB').css('height', 290).css('z-index', 60); $('#socialFB').animate({ left: 0}, function() { socialFB = 1; });  });
    $('#socialFB a').click(function() { 
      if (socialFB == 1) 
      { 
        $('#socialFB').animate({ left: -292}, function(){ $(this).css('z-index', 50); socialFB = 0; }); 
      }
      else
      {
        $('#socialFB').css('height', 290).css('z-index', 60); $('#socialFB').animate({ left: 0}, function() { socialFB = 1;}); 
      }
    });
    $('#socialFB iframe').mouseout(function() { $('#socialFB').animate({ left: -292}, function(){ $(this).css('z-index', 50); });});
                                                                        
    
    $('#socialGPlus a').mouseover(function() { if ( !socialGPlus ) { $('#socialGPlus').animate({ left: 0 }); socialGPlus = 1;}  });
    $('#socialGPlus a').click(function() { 
      if (socialGPlus == 1) 
      { 
        $('#socialGPlus').animate({ left: -89}, function() { socialGPlus = 0; });
      }
      else
      {
         $('#socialGPlus').animate({ left: 0 }); socialGPlus = 1;
      }
    });
    $('#socialGPlus div').mouseleave (function() { $('#socialGPlus').animate({ left: -89}, function() { socialGPlus = 0; });});
    
    $('#socialYoutube a').mouseover(function() { $('#socialYoutube').animate({ left: 0 }, function() {socialYT = 1;}); });
    $('#socialYoutube a').click(function() { 
      if (socialYT == 1) 
      { 
        $('#socialYoutube').animate({ left: -140}, function() {socialYT = 0;});
      }
      else
      {
         $('#socialYoutube').animate({ left: 0 }, function() {socialYT = 1;});
      }
    });
    $('#socialYoutube div').mouseleave (function() { $('#socialYoutube').animate({ left: -140}); });
       

    $('li.backToTop a').click(function() {

					$('body,html').animate({scrollTop:0},800);

					return false;

				});
     
    
  });
   
  
   
  
