$(document).ready(function(){

$('#header_slidedowns').find('a').hover(
  function () {
    $(this).addClass('hover');
    $(this).parent().find('.slidedown').stop(1,1).slideDown(400);
  },
  function () {
	  $("a.energy").removeClass('hover');
    $(this).parent().find('.slidedown').stop(1,1).slideUp(400);
  }
);


$("a[link_id]").live("click", function(){
  var txt_obj = $("div[text_id="+$(this).attr('link_id')+"]");
  if (txt_obj.css('display') == 'none')
  {
    txt_obj.css({'display':'block'});
  }
  else
  {
    txt_obj.css({'display':'none'});
  }

  return false;
});

});

function setCookie (name, value, expires, path, domain, secure) {
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

$(document).ready(function(){

if (jQuery.browser.msie && jQuery.browser.version == 6 && getCookie('oops_ie6') != 1) {
  $(".oops_ie6").css({'display':'block'});
  setCookie('oops_ie6', 1);
}

$("#close_oops_ie6").click( function(){
$(".oops_ie6").css({'display':'none'}); return false;
} );

});

