document.data = [{tag:'奴隸',cnt:1},{tag:'乙女系',cnt:1},{tag:',,',cnt:1},{tag:'奴隸 女王',cnt:1},{tag:"背景設定",cnt:1,no:4},{tag:"賀開板",cnt:1,no:7},{tag:"賀開版",cnt:11,no:9},{tag:"賀開版",cnt:53,no:11},{tag:"Vitamin系列",cnt:5,no:30},{tag:"首先來推薦一下吧~(PC類)",cnt:12,no:40},{tag:"DGS要出游戲了",cnt:2,no:59},{tag:"金色琴弦",cnt:18,no:87},{tag:"mymaster",cnt:10,no:94},{tag:"メイド★はじめました~ご主人様のお世話いたします♥~",cnt:2,no:160},{tag:"うたの☆プリンスさまっ♪",cnt:8,no:165},{tag:"starry sky春夏秋冬",cnt:44,no:168},{tag:"Laughter Land",cnt:7,no:200},{tag:"女性向雜誌",cnt:4,no:217},{tag:"Riddle Garden",cnt:1,no:228},{tag:"ジョーカーの国のアリス",cnt:9,no:242},{tag:"新遊戲...",cnt:31,no:250},{tag:"ときめきメモリアルGirl's Side 3rd Story",cnt:13,no:283},{tag:"君の中のパラディアーム",cnt:5,no:294},{tag:"秋季內容物剪影",cnt:1,no:308},{tag:"LUCKYDOG的新作『ラッキードッグ1+bad egg』轉載翼夢",cnt:18,no:312},{tag:"HUNKS WORK SHOP",cnt:4,no:311},{tag:"Vana Gxardeno",cnt:4,no:385},{tag:"乙女的恋革命★ラブレボ!!",cnt:10,no:394},{tag:"Under the Moon ~つきいろ絵本~",cnt:6,no:405},{tag:"Starry Sky 星座彼氏季",cnt:337,no:419},{tag:"裸執事",cnt:1,no:786},{tag:"美蕾家的遊戲",cnt:3,no:797}]; document.attr = { matchContains: true, minChars: 0, matchContains: true, autoFill: false, max: 50, scrollHeight: 300, selectFirst: false, formatItem: function(row, i, max, term) { return (row.tag?row.tag:row.sub).replace(new RegExp("(" + $("#t1").val() + ")", "gi"), "$1") + " (" + row.cnt + ")"; }, formatMatch: function(row, i, max) { return (row.tag?row.tag:row.sub); }, formatResult: function(row) { return (row.tag?row.tag:row.sub); } }; $('#t1').autocomplete(document.data, document.attr); $('#t1').result(function(event, data, formatted) { if(!data) return; createCookie('t1',data.tag,30); if(data.no) window.location.href='pixmicat.php?res=' + encodeURI(data.no); else if(data.tag) window.location.href = (false&&location.href.match(/old/)? 'pixmicat.php?mode=category&c=' : 'pixmicat.php?mode=module&load=mod_catalog&c=') + encodeURI(data.tag); else if(data.sub) window.location.href='pixmicat.php?mode=module&load=mod_catalog&sub=' + encodeURI(data.sub); }); $('#t1').keydown(function(e){ if(e.keyCode==27){ $(this).blur(); } if(e.keyCode==13){ $(this).search(); } return true; });