// =============================================
//                   jQuery
// =============================================

$(document).ready(function(){
    
    /* 
    *   FUNCTIONS WITH IE RESTRICTION:
    *   IE have some issues with opacity for PNG images with alpha channel
    */
    if( $.browser.msie == false )
    {

        /* 
        *   Opaque buttons
        */
        $(".opbutton").css("opacity","0.6");
        $(".opbutton").hover(function(){
         $(this).animate({opacity: 1}, "fast");
        },function(){
         $(this).animate({opacity: 0.6}, "fast");
        });

    }


    /* Simple object toggle function */
    $("[toggle]").click( function() {
      
      var targetObjId = $(this).attr("toggle");
      var targetObj = $("[id="+targetObjId+"]");
      
      if( $(targetObj).is(":hidden") ) $(targetObj).slideDown();
      else $(targetObj).slideUp();
      
      return false;
  
    });


    /* Simple object show function */
    $("[show]").click( function() {
      
      var targetObjId = $(this).attr("show");
      var targetObj = $("[id="+targetObjId+"]");
      
      $(targetObj).slideDown();
  
    });

    
    
    /* Headermenu handler */
    $("#header > div.headermenu > a").hover(function(){
     $(this).animate({paddingTop: "22px"}, "fast");
     
     if( $.browser.msie == false ) $(this).children("h3").fadeIn("fast");
     else $(this).children("h3").slideDown("fast");
     
    },function(){
     $(this).animate({paddingTop: "12px"}, "fast");
     
     if( $.browser.msie == false ) $(this).children("h3").fadeOut("fast");
     else $(this).children("h3").slideUp("fast");
     
    });
    
    
    /* Footer links hover */
    $('#footer div.footer-widget > ul > li a').hover(function(){
     $(this).animate({ paddingLeft: "15px" }, "fast");
    },function(){
     $(this).animate({ paddingLeft: "10px" }, "fast");
    });
    
    /* About me networks */
    $('div.about-networks > div > a').hover( function(){
      $(this).animate( { marginTop: '5px' }, "fast" );
    }, function(){
      $(this).animate( { marginTop: '20px' }, "fast" );
    } );
    
    
});















