1/* 2 * requires:jQuery v1.7.1 later 3 * name:settings.js 4 * author:Manabu Kushimoto(web-park.org) 5 */ 6 7jQuery(function($){ 8 var $ol=$('<div id="overLay" />'); 9 var $dc=$('<div id="displayContent" />'); 10 var $gc=$('<div id="getContents" />'); 11 var $close=$('<div id="modalClose" />'); 12 $dc.append($gc,$close); 13 $("body").append($ol,$dc); 14 $ol.css({"opacity":0.8}).hide(); 15 $dc.hide(); 16 17 $.fn.extend({ 18 //ONuN 19 targetBlank:function(options){ 20 var defaults={ 21 pageURL:document.URL 22 }; 23 var op=$.extend(defaults,options); 24 var $t=$(this); 25 var thisURL=$t.attr("href"); 26 $t.click(function(){ 27 window.open(thisURL,"_blank"); 28 return false; 29 }); 30 31 }, 32 //y[WàXN[ 33 pageScroll:function(options){ 34 var defaults={ 35 speed:800 36 }; 37 var op=$.extend(defaults,options); 38 var $t=$(this); 39 $t.click(function(){ 40 if(this.hash=="#top"){ 41 var HashOffset=$("body").offset().top; 42 }else{ 43 var Hash=$(this.hash); 44 try{ 45 var HashOffset=$(Hash).offset().top; 46 }catch(e){ 47 return false; 48 } 49 } 50 $("html:not(:animated),body:not(:animated)").animate({ 51 scrollTop: HashOffset 52 },op.speed); 53 return false; 54 }); 55 56 }, 57 //¤iJeSc[ 58 categoryTree:function(options){ 59 var defaults={ 60 id:"", 61 sub_id:"", 62 sub_sub_id:"" 63 }; 64 var op=$.extend(defaults,options); 65 var $t=$(this); 66 67 $("ul.side_nav > li > ul").not($("ul.side_nav > li:eq("+op.id+") > ul")).hide(); 68 $("ul.second_nav li ul").hide(); 69 70 try{ 71 $("ul.side_nav > li:eq("+op.id+") > ul.second_nav > li:eq("+op.sub_id+") > ul").show(); 72 $("ul.side_nav > li:eq("+op.id+") > ul.second_nav > li:eq("+op.sub_id+") > ul.third_nav > li:eq("+op.sub_sub_id+") > ul").show(); 73 }catch(e){}; 74 75 //JeSVINYLÌÝXCh_E 76 var open=true; 77 if(op.id==0&&op.sub_id!=1) open=false; 78 var $music=$("ul.side_nav > li:eq(0)"); 79 $(" > ul > li:eq(1) > a",$music).toggle(function(){ 80 toggleFN($(this).next("ul")); 81 },function(){ 82 toggleFN($(this).next("ul")); 83 }); 84 85 function toggleFN($target){ 86 if(open){ 87 $target.slideUp(300); 88 open=false; 89 }else{ 90 $target.slideDown(300); 91 open=true; 92 } 93 } 94 }, 95 //I[gtF[h 96 autoFade:function(options){ 97 var defaults={ 98 speed:200, 99 interval:1000 100 }; 101 var op=$.extend(defaults,options); 102 var $t=$(this); 103 var $child=$t.children(); 104 var len=$child.length; 105 var index_num=0; 106 107 $child.not($child.eq(0)).hide(); 108 109 setInterval(function(){ 110 $child.not($child.eq(index_num)).fadeOut(op.speed); 111 $child.eq(index_num).fadeIn(op.speed); 112 if(index_num==len-1){ 113 index_num=0; 114 }else{ 115 index_num=index_num+1; 116 } 117 },op.interval); 118 }, 119 //XCh_Ej [ 120 slideDownMenu:function(options){ 121 var defaults={ 122 speed:300 123 }; 124 var op=$.extend(defaults,options); 125 var $t=$(this); 126 var $ul=$t.find("ul"); 127 128 $ul.hide(); 129 130 $t.hover(function(){ 131 $("> ul",this).stop(true,true).slideDown(op.speed); 132 },function(){ 133 $("> ul",this).stop(true,true).slideUp(op.speed/2); 134 }); 135 136 $t.find(".no_link").css({cursor:"default"}); 137 $t.find(".no_link").bind("click",function(){ return false }); 138 139 }, 140 simpleModalAd:function(options){ 141 var defaults={ 142 top:"0", 143 left:"0", 144 right:"", 145 width:"auto", 146 height:"auto" 147 }; 148 var op=$.extend(defaults,options); 149 var $t=$(this); 150 var obj=$t.clone(true).show(); 151 152 $t.hide(); 153 154 $dc.show().css({ 155 top:op.top, 156 left:op.left, 157 width:op.width, 158 height:op.height 159 }); 160 if(op.right) $dc.css({ left:"",right:op.right }); 161 162 $gc.append(obj); 163 164 $close.bind("click",modalClose); 165 166 function modalClose(){ 167 $close.hide(); 168 $dc.hide(); 169 $gc.children().remove(); 170 } 171 172 }, 173 //^uRec 174 tabContents:function(options){ 175 var defaults={ 176 nav:"", 177 target:"", 178 on:"" 179 } 180 var op=$.extend(defaults,options); 181 var $t=$(this); 182 var nav_len=op.nav.length; 183 var target_h=op.target.eq(0).innerHeight(); 184 185 op.target.css({position:"absolute",top:"10px",left:"30px"}); 186 op.target.not(op.target.eq(0)).hide(); 187 op.target.parent().css({position:"relative",height:target_h+"px",overflow:"hidden"}); 188 189 for(var i=0;i<nav_len;i++){ 190 op.nav.eq(i).find("a").click(function(){ 191 var $id=$($(this).attr("href")); 192 var h=$id.innerHeight(); 193 op.nav.not($(this).parent()).removeClass(op.on); 194 $(this).parent().addClass(op.on); 195 $id.parent().stop(false,true).animate({height:h},600); 196 op.target.not($id).stop(false,true).fadeOut(300,function(){ 197 $id.fadeIn(300); 198 });
199 return false; 200 }); 201 } 202 203 } 204 }); 205 206 $("a.blank").each(function(){$(this).targetBlank();}); 207 $("a[href^=#]").pageScroll({speed:600}); 208 $("ul#gnav").find("li").each(function(){ $(this).slideDownMenu(); }); 209 210});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.