function expan(sourceObj)
{
	var targetObj =  sourceObj.nextSibling

	if( targetObj.style.display!="none" )
	{
		targetObj.style.display="none";
		sourceObj.innerHTML = "&gt; "; 
	}
	else
	{
		targetObj.style.display="inline";
		sourceObj.innerHTML = "&lt;"; 

	}
}

function changeText( sobj, newtext )
{
	sobj.innerHTML  = newtext;
}

function play(one)
{
	$(one).click(function(event) 
	{
		event.preventDefault();
	});

	$(".play").show();
	$(".movie").remove();

	$(one).hide();

	var f =$(one).attr("href");
	var movie = '<div class="movie" style="width:320px;height:240px;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" type="application/x-shockwave-flash" id="simplayer" name="simplayer" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"><param name="movie" value="'+f+'"><param name="menu" value="false"><param name="scale" value="noScale"><param name="allowFullscreen" value="true"><param name="allowScriptAccess" value="always"><param name="bgcolor" value="#FFFFFF"><embed src="'+f+'" quality="high" bgcolor="#ffffff" width="320" height="240" name="simplayer" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></div>';

		var s = $(one).attr("id").replace("link","#log");
		$('<div/>').append(movie).appendTo(s);
}


function MakeNoteClickable()
{
	$(".notebtn").click(function(){
		$(this).next().slideToggle("slow");
  	});
}


function InitRoot()
{
	$(".roothigh").hover(
             function(){
                 $(this).css("color","red");
                 $(this).css("position","relative");
                 $(this).css("top","-2px");
                 $(this).css("left","0px");
             },
             function(){
                 $(this).css("color","black");
                 $(this).css("position","relative");
                 $(this).css("top","0px");
                 $(this).css("left","0px");
             }
        );
}

function InitMarquee()
{
        $('div.demo marquee').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        }).mousemove(function (event) {
            if ($(this).data('drag') == true) {
                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
            }
        }).mousedown(function (event) {
            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
        }).mouseup(function () {
            $(this).data('drag', false);
        });
}


function showMore()
{
	$('.hidemore').removeClass('hidemore');
	$('#more').hide();
}

function Init()
{
	$(".lable").click(function(){
		if ($(this).parent().next().is(':hidden')) {
			$(this).parent().css("background-image","url(barbg.gif)");
			$(this).parent().next().slideToggle();//"slow", function(){autoFit();});
		}
		else {
			$(this).parent().next().slideToggle();//"slow", function(){autoFit();}  );
			$(this).parent().css("background-image","none");
		}

	});


	$(".noun, .verb, .adj, .adv, .other").click(function(){

		if(  $(this).css("color") == "red" )
		{
			$(this).css("font-weight","normal");
			$(this).css("color","#000000");
			return;
		}


		if(  $(this).css("font-weight")  != 700 ) 
				$(this).css("font-weight","bold");
		else{
			if(  $(this).css("color") != "red" )
				$(this).css("color","red");
		}

	});



	$(".wordtestbtn").click(function(){
		$(this).next().toggle();
	});


	InitRoot();

	InitMarquee();
}

