// JavaScript Document
jQuery(document).ready(function($) {
	
//search form, change text on focus
	$(".s").focus(function(){
		if($(this).val() == "Søg her..") {
			$(this).val("");
		}
	}).blur(function(){
		if($(this).val() == "") {
			$(this).val("Søg her..");
		}
	});
	
//comment hover effect - show/hide comment reply button & change border color
	$("div.reply").css("opacity",0);
	$("li.comment.depth-1").mouseenter(function() {
		$(this).find("div.reply").fadeTo("fast",1);
		$(this).addClass("active");
	  })
	  .mouseleave(function() {
		$(this).find("div.reply").fadeTo("fast",0);
		$(this).removeClass("active");
	  });
	  	
//smooth scrolling to top
//	$('a.back-top').click(function(){
//		 $('html, body').animate({scrollTop: '0px'}, 1000);
//		 return false;
//	});
//	
//animate to top
//	$(".back-top").hide();
	$(function () {
//		$(window).scroll(function () {
//			if ($(this).scrollTop() > 100) {
//				$('.back-top').fadeIn();
//			} else {
//				$('.back-top').fadeOut();
//			}
//		});

		$('.back-top').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
	});
		
});//end document function

