Skip to content

Instantly share code, notes, and snippets.

@edbo
Created February 10, 2012 03:12
Show Gist options
  • Save edbo/1786037 to your computer and use it in GitHub Desktop.
Save edbo/1786037 to your computer and use it in GitHub Desktop.
HKJC Mobile
function hidePage(){
$('#mainContainer').hide();
$('#seo').hide();
$('#footer').hide();
$("#overlay-item").show();
$("#overlay-bg").show();
}
function showPage(){
$('#mainContainer').show();
$('#seo').show();
$('#footer').show();
$("#overlay-item").hide();
$("#overlay-bg").hide();
}
function showVTOverlay(title, xmlFile, mobileXml) {
$(".overlay-title").html(""+title);
viewer = createPanoViewer({swf:"/member/common/inc/virtual-tour/krpano.swf", id:"krpanoSWFObject", target:"pano-container"});
if( viewer.isDevice("iPhone|iPod|Android") ) {
viewer.addVariable("xml", mobileXml);
viewer.embed();
hidePage();
}
else {
viewer.addVariable("xml", xmlFile);
viewer.embed();
$("#overlay-bg").show();
$("#overlay-item").show();
allowBrowserScroll(false);
}
}
function hideVTOverlay() {
viewer = null;
allowBrowserScroll(true);
stopAudio();
if( viewer.isDevice("iPhone|iPod|Android") ) {
hidePage();
}
else {
$("#overlay-item").hide();
$("#overlay-bg").hide();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment