// TWITTER DISPLAY
$(document).ready(function(){
	getTwitters('deadTweets', {
		id: 'biomann', 
		prefix: '',  // If you want display your avatar and name <img height="16" width="16" src="%profile_image_url%" /><a href="http://twitter.com/%screen_name%">%name%</a> said:<br/>
		clearContents: false, // leave the original message in place
		count: 1, 
		withFriends: true,
		ignoreReplies: false,
		newwindow: true
	});
});
	

function twitterCounter(twitters) {
var usercount = twitters[0].user.followers_count
document.getElementById('twitter_counter').innerHTML = usercount;
}								
//--------------------------------------------------------------------------

// Social network pop bubble
    $(document).ready(function(){
		$("#social_networks li").css("opacity", "0.5");
		$("#social_networks li").hover(function() {
			$(this).animate({opacity: "1"},{duration:150});
		}, function() {
			$(this).animate({opacity: "0.5"},{duration:50});
		});
		$("#social_networks a").hover(function() {
			$(this).stop().find("em").animate({opacity: "show", top: "-50"},{duration:50});
		}, function() {
			$(this).stop().find("em").animate({opacity: "hide", top: "-60"},{duration:50});
		});
	});
	
	
// Dropdown menu
    $(document).ready(function(){
								   
		$('.nav ul ul').css("display", "none");
	
		$('.nav ul li').hover(function(){
			$(this).stop().find('ul:first').slideToggle({duration:150, easing: 'easeOutQuart'});
		},
		function(){
			$(this).find('ul:first').slideToggle({duration:50, easing: 'easeOutQuart'});
		});
     });

// Dropdown menu
    $(document).ready(function(){
								   
		$('#portfolio-list li .zoomer').css("opacity", "0");
	
		$('#portfolio-list li .zoomer').hover(function(){
			$(this).animate({"opacity": "1"}, 300);
		},
		function(){
			$(this).animate({"opacity": "0"}, 150);
		});
     });
	
// Links animation
$(document).ready(function(){
	$(".nav ul ul a").hover(function(){
		$(this).find('span').stop().animate({marginLeft:'10px'},{queue:false, duration:300, easing: 'easeOutQuart'})
	},function(){
		$(this).find('span').stop().animate({marginLeft:'0px'},{queue:false, duration:300, easing: 'easeOutQuart'})
	});
	
	$(".col_1 li a").hover(function(){
		$(this).find('span').stop().animate({marginLeft:'10px'},{queue:false, duration:300, easing: 'easeOutQuart'})
	},function(){
		$(this).find('span').stop().animate({marginLeft:'0px'},{queue:false, duration:300, easing: 'easeOutQuart'})
	});
 
});

// Hover effect Sidebar list
$(document).ready(function(){
	$('.col_1 li a')
		.css( {backgroundPosition: "left 50%"} )
		.mouseover(function(){
			$(this).stop().animate(
				 { backgroundPosition:"(9px 50%)"},
				 { queue: false,
				   duration: 300,
				   easing: 'easeOutQuart'
			})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(left 50%)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition: "left 50%"})
			}})
		})
});

// Smooth Scroll effect
$(document).ready(function(){
 
    $('a[href*=#]').click(function() {
 
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
 
            var $target = $(this.hash);
 
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
 
            if ($target.length) {
 
                var targetOffset = $target.offset().top;
 
                $('html,body').animate({scrollTop: targetOffset}, 1000);
 
                return false;
 
            }
 
        }
 
    });
 
});


// Filterable Devilcantburn
$(document).ready(function(){
					if((document.all)&&(navigator.appVersion.indexOf("MSIE 8.")!=-1)){
						// Get a link...
						$("#portfolio-filter a").click(function(){
							// Remove the current class
							$("#portfolio-filter a").removeClass('current');
							// Add the current class on the link clicked
							$(this).addClass('current');
							// Get the REL of the link
							var filter = $(this).attr("rel");
							// Make the animation of disappearing
							$("#portfolio-list li")
									.css("display","none");
							// and appearing
							$("#portfolio-list li."+filter)
									.css("display","block")
						});
						// If ALL is clicked...
						$("#portfolio-filter #all").click(function(){
							// We make the animation to display EVERY list elements
							$("#portfolio-list li").css("display","block");
							
						});
					}
					else {
						// Get a link...
						$("#portfolio-filter a").click(function(){
							// Remove the current class
							$("#portfolio-filter a").removeClass('current');
							// Add the current class on the link clicked
							$(this).addClass('current');
							// Get the REL of the link
							var filter = $(this).attr("rel");
							// Make the animation of disappearing
							$("#portfolio-list li")
									.animate({opacity:'0'},{duration:150})
									.css("display","none");
							// and appearing
							$("#portfolio-list li."+filter)
									.css("display","none")
									.delay(600)
									.css("display","block")
									.animate({opacity:'1'},{duration:300, delay:250, easing: 'easeOutQuart'});
						});
						// If ALL is clicked...
						$("#portfolio-filter #all").click(function(){
							// We make the animation to display EVERY list elements
							$("#portfolio-list li").css("display","block").animate({opacity:'1'},800);
							
						});
					}
});
