
function createClockBox(clocksrc){var a=new flash({classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0",width:"45",height:"45"},{movie:clocksrc,quality:"best",wmode:"transparent",menu:"false"},{height:"45",width:"45",align:"middle",type:"application/x-shockwave-flash",menu:"false",wmode:"transparent",scale:"showall",loop:"true",play:"true",pluginspage:"http://www.adobe.com/go/getflashplayer_cn",quality:"best",src:clocksrc});$('<div class="clockBox">'+a.str+"</div>").appendTo("#mainWrapper")};function flash(d,c,a){this.str="";if($.browser.msie){this.str+="<object ";for(var b in d){this.str+=b+'="'+d[b]+'" '}this.str+=">";for(var b in c){this.str+='<param name="'+b+'" value="'+c[b]+'" /> '}this.str+="</object>"}else{this.str+="<embed ";for(var b in a){this.str+=b+'="'+a[b]+'" '}this.str+="> </embed>"}}flash.prototype.append=function(a){$("#"+a).html(this.str)};jQuery.getPos=function(e)
{var l=0;var t=0;var w=jQuery.intval(jQuery.css(e,'width'));var h=jQuery.intval(jQuery.css(e,'height'));var wb=e.offsetWidth;var hb=e.offsetHeight;while(e.offsetParent){l+=e.offsetLeft+(e.currentStyle?jQuery.intval(e.currentStyle.borderLeftWidth):0);t+=e.offsetTop+(e.currentStyle?jQuery.intval(e.currentStyle.borderTopWidth):0);e=e.offsetParent;}
l+=e.offsetLeft+(e.currentStyle?jQuery.intval(e.currentStyle.borderLeftWidth):0);t+=e.offsetTop+(e.currentStyle?jQuery.intval(e.currentStyle.borderTopWidth):0);return{x:l,y:t,w:w,h:h,wb:wb,hb:hb};};jQuery.getClient=function(e)
{if(e){w=e.clientWidth;h=e.clientHeight;}else{w=(window.innerWidth)?window.innerWidth:(document.documentElement&&document.documentElement.clientWidth)?document.documentElement.clientWidth:document.body.offsetWidth;h=(window.innerHeight)?window.innerHeight:(document.documentElement&&document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.offsetHeight;}
return{w:w,h:h};};jQuery.getScroll=function(e)
{if(e){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;}else{if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight;}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight;}}
return{t:t,l:l,w:w,h:h};};jQuery.intval=function(v)
{v=parseInt(v);return isNaN(v)?0:v;};jQuery.fn.ScrollTo=function(s){o=jQuery.speed(s);return this.each(function(){new jQuery.fx.ScrollTo(this,o);});};jQuery.fx.ScrollTo=function(e,o)
{var z=this;z.o=o;z.e=e;z.p=jQuery.getPos(e);z.s=jQuery.getScroll();z.clear=function(){clearInterval(z.timer);z.timer=null};z.t=(new Date).getTime();z.step=function(){var t=(new Date).getTime();var p=(t-z.t)/z.o.duration;if(t>=z.o.duration+z.t){z.clear();setTimeout(function(){z.scroll(z.p.y,z.p.x)},13);}else{st=((-Math.cos(p*Math.PI)/2)+0.5)*(z.p.y-z.s.t)+z.s.t;sl=((-Math.cos(p*Math.PI)/2)+0.5)*(z.p.x-z.s.l)+z.s.l;z.scroll(st,sl);}};z.scroll=function(t,l){window.scrollTo(l,t)};z.timer=setInterval(function(){z.step();},13);};(function($)
{$(document).ready(function(){var site_url=$('#logo a').attr("href");jQuery("#post .entry p a[href*='"+site_url+"'],a[href*='javascript'],a:has(img),a[href*=#]").attr("rel","inlinks");jQuery("#post .entry p a[rel!='inlinks']").click(function(){window.open(this.href);return false;});jQuery("a[rel='external'],a[rel='external nofollow']").click(function(){window.open(this.href);return false;});jQuery("#post .entry p a[rel!='inlinks']").css({background:"url(/wp-content/themes/diGu/images/out-link.gif) no-repeat right 100%","padding-right":"12px"});var hleft=$('#content').height();var hrigh=$('#sidebar').height();if(hleft>hrigh)
{$('#sidebar').height(hleft);}
else
{$('#content').css({"padding-bottom":hrigh-hleft})}
$('.gotop').click(function(){$('#header').ScrollTo(1000);});$('#post-a-comment').click(function(){$('#respond').ScrollTo(1000);$('#comment').focus();return false;});if($('.thread_comments').text()=='disable')
{$('#comments li').each(function(){var zzz=$(this).find('.comment-meta');var rep="<div class=\"reply\"><a class=\"comment-reply-link\" ref=\"javascript:void(0);\">Reply</a></div>";zzz.append(rep);});}
$('.reply').click(function(){if($('#comment')){field=$('#comment');}else{alert("The comment box does not exist!");return false;}
var atname=$(this).parents(".comment-body").find("cite").text();var aurl='"'+$(this).parents(".comment-body").attr("id").replace("div-","#")+'"';var insertStr="\n&lt;a href="+aurl+"&gt;@"+atname+"&lt;/a&gt;&nbsp;";var insertStr2="&lt;a href="+aurl+"&gt;@"+atname+"&lt;/a&gt;&nbsp;";if(field.val()!="")
{var fievalue=field.html();$('textarea#comment').clone().appendTo('#re-use');$('textarea#comment:first').remove();$('textarea#comment').empty();if(fievalue.indexOf(insertStr2)>-1){$('textarea#comment').html(fievalue);alert("You've already appended this reply!");return false;}
{$('textarea#comment').html(fievalue+insertStr);}}
else
{$('textarea#comment').clone().appendTo('#re-use');$('textarea#comment:first').remove();$('textarea#comment').empty();$('textarea#comment').html(insertStr2);}
if($('.thread_comments').text()=='disable')
{$('textarea#comment').ScrollTo(1000);}
$('textarea#comment').focus();});$('#cancel-comment-reply-link').click(function(){$("#comment").empty();});if($("#author").text()!="")
$("#author_info").hide();$('#change-comment-author').click(function(){if($("#author_info").css("display")=='none')
$("#change-comment-author").html("Close &raquo;");else
$("#change-comment-author").html("Change &raquo;");$("#author_info").slideToggle('slow');});var C=/^@/;var A=/^#comment-/;$("#comments li p a").each(function(){if($(this).text().match(C)&&$(this).attr("href").match(A)){$(this).addClass("smooth")}});$('.smooth').click(function(){$($(this).attr("href")).ScrollTo(1000);return false;});$("#postMeta a").each(function(){var currentUrl=window.location;if(($(this).attr("href")==(currentUrl+"#comments"))||($(this).attr("href")==(currentUrl+"#respond")))
{if($('#commentsCount').text().indexOf('0')>-1)
$(this).addClass("to-respon-comment");else
$(this).addClass("to-comments");}});$('.to-respon-comment').click(function(){$('#respond').ScrollTo(1000);$('#comment').focus();return false;});$('.to-comments').click(function(){$('#comments').ScrollTo(1000);return false;});$('#comments .smooth').hover(function(){if($('.thread_comments').text()=='disable')
$($(this).attr("href")).clone().hide().attr("id","").insertAfter($(this).parents("li")).addClass('tip').fadeIn('slow');else
{var commentcontent=$($(this).attr("href")).clone();commentcontent.each(function(){$(this).find('li').remove()})
commentcontent.hide().attr("id","").insertAfter($(this).parents("li")).addClass('tip').fadeIn('slow');}},function(){$(".tip").animate({opacity:"hide",top:'+=80'},{duration:700},function(){$(".tip").remove();})}).mousemove(function(e){$(".tip").css({left:(e.clientX-150),top:(e.pageY-100)});});$('#trackbacks').click(function(){$("#pinglist").slideToggle('slow');});$('#Notice .noticeTitle').click(function(){$("#Notice .NoticeContent").slideToggle('slow');});});})(jQuery);
