$(function(){
//	document.write(navigator.userAgent.toLowerCase());

$('#homeslide').loopedSlider({
	autoStart: 5000,
	restart: 5000,
	containerClick: false
});


//alert(window.location.hash.replace("#", ''));
var url=$.url.decode(window.location.href);

var hashes = url.slice(url.indexOf('com/') + 4).split('/');
//alert(hashes[hashes.length-2]);

hashesSize=hashes.length;


/*
var hash = hashes[hashesSize-2]+'/'+hashes[hashesSize-1]; //'holywood.html';

alert(hash);

$(".page").live("pageshow", function(){
    $(page).find('nav a[href*="'+hash+'"]').addClass('ui-btn-active');
    });

$("nav").find('a[href*="'+hash+'"]').parent().addClass('active');
*/

$("nav#headnav").find('a[href$="'+hashes[hashesSize-2]+'/"]').addClass('active');

$("nav#sidenav").find('a[href$="'+hashes[hashesSize-2]+'/'+hashes[hashesSize-1]+'"]').addClass('active');

// alert(hashes+hashes[hashesSize-2]+'/'+hashes[hashesSize-1]);




$('#headlangs dt a').click(function(){
//alert('a');
  $(this).parent().next().toggle();
  return false;
});


$('#headlangs dt a').mouseenter(function(){
//alert('a');
  $(this).parent().next().show();
//  return false;
});

$('#headlangs dd').mouseleave(function(){
//alert('a');
  $(this).hide();
//  return false;
});







var defaultEncoding = 2; // 1: Tranditional Chinese, 2: Simplified Chinese
var translateDelay = 0;
var cookieDomain = "http://ctavipdede.loc";
var msgToTraditionalChinese = "正體中文";
var msgToSimplifiedChinese = "简体中文"; 
var translateButtonId = "translateLink";
translateInitilization();


});//end $(function(){



