diff --git a/.gitignore b/.gitignore
index f86fa8e..b458e2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
-# https://git-scm.com/docs/gitignore
-# https://help.github.com/articles/ignoring-files
-# Example .gitignore files: https://github.com/github/gitignore
\ No newline at end of file
+/bower_components/
\ No newline at end of file
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..e7cf64f
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,29 @@
+{
+  "name": "dropdown.js",
+  "version": "0.0.1",
+  "homepage": "https://github.com/FezVrasta/dropdown.js",
+  "authors": [
+    "Federico Zivolo <info@mywebexpression.com>"
+  ],
+  "description": "Finally a dropdown plugin that transforms select inputs in nice dropdowns and does not drive you crazy.",
+  "main": ["jquery.dropdown.js", "jquery.dropdown.css"],
+  "keywords": [
+    "dropdown",
+    "dropdown.js",
+    "choosen",
+    "selectize",
+    "select",
+    "multiselect"
+  ],
+  "license": "MIT",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ],
+  "dependencies": {
+    "jquery": "~2.1.3"
+  }
+}
diff --git a/index.html b/index.html
index 044f38d..db8b5cd 100644
--- a/index.html
+++ b/index.html
@@ -1,88 +1,98 @@
 <!DOCTYPE html>
 <html>
-    <head>
-        <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
-        <link href="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/material-wfont.min.css" rel="stylesheet">
-        <link href="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css" rel="stylesheet">
-
-        <link href="jquery.dropdown.css" rel="stylesheet">
-    </head>
-    <body>
-
-        <button>Click</button>
-
-        <select multiple class="select form-control floating-label" placeholder="This is a placeholder">
-            <option></option>
-            <option selected>Foobar</option>
-            <option selected>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option selected>Foobar</option>
-            <option selected>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option selected>Foobar</option>
-            <option selected>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option selected>Foobar</option>
-            <option selected>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option selected>Foobar</option>
-            <option selected>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-            <option>Foobar</option>
-            <option>Is great</option>
-        </select>
-
-        <br><br><br>
-        <br><br><br>
-        <br><br><br>
-        <select class="select" placeholder="This is a placeholder">
-            <option></option>
-            <option>Foobar</option>
-            <option value="hi..." selected>Is great</option>
-        </select>
-
-
-
-
-        <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
-        <script src="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/js/material.min.js"></script>
-        <script src="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/js/ripples.min.js"></script>
-
-        <script src="jquery.dropdown.js"></script>
-        <script>
-            $.material.init();
-
-            $(document).ready(function() {
-                $(".select").dropdown({"optionClass": "withripple"});
-            });
-
-            $("button").click(function() {
-                $("body").append("<select class=select><option>hey</option></select>");
-            });
-
-        </script>
-
-
-        <style>
-            body {
-                width: 200px;
-                margin: 100px;
-            }
-        </style>
-
-    </body>
+  <head>
+    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/material-wfont.min.css" rel="stylesheet">
+    <link href="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css" rel="stylesheet">
+
+    <link href="jquery.dropdown.css" rel="stylesheet">
+  </head>
+  <body>
+
+    <button>Click</button>
+
+    <select multiple class="select form-control floating-label" placeholder="This is a placeholder">
+      <option></option>
+      <option selected>Foobar</option>
+      <option selected>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option selected>Foobar</option>
+      <option selected>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option selected>Foobar</option>
+      <option selected>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option selected>Foobar</option>
+      <option selected>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option selected>Foobar</option>
+      <option selected>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+      <option>Foobar</option>
+      <option>Is great</option>
+    </select>
+
+    <br><br><br>
+    <br><br><br>
+    <br><br><br>
+    <select class="select" placeholder="This is a placeholder">
+      <option></option>
+      <option>Foobar</option>
+      <option value="hi..." selected>Is great</option>
+    </select>
+
+    <br><br><br>
+
+    <select id="multi" multiple>
+      <option value="1">1</option>
+      <option value="2">2</option>
+      <option value="3">3</option>
+    </select>
+
+
+
+
+    <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
+    <script src="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/js/material.min.js"></script>
+    <script src="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/js/ripples.min.js"></script>
+
+    <script src="jquery.dropdown.js"></script>
+    <script>
+      $.material.init();
+
+      $(document).ready(function() {
+        $(".select").dropdown({"optionClass": "withripple"});
+      });
+
+      $().dropdown({autoinit: "select"});
+
+      $("button").click(function() {
+        $("body").append("<select class=select><option>hey</option><option>hey</option></select>");
+      });
+
+    </script>
+
+
+    <style>
+      body {
+        width: 200px;
+        margin: 100px;
+      }
+    </style>
+
+  </body>
 </html>
 
