/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */


/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * Version: 3.0.2
 * 
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);

/**
 * 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(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};

/**
 * jQuery Custom Plugins
 */
(function(e){function a(p,i){var o=e.extend(true,a.defaults,i||{});var n=[];function k(q){var r=q.currentTarget;j(r,e(r).data("imgrollover_change"));if(o.onRollOver){o.onRollOver.call(this)}}function m(q){var r=q.currentTarget;j(r,e(r).data("imgrollover_default"));if(o.onRollOut){o.onRollOut.call(this)}}function j(q,r){e(q).attr("src",r)}function l(q,r){r=e(r);if(r.closest("em").length==0){var u=r.attr("src");var t=u.lastIndexOf(".");var s=u.substr(0,t)+o.suffix+u.substr(t,4);n.push(e("<img />").attr({src:s,alt:""}));r.data({imgrollover_default:u,imgrollover_change:s});r.bind({mouseenter:k,mouseleave:m})}}return p.each(l)}a.defaults={suffix:"_on",onRollOver:null,onRollOut:null};function f(m,i){var k=e.extend(true,f.defaults,i||{});var o=e((e.support.boxModel)?(navigator.appName.match(/Opera/)?"html":"html, body"):"body");function l(q){o.queue([]).stop()}function p(q,r){o.queue([]).stop()}function j(s,t){var u=t.hash;var v=t.href;var r=location.href;if(u&&e(u).length>0&&v.match(new RegExp(r.split("#")[0]))){e(t).bind("click",q)}function q(x){var C=window;var E=document;var D=E.body;var F=E.documentElement;var G=F.scrollWidth;var J=F.scrollHeight;var z=C.innerWidth||F.clientWidth;var w=C.innerHeight||F.clientHeight;var B=e(u).offset();var y={x:C.pageXOffset||F.scrollLeft||D.scrollLeft||0,y:C.pageYOffset||F.scrollTop||D.scrollTop||0};var A={x:B.left,y:B.top};var I=G-z;var H=J-w;if(I<A.x){A.x=I}if(H<A.y){A.y=H}o.queue([]).stop();o.animate({scrollLeft:parseInt(A.x),scrollTop:parseInt(A.y)},{duration:k.duration,easing:k.easing,step:k.onProgress,complete:k.onComplete});x.preventDefault();x.stopPropagation()}}var n=e(document);n.bind("click",l);if(e.fn.mousewheel){n.mousewheel(p)}return m.each(j)}f.defaults={duration:1000,easing:null,onProgress:null,onComplete:null};function h(l,j){var i=e.extend(true,h.defaults,j||{});function k(u,s){var p={width:screen.width,height:screen.height,left:0,top:0,menubar:0,toolbar:0,location:0,status:0,scrollbars:1,resizable:1,center:1,target:1,onUnload:null};s=e(s);var r=(s.attr("rel")||"").split(",");if(r.length==1&&r[0].split(":").length==1){var n=r[0];if(typeof(i[n])!="undefined"){p=e.extend(p,i[n])}}else{for(var t=0,q=r.length;t<q;t++){var o=r[t].split(":");if(typeof(p[o[0]])!="undefined"&&o.length==2){p[o[0]]=o[1]}}}var v="";var x=null;if(p.target=="_self"||p.target=="_blank"){v=p.target}else{v="PopupWindow";if(p.target==1||p.target=="yes"){v+=u}if(p.center==1||p.center=="yes"){p.left=(screen.width-p.width)/2;p.top=(screen.height-p.height)/2}x="";for(var w in p){if(w=="center",w=="target",w=="onUnload"){continue}x+=w+"="+p[w]+","}if(w){x=x.slice(0,-1)}}s.bind("click",m);function m(B){var y=window.open(B.currentTarget.href,v,x||"");if(y&&!y.closed){y.focus()}if(p.onUnload){var A=setInterval(z,500)}function z(){if(!y||y.closed){clearInterval(A);p.onUnload.call(this)}}return false}}return l.each(k)}h.defaults={selfWindow:{target:"_self"},blankWindow:{target:"_blank"},internal:{target:"_self"},external:{target:"_blank"}};var c=e.fn;function d(i){return a(this,i)}d.defaults=a.defaults;function g(i){return f(this,i)}g.defaults=f.defaults;function b(i){return h(this,i)}b.defaults=h.defaults;c.imageRollOver=d;c.pageScroller=g;c.windowNavigator=b})(jQuery);

