var TourInstance = {
init: function(){
var takeTour = $('#take-tour'),
calloutMgr = hopscotch.getCalloutManager(),
state = hopscotch.getState(),
numericState = state ? parseInt(state.split(':')[1], 10) : null,
step = null,
multipages = [4, 5, 8, 9, 10, 11, 12, 13, 14]; // steps
if (takeTour){
takeTour.on('click', function(e){
if (e) e.preventDefault();
calloutMgr.removeCallout('get-started');
if (!hopscotch.isActive){
if (numericState == null || numericState < 4){
window.scrollTo(0, 0);
setTimeout(function(){ hopscotch.startTour(Tour.getSteps()); }, 600);
} else {
hopscotch.startTour(Tour.getSteps());
}
}
});
if (!hopscotch.isActive && !(sticky.get('hide_rtv3_tour_bubble') || false)){
calloutMgr.createCallout({
id: 'get-started',
target: 'take-tour',
placement: 'bottom',
xOffset: 20,
title: 'Discover the new RTv3 features!',
content: 'Click the "Take a Tour" button to start a tour on the new RocketTheme site features.',
onClose: function(){
sticky.set('hide_rtv3_tour_bubble', true);
}
});
$(calloutMgr.getCallout('get-started').element).addClass('hidden-phone');
}
}
if (array(multipages).contains(numericState)) step = numericState;
if (step !== null) hopscotch.startTour(Tour.getSteps(), step);
}
};
Time to create page: 0.053 seconds