/*--------------------- jquery.cookie.js ---------------------*/
/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // NOTE Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};
/*--------------------- colorChanger.js ---------------------*/
changeColorSet=function(color){
	if(color==null){
	var color=$.cookie('mobibyColor');
		color=(color==null)?'blue':color;
	}
	var CSSList=document.getElementsByTagName('LINK');
	for(var i=0;i<CSSList.length;i++){
		var rel=CSSList.item(i).rel;
		var title=CSSList.item(i).title;
		var match='';
		if(rel.match(/alternate/)&&(match=title.match(/mobiby_(.*)/))){
			CSSList.item(i).disabled=true;
			if(match[1]==color){
				var d=CSSList.item(i).disabled=false;
			}
		}
	}
	$.cookie('mobibyColor',color);
}
changeColorSet();
$(document).ready(function(){
$('#blue').click(function(){changeColorSet('blue');});
$('#green').click(function(){changeColorSet('green');});
$('#pink').click(function(){changeColorSet('pink');});
$('#black').click(function(){changeColorSet('black');});
$('#orange').click(function(){changeColorSet('orange');});
;});
/*--------------------- fontSizeChanger.js ---------------------*/
getStyleObject=function(){
	var stylesheets=document.styleSheets;
	for(var i=0;i<stylesheets.length;i++){
	if(stylesheets.item(i).href.match(/fontSize.css$/)){
	var stylesheet=stylesheets.item(i);
	break;
	}
	}
	if(stylesheet.cssRules){
	cssrules=stylesheet.cssRules;
	}else if(stylesheet.rules){
	cssrules=stylesheet.rules;
	}
	for(var i=0;i<cssrules.length;i++){
	if(cssrules.item(i).selectorText.match(/^.centerColumn$/)){
	oStyle=cssrules.item(i).style;
	}
	}
	return oStyle;
}

changeFontSize = function(fontSize){
	
	var oStyle = getStyleObject();
	oStyle.cssText='font-size:'+fontSize;
	$.cookie('cartGateFontSizeChanger',fontSize);
}

var fontSize = $.cookie('cartGateFontSizeChanger');
if(fontSize) changeFontSize(fontSize);


$(document).ready(function(){
	$('#smallFont').click(function(){changeFontSize('13px')});
	$('#mediumFont').click(function(){changeFontSize('15px')});
	$('#largeFont').click(function(){changeFontSize('20px')});
});
/*--------------------- roll_over.js ---------------------*/
function initRollOverImages(){
    var image_cache = new Object();
    $("img.roll_over").each(function(i){
        var imgsrc = this.src;
        if("undefined" != typeof(this.src)){
        	var dot = this.src.lastIndexOf('.');
        	var imgsrc_on = this.src.substr(0, dot) + '_over' + this.src.substr(dot, 4);
	        image_cache[this.src] = new Image();
        	image_cache[this.src].src = imgsrc_on;
        	$(this).hover(function(){
	            this.src = imgsrc_on;
        }, function(){
            this.src = imgsrc;
        });
        }
    });
}

$(document).ready(initRollOverImages);
/*--------------------- tabber.js ---------------------*/
/*==================================================
$Id: tabber.js,v 1.9 2006/04/27 20:51:51 pat Exp $
tabber.js by Patrick Fitzgerald pat@barelyfitz.com

Documentation can be found at the following URL:
http://www.barelyfitz.com/projects/tabber/

License (http://www.opensource.org/licenses/mit-license.php)

Copyright (c) 2006 Patrick Fitzgerald

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==================================================*/

