diff --git a/src/x-carousel.html b/src/x-carousel.html
index 9d788f8..93c6f8a 100755
--- a/src/x-carousel.html
+++ b/src/x-carousel.html
@@ -6,16 +6,53 @@
xtag.register('x-carousel', {
lifecycle: {
// Fires when an instance of the element is created
- created: function() {},
+ created: function() {
+ this._items = [];
+ },
// Fires when an instance was inserted into the document
- inserted: function() {},
+ inserted: function() {
+ this.loadItems();
+ this.loadTheme();
+ },
+
+ loadTheme: function(){
+
+ },
+
+ options: function(){
+ // TODO: refactor into
+ if(this.lazyload !== undefined && this.lazyload !== null){
+ // load items lazy
+ }
+ if(this.wrap !== undefined && this.wrap !== null) {
+ // wrap items
+ }
+
+ // controls
+ },
+
+ loadItems: function(){
+ if(this.items !== undefined && this.items !== null && this.items !== ""){
+ // load JSON based on path
+ }
+
+ if(this.childNodes('li').length > 0) {
+ [].forEach.call(this.querySelectorAll('li'), function (carouselItem) {
+ this._items.push({"item" : carouselItem, "content" : carouselItem.innerHTML })
+ }.bind(this));
+ }
+ },
// Fires when an instance was removed from the document
- removed: function() {},
+ removed: function() {
+
+ },
// Fires when an attribute was added, removed, or updated
- attributeChanged: function(attr, oldVal, newVal) {}
+ attributeChanged: function(attr, oldVal, newVal) {
+
+ }
},
events: {},
accessors: {},