( function( $ ) {
	/**
	 * iAcc
	 * localNav開閉設定
	 */
	$.fn.iAcc = function ( _acc ){
		
		var _openClass  = "acc_open";
		var _closeClass = "acc_close";
		var _dataClass  = "acc_dataInner";
		var _cfg = "close";
		
		this.each( function(){
			var _accBtn = $(this);
			_accBtn.css( "cursor","pointer" );
			_accBtn.next().addClass( _dataClass );
			_accBtn.next().wrap("<div class='acc_data'>");
			var _defOpen =_accBtn.parent().hasClass("cate_current");
			//console.log(_defOpen);
			
			if( _cfg == "open" || _defOpen ) _acc_open();
			else _acc_close();
			
			var addIcon = "<div class='ico'></div>";
			_accBtn.append( addIcon );
			
			_accBtn.find(".ico").click( _clickEvent );
			//_accBtn.click( _clickEvent );
			//_accBtn.hover( _acc_hover , _acc_out );
			
			function _clickEvent (){
				var state = _accBtn.next().attr("style");
				if( state.match("none") ) _acc_open();
				else _acc_close();
				return false;
			}
			
			function _acc_open (){
				var _targetClass = { t:_accBtn , rem:_closeClass , add:_openClass }
				_classChangeEvent ( _targetClass );
				_viewEvent( _accBtn.next() , "show" );
			}
			
			function _acc_close (){
				var _targetClass = { t:_accBtn , rem:_openClass , add:_closeClass }
				_classChangeEvent ( _targetClass );
				_viewEvent( _accBtn.next() , "hide" );
			}
			 
			function _acc_hover(){ _accBtn.css( { opacity: "0.7" } ); }
			function _acc_out()  { _accBtn.css( { opacity: "1"} ); }
			
		});
		
		function _classChangeEvent ( _targetClass ){
			$( _targetClass.t ).addClass   ( _targetClass.add );
			$( _targetClass.t ).removeClass( _targetClass.rem );
		}
		
		function _viewEvent ( t , e ){
			if( e == "show" )$( t ).show();
			else $( t ).hide();
		}
		
		return this;
	}


	// ローカル変数に window オブジェクトと document オブジェクトをキャッシュします。
	var windowObject   = window,
		documentObject = document;
	
	// jQuery ライブラリのメソッドをキャッシュします。
	var $extend = $.extend,
		$ajax   = $.ajax;
	
	/**
	 * inputFieldLabel
	 * <p>入力フィールドにデフォルトラベルを追加する機能を提供します。</p>
	 * 
	 * @param	elements:jQueryObject
	 * <p>対象となる jQueryObject オブジェクトです。</p>
	 * @param	options:Object
	 * <p>プラグインのオプションオブジェクトです。</p>
	 */
	function inputFieldLabel( elements, options ) {
		var settings = $extend( true, inputFieldLabel.defaults, options || {} );
		
		var labelText = settings.labelText, labelClass = settings.labelClass;
		
		function _each( index, element ) {
			var $element = $( element );
			$element.bind( { "focus":_focus, "blur":_blur } );
			$element.addClass( labelClass );
			$element.attr( "value", labelText );
			
			var $submitButton = $( settings.submitButton );
			if( $submitButton.length > 0 ) {
				$submitButton.data( "inputField", $element );
				$submitButton.bind( "click", _click );
			}
			
			function _focus( event ) {
				var $target = $( event.currentTarget );
				if( $target.attr( "value" ) === labelText ) {
					$target.removeClass( labelClass );
					$target.attr( "value", "" );
				}
			}
			
			function _blur( event ) {
				var $target = $( event.currentTarget );
				if( $target.attr( "value" ) === "" ) {
					$target.addClass( labelClass );
					$target.attr( "value", labelText );
				}
			}
			
			function _click( event ) {
				var $target = $( $( event.currentTarget ).data( "inputField" ) );
				if( $target.attr( "value" ) === labelText ) { return false; }
			}
		}
		
		return elements.each( _each );
	}
	
	inputFieldLabel.defaults = {
		labelText:"Search", labelClass:"defaultLabel", submitButton:null
	};
	
	/**
	 * fontSizeSelector
	 * <p>ページの基本フォントサイズを変更する機能を提供します。</p>
	 * 
	 * @param	elements:jQueryObject
	 * <p>対象となる jQueryObject オブジェクトです。</p>
	 * @param	options:Object
	 * <p>プラグインのオプションオブジェクトです。</p>
	 */
	function fontSizeSelector( elements, options ) {
		var settings = $extend( true, fontSizeSelector.defaults, options || {} );
		
		var size = settings.size, navi = settings.navi,
			selectedClass = settings.selectedClass, defaultSize = settings.defaultSize, useCookie = settings.useCookie;
		
		var $bodyElement = $( documentObject.body ), $cookie = $.cookie;
		
		if( useCookie && $cookie ) { defaultSize = $cookie( "configFontSize" ) || defaultSize; }
		
		function _each( index, element ) {
			var $element = $( element );
			
			var defaultSizeAnchor;
			
			for( var key in navi ) {
				if( !size[key] ) { throw new Error( "Error: 対応するフォントサイズ用の body タグに付加するクラス名が指定されていません。" ); }
				
				var value = navi[key];
				
				var targetItem = $element.find( "#" + value );
				if( !targetItem.length ) { targetItem = $element.find( "." + value ); }
				
				if( targetItem.length > 0 ) {
					var targetAnchor = targetItem.find( "a" );
					if( !targetAnchor.length ) {
						targetAnchor = $( "<a></a>" ).attr( { "href":"#", "title":targetItem.text() } );
						targetItem.wrapInner( targetAnchor );
					}
				//	var targetEmphasis = $( "<em></em>" ).append( targetAnchor.children().clone() );
					if( targetAnchor.length > 0 ) {
					//	$.data( targetItem.get( 0 ), "anchor", targetAnchor );
					//	$.data( targetItem.get( 0 ), "emphasis", targetEmphasis );
						targetAnchor.bind( "click", _click );
						if( defaultSize === key ) { defaultSizeAnchor = targetAnchor; }
					}
				}
			}
			
			if( defaultSizeAnchor ) { defaultSizeAnchor.trigger( "click" ); }
			
			function _click( event ) {
				var $target = $( event.currentTarget ),
					$parent = $target.parent(),
					$siblings = $parent.siblings();
				
				$target.unbind( "click", _click );
				
				if( !$bodyElement.length ) { $bodyElement = $( documentObject.body ); }
				
				var key, value;
				
				for( key in size ) {
					value = size[key];
					
					if( $bodyElement.hasClass( value ) ) { $bodyElement.removeClass( value ); }
				}
				
				for( var i = 0, l = $siblings.length; i < l; i++ ) {
					var $sibling = $( $siblings.get( i ) );
					var $em = $sibling.find( "em" );
					if( $em.length > 0 ) {
					//	var $anchor = $.data( $sibling.get( 0 ), "anchor" );
						var $anchor = $( "<a></a>" ).attr( { "href":"#", "title":$em.text() } ).append( $em.children() );
						$em.replaceWith( $anchor );
						$anchor.bind( "click", _click );
					}
				}
				
				for( key in navi ) {
					value = navi[key];
					
					if( $parent.attr( "id" ) === value || $parent.hasClass( value ) ) {
						$siblings.removeClass( selectedClass );
						$parent.addClass( selectedClass );
						
					//	$target.replaceWith( $.data( $parent.get( 0 ), "emphasis" ) );
						$target.replaceWith( $( "<em></em>" ).attr( "title", $target.text() ).append( $target.children() ) );
						
						$bodyElement.addClass( size[key] );
						
						if( useCookie && $cookie ) { $cookie( "configFontSize", key, { expires:settings.cookieExpires, path:settings.cookiePath } ); }
						
						break;
					}
				}
				
				return false;
			}
			
		}
		
		return elements.each( _each );
	}
	
	fontSizeSelector.defaults = {
		navi:{ small:"itemSmall", medium:"itemMedium", large:"itemLarge" },
		size:{ small:"sizeSmall", medium:"sizeMedium", large:"sizeLarge" },
		selectedClass:"selected", defaultSize:"medium", useCookie:false, cookieExpires:30, cookiePath:"/"
	};
	
	/**
	 * $fn
	 * <p>jQuery.fn オブジェクトです。</p>
	 */
	var $fn = $.fn;
	
	// fnInputFieldLabel
	function fnInputFieldLabel( options ) { return inputFieldLabel( this, options ); }
	fnInputFieldLabel.defaults = inputFieldLabel.defaults;
	
	// fnFontSizeSelector
	function fnFontSizeSelector( options ) { return fontSizeSelector( this, options ); }
	fnFontSizeSelector.defaults = fontSizeSelector.defaults;
	
	$fn.inputFieldLabel  = fnInputFieldLabel;
	$fn.fontSizeSelector = fnFontSizeSelector;


})( jQuery );
