/*
 * 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 (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		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;
	}
});

/*
 *
 * 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. 
 *
 */

/*---------------------------------------------------------------------------------*/
/*
 *	jQuery Timer plugin v0.1
 *		Matt Schmidt [http://www.mattptr.net]
 *
 *	Licensed under the BSD License:
 *		http://mattptr.net/license/license.txt
 */
 
 jQuery.timer = function (interval, callback)
 {
 /**
  * timer() provides a cleaner way to handle intervals  
  *
  *	@usage
  * $.timer(interval, callback);
  *
  *
  * @example
  * $.timer(1000, function (timer) {
  * 	alert("hello");
  * 	timer.stop();
  * });
  * @desc Show an alert box after 1 second and stop
  * 
  * @example
  * var second = false;
  *	$.timer(1000, function (timer) {
  *		if (!second) {
  *			alert('First time!');
  *			second = true;
  *			timer.reset(3000);
  *		}
  *		else {
  *			alert('Second time');
  *			timer.stop();
  *		}
  *	});
  * @desc Show an alert box after 1 second and show another after 3 seconds
  */
	var interval = interval || 100;
	if (!callback)
		return false;
	_timer = function (interval, callback) {
		this.stop = function () {
			clearInterval(self.id);
		};
		this.internalCallback = function () {
			callback(self);
		};
		this.reset = function (val) {
			if (self.id)
				clearInterval(self.id);
			var val = val || 100;
			this.id = setInterval(this.internalCallback, val);
		};
		this.interval = interval;
		this.id = setInterval(this.internalCallback, this.interval);
		var self = this;
	};
	return new _timer(interval, callback);
 };

/*---------------------------------------------------------------------------------
 Init Propaties
---------------------------------------------------------------------------------*/

var news_count_max       = 5;
var topics_count_max     = 5;
var global_area_datas    = new Array();

$(document).ready(function(){
//	dispNews();
//	dispTopics();
//	dispInformation();
	
	$.ajax({
		type     : "GET",
		url      : "/EN/TOP2011/XML/navi.xml",
		dataType : "xml",
		cache    : false,
		success  : function(navi_xml) { parseNaviXml(navi_xml); },
		error    : function () {  }
	});

});

/*---------------------------------------------------------------------------------
 Main Visual
---------------------------------------------------------------------------------*/
var pre_img = new Array();
var now_selected = "";
var navi = new Array();
var gTime = 0;
var onMo = false;
var slideTh = true;

function parseNaviXml(navi_xml){

	var navi_count    = 0;
	var navi_main_img = new Array();
	var navi_main_img = new Array();
	$(navi_xml).find("Lists").each(function(){
		
		var priority = $(this).find("Priority").text();
		if(priority == ""){
			priority = "9999";
		}
		navi[navi_count] = {
					"Priority"           : priority,
					"MainHtmlPicture"    : $(this).find("MainHtmlPicture").text(),
					"Link"               : $(this).find("Link").text(),
					"Target"             : $(this).find("Target").text()
		}
		pre_img[navi_count] = new Image();
		pre_img[navi_count].src = $(this).find("MainHtmlPicture").text();
		navi_count++;
	});
	
	//if(navi_count >= 1){
	if(navi_count == navi.length){
	
		$('.image-area').after('<ul id="countNav"></ul>');
		$('.image-area').after('<a id="btnL"></a>');
		$('.image-area').after('<a id="btnR"></a>');
		//
		navi.sort(sortPriority);
		
		$("#mainImg").after('<div id="mImg"></div>');
		
		var a = navi.length;
		
		if(navi[a-1]["Link"] != ""){
			$("#mImg").append('<a class="'+('img'+a)+'" href="'+navi[a-1]["Link"]+'"target="'+navi[a-1]["Target"]+'"><img src="'+navi[a-1]["MainHtmlPicture"]+'" width="964" height="400" /></a>');
		}else{
			$("#mImg").append('<span class="'+('img'+a)+'"><img src="'+navi[a-1]["MainHtmlPicture"]+'" width="964" height="400" /></span>');
		}
		$('#mImg .img'+a).css({"left":-964});
		
		for(var i=0; i<navi.length; i++){
			if(navi[i]["Link"] != ""){
				$("#mImg").append('<a class="'+('img'+i)+'" href="'+navi[i]["Link"]+'"target="'+navi[i]["Target"]+'"><img src="'+navi[i]["MainHtmlPicture"]+'" width="964" height="400" /></a>');
			}else{
				$("#mImg").append('<span class="'+('img'+i)+'"><img src="'+navi[i]["MainHtmlPicture"]+'" width="964" height="400" /></span>');
			}
			var str = '#mImg .img'+i;
			$(str).css({"left":964*i});
		}
		
		var b = -1;
		if(navi[b+1]["Link"] != ""){
			$("#mImg").append('<a class="'+('img'+b)+'" href="'+navi[b+1]["Link"]+'"target="'+navi[b+1]["Target"]+'"><img src="'+navi[b+1]["MainHtmlPicture"]+'" width="964" height="400" /></a>');
		
		}else{
			$("#mImg").append('<span class="'+('img'+b)+'"><img src="'+navi[b+1]["MainHtmlPicture"]+'" width="964" height="400" /></span>');
		}
		$('#mImg .img'+b).css({"left":964*navi.length});
		
		now_selected = 0;
		navi_count = 0;
		gTime = 0;
		
		//---------------------------------------------------------------------
		centerIcon();
		setTimer();
		//---------------------------------------------------------------------
		$("#mainVisual").hover(function(){
			onMo = true;
			gTime = 0;
		}, function(){
			onMo = false;
		});
		
		//CENTER 
		for(var i=0;i<navi.length;i++){
			if(i==0){
				$("#countNav").append('<li class="nav_over"></li>');
			}else{
				$("#countNav").append('<li></li>');
			}
		}
		var navi_li_count = $("#countNav>li").length;
		
		$("#countNav").attr("style", "left:"+(482-$("#countNav").width()*0.5-5)+"px");
		
		$("#countNav>li").hover(function(){
			var n = $("#countNav").find("li").index(this);
			if(n != now_selected){
				$(this).addClass('nav_over');
			}
		}, function(){
			var n = $("#countNav").find("li").index(this);
			if(n != now_selected){
				$(this).removeClass('nav_over');
			}
		});
		
		$("#countNav>li").click(function(){
			var n = $("#countNav").find("li").index(this);
				if(slideTh){
					slideImage(n);
				}
		});
		
		//---------------------------------------------------------------------
		
		$("#mainVisual #btnR").hover(function(){
			$(this).addClass('btn_over');
		}, function(){
			$(this).removeClass("btn_over");
		});
		
		$("#mainVisual #btnR").click(function(){
			var n = now_selected+1;
			if(n > navi.length-1){
			 	n = 0;
			}
			if(slideTh){
				slideImage(n);
			}
		});
		
		$("#mainVisual #btnL").hover(function(){
			$(this).addClass('btn_over');
		}, function(){
			$(this).removeClass("btn_over");
		});
		
		$("#mainVisual #btnL").click(function(){
			var n = now_selected-1;
			if(n < 0){
				n = navi.length-1;
			}
			if(slideTh){
				slideImage(n);
			}
		});
	}
}

