document.write('<script type="text/javascript" src="/EN/SHARED/JS/country_code.js"></scr'+'ipt>');

// Change UTC Time
function calcDate(str) {
	// str = YYMMDDHHMM
	var i;
	var temp = new Array();
	for (i = 0; i < 5; i++) {
		temp[i] = parseInt(str.substring(i * 2, i * 2 + 2), 10);
	}
	var date = new Date();
	date.setUTCFullYear(temp[0] + 2000, temp[1] - 1, temp[2]);
	date.setUTCHours(temp[3] - 9, temp[4], 0);
	return date.getTime();
}
//live
var time_present = new Date().getTime();
var liveDispFlag01='off';
var liveScheduleBoxData00='';
var liveScheduleBoxData01='';
liveScheduleBoxData01+='<div id="topLive01">';
liveScheduleBoxData01+='<div><img src="/EN/TOP2011/IMAGES/top_live01.gif" width="251" height="44" alt="LIVE SCHEDULE" /></div>';
liveScheduleBoxData01+='<div id="topLive02">';
liveScheduleBoxData01+='<div id="topLive03">';
var liveScheduleBoxData02='';
var liveScheduleBoxData03='';
liveScheduleBoxData03+='</div>';
liveScheduleBoxData03+='<div id="topLive08"></div>';
liveScheduleBoxData03+='</div>';
liveScheduleBoxData03+='</div>';
if(typeof(liveData)!="undefined"){
	for(h=0;h<liveData.length;h++){
		if(calcDate(liveData[h].Banner_Start) <= time_present && calcDate(liveData[h].Banner_End)>= time_present){
			liveDispFlag01='on';
			liveScheduleBoxData02+='<!--01-->';
			liveScheduleBoxData02+='<div class="topLive04">';
			liveScheduleBoxData02+='<div class="topLive05 png_bg"></div>';
			if (calcDate(liveData[h].LivePage_Start) <= time_present && calcDate(liveData[h].Event_End) >= time_present) {
				liveScheduleBoxData02+='<div class="topLive06 png_bg"><a href="/EN/NISSANCHANNEL/live.html"><img src="'+liveData[h].Thumbnail+'" width="214" alt="'+liveData[h].Title+'" /></a></div>';
			}else if(liveData[h].VideoID){
				liveScheduleBoxData02+='<div class="topLive06 png_bg"><a href="/EN/NISSANCHANNEL/index.html?bctid='+liveData[h].VideoID+'"><img src="'+liveData[h].Thumbnail+'" width="214" alt="'+liveData[h].Title+'" /></a></div>';
			}else{
				liveScheduleBoxData02+='<div class="topLive06 png_bg"><!--<a href="javascript:void(0);">--><img src="'+liveData[h].Thumbnail+'" width="214" alt="'+liveData[h].Title+'" /><!--</a>--></div>';
			}
			liveScheduleBoxData02+='<div class="topLive07 png_bg"></div>';
			liveScheduleBoxData02+='<ul class="columnLink01">';
			if (calcDate(liveData[h].LivePage_Start) <= time_present && calcDate(liveData[h].Event_End) >= time_present) {
				liveScheduleBoxData02+='<li class="png_bg"><b><a href="/EN/NISSANCHANNEL/live.html" class="linkLive01">'+liveData[h].Title+'<br />'+liveData[h].Text+'</a></b></li>';
			}else if(liveData[h].VideoID){
				liveScheduleBoxData02+='<li class="png_bg"><b><a href="/EN/NISSANCHANNEL/index.html?bctid='+liveData[h].VideoID+'" class="linkLive01">'+liveData[h].Title+'<br />'+liveData[h].Text+'</a></b></li>';
			}else{
				liveScheduleBoxData02+='<li class="png_bg"><b style="color:#fff;"><!--<a href="javascript:void(0);" class="linkLive01">-->'+liveData[h].Title+'<br />'+liveData[h].Text+'<!--</a>--></b></li>';
			}
			liveScheduleBoxData02+='</ul></div>';
		}
	}
}


