$(function(){ 
    $(".learn1").mouseover(function(){
        $(this).css("margin-top","8px")
    })
    $(".learn2").mouseover(function(){
        $(this).css("margin-top","8px")
    })
    $(".learn1").mouseout(function(){
        $(this).css("margin-top","0px")
    })
    $(".learn2").mouseout(function(){
        $(this).css("margin-top","0px")
    })
})

function tabPanel(o) {
  var menus = o.find('.tabTitle li');
  
  menus.each(function(i, item){
    $(item).click(function(){
    	var rel = this.firstChild.rel;
     $('#iframe').css('display', 'none');
     $('#searchcontent').css('display', 'none');
      menus.each(function(i, item1){
      	var link = item1.firstChild;

      	if(link.rel == rel) {
          $(link).addClass('active');
          $('#' + link.rel).css('display', 'block');
        } else {
          $(link).removeClass('active');
          $('#' + link.rel).css('display', 'none');
        }
      });
    });
  });
}

function chanagemodule(){
  $('#chapterContent').css('display', 'none');
  $('#searchcontent').css('display', 'none');
  $('#learncontent').css('display', 'none');
  $('#comment').css('display', 'none');
  $('#wrap').css('display', 'none');
  $('#iframe').css('display', 'block');
}

function closemunu(){
	var src = $('#treemenubar').attr('src');
	if(src == 'images/menubar1.gif') {
    $('#divWaitCompareLayer').css('width', '25px');
    $('#miniWaitCompare .left').css('display', 'none');
    $('#treemenubar').attr('src', 'images/menubar2.gif');
    $('#treemenubar').attr('title', '開ける');
	} else {
    $('#divWaitCompareLayer').css('width', '160px');
    $('#miniWaitCompare .left').css('display', 'block');
    $('#treemenubar').attr('src', 'images/menubar1.gif');
    $('#treemenubar').attr('title', '閉じる');
	}
}

function bookmark(classid, chapterid) {
  $.ajax({
   type: "GET",
   url: "courseware.php",
   data:   "module=bookmark&classid="+classid+"&id="+chapterid,
   success: function(msg){ 
    var msgs = msg.split(',');
    if(msgs[0] == 'success') {
    	alert(msgs[0]);
    } else {
      alert(msgs[1]);
    }
   } 
  });  
}

 function isReady() {
   return nnn;
 }

function flashplay() {
	isReady();
  AC_FL_RunContent(
  'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
  'width', '800',
  'height', '630',
  'src', 'orimedplayer',
  'quality', 'high',
  'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
  'align', 'middle',
  'play', 'false',
  'loop', 'true',
  'scale', 'showall',
  'wmode', 'window',
  'devicefont', 'false',
  'id', 'orimedplayer',
  'bgcolor', '#ffffff',
  'name', 'orimedplayer',
  'menu', 'false',
  'allowFullScreen', 'true',
  'allowScriptAccess','always',
  'movie', 'orimedplayer',
  'salign', ''
  ); //end AC code
}
