var ct=0;
$(document).ready(function() {
 
	
    $("#menu2 li").mouseover(function(){
		 //var vname=($(this)).attr("class");
		 $(this).addClass("onmenu");
	});	

    $("#menu2 li").mouseout(function(){
		 //var vname=($(this)).attr("class");
		 $(this).removeClass("onmenu")
	});	



	$("#addfav").click(function() {
        if(jQuery.browser.msie){
        window.external.addFavorite("http://"+location.hostname,document.getElementsByTagName("title")[0].innerText); 
        }else if (document.all){ 
          window.external.addFavorite("http://"+location.hostname,document.getElementsByTagName("title")[0].innerText); 
          }else if (window.sidebar){ 
        // window.sidebar.addPanel(document.getElementsByTagName("title")[0].innerText,"http://"+location.hostname, ""); 
        }else { 
          // alert('您可以尝试通过快捷键' + ctrl + ' + D 加入到收藏夹~'); 
	    }
	});


	$("#sethomepage").click(function() {
	this.style.behavior="url(#default#homepage)";
	this.setHomePage("http://"+location.hostname);
	});	





	
});




function insertFlash(elm, url, w, h) {
if (!document.getElementById(elm)) return;
var str = '';
str += '<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">';
str += '<param name="movie" value="'+ url +'">';
str += '<param name="wmode" value="transparent">';
str += '<param name="quality" value="high">';
str += '<param name="menu" value="false">';
str += '<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="autohigh" wmode="transparent" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
str += '</object>';
document.getElementById(elm).innerHTML = str;
}

function insertFlash2(elm, url, w, h) {
if (!document.getElementById(elm)) return;
var str = '';
str += '<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">';
str += '<param name="movie" value="'+ url +'">';
str += '<param name="wmode" value="transparent">';
str += '<param name="quality" value="high">';
str += '<param name="loop" value="falsh">';
str += '<param name="menu" value="false">';
str += '<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="autohigh" wmode="transparent" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
str += '</object>';
document.getElementById(elm).innerHTML = str;
}



<!--
function FP_openNewWindow(w,h,nav,loc,sts,menu,scroll,resize,name,url) {//v1.0
 var windowProperties=''; if(nav==false) windowProperties+='toolbar=no,'; else
  windowProperties+='toolbar=yes,'; if(loc==false) windowProperties+='location=no,'; 
 else windowProperties+='location=yes,'; if(sts==false) windowProperties+='status=no,';
 else windowProperties+='status=yes,'; if(menu==false) windowProperties+='menubar=no,';
 else windowProperties+='menubar=yes,'; if(scroll==false) windowProperties+='scrollbars=no,';
 else windowProperties+='scrollbars=yes,'; if(resize==false) windowProperties+='resizable=no,';
 else windowProperties+='resizable=yes,'; if(w!="") windowProperties+='width='+w+',';
 if(h!="") windowProperties+='height='+h; if(windowProperties!="") { 
  if( windowProperties.charAt(windowProperties.length-1)==',') 
   windowProperties=windowProperties.substring(0,windowProperties.length-1); } 
 window.open(url,name,windowProperties);
}

function OpWin(UrlStr){
FP_openNewWindow('', '', false, false, false, false, true, true, 'Flash', /*href*/''+UrlStr)
}

// -->


/*
*
*/
(function($){$.fn.playImgs=function(settings){var options=$.extend({transition:0,title:0,num:1,time:0,duration:500,onStart:function(){},onStop:function(){},onShow:function($){$.show();},onHide:function($){$.hide();}},settings);var $container=this.hide();var $images=$container.find("img").hide();var lastIndex=$images.length-1;var prevIndex=lastIndex;var index=0;var timer;if(options.title==1)
{var $title_bar=$("<div class=\"title_bar\">&nbsp;</div>").appendTo($container).fadeTo('fast',"0.75");}
if(options.num==1)
{var $indexGroups=$("<ul class=\"num_bar\"></ul>").fadeTo('fast',0.9);for(var i=0;i<$images.length;i++){$indexGroups.append("<li>"+(i+1)+"</li>");}
var $sn=$indexGroups.appendTo($container).children("li")}
$images.hover(function(){pause();},function(){timer=setTimeout(run,options.time);});if(options.num==1)
{$sn.hover(function(){index=$.trim($(this).text())-1;if(prevIndex!=index){hide(prevIndex);show(index);}
prevIndex=index;pause();},function(){prevIndex=$.trim($(this).text())-1;timer=setTimeout(run,options.time);});}
function run(){index=index==prevIndex?index+1:index;index=index>lastIndex?0:index;if(options.transition==23){var random_num=parseInt(Math.random()*5)+1;$container.playAction(random_num);}
hide(prevIndex);show(index);prevIndex=index;index++;timer=setTimeout(run,options.time);}
function show(index){options.onShow($images.eq(index));if(options.title==1){$title_bar.text($images.eq(index).parent("a").attr("title"));}
if(options.num==1){$sn.eq(index).addClass("on");}}
function hide(index){options.onHide($images.eq(index));if(options.num==1){$sn.eq(index).removeClass("on");}}
function pause(){options.onStop();clearTimeout(timer);}
$container.start=function(){options.onStart();run();return $container;}
$container.stop=function(){options.onStop();pause();return $container;}
$container.playAction=function(n){switch(n){case 1:options.onShow=function($_){$_.fadeIn(options.duration);};options.onHide=function($_){$_.fadeOut(options.duration);};break;case 2:options.onShow=function($_){$_.slideDown(options.duration);};options.onHide=function($_){$_.slideUp(options.duration);};break;case 3:options.onShow=function($_){$_.css("left",-$_.width()+'px').show().animate({left:"0px"},options.duration);};options.onHide=function($_){$_.css("left",'0px').animate({left:$_.width()+'px'},options.duration);};break;case 4:options.onShow=function($_){$_.css("top",-$_.height()+'px').show().animate({top:"0px"},options.duration);};options.onHide=function($_){$_.css("top",'0px').animate({top:$_.height()+'px'},options.duration);};break;case 5:options.onShow=function($_){$_.css("bottom",-$_.height()+'px').show().animate({bottom:"0px"},options.duration);};options.onHide=function($_){$_.css("bottom",'0px').animate({bottom:$_.height()+'px'},options.duration);};break;case 6:options.onShow=function($_){$_.css("left",$_.width()+'px').show().animate({left:"0px"},options.duration);};options.onHide=function($_){$_.css("left",'0px').animate({left:-$_.width()+'px'},options.duration);};break;case 23:var random=parseInt(Math.random()*5)+1;break;}
return this;}
return $container.playAction(options.transition).show();}})(jQuery);