//blog
google.load("feeds","1");
function initialize01(){
	var minute01="-1";
	var blog_write_data01=new Array();
	var blog_write_data02=new Array();
	var blog_title01='Nissan Channel 23 Blog';
	var blog_link01='http://blog.nissan-global.com/EN/';
	var blog_image01='/EN/TOP2011/IMAGES/top_nissan01.gif';
	var blog_title02=new Array();
	var blog_link02=new Array();
	var blog_image02=new Array();
	var blog_item01=3;
	var blog_tag01=new Array('#blogData01','#blogData01-02','#blogData01-03');
	var blog_tag02=new Array('#blogData02','#blogData02-02','#blogData02-03');
	var blog_tag03=new Array('#blogDisp','#blogDisp-02','#blogDisp-03');
	//$.getJSON('http://json-time.appspot.com/time.json?&callback=?',function(data_type){
		//minute01=data_type.minute;
		/*if(minute01=="-1"){
			minute01=(new Date()).getMinutes();
		}*/
		var blog_url01='';
		//var blog_rss01=blog_link01+'?feed=rss2'+"&amp;"+minute01;
		//var blog_rss01=blog_link01+'?feed=rss2'+"&"+(new Date()).getTime();
		var blog_rss01=blog_link01+'?feed=rss2'+"&"+(new Date()).getFullYear()+(new Date()).getMonth()+(new Date()).getDate()+(new Date()).getHours()+(new Date()).getMinutes();
		var feed = new google.feeds.Feed(blog_rss01);
		feed.setNumEntries(blog_item01);
		feed.setResultFormat(google.feeds.Feed.XML_FORMAT); 
		feed.load(function(result01){
			if(!result01.error){
				var container01=document.getElementById("feed");
				var items01=result01.xmlDocument.getElementsByTagName("item");
				var blog_html01=''; 
				for(var i=0;i<blog_item01;i++){
					blog_title02.push(items01[i].getElementsByTagName("title")[0].firstChild.nodeValue)
					blog_link02.push(items01[i].getElementsByTagName("link")[0].firstChild.nodeValue)
					if(items01[i].getElementsByTagName("image")[0]!=null){
						blog_image02.push(items01[i].getElementsByTagName("image")[0].firstChild.firstChild.nodeValue)
					}
				}
				for(q=0;q<blog_item01;q++){
					blog_write_data01.push('<a href="'+blog_link02[q]+'" target="_self"><img src="'+blog_image02[q]+'" width="214" alt="'+blog_title02[q]+'" id="blogImageData01" /></a>');
					blog_write_data02.push('<a href="'+blog_link02[q]+'" target="_self">'+blog_title02[q]+'</a>');
					$(blog_tag01[q]).html(blog_write_data01[q]);
					$(blog_tag02[q]).html(blog_write_data02[q]);
					$(blog_tag03[q]).css({"visibility":"visible"}).show();
				}
			}else{
				$(blog_tag01[0]).html('<a href="'+blog_link01+'" target="_self"><img src="'+blog_image01+'" width="214" alt="'+blog_title01+'"/></a>');
				$(blog_tag02[0]).html('<a href="'+blog_link01+'" target="_self">'+blog_title01+'</a>');
			}
		});
	//});
}
google.setOnLoadCallback(initialize01);


