var thissound;

jQuery(document).ready(function() {
	
	thissound = eval("document.wininf");
	
	//div hover effect
	$("div.special div").mouseover(function() {
			$(this).addClass("program_h");
	});
	
	$("div.special div").mouseout(function() {
			$(this).removeClass("program_h");
			
	});
	
	$("div.special div").click(function() {
			window.location = $(this).children("a").attr("href");
	});
	
	$("#navmenu a").hover(function() {
			play_sound();
	}, function(){

	});
	
	//ie6 fix for input buttons
	$("input.button").mouseover(function() {
			$(this).addClass("buttonh");
	});
	
	$("input.button").mouseout(function() {
			$(this).removeClass("buttonh");

	});
	
	$("input.button1").mouseover(function() {
			$(this).addClass("button1h");
	});
	
	$("input.button1").mouseout(function() {
			$(this).removeClass("button1h");
	});
	
	$("input.button_white").mouseover(function() {
			$(this).addClass("button_white_h");
	});
	
	$("input.button_white").mouseout(function() {
			$(this).removeClass("button_white_h");

	});
	
	//dropdown menu effect
	$("ul#navmenu li.root").hover(function() {
			$(this).children("ul").stop();
			$(this).children("ul").animate( { height:"300px" }, 1500 );
	}, function(){
			$(this).children("ul").stop();			
			$(this).children("ul").animate( { height:"0px" }, 1000 , function(){
				$(this).css('display','none');
			});
	});
	
	//open each element in menu slowly after page load
	$("ul#navmenu li.root:first").animate({marginTop:"0px"},200,function(){
			play_sound();
		$(this).next("li.root").animate({marginTop:"0px"},200,function(){
			play_sound();
		$(this).next("li.root").animate({marginTop:"0px"},200,function(){
			play_sound();
		$(this).next("li.root").animate({marginTop:"0px"},200,function(){
			play_sound();
		$(this).next("li.root").animate({marginTop:"0px"},200,function(){
			play_sound();
		$(this).next("li.root").animate({marginTop:"0px"},200,function(){
			play_sound();
		$("ul#navmenu").css('overflow', 'visible');
	});
	});
	});
	});
	});
	});
	
	$("a.skype").html('');
	
	//forum
	$("a.quote").click(function() {
		mytext = $(this).parent().parent().children("td:first").html().replace(/<div class="quote.*div>/g, '').replace(/<div class="sended.*div>/g, '');
		user = $(this).parent().parent().children("td:eq(1)").html();
		byuser = user.substr(0, user.indexOf("<br")) ;
		
		ed.setContent('<div class="quote">by '+byuser+'<br />'+mytext+'</div><br />');
	
		//return false;
	});

});

function play_sound(){
	try
  {
	thissound.Stop();
	thissound.Play();
  }
	catch(err)
  {
  }
}