function slideImage(num){
	slideTh = false;
	var aTime = 900;
	var aEase = "easeInOutQuart";
	gTime = 0;
	
	movBtns(true);
	
	if(now_selected == navi.length-1 && num == 0){
		$('#mImg').animate({left:-964*navi.length}, aTime, aEase, function(){
			$(this).css({"left":0});	
			now_selected = num;
			centerIcon(num);
			slideTh = true;
			movBtns(false);
		});
	}else if(now_selected == 0 && num == navi.length-1){
		$('#mImg').animate({left:964}, aTime, aEase, function(){
			$(this).css({"left":-964*(navi.length-1)});	
			now_selected = num;
			centerIcon(num);
			slideTh = true;
			movBtns(false);
		});
	}else{
		$('#mImg').animate({left:-964*num}, aTime, aEase, function(){
			now_selected = num;
			centerIcon(num);
			slideTh = true;
			movBtns(false);
		});
	}
}

function movBtns(bool){
	if(bool){
		$('#mainVisual #btnR').animate({left:984}, 400, "easeOutQuart");
		$('#mainVisual #btnL').animate({left:-40}, 400, "easeOutQuart");
	}else{
		$('#mainVisual #btnR').animate({left:944}, 400, "easeOutQuart");
		$('#mainVisual #btnL').animate({left:0}, 400, "easeOutQuart");
	}
}

function centerIcon(num){
	for(var i=0; i<navi.length; i++){
		if(num == i){
			$("#countNav").find("li:eq("+i+")").addClass('nav_over');
		}else{
			$("#countNav").find("li:eq("+i+")").removeClass("nav_over");
		}
	}
}


function setTimer(){
	var dTime = 8;
	/*/Debagger
	$('body').prepend('<div id="dbgr" style="padding:24px; position:absolute; z-index:15000"><p id="dT"></p></div>');
	/*/
	$.timer(1000, function (timer) {
		if(!onMo && slideTh){
			gTime += 1;
		}
		/*/Debugger
		$("#dT").html("<p>image = "+(now_selected+1)+"<br />gTime = "+gTime+"<br />onMo = "+onMo+"</p>");
		/*/
		if(gTime == dTime){		
			var n = now_selected+1;
			if(n > navi.length-1){
			 n = 0;
			}
			for(var i=0;i<navi.length;i++){
				if(i == n){
					$("#countNav").find("li:eq("+i+")").addClass('nav_over');
				}else{
					$("#countNav").find("li:eq("+i+")").removeClass("nav_over");
				}
			}
			if(slideTh){
				slideImage(n);
			}
		}
	});
}