function tabberObj(argsObj)
{
var arg;
this.div=null;
this.classMain="tabber";
this.classMainLive="tabberlive";
this.classTab="tabbertab";
this.classTabDefault="tabbertabdefault";
this.classNav="tabbernav";
this.classTabHide="tabbertabhide";
this.classNavActive="tabberactive";
this.titleElements=['h2','h3','h4','h5','h6'];
this.titleElementsStripHTML=true;
this.removeTitle=true;
this.addLinkId=false;
this.linkIdFormat='<tabberid>nav<tabnumberone>';
for(arg in argsObj){this[arg]=argsObj[arg];}
this.REclassMain=new RegExp('\\b'+this.classMain+'\\b','gi');
this.REclassMainLive=new RegExp('\\b'+this.classMainLive+'\\b','gi');
this.REclassTab=new RegExp('\\b'+this.classTab+'\\b','gi');
this.REclassTabDefault=new RegExp('\\b'+this.classTabDefault+'\\b','gi');
this.REclassTabHide=new RegExp('\\b'+this.classTabHide+'\\b','gi');
this.tabs=new Array();
if(this.div){
this.init(this.div);
this.div=null;
}
}
tabberObj.prototype.init=function(e)
{
var
childNodes,
i,i2,
t,
defaultTab=0,
DOM_ul,
DOM_li,
DOM_a,
aId,
headingElement;
if(!document.getElementsByTagName){return false;}
if(e.id){
this.id=e.id;
}
this.tabs.length=0;
childNodes=e.childNodes;
for(i=0;i<childNodes.length;i++){
if(childNodes[i].className&&
childNodes[i].className.match(this.REclassTab)){
t=new Object();
t.div=childNodes[i];
this.tabs[this.tabs.length]=t;
if(childNodes[i].className.match(this.REclassTabDefault)){
defaultTab=this.tabs.length-1;
}
}
}
DOM_ul=document.createElement("ul");
DOM_ul.className=this.classNav;
for(i=0;i<this.tabs.length;i++){
t=this.tabs[i];
t.headingText=t.div.title;
if(this.removeTitle){t.div.title='';}
if(!t.headingText){
for(i2=0;i2<this.titleElements.length;i2++){
headingElement=t.div.getElementsByTagName(this.titleElements[i2])[0];
if(headingElement){
t.headingText=headingElement.innerHTML;
if(this.titleElementsStripHTML){
t.headingText.replace(/<br>/gi," ");
t.headingText=t.headingText.replace(/<[^>]+>/g,"");
}
break;
}
}
}
if(!t.headingText){
t.headingText=i+1;
}
DOM_li=document.createElement("li");
t.li=DOM_li;
DOM_a=document.createElement("a");
//すでにエンコード済みなので、２重にエンコードされてしまう
//DOM_a.appendChild(document.createTextNode(t.headingText));
DOM_a.innerHTML=t.headingText;
DOM_a.href="javascript:void(null);";
DOM_a.title=t.headingText;
DOM_a.onclick=this.navClick;
DOM_a.tabber=this;
DOM_a.tabberIndex=i;
if(this.addLinkId&&this.linkIdFormat){
aId=this.linkIdFormat;
aId=aId.replace(/<tabberid>/gi,this.id);
aId=aId.replace(/<tabnumberzero>/gi,i);
aId=aId.replace(/<tabnumberone>/gi,i+1);
aId=aId.replace(/<tabtitle>/gi,t.headingText.replace(/[^a-zA-Z0-9\-]/gi,''));
DOM_a.id=aId;
}
DOM_li.appendChild(DOM_a);
DOM_ul.appendChild(DOM_li);
}
e.insertBefore(DOM_ul,e.firstChild);
e.className=e.className.replace(this.REclassMain,this.classMainLive);
this.tabShow(defaultTab);
if(typeof this.onLoad=='function'){
this.onLoad({tabber:this});
}
return this;
};
tabberObj.prototype.navClick=function(event)
{
var
rVal,
a,
self,
tabberIndex,
onClickArgs;
a=this;
if(!a.tabber){return false;}
self=a.tabber;
tabberIndex=a.tabberIndex;
a.blur();
if(typeof self.onClick=='function'){
onClickArgs={'tabber':self,'index':tabberIndex,'event':event};
if(!event){onClickArgs.event=window.event;}
rVal=self.onClick(onClickArgs);
if(rVal===false){return false;}
}
self.tabShow(tabberIndex);
return false;
};
tabberObj.prototype.tabHideAll=function()
{
var i;
for(i=0;i<this.tabs.length;i++){
this.tabHide(i);
}
};
tabberObj.prototype.tabHide=function(tabberIndex)
{
var div;
if(!this.tabs[tabberIndex]){return false;}
div=this.tabs[tabberIndex].div;
if(!div.className.match(this.REclassTabHide)){
div.className+=' '+this.classTabHide;
}
this.navClearActive(tabberIndex);
return this;
};
tabberObj.prototype.tabShow=function(tabberIndex)
{
var div;
if(!this.tabs[tabberIndex]){return false;}
this.tabHideAll();
div=this.tabs[tabberIndex].div;
div.className=div.className.replace(this.REclassTabHide,'');
this.navSetActive(tabberIndex);
if(typeof this.onTabDisplay=='function'){
this.onTabDisplay({'tabber':this,'index':tabberIndex});
}
return this;
};
tabberObj.prototype.navSetActive=function(tabberIndex)
{
this.tabs[tabberIndex].li.className=this.classNavActive;
return this;
};
tabberObj.prototype.navClearActive=function(tabberIndex)
{
this.tabs[tabberIndex].li.className='';
return this;
};
function tabberAutomatic(tabberArgs)
{
var
tempObj,
divs,
i;
if(!tabberArgs){tabberArgs={};}
tempObj=new tabberObj(tabberArgs);
divs=document.getElementsByTagName("div");
for(i=0;i<divs.length;i++){
if(divs[i].className&&
divs[i].className.match(tempObj.REclassMain)){
tabberArgs.div=divs[i];
divs[i].tabber=new tabberObj(tabberArgs);
}
}
return this;
}
function tabberAutomaticOnLoad(tabberArgs)
{
var oldOnLoad;
if(!tabberArgs){tabberArgs={};}
oldOnLoad=window.onload;
if(typeof window.onload!='function'){
window.onload=function(){
tabberAutomatic(tabberArgs);
};
}else{
window.onload=function(){
oldOnLoad();
tabberAutomatic(tabberArgs);
};
}
}
if(typeof tabberOptions=='undefined'){
tabberAutomaticOnLoad();
}else{
if(!tabberOptions['manualStartup']){
tabberAutomaticOnLoad(tabberOptions);
}
}
/*--------------------- yuga.js ---------------------*/
/*
 * yuga.js 0.7.1 - 優雅なWeb制作のためのJS
 *
 * Copyright (c) 2009 Kyosuke Nakamura (kyosuke.jp)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Since:     2006-10-30
 * Modified:  2009-01-27
 *
 * jQuery 1.3.1
 * ThickBox 3.1
 */

