$(document).ready(function(){
	
	
	/*
	//Aktuelle nyheter
	$("#sidebar-2").empty();	
	
	var rssContainer = $("#sidebar-2");
	var feed = "http://www.corrosafe.no/1201215?template=RSS";
	
	$.get('/Webdesk/rss?source='+feed+'&encoding=iso', function(d) {
        var html = "";
		$(d).find('item').each(function(index,element) {
	    
            //name the current found item this for this particular loop run
		    var $item = $(this);
		    // grab the post title
		    var title = $item.find('title').text();
		    // grab the post's URL
		    var link = $item.find('link').text();
		    // next, the description
		    var description = $item.find('description').text();
		    //don't forget the pubdate
		    var pubDate = $item.find('pubDate').text();
            //image
            var image = $item.find('image').text() != "" ? '<img src="../../images/'+$item.find('image').text()+'" />' : '';

            // now create a var 'html' to store the markup we're using to output the feed to the browser window
		    html += "<div class=\"element column\"><a href=\"" + link + "\" target=\"_self\">"+image+"<h5>" + title + "<\/h5><\/a><p class=\"byline\">"+pubDate+"</p><p class=\"presentation\">"+description+"</p></div>";
        });
		$(rssContainer).html(html).cycle({pause:1,timeout:5000});        
	});
	*/
	

if($("#start-button").length == 0){
    
    $("#container").append(
        $("<img/>").attr({'src':'http://www.corrosafe.no/Webdesk/bilde/205030.gif','id':'start-button'})
    );

}

$("#start-button").mouseenter(function(){
    if($("#start-button-message").length == 0){
        $("<div/>").appendTo("#container").attr("id","start-button-message").html("<strong>Bestill tid for Dinitrol rust-behandling</strong><br /><br />Prøveperiode startet").css({'opacity':0,'margin-top':'50px'}).animate({'opacity':'1','margin-top':'20px'},200);
    }
});

$("#start-button").click(function(event){
	event.preventDefault();
	location.href = 'http://www.corrosafe.no/dinitrol';
	return false;
});

$("#start-button").mouseleave(function(){
    $("#start-button-message").animate({'opacity':'0','margin-top':'50px'},200,function(){$(this).detach()});
});


});
