$(document).ready(function(){
	if ($("#info").html()) $("#info").show();
	if ($("#error").html()) $("#error").show();
	$("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank"); 
	$("a[href*='http://www.danarts.info']").attr("target",""); 
	$("*").live("contextmenu",function(e){return false;});   

	$(".dropdown").each(function(){
	$(this).find("li:last").css({"border-bottom":0});
	$(this).parent().eq(0).hoverIntent({
		timeout: 100,
		over: function(){
			var current = $('.dropdown:eq(0)',this);
			current.slideDown(200);
		}, out: function(){
			var current = $('.dropdown:eq(0)',this);
			current.fadeOut(200);
			}
		});
	});
		
	$(".error").click(function(){
		$(this).removeClass("error");
		});
	});
	
/* code to handle cookies */
/* code to handle cookies */
function set_cookie(c_name,value){
	var path = "/";
	var expiredays = 999;
	var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toUTCString()+";path=" + path);
}
function get_cookie(c_name){
	if(document.cookie.length>0)
	{c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
	{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
	return"";
}