diff --git a/jquery.dropdown.css b/jquery.dropdown.css
index 825f4d9..590ddec 100644
--- a/jquery.dropdown.css
+++ b/jquery.dropdown.css
@@ -1,59 +1,59 @@
 .dropdownjs {
-    position: relative;
+  position: relative;
 }
 .dropdownjs  * {
-    box-sizing: border-box;
+  box-sizing: border-box;
 }
 .dropdownjs > input {
-    width: 100%;
-    cursor: pointer !important;
+  width: 100%;
+  cursor: pointer !important;
 }
 .dropdownjs > input.focus ~ ul {
-    transform: scale(1);
+  transform: scale(1);
 }
 .dropdownjs > ul {
-    position: absolute;
-    padding: 0;
-    margin: 0;
-    min-width: 200px;
-    transform: scale(0);
-    z-index: 10000;
+  position: absolute;
+  padding: 0;
+  margin: 0;
+  min-width: 200px;
+  transform: scale(0);
+  z-index: 10000;
 }
 .dropdownjs > ul[placement=top-left] {
-    transform-origin: bottom left;
-    bottom: 0;
-    left: 0;
+  transform-origin: bottom left;
+  bottom: 0;
+  left: 0;
 }
 .dropdownjs > ul[placement=bottom-left] {
-    transform-origin: top left;
-    top: 0;
-    left: 0;
+  transform-origin: top left;
+  top: 0;
+  left: 0;
 }
 .dropdownjs > ul  > li {
-    list-style: none;
-    padding: 10px 20px;
+  list-style: none;
+  padding: 10px 20px;
 }
 
 
 /* Theme */
 .dropdownjs > input {
-    cursor: pointer;
+  cursor: pointer;
 }
 .dropdownjs > ul {
-    background: #FFF;
-    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 6px rgba(0, 0, 0, 0.12);
-    transition: transform 0.2s ease-out;
-    padding: 10px;
-    overflow: auto;
+  background: #FFF;
+  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 6px rgba(0, 0, 0, 0.12);
+  transition: transform 0.2s ease-out;
+  padding: 10px;
+  overflow: auto;
 }
 .dropdownjs > ul > li {
-    cursor: pointer;
+  cursor: pointer;
 }
 .dropdownjs > ul > li.selected,
 .dropdownjs > ul > li:active {
-    background-color: #eaeaea;
+  background-color: #eaeaea;
 }
 .dropdownjs > ul > li:focus {
-    outline: 0;
-    background-color: #d4d4d4;
+  outline: 0;
+  background-color: #d4d4d4;
 }
