jQuery.easing.easeOutQuart=function(a,b,g,f,e){return-f*((b=b/e-1)*b*b*b-1)+g};jQuery(function(a){a.easing.backout=function(f,g,e,j,i){var h=1.70158;return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e}});$(document).ready(function(){$("ul[class=menuTab] li[class=tab]").eq(0).css({"border-left-width":"1px"});$("ul[class=menuTab] li[class=tab]").each(function(a){$(this).hover(function(){$("div[class=tabContent]").hide();$("div[class=tabContent]").eq(a).show();$(this).addClass("tabHover").removeClass("tab")},function(){$(this).addClass("tab").removeClass("tabHover")})});$("div[class=tabContent]").eq(0).show();$("div[class=example]").each(function(a){$(this).find("div[class=exampleImage] img").hover(function(){$("div[class=example] img").not("div[class=exampleImage] img").eq(a).attr("src",$(this).attr("src"))},function(){})});$("ul[class=showIndex] .vote , ul[class=showIndex] .tab").eq(0).css({"border-left-width":"1px","border-right-width":"0px"});$("#postUploader table").each(function(a){$(this).find("tr:last td").css({"border-bottom-width":"0px"})});var d=$("form#postUploader");$("form#postUploader").each(function(){for(var a=1;a<=10;a++){$("#imgUploader_"+a).makeAsyncUploader({upload_url:"./ajax.uploadfile.php",file_size_limit:1024*2*1.2+" KB",file_types:"*.jpg; *.jpeg",dataValue:null})}$("form#postUploader input[type=text]#webUrl").click(function(){if($(this).val()==""){$(this).val("http://")}}).focus(function(){if($(this).val()==""){$(this).val("http://")}}).blur(function(){if($(this).val()=="http://"){$(this).val("")}})});var c=0;$("div#uploadButtom").click(function(){switch(parseInt($('#status').val())){case 1:case 2:alert('投稿時間為，2009年10月12日(一）AM 9:00 起 至 2009年11月23日(一) PM 6:00 截止。');return false;break;case 3:alert('您目前所上傳的參賽活動已經5筆了！');return false;break;}if(parseInt($('#uploadNums').val())>=5){alert('您目前所上傳的參賽活動已經5筆了！');return false;}var a=$("#title");if(jQuery.trim(a.val())==""){alert("請輸入作品名稱");a.focus();return false}var a=$("#textarea");if(jQuery.trim(a.val())==""){alert("請輸入作品介紹");a.focus();return false}var a=$("#photoNums");if(parseInt(a.val())==0){alert("至少請上傳一張照片");return false}$("form#postUploader").submit()});$("ul[class=moreImages] img").each(function(){$(this).click(function(){var e=$(this).attr("src");var a=jQuery.url.setUrl(e).param("ow");var b=jQuery.url.setUrl(e).param("oh");var e="img.php?w="+(a>350?350:a)+"&h="+(b>350?350:b)+"&src="+jQuery.url.setUrl(e).param("src")+"&ow="+a+"&oh="+b;$("div[class=imageTOP] img:eq(0)").attr("src",e);})});if($("#slideshow").attr("id")=="slideshow"){$("#slideshow").serialScroll({items:"li",next:"a.Arr_Right_A",prev:"a.Arr_Left_A",offset:0,start:0,duration:350,force:false,stop:true,lock:true,cycle:false,easing:"easeOutQuart",jump:false});$('input[type=button][id^=doDelete_]').click(function(){if(confirm('確定要刪除此留言')){$('#bid').val($(this).attr("id").substring(9,$(this).attr("id").length));$('#fDelete').submit();return false;}return false;});}});function openBig(b,a,c){var u=$('div[class=imageTOP] img:eq(0)').attr("src");var w=jQuery.url.setUrl(u).param("ow");var h=jQuery.url.setUrl(u).param("oh");var w=(w>600?600:w);var h=(h>600?600:h);var args="height="+(parseInt(h)+20)+" ,width="+(parseInt(w)+20)+"  ,toolbar=no,menubar=no ,scrollbars=no ,resizable=yes ,location=no ,status=no ,top=100 , left=100";var url="img.php?w="+w+"&h="+h+"&src="+jQuery.url.setUrl(u).param("src")+"&r="+Math.random();window.open(url,"",args);}function vote(a,c){var b;b="post=1&action=1";b+="&type=vote";b+="&id="+c;b+="&sid="+$("#sid").val();b+="&auth="+$("#auth").val();$.ajax({type:"POST",url:"do.count.php",data:b,error:function(d){alert("錯誤：系統忙碌中，請稍待一下，或重新試一次！");return false},success:function(e){switch(parseInt(e)){case 1:alert("請先 登入會員！！");MM_openBrWindow("./login.php","","");return false;break;case 2:alert("投票成功！");var d=$("span[class=votesView]").html();var d=parseInt(d)+1;$("span[class=votesView]").html(d);return false;break;case 3:alert("這參賽者今天你已投過");return false;break;case 4:alert("網路票選活動自2009年11月2日(一）AM 9:00 至 2009年12月21日(一）PM 6:00");return false;break}return false}})};