function sortPriority(a, b){
	var navi_key = "Priority";
	if(parseInt(a[navi_key]) == parseInt(b[navi_key])){
		return 0;
	}else if(parseInt(a[navi_key]) > parseInt(b[navi_key])){
		return 1;
	}else{
		return -1;
	}
}

/*---------------------------------------------------------------------------------
 News Release

---------------------------------------------------------------------------------*/
/*function convertXMLNews(){
	var xmlArray = new Array();
	var target   = "";
	xmlArray.push('<?xml version="1.0" encoding="utf-8" ?>');
	xmlArray.push('<NEWS>');
	for(i=0;i<N_Date.length;i++){
		xmlArray.push('<Lists><!-- PICKUP -->');
		xmlArray.push('<Date>'+N_Date[i]+'</Date>');
		xmlArray.push('<Text><![CDATA['+N_Title[i]+']]></Text>');
		xmlArray.push('<Url>'+N_Url[i]+'</Url>');
			
		target = "_self";
		if(jQuery.inArray(N_Url[i], Blank_Url) != -1){
			target = "_blank";
		}

		xmlArray.push('<Target>' + target + '</Target>');
		xmlArray.push('</Lists>');
	}
	xmlArray.push('</NEWS>');
	return xmlArray.join("");
}

function dispNews(){
	var news_count = 0;
	if(news_count_max <= N_Date.length){
		news_count = news_count_max;
	}else if(N_Date.length != 0){
		news_count = N_Date.length;
	}

	var htmlArray = new Array();
	var target    = "";
	for(i=0;i<news_count;i++){
		htmlArray.push('<dl class="clearfix">');
		htmlArray.push('<dt>'+N_Date[i]+'</dt>');
		htmlArray.push('<dd>');

		target = "_self";
		if(jQuery.inArray(N_Url[i], Blank_Url) != -1){
			target = "_blank";
		}

		htmlArray.push('<a href="' + N_Url[i] + '" target="' + target + '">' + N_Title[i] + '</a>');

		htmlArray.push('</dd>');
		htmlArray.push('</dl>');
	}
	$("#newsRelease .hdBlock").after(htmlArray.join(""));
}*/

/*---------------------------------------------------------------------------------
 Topics
---------------------------------------------------------------------------------*/
/*function convertXMLTopics(){
	var xmlArray = new Array();
	xmlArray.push('<?xml version="1.0" encoding="utf-8"?>');
	xmlArray.push('<TOPICS>');
	for(i=0;i<T_Date.length;i++){
		xmlArray.push('<Lists><!-- PICKUP -->');
		xmlArray.push('<Date>'+T_Date[i]+'</Date>');
		xmlArray.push('<Text><![CDATA['+T_Title[i]+']]></Text>');
		xmlArray.push('<Url>'+T_Url[i]+'</Url>');
		xmlArray.push('<Target>' + T_Target[i] + '</Target>');
		xmlArray.push('</Lists>');
	}
	xmlArray.push('</TOPICS>');
	return xmlArray.join("");
}

function dispTopics(){
	var topics_count = 0;
	if(topics_count_max <= T_Date.length){
		topics_count = topics_count_max;
	}else if(T_Date.length != 0){
		topics_count = T_Date.length;
	}
	var htmlArray = new Array();
	for(i=0;i<topics_count;i++){
		htmlArray.push('<dl class="clearfix">');
		htmlArray.push('<dt>'+T_Date[i]+'</dt>');
		htmlArray.push('<dd>');
		htmlArray.push('<a href="' + T_Url[i] + '" target="' + T_Target[i] + '">' + T_Title[i] + '</a>');
		htmlArray.push('</dd>');
		htmlArray.push('</dl>');
	}
	$("#topics .hdBlock").after(htmlArray.join(""));
}*/

/*---------------------------------------------------------------------------------
 Infoemation
---------------------------------------------------------------------------------*/
/*function dispInformation(){
	if(typeof(I_Text) == "undefined"){
		return;
	}
	$('#content').before('<div id="information"><dl></dl><!-- /#information --></div>');
	
	var htmlText = '';
	var htmlArray = new Array();

	htmlArray.push('<dt><img src="/JP/IMAGES/icon_information.gif" alt="INFORMATION" width="89" height="22" /></dt>');
	htmlArray.push('<dd>' + I_Text + '</dd>');

	htmlText = htmlArray.join("");

	var information = $("div[id*='information']>dl");
	$(information).html(htmlText);
}

function openWindow(uri){
	try{
		var win = window.open(uri,"popup_html","width=550,height=550,scrollbars=yes,toolbar=no,status=yes,directories=no,menubar=no,resizable=yes");
	}catch(e){
	}
}*/


/*---------------------------------------------------------------------------------
 nissan Stories banner view
---------------------------------------------------------------------------------*/
/*$(document).ready(function(){
	var len = $(".stbanner").length;
	var ran = Math.floor(Math.random()*len)+1;
	$("#stbanner"+ran).css("display","inline");
});*/

