﻿$(document).ready(function(){var b=$("#btnLogin");b.click(function(){jBox.open("iframe-Login","iframe","/Login.html",$(this).attr("title"),"width=320,height=220,center=true,minimizable=false,resize=false,draggable=true,model=true,scrolling=false");return false});var c=$("#btnReg");c.click(function(){jBox.open("iframe-Reg","iframe","http://passport.365ttcz.com/SimpleReg.aspx?returnUrl="+window.location.href,$(this).attr("title"),"width=720,height=550,center=true,minimizable=false,resize=false,draggable=false,model=true,scrolling=false");return false});var a=$("#btnChangePass");a.click(function(){jBox.open("iframe-ChangePass","iframe","http://passport.365ttcz.com/PassCenter/SimpleModifyPassword.aspx?returnUrl="+window.location.href,$(this).attr("title"),"width=350,height=180,center=true,minimizable=false,resize=false,draggable=false,model=true,scrolling=false");return false});$("#NavMenu").hover(function(){$("p",this).fadeIn("fast")},function(){$("p",this).fadeOut("fast")});$("p","#NavMenu").fadeIn("fast");if(window.location.hash.indexOf("#Login")>=0){btn11.click()}});function OpenWindow(c,b,a){var d=$(c);jBox.open(d.attr("href"),"iframe",d.attr("href"),d.text(),"width="+b+",height="+a+",center=true,minimizable=false,resize=false,draggable=true,model=true,scrolling=false")}function OpenWindow2(b,d,c,a){jBox.open(b,"iframe",b,d,"width="+c+",height="+a+",center=true,minimizable=false,resize=false,draggable=true,model=true,scrolling=false")}function CopyToClipboard(b){try{window.clipboardData.setData("text",b)}catch(a){}this.select()}var DateDiff=new Object();DateDiff.RelaceDateTime=function(g){var b=1000;var c=1000*60;var e=c*60;var i=e*24;var j=i*15;var h=i*30;function a(q){var l=new Date().getTime();var p=l-q;if(p<0){}var n=p/h;var k=p/(7*i);var s=p/i;var r=p/e;var m=p/c;var o=p/b;if(n>=1){result=parseInt(n)+"个月前"}else{if(s>=1){if(parseInt(s)==1){result="昨天"}else{if(parseInt(s)==2){result="前天"}else{result=parseInt(s)+"天前"}}}else{if(r>=1){result=parseInt(r)+"小时前"}else{if(m>=1){result=parseInt(m)+"分钟前"}else{if(o>=1){result=parseInt(o)+"秒钟前"}else{result="刚刚"}}}}}return result}function d(k){return Date.parse(k.replace(/-/gi,"/"))}function f(k){if($("#"+k)){$("#"+k).html(a(d($("#"+k).html())))}}f(g)};function RelaceDateTime(a){DateDiff.RelaceDateTime(a)}$(document).ready(function(){$(".Thumbnails").each(function(){var a=$(this);a.load(function(){var g=a.attr("maxsize");var f=g;var e=g;var d=0;var c=a.width();var b=a.height();if(c>f||b>e){if(c>b){a.css("width",f);b=b*f/c;a.css("height",b)}else{a.css("height",e);c=c*e/b;a.css("width",c)}}})})});function Id(b,c){var a=document.getElementById(b);if(a){if(c){a=a.getElementsByTagName(c)}return a}else{a=document.getElementsByName(b);if(a.length>0){if(/^\d+$/.test(c)){return a[c]}else{if(!c){return a}}}else{a=document.getElementsByTagName(b);if(a.length>0){if(/^\d+$/.test(c)){return a[c]}else{if(!c){return a}}}}}}function Ps(){var b=Id("Ps","a"),d=Id("Ps","img")[0];if(b.length>=2&&d){var g,l,h,j=new Image(),e=new Image(),k=function(){if(g){location=b[0].href}else{location=b[1].href}};h=!($.browser.msie);if(h){j.src="/img/Cursor/pre.gif";e.src="/img/Cursor/next.gif"}else{j.src="/img/Cursor/pre.ani";e.src="/img/Cursor/next.ani"}d.onclick=k;d.onmousemove=function(f){var a,c;if(h){if(!l){l=document.createElement("img");l.onclick=k}a=f.clientX-d.offsetLeft}else{var f=window.event;a=f.offsetX}if(a<=d.clientWidth/2){c=true}else{c=false}if(h){if(c!=g){g=c;if(c){d.alt="点击跳到上一张"}else{d.alt="点击跳到下一张"}}d.style.cursor="none";l.style.position="fixed";l.style.top=f.clientY+"px";l.style.left=f.clientX+"px";l.style.margin="0";l.style.cursor="none";if(c){l.src=j.src}else{l.src=e.src}document.body.appendChild(l)}else{if(c!=g){g=c;if(c){d.style.cursor="url('"+j.src+"')";d.alt="点击跳到上一张"}else{d.style.cursor="url('"+e.src+"')";d.alt="点击跳到下一张"}}}};if(h){document.onmouseout=function(c){if(l){var a=c.target;if(a!=d){document.body.removeChild(l);l=null}}}}}}function ShowMsgbox(c){var a;var b=$("#div_tips_v2");b.css("cursor","pointer");b.html("<div class='tip_layer' style='z-index: 10000;'><div class='tl_ico_hits'></div>"+c+"<div class='tl_end'></div></div>");b.css("left",(($(document).width())/2-(parseInt(b.width())/2))+"px");b.css("top",(($(document).height())/2-(parseInt(b.height())/2))+"px");b.css("display","block").fadeIn("fast").delay(2000).fadeOut("slow")}function ShowNotifybox(d,c){var a={dir1:"up",dir2:"left",firstpos1:15,firstpos2:15};var b={pnotify_title:d,pnotify_text:c,pnotify_addclass:"stack-bottomright",pnotify_stack:a};$.pnotify(b)}$(document).ready(function(){$(".AvatarImg").each(function(){$(this).css("cursor","pointer");var a=$(this).attr("src");a=a.substring(a.indexOf("pid=")+4);if(a!="-1"){$(this).qtip({content:{text:'<img class="throbber" src="/images/loading.gif" alt="Loading..." />',url:"/Tools/Profile.aspx?pid="+a},position:{corner:{target:"bottomRight",tooltip:"topRight"},adjust:{screen:true}},show:{when:"mouseover",solo:true},hide:"unfocus",style:{tip:true,border:{width:0,radius:3},name:"blue",width:320}})}})});