﻿$(function() {
	$("#links").html('<a href="http://www.garaget.org/bramstedt" id="garaget"><img src="garaget.png" alt="Bramstedt på Garaget.org" /></a><a href="http://www.facebook.com/bramstedt" id="facebook"><img src="facebook.png" alt="Bramstedt på Facebook" /></a><a href="http://bramstedt.se/blogg/feed" id="feed"><img src="feed.png" alt="Bramstedt blogg som RSS" /></a>');
	$("#links a img").html("").fadeTo("fast", 0.01);
	$("#links a img").hover(
		function () {
			$(this).stop().animate({"opacity": 1}, "fast");
		},
		function () {
			$(this).stop().animate({"opacity": 0.01}, "fast");
		}
	);

	var speed = "normal";
	$("a.blogg").each(function(){ 
		$(this).css("position","relative");
		var html = $(this).html();
		$(this).html("<span class=\"one\">"+ html +"</span>");
		$(this).append("<span class=\"two\">"+ html +"</span<");		
		if($.browser.msie){
			$("span.one",$(this)).css("background","#000");
			$("span.two",$(this)).css("background","#000");	
			$("span.one",$(this)).css("opacity",1);			
		};
		$("span.two",$(this)).css("opacity",0);		
		$("span.two",$(this)).css("position","absolute");		
		$("span.two",$(this)).css("top","0");
		$("span.two",$(this)).css("left","0");		
		$(this).hover(
			function(){
				$("span.one",this).stop().animate({"opacity": 0}, "slow");
				$("span.two",this).stop().animate({"opacity": 1}, "slow");
			},
			function(){
				$("span.one",this).stop().animate({"opacity": 1}, "slow");
				$("span.two",this).stop().animate({"opacity": 0}, "slow");
			}			
		)
	});
});