$(document).ready(function(){
			 $('#social').itgButtonAnimator({
				  find_child : 'a',
				  animation : 'slide_down_fade',
				  fadeOpacity : 0.6,
				  slideRange : 5,
				  animationInSpeed : 150,
				  animationOutSpeed : 300  	   
          });
		 
$(document).ready(function() {
   $('#s3slider').s3Slider({
      timeOut: 4000
   
   });
   
  }); 
		  				  
});

/*BUTTON FADE UP AND DOWN*/
(function($){
    $.fn.itgButtonAnimator = function(options) {   
        //default parameters
        var op = {
            find_child : 'a',
            animation : 'slide_up_fade', //fade, slide_up, slide_down, slide_up_fade, slide_down_fade
            fadeOpacity : 0.3,
            slideRange : 15,
            animationInSpeed : 400,
            animationOutSpeed : 200,
            easing : 'linear'
        };
        
        //Extend it
        op = $.extend({}, op, options);

        //Loop using jQuery each()
        return this.each(function(){
            //Some shortcuts
            var itg_But = $(this); //jQuery Object
            var itg_but = this; //DOM Object
            
            //First apply default CSS if needed
            
            if((op.animation == 'slide_up') || (op.animation == 'slide_down') || (op.animation == 'slide_up_fade') || (op.animation == 'slide_down_fade')) {
                $(this).find(op.find_child).css({'display': 'block', 'float': 'left'});
            }
            
            //set the target
            var target_anim = itg_But.find(op.find_child);
            
            //set the animation
            switch(op.animation) {
                case 'fade' :
                    target_anim.bind('mouseover', function(){
                        $(this).stop(true).css({opacity: 1}).animate({opacity: op.fadeOpacity}, op.animationInSpeed, op.easing);
                    });
                    itg_But.find(op.find_child).bind('mouseout', function(){
                        $(this).stop(true).css({opacity: op.fadeOpacity}).animate({opacity: 1}, op.animationOutSpeed, op.easing);
                    });
                    break;
                case 'slide_up':
                    target_anim.css({paddingTop : op.slideRange+'px', paddingBottom: 0});
                    target_anim.bind('mouseover', function(){
                        $(this).stop(true).animate({paddingBottom : op.slideRange+'px', paddingTop : 0}, op.animationInSpeed, op.easing);
                    });
                    target_anim.bind('mouseout', function(){
                        $(this).stop(true).animate({paddingBottom : 0, paddingTop : op.slideRange+'px'}, op.animationOutSpeed, op.easing);
                    });
                    break;
                case 'slide_down':
                    target_anim.css({paddingTop: 0, paddingBottom: op.slideRange+'px'});
                    target_anim.bind('mouseover', function(){
                        $(this).stop(true).animate({paddingTop: op.slideRange+'px', paddingBottom: 0}, op.animationInSpeed, op.easing);
                    });
                    target_anim.bind('mouseout', function(){
                        $(this).stop(true).animate({paddingTop:0, paddingBottom: op.slideRange+'px'}, op.animationOutSpeed, op.easing);
                    });
                    break;
                case 'slide_up_fade':
                    target_anim.css({paddingTop : op.slideRange+'px', paddingBottom: 0, opacity: 1});
                    target_anim.bind('mouseover', function(){
                        $(this).stop(true).animate({paddingBottom : op.slideRange+'px', paddingTop : 0, opacity: op.fadeOpacity}, op.animationInSpeed, op.easing);
                    });
                    target_anim.bind('mouseout', function(){
                        $(this).stop(true).animate({paddingBottom : 0, paddingTop : op.slideRange+'px', opacity: 1}, op.animationOutSpeed, op.easing);
                    });
                    break;
                case 'slide_down_fade':
                    target_anim.css({paddingTop: 0, paddingBottom: op.slideRange+'px', opacity: 1});
                    target_anim.bind('mouseover', function(){
                        $(this).stop(true).animate({paddingTop: op.slideRange+'px', paddingBottom: 0, opacity: op.fadeOpacity}, op.animationInSpeed, op.easing);
                    });
                    target_anim.bind('mouseout', function(){
                        $(this).stop(true).animate({paddingTop:0, paddingBottom: op.slideRange+'px', opacity: 1}, op.animationOutSpeed, op.easing);
                    });
                    break;
                default:
                alert('Sorry the animation method '+op.animation+' is not available');
            }
        });
        
    };
})(jQuery);