diff --git a/jquery.dropdown.js b/jquery.dropdown.js
index 08c5f70..543ddc6 100644
--- a/jquery.dropdown.js
+++ b/jquery.dropdown.js
@@ -2,253 +2,247 @@
 
 (function($) {
 
-    var methods = {
-        options : {
-            "optionClass": "",
-            "dropdownClass": "",
-            "autoinit": false,
-            "callback": false
-        },
-        init: function(options) {
-
-            // Apply user options if user has defined some
-            if (options) {
-                options = $.extend(methods.options, options);
-            } else {
-                options = methods.options;
-            }
-
-            function initElement($select) {
-                // Don't do anything if this is not a select or if this select was already initialized
-                if ($select.data("dropdownjs") || !$select.is("select")) {
-                    return;
-                }
-
-                // Is it a multi select?
-                var multi = $select.attr("multiple");
-
-                // Create the dropdown wrapper
-                var $dropdown = $("<div></div>");
-                $dropdown.addClass("dropdownjs").addClass(options.dropdownStyle);
-                $dropdown.data("select", $select);
-
-                // Create the fake input used as "select" element and cache it as $input
-                var $input = $("<input type=text readonly>");
-                if ($.material) { $input.data("mdproc", true); }
-                // Append it to the dropdown wrapper
-                $dropdown.append($input);
-
-                // Create the UL that will be used as dropdown and cache it AS $ul
-                var $ul = $("<ul></ul>");
-
-                // Append it to the dropdown
-                $dropdown.append($ul);
-
-                // Transfer the placeholder attribute
-                $input.attr("placeholder", $select.attr("placeholder"));
-
-                // Loop trough options and transfer them to the dropdown menu
-                $select.find("option").each(function() {
-                    // Cache $(this)
-                    var $this = $(this);
-
-                    // Create the option
-                    var $option = $("<li></li>");
-
-                    // Style the option
-                    $option.addClass(options.optionStyle);
-
-                    // If the option has some text then transfer it
-                    if ($this.text()) {
-                        $option.text($this.text());
-                    }
-                    // Otherwise set the empty label and set it as an empty option
-                    else {
-                        $option.html("&nbsp;");
-                    }
-                    // Set the value of the option
-                    $option.attr("value", $this.val());
-
-                    // Ss it selected?
-                    if ($this.attr("selected")) {
-                        $option.attr("selected", true);
-                    }
-
-                    // Append option to our dropdown
-                    $ul.append($option);
-                });
-
-                // Cache the dropdown options
-                var selectOptions = $dropdown.find("li");
-
-                // If is a single select, selected the first one or the last with selected attribute
-                if (!multi) {
-                    var $selected;
-                    if ($ul.find("[selected]").length) {
-                        $selected = $ul.find("[selected]").last();
-                    }
-                    else {
-                        $selected = $ul.find("li").first();
-                    }
-                    methods._select($dropdown, $selected);
-                } else {
-                    methods._select($dropdown, $ul.find("[selected]"));
-                }
-
-                // Transfer the classes of the select to the input dropdown
-                $input.addClass($select[0].className);
-
-                // Hide the old and ugly select
-                $select.hide().data("dropdownjs", true);
-
-                // Bring to life our awesome dropdownjs
-                $select.after($dropdown);
-
-                // Call the callback
-                if (options.callback) {
-                    options.callback($dropdown);
-                }
-
-                //---------------------------------------//
-                // DROPDOWN EVENTS                       //
-                //---------------------------------------//
-
-                // On click, set the clicked one as selected
-                selectOptions.on("click", function(e) {
-                    methods._select($dropdown, $(this));
-                });
-                selectOptions.on("keydown", function(e) {
-                    if (e.which === 27) {
-                        $(".dropdownjs > ul > li").each(function() { $(this).attr("tabindex", -1); });
-                        return $input.removeClass("focus").blur();
-                    }
-                    if (e.which === 32) {
-                        methods._select($dropdown, $(this));
-                        return false;
-                    }
-                });
-
-                selectOptions.on("focus", function() {
-                    $input.addClass("focus");
-                });
-
-                // Used to make the dropdown menu more dropdown-ish
-                $input.on("click focus", function(e) {
-                    e.stopPropagation();
-                    $(".dropdownjs > ul > li").each(function() { $(this).attr("tabindex", -1); });
-                    $(".dropdownjs > input").not($(this)).removeClass("focus").blur();
-
-                    selectOptions.each(function() { $(this).attr("tabindex", 0); });
-
-                    // Set height of the dropdown
-                    var coords = {
-                        top: $(this).offset().top - $(document).scrollTop(),
-                        left: $(this).offset().left - $(document).scrollLeft(),
-                        bottom: $(window).height() - ($(this).offset().top - $(document).scrollTop()),
-                        right: $(window).width() - ($(this).offset().left - $(document).scrollLeft())
-                    };
-
-                    var height = coords.bottom;
-
-                    // Decide if place the dropdown below or above the input
-                    if (height < 200 && coords.top > coords.bottom) {
-                        height = coords.top;
-                        $ul.attr("placement", "top-left");
-                    } else {
-                        $ul.attr("placement", "bottom-left");
-                    }
-
-                    $(this).next("ul").css("max-height", height - 20);
-                    $(this).addClass("focus");
-                });
-                $(document).on("click", function() {
-                    $(".dropdownjs > ul > li").each(function() { $(this).attr("tabindex", -1); });
-                    $input.removeClass("focus");
-                });
-            }
-
-            if (options.autoinit) {
-                $(document).on("DOMNodeInserted", function(e) {
-                    var $this = $(e.target);
-                    if ($this.is("select") && $this.is(options.autoinit)) {
-                        initElement($this);
-                    }
-                });
-            }
-
-            // Loop trough elements
-            $(this).each(function() {
-                initElement($(this));
-            });
-        },
-        select: function(target) {
-            var $target = $(this).find("[value=\"" + target + "\"]");
-            methods._select($(this), $target);
-        },
-        _select: function($dropdown, $target) {
-            // Get dropdown's elements
-            var $select = $dropdown.data("select"),
-                $input  = $dropdown.find("input");
-
-            // Is it a multi select?
-            var multi = $select.attr("multiple");
-
-            // Cache the dropdown options
-            var selectOptions = $dropdown.find("li");
-
-            // Behavior for multiple select
-            if (multi) {
-                // Toggle option state
-                $target.toggleClass("selected");
-                // Toggle selection of the clicked option in native select
-                var $selected = $select.find("[value=\"" + $target.attr("value") + "\"]");
-                if ($selected.attr("selected")) {
-                    $selected.attr("selected", true);
-                } else {
-                    $selected.attr("selected", false);
-                }
-                // Add or remove the value from the input
-                var text = [];
-                selectOptions.each(function() {
-                    if ($(this).hasClass("selected")) {
-                        text.push($(this).text());
-                    }
-                });
-                $input.val(text.join(", "));
-            }
-
-            // Behavior for single select
-            if (!multi) {
-                // Unselect options except the one that will be selected
-                selectOptions.not($target).removeClass("selected");
-                // Select the selected option
-                $target.addClass("selected");
-                // Set the value to the native select
-                $select.val($target.attr("value"));
-                // Set the value to the input
-                $input.val($target.text());
-            }
-
-            // This is used only if Material Design for Bootstrap is selected
-            if ($.material) {
-                if ($input.val().trim()) {
-                    $select.removeClass("empty");
-                } else {
-                    $select.addClass("empty");
-                }
-            }
-
+  var methods = {
+    options : {
+      "optionClass": "",
+      "dropdownClass": "",
+      "autoinit": false,
+      "callback": false
+    },
+    init: function(options) {
+
+      // Apply user options if user has defined some
+      options = (options) ? $.extend(methods.options, options) : methods.options;
+
+      function initElement($select) {
+        // Don't do anything if this is not a select or if this select was already initialized
+        if ($select.data("dropdownjs") || !$select.is("select")) {
+          return;
         }
-    };
 
-    $.fn.dropdown = function(params) {
-        if (methods[params]) {
-            return methods[params].apply(this, Array.prototype.slice.call(arguments,1));
-        } else if (typeof params === "object" | !params) {
-            return methods.init.apply(this, arguments);
+        // Is it a multi select?
+        var multi = $select.attr("multiple");
+
+        // Create the dropdown wrapper
+        var $dropdown = $("<div></div>");
+        $dropdown.addClass("dropdownjs").addClass(options.dropdownStyle);
+        $dropdown.data("select", $select);
+
+        // Create the fake input used as "select" element and cache it as $input
+        var $input = $("<input type=text readonly>");
+        if ($.material) { $input.data("mdproc", true); }
+        // Append it to the dropdown wrapper
+        $dropdown.append($input);
+
+        // Create the UL that will be used as dropdown and cache it AS $ul
+        var $ul = $("<ul></ul>");
+
+        // Append it to the dropdown
+        $dropdown.append($ul);
+
+        // Transfer the placeholder attribute
+        $input.attr("placeholder", $select.attr("placeholder"));
+
+        // Loop trough options and transfer them to the dropdown menu
+        $select.find("option").each(function() {
+          // Cache $(this)
+          var $this = $(this);
+
+          // Create the option
+          var $option = $("<li></li>");
+
+          // Style the option
+          $option.addClass(options.optionStyle);
+
+          // Save the original option inside the li element
+          $option.data("option", $this);
+
+          // If the option has some text then transfer it
+          if ($this.text()) {
+            $option.text($this.text());
+          }
+          // Otherwise set the empty label and set it as an empty option
+          else {
+            $option.html("&nbsp;");
+          }
+          // Set the value of the option
+          $option.attr("value", $this.val());
+
+          // Ss it selected?
+          if ($this.attr("selected")) {
+            $option.attr("selected", true);
+          }
+
+          // Append option to our dropdown
+          $ul.append($option);
+        });
+
+        // Cache the dropdown options
+        var selectOptions = $dropdown.find("li");
+
+        // If is a single select, selected the first one or the last with selected attribute
+        if (!multi) {
+          var $selected;
+          if ($ul.find("[selected]").length) {
+            $selected = $ul.find("[selected]").last();
+          }
+          else {
+            $selected = $ul.find("li").first();
+          }
+          methods._select($dropdown, $selected);
         } else {
-            $.error("Method " + params + " does not exists on jQuery.dropdown");
+          methods._select($dropdown, $ul.find("[selected]"));
+        }
+
+        // Transfer the classes of the select to the input dropdown
+        $input.addClass($select[0].className);
+
+        // Hide the old and ugly select
+        $select.hide().data("dropdownjs", true);
+
+        // Bring to life our awesome dropdownjs
+        $select.after($dropdown);
+
+        // Call the callback
+        if (options.callback) {
+          options.callback($dropdown);
+        }
+
+        //---------------------------------------//
+        // DROPDOWN EVENTS                       //
+        //---------------------------------------//
+
+        // On click, set the clicked one as selected
+        selectOptions.on("click", function(e) {
+          methods._select($dropdown, $(this));
+        });
+        selectOptions.on("keydown", function(e) {
+          if (e.which === 27) {
+            $(".dropdownjs > ul > li").each(function() { $(this).attr("tabindex", -1); });
+            return $input.removeClass("focus").blur();
+          }
+          if (e.which === 32) {
+            methods._select($dropdown, $(this));
+            return false;
+          }
+        });
+
+        selectOptions.on("focus", function() {
+          $input.addClass("focus");
+        });
+
+        // Used to make the dropdown menu more dropdown-ish
+        $input.on("click focus", function(e) {
+          e.stopPropagation();
+          $(".dropdownjs > ul > li").each(function() { $(this).attr("tabindex", -1); });
+          $(".dropdownjs > input").not($(this)).removeClass("focus").blur();
+
+          selectOptions.each(function() { $(this).attr("tabindex", 0); });
+
+          // Set height of the dropdown
+          var coords = {
+            top: $(this).offset().top - $(document).scrollTop(),
+            left: $(this).offset().left - $(document).scrollLeft(),
+            bottom: $(window).height() - ($(this).offset().top - $(document).scrollTop()),
+            right: $(window).width() - ($(this).offset().left - $(document).scrollLeft())
+          };
+
+          var height = coords.bottom;
+
+          // Decide if place the dropdown below or above the input
+          if (height < 200 && coords.top > coords.bottom) {
+            height = coords.top;
+            $ul.attr("placement", "top-left");
+          } else {
+            $ul.attr("placement", "bottom-left");
+          }
+
+          $(this).next("ul").css("max-height", height - 20);
+          $(this).addClass("focus");
+        });
+        $(document).on("click", function() {
+          $(".dropdownjs > ul > li").each(function() { $(this).attr("tabindex", -1); });
+          $input.removeClass("focus");
+        });
+      }
+
+      if (options.autoinit) {
+        $(document).on("DOMNodeInserted", function(e) {
+          var $this = $(e.target);
+          if ($this.is("select") && $this.is(options.autoinit)) {
+            initElement($this);
+          }
+        });
+      }
+
+      // Loop trough elements
+      $(this).each(function() {
+        initElement($(this));
+      });
+    },
+    select: function(target) {
+      var $target = $(this).find("[value=\"" + target + "\"]");
+      methods._select($(this), $target);
+    },
+    _select: function($dropdown, $target) {
+      // Get dropdown's elements
+      var $select = $dropdown.data("select"),
+          $input  = $dropdown.find("input");
+
+      // Is it a multi select?
+      var multi = $select.attr("multiple");
+
+      // Cache the dropdown options
+      var selectOptions = $dropdown.find("li");
+
+      // Behavior for multiple select
+      if (multi) {
+        // Toggle option state
+        $target.toggleClass("selected");
+        // Toggle selection of the clicked option in native select
+        var $selected = $target.data("option");
+        if ($selected[0]) {
+          $selected[0].selected = !$selected[0].selected;
         }
-    };
+        $select.trigger("change");
+        // Add or remove the value from the input
+        var text = [];
+        selectOptions.each(function() {
+          if ($(this).hasClass("selected")) {
+            text.push($(this).text());
+          }
+        });
+        $input.val(text.join(", "));
+      }
+
+      // Behavior for single select
+      if (!multi) {
+        // Unselect options except the one that will be selected
+        selectOptions.not($target).removeClass("selected");
+        // Select the selected option
+        $target.addClass("selected");
+        // Set the value to the native select
+        $select.val($target.attr("value")).trigger("change");
+        // Set the value to the input
+        $input.val($target.text());
+      }
+
+      // This is used only if Material Design for Bootstrap is selected
+      if ($.material) {
+        $select.toggleClass("empty", !$input.val().trim());
+      }
+
+    }
+  };
+
+  $.fn.dropdown = function(params) {
+    if (methods[params]) {
+      return methods[params].apply(this, Array.prototype.slice.call(arguments,1));
+    } else if (typeof params === "object" | !params) {
+      return methods.init.apply(this, arguments);
+    } else {
+      $.error("Method " + params + " does not exists on jQuery.dropdown");
+    }
+  };
 
 })(jQuery);
