 $(function () {
        $('.bubbleInfo').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 250;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.trigger', this);
            var popup = $('.popup', this).css('opacity', 0);


            $([trigger.get(0), popup.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of popup box
                    beingShown = true;

                    popup.css({
                        top: trigger.outerHeight(true) - 2 ,
                        left: 0 - (popup.outerWidth() / 2) + ( trigger.outerWidth() / 2),
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                    trigger.css({'color' : '#fff'});
                    //alert(trigger.outerHeight(true));
                }

            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    popup.animate({
                        top: '+=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        popup.css('display', 'none');
                    });
                    trigger.css({'color' : 'rgba(255, 255, 255, 0.5)'});

                }, hideDelay);

            });
        });
    });
    


	$(document).ready(function(){


		
		$("a").css('color', '#fff');
		$("a").css('opacity', .5);
		$(".popup a").css('opacity', 1);
		
		
		$("a").hover(
			function(){
			$(this).animate({opacity: 1}, 250);
			},
			function(){
			$(this).animate({opacity: .5}, 250);
			}
		);
		
		
		$(".flickr_badge_image a").find("img").css('opacity', .75);
		
		$(".flickr_badge_image a").hover(
			function(){
			$(this).find("img").animate({opacity: 1}, 250);
			},
			function(){
			$(this).find("img").animate({opacity: .75}, 250);
			}
			
		);//hover
		
		
		
		$("#tumblr a").find("img").css('opacity', .75);
		
		$("#tumblr a").hover(
			function(){
			$(this).find("img").animate({opacity: 1}, 250);
			},
			function(){
			$(this).find("img").animate({opacity: .75}, 250);
			}
			
		);//hover
		
	}); //document ready