/*
---------------------------------------------------------
	jquery.browser.custom.min.js by HiGash.Net [2009/10/23]
	*GNU General Public License v3
	*http://higash.net/labo/

	Modify jQuery Browser Plugin by Jonathan Neal
	*Copyright (C) 2008 Jonathan Neal
	*http://jquery.thewikies.com/browser/
---------------------------------------------------------
*/
(function($){$.browserTest=function(a,z){var u='unknown',x='X',m=function(r,h){for(var i=0;i<h.length;i=i+1){r=r.replace(h[i][0],h[i][1]);}return r;},c=function(i,a,b,c){var r={name:m((a.exec(i)||[u,u])[1],b)};r[r.name]=true;r.version=(c.exec(i)||[x,x,x,x])[3];if(r.name.match(/safari/)&&r.version>400){r.version='2.0';}if(r.name==='presto'){r.version=($.browser.version>9.27)?'futhark':'lineaTopics_b';}r.versionNumber=parseFloat(r.version,10)||0;r.versionX=(r.version!==x)?(r.version+'').substr(0,1):x;r.className=r.name+r.versionX;return r;};a=(a.match(/Opera|Navigator|Minefield|KHTML|Chrome/)?m(a,[[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/,''],['Chrome Safari','Chrome'],['KHTML','Konqueror'],['Minefield','Firefox'],['Navigator','Netscape']]):a).toLowerCase();$.browser=$.extend((!z)?$.browser:{},c(a,/(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/,[],/(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/));$.layout=c(a,/(gecko|konqueror|msie|opera|webkit)/,[['konqueror','khtml'],['msie','trident'],['opera','presto']],/(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);$.os={name:(/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase())||[u])[0].replace('sunos','solaris')};if(!z){$('html').addClass([$.os.name,$.browser.name,$.browser.className,$.layout.name,$.layout.className].join(' '));}};$.browserTest(navigator.userAgent);})(jQuery);$(document).ready(function(){$("html").css("overflow-y","scroll");$("body").addClass($.browser.className);$("input[type=text]").addClass("text");$("input[type=radio]").addClass("radio");$("input[type=checkbox]").addClass("checkbox");$("input[type=submit]").addClass("submit")});



if(($.browser.versionX==6)&&($.browser.name=="msie")){
/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.8a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
**/
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();
DD_belatedPNG.fix('img, .png_bg');
}
/*
 * Marquee jQuery Plug-in
 *
 * Copyright 2009 Giva, Inc. (http://www.givainc.com/labs/) 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 	http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Date: 2009-05-20
 * Rev:  1.0.01
 */
(function(A){A.marquee={version:"1.0.01"};A.fn.marquee=function(E){var F=typeof arguments[0]=="string"&&arguments[0];var D=F&&Array.prototype.slice.call(arguments,1)||arguments;var C=(this.length==0)?null:A.data(this[0],"marquee");if(C&&F&&this.length){if(F.toLowerCase()=="object"){return C}else{if(C[F]){var B;this.each(function(G){var H=A.data(this,"marquee")[F].apply(C,D);if(G==0&&H){if(!!H.jquery){B=A([]).add(H)}else{B=H;return false}}else{if(!!H&&!!H.jquery){B=B.add(H)}}});return B||this}else{return this}}}else{return this.each(function(){new A.Marquee(this,E)})}};A.Marquee=function(E,Q){Q=A.extend({},A.Marquee.defaults,Q);var O=this,M=A(E),F=M.find("> li"),H=-1,G=false,L=false,N=0;A.data(M[0],"marquee",O);this.pause=function(){G=true;P()};this.resume=function(){G=false;D()};this.update=function(){var R=F.length;F=M.find("> li");if(R<=1){D()}};function K(R){if(F.filter("."+Q.cssShowing).length>0){return false}var T=F.eq(R);if(A.isFunction(Q.beforeshow)){Q.beforeshow.apply(O,[M,T])}var S={top:(Q.yScroll=="top"?"-":"+")+T.outerHeight()+"px",left:0};M.data("marquee.showing",true);T.addClass(Q.cssShowing);T.css(S).animate({top:"0px"},Q.showSpeed,Q.fxEasingShow,function(){if(A.isFunction(Q.show)){Q.show.apply(O,[M,T])}M.data("marquee.showing",false);J(T)})}function J(S,R){if(L==true){return false}R=R||Q.pauseSpeed;if(C(S)){setTimeout(function(){if(L==true){return false}var V=S.outerWidth(),T=V*-1,U=parseInt(S.css("left"),10);S.animate({left:T+"px"},((V+U)*Q.scrollSpeed),Q.fxEasingScroll,function(){I(S)})},R)}else{if(F.length>1){setTimeout(function(){if(L==true){return false}S.animate({top:(Q.yScroll=="top"?"+":"-")+M.innerHeight()+"px"},Q.showSpeed,Q.fxEasingScroll);I(S)},R)}}}function I(R){if(A.isFunction(Q.aftershow)){Q.aftershow.apply(O,[M,R])}R.removeClass(Q.cssShowing);B()}function P(){L=true;if(M.data("marquee.showing")!=true){F.filter("."+Q.cssShowing).dequeue().stop()}}function D(){L=false;if(M.data("marquee.showing")!=true){J(F.filter("."+Q.cssShowing),1)}}if(Q.pauseOnHover){M.hover(function(){if(G){return false}P()},function(){if(G){return false}D()})}function C(R){return(R.outerWidth()>M.innerWidth())}function B(){H++;if(H>=F.length){if(!isNaN(Q.loop)&&Q.loop>0&&(++N>=Q.loop)){return false}H=0}K(H)}if(A.isFunction(Q.init)){Q.init.apply(O,[M,Q])}B()};A.Marquee.defaults={yScroll:"top",showSpeed:850,scrollSpeed:12,pauseSpeed:5000,pauseOnHover:true,loop:-1,fxEasingShow:"swing",fxEasingScroll:"linear",cssShowing:"marquee-showing",init:null,beforeshow:null,show:null,aftershow:null}})(jQuery);
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);


//topics
var T_Date=new Array();//
var topHotTopics_data01='';
if(typeof(Topics_Date)!="undefined"){
	for(i=0,dsp_cnt0=0;i<top_topics_display01*2;i++){
		dsp_cnt0++;
		if(i==0){
			topHotTopics_data01+='<div id="topTopicsDisplay01">';
		}
		if(i==top_topics_display01){
			topHotTopics_data01+='<div id="topTopicsDisplay02">';
		}
		topHotTopics_data01+='<div class="topHotTopics01 clearfix">';
		topHotTopics_data01+='<div class="topHotTopics02">';
		topHotTopics_data01+='<div class="topHotTopics03">';
		topHotTopics_data01+='<div class="topHotTopics04"></div>';
		topHotTopics_data01+='<div class="topHotTopics05">';
		if(Topics_Thumbnail[i]==''){
			Topics_Thumbnail[i]='<img src="/EN/TOP2011/IMAGES/top_nissan01.gif" width="214" height="119" alt="" />';
		}
		topHotTopics_data01+='<a href="'+Topics_Url[i]+'" target="'+Topics_Target[i]+'">'+Topics_Thumbnail[i]+'</a>';
		topHotTopics_data01+='</div>';
		topHotTopics_data01+='<div class="topHotTopics06"></div>';
		topHotTopics_data01+='</div>';
		topHotTopics_data01+='<div class="topHotTopics07">';
		topHotTopics_data01+='<div class="topHotTopics08"><p class="topHotTopics09">'+Topics_Date[i]+'</p></div>';
		topHotTopics_data01+='<div class="topHotTopics10">';
		if(Topics_Category[i]=='REPORT'){
			topHotTopics_data01+='<img src="/EN/TOP2011/IMAGES/top_icon_report01.gif" alt="" />';
		}else if(Topics_Category[i]=='OTHER'){
			topHotTopics_data01+='<img src="/EN/TOP2011/IMAGES/top_icon_other01.gif" alt="" />';
		}else if(Topics_Category[i]=='VIDEO'){
			topHotTopics_data01+='<img src="/EN/TOP2011/IMAGES/top_icon_video01.gif" alt="" />';
		}else if(Topics_Category[i]=='RELEASE'){
			topHotTopics_data01+='<img src="/EN/TOP2011/IMAGES/top_icon_newsrelease01.gif" alt="" />';
		}
		topHotTopics_data01+='</div>';
		topHotTopics_data01+='<div class="topHotTopics11"><div></div></div>';
		topHotTopics_data01+='<div class="linkHover01">';
		topHotTopics_data01+='<h3 class="topHotTopics13"><a href="'+Topics_Url[i]+'" target="'+Topics_Target[i]+'"><strong>'+Topics_Title[i]+'</strong></a></h3>';
		topHotTopics_data01+='<a href="'+Topics_Url[i]+'" target="'+Topics_Target[i]+'" class="topHotTopics12 linkHover01 linkHover02">';
		topHotTopics_data01+='<p class="topHotTopics14">'+Topics_Text[i]+'</p>';
		topHotTopics_data01+='</a>';
		topHotTopics_data01+='</div>';
		topHotTopics_data01+='</div>';
		topHotTopics_data01+='</div>';
		topHotTopics_data01+='</div>';
		if((i==top_topics_display01-1)||(i==top_topics_display01*2-1)){
			topHotTopics_data01+='</div>';
		}
	}
	if(dsp_cnt0==0){
		topHotTopics_data01+="no topics.";
	}
}

//stories
var topStories_data01='';
var topStories_data02='';
if(typeof(Stories_Title)!="undefined"){
	for(i=0,dsp_cnt=0;i<Stories_Url.length;i++){
		topStories_data01+='<div class="topRightFrame03">';
		topStories_data01+='<div class="topRightFrame04 png_bg"></div>';
		topStories_data01+='<div class="topRightFrame05 png_bg"><div id="topStoriesData01"><a href="'+Stories_Url[i]+'" target="'+Stories_Target[i]+'">'+Stories_Thumbnail[i]+'</a></div></div>';
		topStories_data01+='<div class="topRightFrame06 png_bg"></div>';
		topStories_data01+='<div id="topStoriesData02"><ul class="columnLink01"><li class="png_bg"><b><a href="'+Stories_Url[i]+'" target="'+Stories_Target[i]+'">'+Stories_Title[i]+'</a></b></li></ul></div>';
		topStories_data01+='</div>';
	}
}
/*if(typeof(Stories_Title)!="undefined"){
	var topStories_disp01=Math.floor(Math.random()*(Stories_Url.length));
	topStories_data01+='<a href="'+Stories_Url[topStories_disp01]+'" target="'+Stories_Target[topStories_disp01]+'">'+Stories_Thumbnail[topStories_disp01]+'</a>';
	topStories_data02+='<ul class="columnLink01">';
	for(i=0,dsp_cnt=0;i<Stories_Url.length;i++){
		dsp_cnt++;
		topStories_data02+='<li class="png_bg"><b><a href="'+Stories_Url[i]+'" target="'+Stories_Target[i]+'">'+Stories_Title[i]+'</a></b></li>';
	}
	
	if(dsp_cnt==0){
		topStories_data02+="no stories.";
	}
	topStories_data02+='</ul>';
}*/

//news_releases
var news_release_display01=5;
var news_release_data01='';
for(a=0;a<N_Date.length;a++){
	if(a<news_release_display01){
		news_release_data01+='<li><a href="'+N_Url[a]+'"';
		if($.inArray(N_Url[a],Blank_Url)!=-1){
			news_release_data01+=' target="_blank">';
		}else{
			news_release_data01+=' target="_self">';
		}
		news_release_data01+=N_Date[a]+'&nbsp;&nbsp;'+N_Title[a]+'</a></li>';
	}
}


//
$(function(){
	//button
	var buttonFlag01="prev";
	$('#top_prev01').attr("src",'TOP2011/IMAGES/top_prev0'+top_topics_display01+'_off.gif');
	$('#top_next01').attr("src",'TOP2011/IMAGES/top_next0'+top_topics_display01+'_on.gif');
	$('#top_next01').hover(
		function(){
			$(this).css('cursor','pointer');
		},function(){
			$(this).css('cursor','default');
		}
	);
	$('#top_next01').click(
		function(){
			if(buttonFlag01!="next"){
				//$.scrollTo("#topNewsTicker01", 100);
				$('#top_next01').attr("src",'TOP2011/IMAGES/top_next0'+top_topics_display01+'_off.gif');
				$('#top_prev01').attr("src",'TOP2011/IMAGES/top_prev0'+top_topics_display01+'_on.gif');
				$("#topTopicsDisplay01").hide();
				$("#topTopicsDisplay02").show();
				buttonFlag01="next";
				$('#top_prev01').hover(
					function(){
						$(this).css('cursor','pointer');
					},function(){
						$(this).css('cursor','default');
					}
				);
				$('#top_next01').hover(
					function(){
						$(this).css('cursor','default');
					},function(){
						$(this).css('cursor','default');
					}
				);
			}
		}
	);
	$('#top_prev01').click(
		function(){
			if(buttonFlag01!="prev"){
				//$.scrollTo("#topNewsTicker01", 100);
				$('#top_prev01').attr("src",'TOP2011/IMAGES/top_prev0'+top_topics_display01+'_off.gif');
				$('#top_next01').attr("src",'TOP2011/IMAGES/top_next0'+top_topics_display01+'_on.gif');
				$("#topTopicsDisplay02").hide();
				$("#topTopicsDisplay01").show();
				buttonFlag01="prev";
				$('#top_prev01').hover(
					function(){
						$(this).css('cursor','default');
					},function(){
						$(this).css('cursor','default');
					}
				);
				$('#top_next01').hover(
					function(){
						$(this).css('cursor','pointer');
					},function(){
						$(this).css('cursor','default');
					}
				);
			}
		}
	);
	//news_releases
	$("#marquee01").html(news_release_data01);
	$("#marquee01").marquee({yScroll:"bottom",pauseOnHover:false});
	$("#marquee01").after('<ul id="marquee02"></ul>');
	$("#marquee02").html(news_release_data01);
	//topics
	$('#topHotTopicsData01').html(topHotTopics_data01);
	$('.topHotTopics01').slideDown("fast");
	for(x=0;x<$(".topHotTopics05 img").length;x++){
		if($(".topHotTopics05 img").eq(x).width()>214){
			$(".topHotTopics05 img").eq(x).css({"width":"214px","overflow":"hidden"});
		}
		if($(".topHotTopics05 img").eq(x).height()>120){
			$(".topHotTopics05").eq(x).css({"height":"120px","overflow":"hidden"});
		}
	}
	//live
	if(liveDispFlag01=='on'){
		$('#liveScheduleBox01').show();
		liveScheduleBoxData00=liveScheduleBoxData01+liveScheduleBoxData02+liveScheduleBoxData03;
	}
	$('#liveScheduleBox01').html(liveScheduleBoxData00);
	//stories
	$('#storiesData01').html(topStories_data01);
	//linkHover01
	$('.linkHover01').hover(
		function(){
			$(this).css('cursor','pointer');
		},function(){
			$(this).css('cursor','default');
		}
	);
	$('.linkHover02').hover(
		function(){
			$(this).css({'text-decoration':'underline','color':'#666'});
		},function(){
			$(this).css({'text-decoration':'none','color':'#666'});
		}
	);
});


