title: Store Highcharts in Javascript Function - How to?
body: <p>I am trying to store the entire Highcharts/Highstocks script into a function for js to make things a bit more compact and easier to replicate.</p>
  
  <pre><code>$(function() {
  // Create the chart
      window.chart = new Highcharts.StockChart({
          chart : {
              renderTo : 'container'
          },
  
          rangeSelector : {
              selected : 1
          },
  
          title : {
              text : 'AAPL Stock Price'
          },
  
          series : [{
              name : 'AAPL',
              data : [[1,2],[4,5]],
              tooltip: {
                  valueDecimals: 2
              }
          }]
      });
  });
  </code></pre>
  
  <p>This is basically whats in the file highchartsfunc.js that I call for the function. Any idea?</p>