/* * yuga.js 0.3.0 - ?…η????eb?‹β??‡α??????S * * Copyright (c) 2007 Kyosuke Nakamura (kyosuke.jp) * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * Since: 2006-10-30 * Modified: 2007-06-18 * * jQuery 1.1.2 * ThickBox 3 * Interface 1.2 (Effects scroll) */ /* yuga.js???„„^?‚ƒ?ƒα????functionδ] */ var yuga = { // image?‡α???…α?‡ƒ?Žα??? preloader: { loadedImages: [], load: function (url){ var img = this.loadedImages; var l = img.length; img[l] = new Image(); img[l].src = url; } }, // URI??δ₯‚†???????…α???Œα?„ƒ?ˆƒ????δ½???function URI: function(s){ this.originalPath = s; //δT‹γˆ]???ƒ????γ]? this.getAbsolutePath = function(path){ var img = new Image(); img.src = path; path = img.src; img.src = '#'; return path; }; this.absolutePath = this.getAbsolutePath(s); //???????Œα?†ƒ?…α?Šƒ?ˆƒ???ƒα???????…ƒ???? this.isSelfLink = (this.absolutePath == location.href); //δT‹γˆ]???ƒ????δ₯ var a = this.absolutePath.split('://'); this.schema = a[0]; var d = a[1].split('/'); this.host = d.shift(); var f = d.pop(); this.dirs = d; this.file = f.split('?')[0].split('#')[0]; var fn = this.file.split('.'); this.fileExtension = (fn.length == 1) ? '' : fn.pop(); this.fileName = fn.join('.'); var fq = f.split('?'); this.query = (fq[1]) ? fq[1].split('#')[0] : ''; var ff = f.split('#'); this.fragment = (ff[1]) ? ff[1].split('?')[0] : ''; } }; $(function(){ //??γWŒα?‡ƒ?Žα?†ƒ?…α?Žα??? $('.btn').each(function(){ this.originalSrc = $(this).attr('src'); this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)/, "_on$1"); yuga.preloader.load(this.rolloverSrc); }); $('.btn').not($('.btngroup .btn')).hover(function(){ $(this).attr('src',this.rolloverSrc); },function(){ $(this).attr('src',this.originalSrc); }); //???Žα?Œγ???…α?Šƒ?ˆƒ?ˆƒ?????????α???ƒ?Žα?Œƒ?„ƒ??interface.js?…‡?? $(function(){ $('.pageTop a').click(function(){ $('#header').ScrollTo(600, 'easeout'); return false; }); }) //?Ž…??Œε?Šα?…α?Šƒ?ˆƒ??????hickbox?„ˆGδC?thickbox.js?…‡?? tb_init('a[@href$=".jpg"], a[@href$=".gif"], a[@href$=".png"]'); //γD??ˆα???‹δ?ˆα???…γ??住…?? $('ul').each(function(){ $(this).find('li:odd').addClass('even'); $(this).find('li:even').addClass('odd'); }); $('table').each(function(){ $(this).find('th:odd,td:odd').addClass('even'); $(this).find('th:even,td:even').addClass('odd'); }); });