(function($) {
	$(document).ready( function() {
		$("#daqui").appendTo('.post-meta');
	    $('.feature-slider a').click(function(e) {
	        $('.featured-posts div.featured-post').css({
	            opacity: 0,
	            visibility: 'hidden'
	        });
	        $(this.hash).css({
	            opacity: 1,
	            visibility: 'visible'
	        });
	        $('.feature-slider a').removeClass('active');
	        $(this).addClass('active');
	        e.preventDefault();
	    });
	});
})(jQuery);


  //avoid conflict with other script
  $j=jQuery.noConflict();

  $j(document).ready(function($) {

	//this is the floating content
	var $floatingbox = $('.single .post-meta');

	if($('.post-meta').length > 0){

	  var bodyY = parseInt($('.post-meta').offset().top) - 0;

	  $(window).scroll(function () { 

	   var scrollY = $(window).scrollTop();
	   var isfixed = $floatingbox.css('position') == 'fixed';
 		var originalW = $floatingbox.css('width');
		var falsoB = $('.post-tags').css('background-color');
		
		
		var originalB = $('.post-meta').css('background-color');
		
		
		
		
	   if($floatingbox.length > 0){

	      if ( scrollY > bodyY && !isfixed ) {
			$floatingbox.stop().css({
			  position: 'fixed',
			 top: 0,
			marginTop:0,
			width: originalW,
			backgroundColor: falsoB,
zIndex:1000000

			});
		} else if ( scrollY < bodyY && isfixed ) {
		 	  $floatingbox.css({
			  position: 'relative',
			  top: 0,
			marginTop:0,
			width: originalW,
			backgroundColor: originalB,
zIndex:1000000

		});
	     }		
	   }
     });
   }
});