/*
 * [使用方法] XHTMLのhead要素内で次のように読み込みます。
 
<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
<script type="text/javascript" src="js/yuga.js" charset="utf-8"></script>

 */

(function($) {

	$(function() {
		//$.yuga.selflink();
		//$.yuga.rollover();
		//$.yuga.externalLink();
		//$.yuga.thickbox();
		$.yuga.scroll();
		//$.yuga.tab();
		$.yuga.stripe();
		//$.yuga.css3class();
	});

	//---------------------------------------------------------------------

	$.yuga = {
		// URIを解析したオブジェクトを返すfunction
		Uri: function(path){
			var self = this;
			this.originalPath = path;
			//絶対パスを取得
			this.absolutePath = (function(){
				var e = document.createElement('span');
				e.innerHTML = '<a href="' + path + '" />';
				return e.firstChild.href;
			})();
			//絶対パスを分解
			var fields = {'schema' : 2, 'username' : 5, 'password' : 6, 'host' : 7, 'path' : 9, 'query' : 10, 'fragment' : 11};
			var r = /^((\w+):)?(\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/.exec(this.absolutePath);
			for (var field in fields) {
				this[field] = r[fields[field]];
			}
			this.querys = {};
			if(this.query){
				$.each(self.query.split('&'), function(){
					var a = this.split('=');
					if (a.length == 2) self.querys[a[0]] = a[1];
				});
			}
		},
		//現在のページと親ディレクトリへのリンク
		selflink: function (options) {
			var c = $.extend({
				selfLinkAreaSelector:'body',
				selfLinkClass:'current',
				parentsLinkClass:'parentsLink',
				postfix: '_cr',
				changeImgSelf:true,
				changeImgParents:true
			}, options);
			$(c.selfLinkAreaSelector+((c.selfLinkAreaSelector)?' ':'')+'a[href]').each(function(){
				var href = new $.yuga.Uri(this.getAttribute('href'));
				var setImgFlg = false;
				if ((href.absolutePath == location.href) && !href.fragment) {
					//同じ文書にリンク
					$(this).addClass(c.selfLinkClass);
					setImgFlg = c.changeImgSelf;
				} else if (0 <= location.href.search(href.absolutePath)) {
					//親ディレクトリリンク
					$(this).addClass(c.parentsLinkClass);
					setImgFlg = c.changeImgParents;
				}
				if (setImgFlg){
					//img要素が含まれていたら現在用画像（_cr）に設定
					$(this).find('img').each(function(){
						this.originalSrc = $(this).attr('src');
						this.currentSrc = this.originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
						$(this).attr('src',this.currentSrc);
					});
				}
			});
		},
		//ロールオーバー
		rollover: function(options) {
			var c = $.extend({
				hoverSelector: '.btn, .allbtn img',
				groupSelector: '.btngroup',
				postfix: '_on'
			}, options);
			//ロールオーバーするノードの初期化
			var rolloverImgs = $(c.hoverSelector).filter(isNotCurrent);
			rolloverImgs.each(function(){
				this.originalSrc = $(this).attr('src');
				this.rolloverSrc = this.originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
				this.rolloverImg = new Image;
				this.rolloverImg.src = this.rolloverSrc;
			});
			//グループ内のimg要素を指定するセレクタ生成
			var groupingImgs = $(c.groupSelector).find('img').filter(isRolloverImg);

			//通常ロールオーバー
			rolloverImgs.not(groupingImgs).hover(function(){
				$(this).attr('src',this.rolloverSrc);
			},function(){
				$(this).attr('src',this.originalSrc);
			});
			//グループ化されたロールオーバー
			$(c.groupSelector).hover(function(){
				$(this).find('img').filter(isRolloverImg).each(function(){
					$(this).attr('src',this.rolloverSrc);
				});
			},function(){
				$(this).find('img').filter(isRolloverImg).each(function(){
					$(this).attr('src',this.originalSrc);
				});
			});
			//フィルタ用function
			function isNotCurrent(i){
				return Boolean(!this.currentSrc);
			}
			function isRolloverImg(i){
				return Boolean(this.rolloverSrc);
			}

		},
		//外部リンクは別ウインドウを設定
		externalLink: function(options) {
			var c = $.extend({
				windowOpen:true,
				externalClass: 'externalLink',
				addIconSrc: ''
			}, options);
			var uri = new $.yuga.Uri(location.href);
			var e = $('a[href^="http://"]').not('a[href^="' + uri.schema + '://' + uri.host + '/' + '"]');
			if (c.windowOpen) {
				e.click(function(){
					window.open(this.href, '_blank');
					return false;
				});
			}
			if (c.addIconSrc) e.not(':has(img)').after($('<img src="'+c.addIconSrc+'" class="externalIcon" />'));
			e.addClass(c.externalClass);
		},
		//画像へ直リンクするとthickboxで表示(thickbox.js利用)
		thickbox: function() {
			try {
				tb_init('a[href$=".jpg"]:not(.thickbox, a[href*="?"]), a[href$=".gif"][href!="?"]:not(.thickbox, a[href*="?"]), a[href$=".png"][href!="?"]:not(.thickbox, a[href*="?"])');
			} catch(e) {
			}	
		},
		//ページ内リンクはするするスクロール
		scroll: function(options) {
			//ドキュメントのスクロールを制御するオブジェクト
			var scroller = (function() {
				var c = $.extend({
					easing:100,
					step:30,
					fps:60,
					fragment:''
				}, options);
				c.ms = Math.floor(1000/c.fps);
				var timerId;
				var param = {
					stepCount:0,
					startY:0,
					endY:0,
					lastY:0
				};
				//スクロール中に実行されるfunction
				function move() {
					if (param.stepCount == c.step) {
						//スクロール終了時
						setFragment(param.hrefdata.absolutePath);
						window.scrollTo(getCurrentX(), param.endY);
					} else if (param.lastY == getCurrentY()) {
						//通常スクロール時
						param.stepCount++;
						window.scrollTo(getCurrentX(), getEasingY());
						param.lastY = getEasingY();
						timerId = setTimeout(move, c.ms); 
					} else {
						//キャンセル発生
						if (getCurrentY()+getViewportHeight() == getDocumentHeight()) {
							//画面下のためスクロール終了
							setFragment(param.hrefdata.absolutePath);
						}
					}
				}
				function setFragment(path){
					location.href = path
				}
				function getCurrentY() {
					return document.body.scrollTop  || document.documentElement.scrollTop;
				}
				function getCurrentX() {
					return document.body.scrollLeft  || document.documentElement.scrollLeft;
				}
				function getDocumentHeight(){
					return document.documentElement.scrollHeight || document.body.scrollHeight;
				}
				function getViewportHeight(){
					return (!$.browser.safari && !$.browser.opera) ? document.documentElement.clientHeight || document.body.clientHeight || document.body.scrollHeight : window.innerHeight;
				}
				function getEasingY() {
					return Math.floor(getEasing(param.startY, param.endY, param.stepCount, c.step, c.easing));
				}
				function getEasing(start, end, stepCount, step, easing) {
					var s = stepCount / step;
					return (end - start) * (s + easing / (100 * Math.PI) * Math.sin(Math.PI * s)) + start;
				}
				return {
					set: function(options) {
						this.stop();
						if (options.startY == undefined) options.startY = getCurrentY();
						param = $.extend(param, options);
						param.lastY = param.startY;
						timerId = setTimeout(move, c.ms); 
					},
					stop: function(){
						clearTimeout(timerId);
						param.stepCount = 0;
					}
				};
			})();
			$('a[href^=#], area[href^=#]').not('a[href=#], area[href=#]').each(function(){
				this.hrefdata = new $.yuga.Uri(this.getAttribute('href'));
			}).click(function(){
				var target = $('#'+this.hrefdata.fragment);
				if (target.length == 0) target = $('a[name='+this.hrefdata.fragment+']');
				if (target.length) {
					scroller.set({
						endY: target.offset().top,
						hrefdata: this.hrefdata
					});
					return false;
				}
			});
		},
		//タブ機能
		tab: function(options) {
			var c = $.extend({
				tabNavSelector:'.tabNav',
				activeTabClass:'active'
			}, options);
			$(c.tabNavSelector).each(function(){
				var tabNavList = $(this).find('a[href^=#], area[href^=#]');
				var tabBodyList;
				tabNavList.each(function(){
					this.hrefdata = new $.yuga.Uri(this.getAttribute('href'));
					var selecter = '#'+this.hrefdata.fragment;
					if (tabBodyList) {
						tabBodyList = tabBodyList.add(selecter);
					} else {
						tabBodyList = $(selecter);
					}
					$(this).unbind('click');
					$(this).click(function(){
						tabNavList.removeClass(c.activeTabClass);
						$(this).addClass(c.activeTabClass);
						tabBodyList.hide();
						$(selecter).show();
						return false;
					});
				});
				tabBodyList.hide()
				tabNavList.filter(':first').trigger('click');
			});
		},
		//奇数、偶数を自動追加
		stripe: function(options) {
			var c = $.extend({
				oddClass:'odd',
				evenClass:'even'
			}, options);
			$('ul, ol').each(function(){
				//JSでは0から数えるのでevenとaddを逆に指定
				$(this).children('li:odd').addClass(c.evenClass);
				$(this).children('li:even').addClass(c.oddClass);
			});
			$('table, tbody').each(function(){
				$(this).children('tr:odd').addClass(c.evenClass);
				$(this).children('tr:even').addClass(c.oddClass);
			});
		},
		//css3のクラスを追加
		css3class: function() {
			//:first-child, :last-childをクラスとして追加
			$('body :first-child').addClass('firstChild');
			$('body :last-child').addClass('lastChild');
			//css3の:emptyをクラスとして追加
			$('body :empty').addClass('empty');
		}
	};
})(jQuery);

