// Google Analytics
var _gaq = _gaq || []; 
_gaq.push(['_setAccount', 'UA-15833945-2']); 
_gaq.push(['_setDomainName', 'none']); 
_gaq.push(['_setAllowLinker', true]); 
_gaq.push(['_trackPageview']); 

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 
})();

// Google CDN
if(!this.JSON)this.JSON={};
(function(){function k(a){return a<10?"0"+a:a}function n(a){o.lastIndex=0;return o.test(a)?'"'+a.replace(o,function(c){var d=q[c];return typeof d==="string"?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function l(a,c){var d,f,i=g,e,b=c[a];if(b&&typeof b==="object"&&typeof b.toJSON==="function")b=b.toJSON(a);if(typeof j==="function")b=j.call(c,a,b);switch(typeof b){case "string":return n(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b);case "object":if(!b)return"null";
g+=m;e=[];if(Object.prototype.toString.apply(b)==="[object Array]"){f=b.length;for(a=0;a<f;a+=1)e[a]=l(a,b)||"null";c=e.length===0?"[]":g?"[\n"+g+e.join(",\n"+g)+"\n"+i+"]":"["+e.join(",")+"]";g=i;return c}if(j&&typeof j==="object"){f=j.length;for(a=0;a<f;a+=1){d=j[a];if(typeof d==="string")if(c=l(d,b))e.push(n(d)+(g?": ":":")+c)}}else for(d in b)if(Object.hasOwnProperty.call(b,d))if(c=l(d,b))e.push(n(d)+(g?": ":":")+c);c=e.length===0?"{}":g?"{\n"+g+e.join(",\n"+g)+"\n"+i+"}":"{"+e.join(",")+"}";
g=i;return c}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+k(this.getUTCMonth()+1)+"-"+k(this.getUTCDate())+"T"+k(this.getUTCHours())+":"+k(this.getUTCMinutes())+":"+k(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var p=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,m,q={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},j;if(typeof JSON.stringify!=="function")JSON.stringify=function(a,c,d){var f;m=g="";if(typeof d==="number")for(f=0;f<d;f+=1)m+=" ";else if(typeof d==="string")m=d;if((j=c)&&typeof c!=="function"&&(typeof c!=="object"||typeof c.length!=="number"))throw new Error("JSON.stringify");return l("",
{"":a})};if(typeof JSON.parse!=="function")JSON.parse=function(a,c){function d(f,i){var e,b,h=f[i];if(h&&typeof h==="object")for(e in h)if(Object.hasOwnProperty.call(h,e)){b=d(h,e);if(b!==undefined)h[e]=b;else delete h[e]}return c.call(f,i,h)}p.lastIndex=0;if(p.test(a))a=a.replace(p,function(f){return"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){a=eval("("+a+")");return typeof c==="function"?d({"":a},""):a}throw new SyntaxError("JSON.parse");}})();
//"
function jQueryEasing(){

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});

};
/*
 * jcommon.js 2.0 beta
 * Copyright (c) 2009 C.M.A. Co.,Ltd.
 *
 * Last Added: 2009-07-28
 */

(function(){
	google.load("jquery", "1.3");
	google.load("swfobject", "2.2");
	google.setOnLoadCallback(function(){
		window.absPath = '/';
		jQueryEasing();
		jQueryCustomFn();
		jQueryRun();
	});
})();
function jQueryCustomFn(){
	//URL解析
	location.linkArray=location.pathname.split('/');location.linkArray=location.linkArray.slice(1);var isLinkAry=new Array;var isLinkAry2=new Array;for(var i=1;i<=location.linkArray.length;i++){isLinkAry[i]=location.linkArray.slice(-i);isLinkAry[i]=isLinkAry[i].join('/');isLinkAry[i]=isLinkAry[i].replace(/\/index.*$/,"/")}location.linkArray=location.linkArray.slice(0,-1);for(var i=1;i<=location.linkArray.length;i++){isLinkAry2[i]=location.linkArray.slice(0,i);isLinkAry2[i]=isLinkAry2[i].join('/');isLinkAry2[i]=isLinkAry2[i].replace(/\/index.*$/,"");isLinkAry2[i]=isLinkAry2[i]+'/'}location.linkArray=isLinkAry.concat(isLinkAry2);
	//jcommon
	$.jcommon={preloader:{loadedImages:[],load:function(url){var img=this.loadedImages;var l=img.length;img[l]=new Image();img[l].src=url}},URI:function(path){path=path.replace(/^file:\/\/\//,"");path=path.replace(/^https[^a-z]*/,"");path=path.replace(/^http[^a-z]*/,"");path=path.replace(document.domain,"");path=path.replace(/^[\.|\/]*/,"");path=path.replace(/index.*$/,"");this.absolutePath=path;this.len=location.linkArray.length;this.isSelfLink=false;while(this.len--){this.isSelfLink=this.isSelfLink||(this.absolutePath==location.linkArray[this.len])}}};
	//ロールオーバー
	$.fn.addRollOver=function(add){$(this).filter('img').each(function(){$(this).runRollOver(add,$(this));}).end().not('img').each(function(){$(this).runRollOver(add,$(this).find('img'));});return this;};
	$.fn.runRollOver=function(add,target){$(this).each(function(num){this.originalSrc=String(target.attr('src'));this.rolloverSrc=this.originalSrc.replace(/(\.gif|\.jpg|\.png)/,add+"$1");}).hover(function(){target.attr('src',this.rolloverSrc);},function(){target.attr('src',this.originalSrc);});return this;};
	//現在のページへのリンク
	$.fn.addCurrentImages=function(add){$(this).each(function(){var href=new $.jcommon.URI($(this).attr('href'));if(href.isSelfLink){$(this).addClass('current');$(this).unbind('mouseenter');$(this).unbind('mouseleave');$(this).find('img').each(function(){$(this).unbind('mouseenter');$(this).unbind('mouseleave');this.currentSrc=this.getAttribute('src').replace(/(\.gif|\.jpg|\.png)/,add+"$1");$(this).attr('src',this.currentSrc)});}});return this;};
	//画像popUp
	$.fn.imagePoper=function(){$(this).click(function(){var _x;var _y;var popImg;var _URL=$(this).attr("href");var floatingObj='#floatingWrapper,#floatingWindow';function closeEvent(){$('#floatingWindow').hide(250,function(){$(this).remove();$('#floatingWrapper').fadeOut(100,function(){$(this).remove()})});return false}$('body').append('<div id="floatingWrapper"></div>').append('<div id="floatingWindow"><p><img src="'+_URL+'" /></p><span class="closeBtn" href="">閉じる</span></div>');$('#floatingWrapper').css({display:"none",height:$('body').height()+'px'}).click(function(){closeEvent()}).fadeIn(250,function(){$('#floatingWindow').find('img').each(function(){var scTop=$.browser.opera?250:$(window).height()/2;popImg=$(this);_x=$(window).width()/2-popImg.width()/2;_y=scTop+$(window).scrollTop()-popImg.height()/2}).end().css({display:"none",top:_y+'px',left:_x+'px',width:popImg.width()+'px'}).show(250).click(function(){closeEvent()})});return false})};
	//ページpopUp
	$.fn.pagePoper=function(){$(this).each(function(){this.param=$(this).attr("href");this.param=this.param.split('?');this.param[1]=this.param[1].split('&');this.param[1]=this.param[1].join(',');$(this).attr("href","")}).click(function(){window.open(this.param[0],'popup',"menubar=1,location=1,resizable=1,status=1,"+this.param[1]);return false})};
	//するするアニメーション
	$.fn.easeScroller = function(d,e){$(this).click(function(){$('html,body').animate({scrollTop:$($(this).attr('href')).offset().top},{duration:d,easing:e});return false;});}
	//ページ全体にリンク
	$.fn.groupLink=function(){$(this).css({cursor:'pointer'}).hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')}).click(function(){location.href=$(this).find('a').attr('href');return false})}
	//外部リンクは別ウインドウを設定
	$.fn.blankWindow=function(){$(this).addClass('externalLink').click(function(){window.open(this.href, '_blank');return false;});}
	//Slider
	$.fn.slider=function(settings){		
		settings = jQuery.extend({
			movement:'slide',
			isCurrentImage:false,
			currentImage:'_on',
			currentClass:'current',
			contClass:'.contents',
			nextClass:'.next',
			backClass:'.back',
			naviClass:'.navigation',
			separate:1,
			overshoot:10,
			time:500,
			loop:false,
			auto:false,
			easeStrength:'Expo'
		},settings);
		// Init
		var	$root	= $(this), 
			$cont	= $(this).find(settings.contClass+':first'),
			$next	= $(this).find(settings.nextClass+':first'),
			$back	= $(this).find(settings.backClass+':first'),
			$navi	= $(this).find(settings.naviClass+':first');
		var	len		= $cont.find('ul:first>li').length,
			count	= 0,
			eventName = $root.attr('id')||$root.attr('class').split(' ',1);
		var crImage = function(c){
			$cr = $navi.find('li:eq('+count/settings.separate+')');
			$cr.trigger('changeImage'+eventName,false);
			count = c;
			$cr = $navi.find('li:eq('+count/settings.separate+')');
			$cr.trigger('changeImage'+eventName,true);
		}
		var autoTrigger = function(){
			if(settings.auto){
				$root.stop().clearQueue();
				$root.animate({width:$root.width()},{
					duration: settings.auto,
					easing: 'linear',
					complete: function(){
						$root.trigger('moveContent'+eventName,[count+settings.separate]);
					}
				});
			}
		}
		if (settings.movement == 'peel') {
			$cont.find('li').append('<img class="peeler" src="'+absPath+'/shared/img/slider/fig_pager.png">');
			$cont.find('img.peeler').css({
				zIndex:99,position:'absolute',left:$cont.width(),top:$cont.height(),width:0,height:0
			})
		}
		$root.bind('moveContent'+eventName,function(e,c){
			if(settings.movement=='peel'){
				//peel
				var cr = $cont.find('li.current').index();
				
				if (c < 0 ) c=len-1 ;
				else if(c >= len) c=0 ;
				
				if (c != cr) {
					//CR IMAGE CHANGE
					crImage(c);
					//
					$cont.find('li')
						.css({zIndex:0})
					.filter('.current').removeClass('current')
						.css({zIndex:len})
							.find('span')
							.css({
								margin:0,width:$cont.width(),height:$cont.height()
							});
					$cont.find('li:eq('+c+')').queue('fx',[]).addClass('current')
						.css({zIndex:len+1})
					.find('span').queue('fx',[])
						.css({
							width:0,height:0
						})
						.animate({margin:0,width:$cont.width(),height:$cont.height()},{duration:settings.time, easing:'easeOut'+settings.easeStrength})
					.end()
						.find('img.peeler').queue('fx',[])
						.css({
							zIndex:len,left:0,top:0,width:0,height:0
						})
						.animate({left:2,top:2,width:$cont.width(),height:$cont.height()},{duration:settings.time*.8, easing:'easeOut'+settings.easeStrength})
						.animate({left:$cont.width(),top:$cont.height(),width:0,height:0},{duration:settings.time*.5, easing:'easeIn'+settings.easeStrength});
				}
			}else{
				//slide||updown
				var isEnd	= false, overshoot = 0, $cr;
				if(settings.auto||settings.loop){
					if (c < 0 ) c=len-1 ;
					else if(c >= len) c=0 ;
				}
				if(c<0||c>=len){
					count = (c<0?0:len-settings.separate);
					overshoot = settings.overshoot*(c<0?1:-1);
					isEnd = true;
				}else{
					//CR IMAGE CHANGE
					crImage(c);
				};
				var moveX	= $cont.find('ul:first>li:eq('+count+')').position().left;
				var moveY	= $cont.find('ul:first>li:eq('+count+')').position().top;
				if(isEnd){
					var	overshootX = settings.movement=='slide'?overshoot:0,
						overshootY = settings.movement=='updown'?overshoot:0;
					$cont.find('ul:first').queue('fx',[])
						.animate({left:-moveX+overshootX,top:-moveY+overshootY},{duration:settings.time/2, easing:'easeOut'+settings.easeStrength})
						.animate({left:-moveX,top:-moveY},{duration:settings.time/2, easing:'easeInOut'+settings.easeStrength});
				}else{
					$cont.find('ul:first').queue('fx',[])
						.animate({left:-moveX,top:-moveY},{duration:settings.time, easing:'easeOut'+settings.easeStrength});
				};
			}
			autoTrigger();
		});
		$back.click(function(){
			$root.trigger('moveContent'+eventName,[count-settings.separate]);
			return false;
		});
		$next.click(function(){
			$root.trigger('moveContent'+eventName,[count+settings.separate]);
			return false;
		});
		$navi.find('li').css({cursor:'pointer'}).click(function(){
			$root.trigger('moveContent'+eventName,[$(this).index()*settings.separate]);
			return false;
		})
		.bind('changeImage'+eventName,function(e,cr,noClass){
			if(settings.isCurrentImage){
				var	src = $(this).find('img').attr('src'),
					regexp = new RegExp(settings.currentImage+'(\.[a-z]+)$');
				if(cr&&!src.match(regexp)){
					$(this).find('img').attr('src',src.replace(/(\.[a-z]+)$/,settings.currentImage+'$1')); 
				}else if(!cr){
					$(this).find('img').attr('src',src.replace(regexp,'$1'));
				}
			}
			if(!noClass){
				cr ?
					$(this).addClass(settings.currentClass):
					$(this).removeClass(settings.currentClass);
			}
		}).hover(function(){
			$(this).addClass('hover');
			if(!$(this).hasClass(settings.currentClass))$(this).trigger('changeImage'+eventName,[true,true]);
		},function(){
			$(this).removeClass('hover');
			if(!$(this).hasClass(settings.currentClass))$(this).trigger('changeImage'+eventName,[false,true]);
		});
		autoTrigger();
		return this;
	}
};
function jQueryRun(){
$(function(){
		
	//ロールオーバー
	$('img.btn,p.toTop img,#subNav a img,#globalNav a img').addRollOver('_on');
	//現在のページへのリンク
	$('#globalNav a,.navigation a').addCurrentImages('_on');	
	//ページ全体にリンク
	$('#main .box','#iteIndex').groupLink();
	//するするアニメーション
	$('a[href^="#"]:not([href^="#point"])').easeScroller(1000,"easeOutExpo");
	//oddとevenを追加
	$('body#faqIndex .section li,body#movIndex .section li,#comIndex #main .section ul li').filter(':odd').addClass('even').end().filter(':even').addClass('odd');
	//画像popUp
	//$('a[href$=".jpg"],a[href$=".gif"]','#mainContent').imagePoper();
	//ポップアップ ※href="[表示するURL]?width=000&amp;height=000"
	$('a.popup','#main').pagePoper();

	//:first-child, :last-childをクラスとして追加
	$('dd').filter(':first-child').addClass('firstChild');
	$('dd').filter(':last-child').addClass('lastChild');
	
	//連番nxxxをクラスとして追加
	$('#supShowroom #main .section li').each(function(num){
		$(this).addClass('n'+(++num));
	});

	//n段組み
	$('.col3 li:nth-child(3n)').addClass('clearMargin');
	
	//外部リンクは別ウインドウを設定
	var noBlank	=[	
				   	'[href^="http://www.atsumi.co.jp/"]',
				   	'[href^="http://www.atsumielectric.com/"]'
				 ];
	$('a[href$=".pdf"],a[href^="http://"]:not('+noBlank+')').blankWindow();
	
	//フォーム
	$('.must label,.must input','#form').click(function(){
		if($(this).parent('li').attr('class')=='set')$('em.hide').css({display:'inline'});
		else $('em.hide').css({display:'none'});
	});
	
	$('#home #news').load('/whatsnew/indexlist.html');
	
	var expressInstall = function() {
		var att = { data:window.absPath+"expressInstall.swf", width:"100%", height:"330" };
		var par = { menu:false };
		var id = "swf";
		swfobject.showExpressInstall(att, par, id, function(){
			$('#swf').html('<img src="img/pho_mainVisual_001.jpg" width="1200" height="370" alt="SECURITY SYSTEM　それは安全と安心を具現化したもの。アツミ電氣は、心のかようヒューマンエンジニアリングを目指しています。" />');
		});
	}
	 /*------------------------------------------
	 *	#home :HOME
	 
	 */ 

	 if($('#home').length){
			//$.getJSON(window.absPath+"shared/data/products.json",function(data){
				if (swfobject.hasFlashPlayerVersion("10")) {
					var fn = function() {
						var att = { data:"loader.swf", width:"100%", height:"330" };
						//var params = {allowScriptAccess:"always",wmode:"opaque",bgcolor:"#000"};
						var par = {wmode:"transparent"};
						//var par = { flashvars:'data='+JSON.stringify(data) };
						var id = "swf";
						//console.log(par);
						swfobject.createSWF(att, par, id);
					};
				}else {
					var fn = expressInstall();
				}
				swfobject.addDomLoadEvent(fn);
			//});
			$('#products').slider({separate:2})
				.find('ul.item li a span').each(function(){
					$(this).find('img').css({marginTop:($(this).height()-$(this).find('img').height())/2});
				});
		};// End if	
	 /*------------------------------------------
	 *	not#home
	 */ if(!$('#home').length){
			$('#subNav').append(
				'<li class="changeLang"><a href="http://www.atsumi.co.jp/"><img src="/shared/img/button/btn_japanese.png" alt="日本語" width="68" height="20" /></a></li>'
			);
		};// End if	
	 /*------------------------------------------
	 *	.products :PRODUCTS
	 */ if($('body.products').length){
		 
			$('div.productsList ul li span','#main')
				.add('div.productsList ul li p.photo','#main')
				.add('#mainPhoto')
				.add('#related dd').each(function(){
					$(this).find('img').css({marginTop:($(this).height()-$(this).find('img').height())/2});
				});
			
		};// End if	
	 /*------------------------------------------
	 *	#conIndex :Contacts
	 */ if($('#conIndex').length){
			data = [{
				"ID" : "Hamamatsu",
				"latlng" : [34.814171,137.744176]
			}];
			$('#gmap').css({height:340});
		 	gmapLoad('gmapIndexRun');
		};// End if	
	 /*------------------------------------------
	 *	
	 */
});
};
//GLOBAL VAR
var data;
//GMAP LOAD
function gmapLoad(fn){
	//Google Map API ver3
	var script = document.createElement("script");
	script.src = "http://maps.google.com/maps/api/js?sensor=true&language=en&callback="+fn;
	script.type = "text/javascript";
	document.getElementsByTagName("body")[0].appendChild(script);		
}
//GMAP MAIN
function gmapIndexRun(){
	var	$g = google.maps,
		gmap = new Object;
	// MAP
	gmap.latlng = new $g.LatLng(data[0].latlng[0],data[0].latlng[1]);	
	gmap.bounds = new $g.LatLngBounds(gmap.latlng,gmap.latlng);
	gmap.div = document.getElementById('gmap');
	gmap.param = {
		zoom:4,
		scrollwheel:false,
		center:new $g.LatLng(38.814171,137.744176),
		mapTypeId: $g.MapTypeId.TERRAIN
	};
	gmap.go = new $g.Map(gmap.div, gmap.param);
	// MARKER
	gmap.marker = new Object;
	gmap.marker.go = new Array;
	var i = 0;
	while(data[i]){
		gmap.marker.param = {
			map:gmap.go,
			position:new $g.LatLng(data[i].latlng[0],data[i].latlng[1])
		}
		gmap.marker.go.push(new $g.Marker(gmap.marker.param));
		gmap.bounds.extend( gmap.marker.param.position );
		i++;
	}
	//if($('#conIndex').length){
	//	gmap.go.fitBounds(gmap.bounds);
	//};
}
	

