
var tempJSON = [
  // {
  //   "category":"JavaScript APIs-Offline Web Applications",
  //   "samples":[
  //     {
  //       "boilerplateLoc": "samples/boilerplateHTML/html5/html_css_js.html",
  //       "files": [],
  //       "editor": "js",
  //       "sampleName": "Offline detection",
  //       "tags": ""
  //     },
  //     {
  //       "boilerplateLoc": "samples/boilerplateHTML/html5/app_cache.html",
  //       "files": [],
  //       "editor": "mixed",
  //       "sampleName": "App Cache*",
  //       "tags": ""
  //     }
  //   ]
  // },
  {
    "category":"JavaScript APIs-Web Storage",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_js.html",
        "files": ["samples/js/html5/local_storage.js"],
        "editor": "js",
        "sampleName": "localStorage",
        "tags": "",
        "spec": "http://dev.w3.org/html5/webstorage/#the-localstorage-attribute"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_js.html",
        "files": ["samples/js/html5/session_storage.js"],
        "editor": "js",
        "sampleName": "sessionStorage",
        "tags": "",
        "spec": "http://dev.w3.org/html5/webstorage/#the-sessionstorage-attribute"
      }
    ]
  },
  {
    "category":"JavaScript APIs-Web SQL Database",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_js.html",
        "files": ["samples/js/html5/web_database.js"],
        "editor": "js",
        "sampleName": "Async Transactions",
        "tags": "",
        "spec": "http://dev.w3.org/html5/webdatabase/",
        "tutorial": "http://tutorials.html5rocks.com/tutorials/webdatabase/todo/"
      }
    ]
  },
  // {
  //   "category":"JavaScript APIs-Web Workers",
  //   "samples":[
  //     {
  //       "boilerplateLoc": "samples/boilerplateHTML/html5/html_css_js.html",
  //       "files": [],
  //       "editor": "js",
  //       "sampleName": "Workers",
  //       "tags": ""
  //     },
  //     {
  //       "boilerplateLoc": "samples/boilerplateHTML/html5/app_cache.html",
  //       "files": [],
  //       "editor": "mixed",
  //       "sampleName": "Shared Workers",
  //       "tags": ""
  //     }
  //   ]
  // },
  // {
  //   "category":"JavaScript APIs-Drag and Drop",
  //   "samples":[
  //     {
  //       "boilerplateLoc": "samples/boilerplateHTML/html5/html_css_js.html",
  //       "files": [],
  //       "editor": "js",
  //       "sampleName": "DOM Drag and Drop",
  //       "tags": ""
  //     },
  //     {
  //       "boilerplateLoc": "samples/boilerplateHTML/html5/app_cache.html",
  //       "files": [],
  //       "editor": "mixed",
  //       "sampleName": "Files Drag and Drop",
  //       "tags": ""
  //     }
  //   ]
  // },
  {
    "category":"JavaScript APIs-XDomain Communication",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/post_message.html",
        "files": ["samples/js/html5/post_message.js"],
        "editor": "js",
        "sampleName": "postMessage",
        "tags": "",
        "spec": "http://dev.w3.org/html5/spec/comms.html#crossDocumentMessages"
      }
    ]
  },
  {
    "category":"JavaScript APIs-File API",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_js.html",
        "files": ["samples/js/html5/file_api.js"],
        "editor": "js",
        "sampleName": "Using FileReader",
        "tags": "",
        "spec": "http://www.w3.org/TR/FileAPI/"
      }
    ]
  },
  {
    "category": "JavaScript APIs-Notifications",
    "samples": [
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/notifications.html",
        "files": ["samples/js/html5/notifications.js"],
        "editor": "js",
        "sampleName": "Simple Notifications",
        "tags": "",
        "spec": "http://dev.w3.org/2006/webapi/WebNotifications/publish/",
        "tutorial": "http://tutorials.html5rocks.com/tutorials/notifications/quick/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/notifications_html.html",
        "files": ["samples/js/html5/notifications_html.js"],
        "editor": "js",
        "sampleName": "Web Notifications",
        "tags": "",
        "spec": "http://dev.w3.org/2006/webapi/WebNotifications/publish/#html",
        "tutorial": "http://tutorials.html5rocks.com/tutorials/notifications/quick/"
      }
    ],
    "docsUrl":"http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"JavaScript APIs-Geolocation API",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/geolocation.html",
        "files": ["samples/js/html5/geolocation.js"],
        "editor": "js",
        "sampleName": "Get Current Position",
        "tags": "",
        "spec": "http://dev.w3.org/geo/api/",
        "tutorial": "http://tutorials.html5rocks.com/tutorials/geolocation/trip_meter/"
      }
    ]
  },
  {
    "category":"JavaScript APIs-Web Workers",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/inline_workers.html",
        "files": ["samples/css/html5/inline_workers.css", "samples/js/html5/inline_workers.js"],
        "editor": "js",
        "sampleName": "Inline Workers",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-workers/current-work/",
        "tutorial": "http://www.html5rocks.com/tutorials/workers/basics/#toc-inlineworkers"
      }
    ]
  },
  {
    "category":"JavaScript APIs-Native Drag and Drop",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/dnd.html",
        "files": ["samples/css/html5/dnd.css",  "samples/js/html5/dnd.js"],
        "editor": "js",
        "sampleName": "Drag and Drop",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html",
        "tutorial": "http://www.html5rocks.com/tutorials/dnd/basics/"
      }
    ]
  },
  {
    "category":"HTML",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/audio_tag.html",
        "files": ["samples/js/html5/audio_tag.js"],
        "editor": "mixed",
        "sampleName": "Audio Tag",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#audio",
        "tutorial": "http://tutorials.html5rocks.com/tutorials/audio/quick/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/video_tag.html",
        "files": ["samples/js/html5/video_tag.js"],
        "editor": "mixed",
        "sampleName": "Video Tag",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/canvas_tag.html",
        "files": ["samples/js/html5/canvas_tag.js"],
        "editor": "js",
        "sampleName": "Canvas Tag",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/webgl.html",
        "files": ["samples/js/html5/webgl.js"],
        "editor": "js",
        "sampleName": "Canvas Tag 3d (WebGL)",
        "tags": "",
        "spec": "https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/ruby_tag.html",
        "files": ["samples/js/html5/blank.js"],
        "editor": "mixed",
        "sampleName": "Ruby Tag",
        "tags": "http://www.w3.org/TR/ruby/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/semantic_markup.html",
        "files": ["samples/js/html5/blank.js", "samples/css/html5/semantic_markup.css"],
        "editor": "mixed",
        "sampleName": "Semantic Markup",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#semantics"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/form_fields.html",
        "files": ["samples/css/html5/form_fields.css"],
        "editor": "mixed",
        "sampleName": "Form Fields",
        "tags": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/query_selectors.html",
        "files": ["samples/js/html5/query_selectors.js"],
        "editor": "mixed",
        "sampleName": "Selectors API",
        "tags": "",
        "spec": "http://www.w3.org/TR/selectors-api2/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/svg.html",
        "files": ["samples/css/html5/svg.css"],
        "editor": "mixed",
        "sampleName": "Inline SVG",
        "tags": "",
        "spec": "http://www.w3.org/TR/SVG/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/text_inside_svg.html",
        "files": ["samples/css/html5/text_inside_svg.css"],
        "editor": "mixed",
        "sampleName": "Text inside SVG",
        "tags": "",
        "spec": "http://www.w3.org/TR/SVG11/text.html"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/microdata.html",
        "files": ["samples/js/html5/blank.js"],
        "editor": "mixed",
        "sampleName": "Microdata",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#microdata"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/link_relations.html",
        "files": ["samples/css/html5/link_relations.css"],
        "editor": "mixed",
        "sampleName": "Link Relations",
        "tags": "",
        "spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#links"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"CSS",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_css_js.html",
        "files": ["samples/js/html5/columns.js", "samples/css/html5/columns.css"],
        "editor": "css",
        "sampleName": "Columns",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-multicol/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/rounded_corners.html",
        "files": ["samples/css/html5/rounded_corners.css"],
        "editor": "css",
        "sampleName": "Rounded Corners",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-background/#the-border-radius"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/web_fonts.html",
        "files": ["samples/css/html5/web_fonts.css"],
        "editor": "css",
        "sampleName": "Web Fonts",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-fonts/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/text_wrapping.html",
        "files": ["samples/css/html5/text_wrapping.css"],
        "editor": "css",
        "sampleName": "Text Wrapping",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-text/#wrapping"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_css.html",
        "files": ["samples/css/html5/text_stroke.css"],
        "editor": "css",
        "sampleName": "Text Stroke",
        "tags": "",
        "spec": "http://www.w3.org/TR/CSS2/fonts.html"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_css_js.html",
        "files": ["samples/css/html5/transitions.css", "samples/js/html5/transitions.js"],
        "editor": "css",
        "sampleName": "Transitions",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-transitions/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/2d_transforms.html",
        "files": ["samples/css/html5/2d_transforms.css"],
        "editor": "css",
        "sampleName": "2d Transforms",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-2d-transforms/"
      },
      // {
      //   "boilerplateLoc": "samples/boilerplateHTML/html5/html_css.html",
      //   "files": ["samples/css/html5/3d_transforms.css"],
      //   "editor": "css",
      //   "sampleName": "3d Transforms",
      //   "tags": ""
      // },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_css_js.html",
        "files": ["samples/css/html5/animations.css", "samples/js/html5/animations.js"],
        "editor": "css",
        "sampleName": "Animations",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-animations/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/html_css.html",
        "files": ["samples/css/html5/gradients.css"],
        "editor": "css",
        "sampleName": "Gradients",
        "tags": "",
        "spec": "http://dev.w3.org/csswg/css3-images/#gradients-"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/new_selectors.html",
        "files": ["samples/css/html5/new_selectors.css"],
        "editor": "css",
        "sampleName": "New Selectors",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-selectors/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/flex_box_model.html",
        "files": ["samples/css/html5/flex_box_model.css", "samples/js/html5/flex_box_model.js"],
        "editor": "css",
        "sampleName": "Flex Box Model",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-flexbox/",
        "tutorial": "http://www.html5rocks.com/tutorials/flexbox/quick/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/complex_box_model.html",
        "files": ["samples/css/html5/complex_box_model.css"],
        "editor": "css",
        "sampleName": "Flex Box Model - Complex",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-flexbox/",
        "tutorial": "http://www.html5rocks.com/tutorials/flexbox/quick/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/html5/shadow.html",
        "files": ["samples/css/html5/shadow.css"],
        "editor": "css",
        "sampleName": "Text and Box Shadow",
        "tags": "",
        "spec": "http://www.w3.org/TR/2010/WD-css3-text-20101005/#text-shadow",
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"Tutorial Samples-Quick hits with the Flexible Box Model",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/flexbox_basic.html",
        "files": ["samples/css/tutorials/flexbox_basic.css"],
        "editor": "css",
        "sampleName": "Flexible Box Model: Basic Example",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-flexbox/",
        "tutorial": "http://www.html5rocks.com/tutorials/flexbox/quick/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/flexbox_center_stage.html",
        "files": ["samples/css/tutorials/flexbox_center_stage.css"],
        "editor": "css",
        "sampleName": "Flexible Box Model: Center Stage",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-flexbox/",
        "tutorial": "http://www.html5rocks.com/tutorials/flexbox/quick/"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"Tutorial Samples-3D and CSS",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/3d_transforms_basic.html",
        "files": [],
        "editor": "mixed",
        "sampleName": "3D Transformation Basic",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-3d-transforms/",
        "tutorial": "http://www.html5rocks.com/tutorials/3d/css/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/3d_transforms.html",
        "files": ["samples/css/tutorials/3d_transforms.css"],
        "editor": "css",
        "sampleName": "3D Transformation",
        "tags": "",
        "spec": "http://www.w3.org/TR/css3-3d-transforms/",
        "tutorial": "http://www.html5rocks.com/tutorials/3d/css/"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"Tutorial Samples-Multimedia",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/audio_tag_with_fallback.html",
        "files": ["samples/css/tutorials/audio_tag_with_fallback.css", "samples/js/tutorials/audio_tag_with_fallback.js"],
        "editor": "mixed",
        "sampleName": "Audio Tag with Fallback to Flash",
        "tags": "",
        "spec": "http://www.w3.org/TR/html5/video.html#audio",
        "tutorial": "http://www.html5rocks.com/tutorials/audio/quick/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/video_formats.html",
        "files": ["samples/css/tutorials/video_formats.css"],
        "editor": "mixed",
        "sampleName": "Video Formats",
        "tags": "",
        "spec": "http://www.w3.org/TR/html5/video.html#video",
        "tutorial": "http://www.html5rocks.com/tutorials/video/basics/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/video_plus_canvas.html",
        "files": ["samples/css/tutorials/video_plus_canvas.css", "samples/js/tutorials/video_plus_canvas.js"],
        "editor": "mixed",
        "sampleName": "Video + Canvas",
        "tags": "",
        "spec": "http://www.w3.org/TR/html5/video.html#video",
        "tutorial": "http://www.html5rocks.com/tutorials/video/basics/"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"Tutorial Samples-Exploring the FileSystem APIs",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/filesystem_apis.html",
        "files": ["samples/css/tutorials/filesystem_apis.css", "samples/js/tutorials/filesystem_apis.js"],
        "editor": "js",
        "sampleName": "FileSystem APIs",
        "tags": "",
        "spec": "http://www.w3.org/TR/file-system-api/",
        "tutorial": "http://www.html5rocks.com/tutorials/file/filesystem/"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"Tutorial Samples-A Simple Trip Meter using the Geolocation API",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/trip_meter.html",
        "files": ["samples/css/tutorials/trip_meter.css", "samples/js/tutorials/trip_meter.js"],
        "editor": "js",
        "sampleName": "The Final Product: Trip Meter",
        "tags": "",
        "spec": "http://dev.w3.org/geo/api/",
        "tutorial": "http://www.html5rocks.com/tutorials/geolocation/trip_meter/"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  },
  {
    "category":"Tutorial Samples-Simple TODO Lists using Web Storage",
    "samples":[
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/webdb_todo_list.html",
        "files": ["samples/css/tutorials/webdb_todo_list.css", "samples/js/tutorials/webdb_todo_list.js"],
        "editor": "js",
        "sampleName": "A Simple TODO List using Web SQL Database",
        "tags": "",
        "spec": "http://dev.w3.org/html5/webdatabase/",
        "tutorial": "http://www.html5rocks.com/tutorials/webdatabase/todo/"
      },
      {
        "boilerplateLoc": "samples/boilerplateHTML/tutorials/indexeddb_todo_list.html",
        "files": ["samples/css/tutorials/webdb_todo_list.css", "samples/js/tutorials/indexeddb_todo_list.js"],
        "editor": "js",
        "sampleName": "A Simple TODO List using IndexedDB",
        "tags": "",
        "spec": "http://www.w3.org/TR/IndexedDB/",
        "tutorial": "http://www.html5rocks.com/tutorials/indexeddb/todo/"
      }
    ],
    "docsUrl": "http://code.google.com/apis/ajaxlanguage/documentation/reference.html"
  }
];

// this was for the case we had sample list stored in other files
// so we concat them to a single array. for the case of html5
// there is only one file so this is not strictly necessary
if (typeof codeArray != 'undefined' && codeArray.length) {
  codeArray = codeArray.concat(tempJSON);
  delete tempJSON;
} else {
  window.codeArray = tempJSON;
  delete tempJSON;
}

