Created
February 10, 2012 03:12
-
-
Save edbo/1786037 to your computer and use it in GitHub Desktop.
HKJC Mobile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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