﻿//latest:2009-02-26 designed by 不惑仔 http://boohover.pixnet.net/blog
$(function(){


var posRel={position:"relative"};
var posAbs={position:"absolute"};

//登入鈕
$(".mbNav .mbNavLog:has(a[href*=login])").hide();
$("#breadcrumb span.current").toggle(
 function(){
		$(".mbNav .mbNavLog:has(a[href*=login])").fadeIn(900);
 },
 function(){
		$(".mbNav .mbNavLog:has(a[href*=login])").hide();
 }
);

$("#msgBoard .pageOn:nth-child(1)").addClass("pageOnBef");

//ie
if($.browser.msie){
	if(parseInt($.browser.version,10)<8){

	 
		if(parseInt($.browser.version,10)<7){
			
		
		}//lt ie7
	
	}//lt ie8
}

//留言板訪客貼文頁

var inStrGlob=/在此輸入/;
var inStrMbDfl=new Array();
var colorMbDfl=$(".formMb").css("color");

$("#msgPost :text,#msgPost textarea").each(
 function(i){
		inStrMbDfl[i]=$(this).val();
		$(this).focus(
   function(){
    $(this).css({color:colorMbDfl});
		  if($(this).val().search(inStrGlob)>-1) $(this).val("");
   }
		).blur(
   function(){
    if($(this).val()=="") $(this).val(inStrMbDfl[i]);
   }
  );
 }
);


$("#msgPost .postPrivate [class^=xtra]").hide();
$("#msgPost #private").focus(
 function(){
		$(this).nextAll(":hidden").fadeIn(500);
 }
).blur(
 function(){
		$(this).nextAll("[class^=xtra]").fadeOut(900);
	}
);

$("#msgPost .postAuth .picCode").addClass("zoomOut");
$("#msgPost .postAuth input").focus(
 function(){
		$(this).nextAll("[class^=xtra]").hide().fadeIn(1800);
		$(this).nextAll("img").removeClass("zoomOut");
 }
).blur(
 function(){
  $(this).nextAll("img").addClass("zoomOut");
	}
);
//留言板編輯頁[回前頁]按鈕
$("#msgEdit .msgDel [class^=xtra]").hide();
$("#msgEdit #deling").focus(
 function(){
		$(this).nextAll(":hidden").fadeIn(500);
 }
).blur(
 function(){
		$(this).nextAll("[class^=xtra]").fadeOut(900);
	}
);

$("#msgEdit .confirming").append('<button type="button"><span>不執行/回前頁</span></button>').click(function(){history.go(-1);});


});