function hideFeedback() {
	$("#feedback").animate({opacity: 0}, 500, function() {
		$(this).hide();
	});
}

var cookie_options = { path: '/', expires: 10 };

$(function(){
	// external Links
	$("a[rel='external']").live("click",function(){
		window.open($(this).attr("href"));
		return false;
	});
	// popup links
	$("a[rel='popup']").click(function(e){
		e.preventDefault();
		myWindow = window.open($(this).attr("href"), "popup", "width=500,height=600,scrollbars=yes");
		myWindow.focus();
	});
	// news ticker
	if(typeof $().newsTicker == "function") {
		var options = {
  		newsList: "#latest ul",
 			tickerRate: 40,
 			startDelay: 10,
 			loopDelay: 4000,
 			placeHolder1: " -",
 			placeHolder2: ""
		};
		$().newsTicker(options);
	};
	//IE only
	if ($.browser.msie) {
    	$("#latest").css("margin","0 0 25px");
    	$("body.home .cc").css("width","960px");    	
	};
	$(".addthis_toolbox").hide();
	//social bookmarks share button	
	$("#share").click(function(){
		if ($(".addthis_toolbox").is(":hidden")) {
		      $(".addthis_toolbox").slideToggle("fast");
		    } else {
		      $(".addthis_toolbox").slideToggle("fast");
		    }
	});
	$("#page_tools .close").click(function() {
		if ($(".addthis_toolbox").is(":visible")) {
		      $(".addthis_toolbox").slideToggle("fast");
		    }
	});

	//ie6 show popup
	if (jQuery.browser.msie && jQuery.browser.version <= 6) {
		
		id = $("#ie6popup button").attr("id");
		if(typeof id != 'undefined') {
			c = $.cookie(id);
			if(!c) {
				$('#ie6popup').fadeIn();
			}
		}
		//hide popup
		$("#ie6popup .hide-popup").click(function(){
			$.cookie($(this).attr("id"), 'hide', cookie_options);
			$('#ie6popup').fadeOut();
		});		
	};

	
});
