/* globals hopscotch: false */

/* ============ */
/* EXAMPLE TOUR */
/* ============ */
var tour = {
  id: 'hello-spark-on-bluemix',
  steps: [
    {
      target: 'main-infobar',
      title: 'Welcome to Spark-as-a-Service on IBM Bluemix!',
      content: 'Hey there! IBM is honored to be a partner in your journey with Apache Spark, Jupyter Notebooks and OpenStack Object Storage.   There will be plenty of time to read documentation and sample code, but let\'s just take some time to see what fun levers are here for you to pull!',
      placement: 'bottom',
      arrowOffset: 60
    },
    {
      target: ['notebooks', 'all-notebooks'],
      title: 'Jupyter Notebooks',
      content: 'Here\'s a tab to show you all of your Jupyter notebooks',
      placement: 'bottom',
      arrowOffset: 60
    },
    {
      target: document.querySelectorAll('.data-page-icon.services')[0],
      title: 'Services',
      content: 'Explore getting data into your services',
      placement: 'right',
      arrowOffset: 30
    },
    {
      target: document.querySelectorAll('.data-page-icon.data')[0],
      title: 'Data',
      content: 'View and Edit connections to an existing data source',
      placement: 'right',
      arrowOffset: 30
    },
    {
      target: document.querySelectorAll('.data-page-icon.analytics')[0],
      title: 'Analytics',
      content: 'Accelerate your analytics with Spark using notebooks in Python or Scala',
      placement: 'right',
      arrowOffset: 30
    },
    {
      target: document.querySelectorAll('.data-page-icon.exchange')[0],
      title: 'Exchange',
      content: 'Unlock the power of your data by exploring and discovering 200+ Datasets via the Analytics Exchange.',
      placement: 'right',
      arrowOffset: 30
    },
    {
      target: document.querySelectorAll('.notebooks-desc')[0],
      title: 'Precipitation Analysis',
      content: 'If you\'re looking for a simple example, checkout this Precipitation Analysis notebook',
      placement: 'right',
      arrowOffset: 30
    },
  ],
  showPrevButton: true,
  scrollTopMargin: 100
},

/* ========== */
/* TOUR SETUP */
/* ========== */
addClickListener = function(el, fn) {
  if (el.addEventListener) {
    el.addEventListener('click', fn, false);
  }
  else {
    el.attachEvent('onclick', fn);
  }
},

init = function() {
  var startBtnId = 'startTourBtn',
      calloutId = 'startTourCallout',
      mgr = hopscotch.getCalloutManager(),
      state = hopscotch.getState();

  if (state && state.indexOf('hello-hopscotch:') === 0) {
    // Already started the tour at some point!
    hopscotch.startTour(tour);
  }
  else {
    // Looking at the page for the first(?) time.
    setTimeout(function() {
      mgr.createCallout({
        id: calloutId,
        target: startBtnId,
        placement: 'left',
        title: 'Friend, interested in a tour?',
        content: 'We shall not cease from exploration<br>And the end of all our exploring<br>Will be to arrive where we started<br>And know the place for the first time.<br>∞T.S. Eliot∞',
        yOffset: -25,
        arrowOffset: 20,
        width: 240
      });
    }, 100);
  }

  addClickListener(document.getElementById(startBtnId), function() {
    if (!hopscotch.isActive) {
      mgr.removeAllCallouts();
      hopscotch.startTour(tour);
    }
  });
};

init();

@@ -263,19 +263,219 @@
  there! 
-IBM
+%3Ca href=%22https://ibm.com/jstart%22%3E%3Cimg border=0 src=%22https://raw.githubusercontent.com/joshisa/huemix-blopscotch/master/img/jstart.png%22 style=%22height:20px;width:20px;vertical-align:middle;%22%3EIBM jStart%3C/a%3E
  is hono
@@ -662,30 +662,15 @@
 %5C's 
-just take some time to
+quickly
  see
@@ -699,16 +699,8 @@
 ere 
-for you 
 to p
@@ -868,17 +868,27 @@
 t: '
-Here%5C's a
+Did you notice this
  tab
@@ -919,16 +919,26 @@
  Jupyter
+ (iPython)
  noteboo
@@ -931,32 +931,33 @@
 ython) notebooks
+?
 ',%0A      placeme
@@ -1118,17 +1118,46 @@
 ntent: '
-E
+Look here! Here%5C's a view to e
 xplore g
@@ -1355,16 +1355,34 @@
 ntent: '
+Got data sources? 
 View and
@@ -1403,33 +1403,20 @@
 ons 
-to an existing data sourc
+for them her
 e',%0A
@@ -1595,38 +1595,20 @@
 t: '
-Accelerate your analytics with
+Homebase for
  Spa
@@ -1629,27 +1629,8 @@
 ooks
- in Python or Scala
 ',%0A 
@@ -1806,66 +1806,33 @@
 t: '
-Unlock the power of your data by exploring and discovering
+Behind Door #3, check out
  200
@@ -2055,62 +2055,42 @@
 t: '
-If you%5C're looking for a simple example,
+Rain, rain go away -
  check
+ 
 out th
-is
+e
  Pre
@@ -2130,37 +2130,35 @@
     placement: '
-right
+top
 ',%0A      arrowOf

Update spark.js