             $option.appendTo @segmentedControl
         else
             $option.insertAfter @segmentedControl.children(".segmented-option:nth-of-type(#{position - 1})")
+        return this
 
 
     removeOptions: (options...) ->


        $segmentedControl.appendTo options.container



    setMainColor: (color) ->

        console.log findSelector
        @segmentedControl.children(findSelector).remove()
        @_setSegmentMaxWidth()
        return this

SegmentedControl.template = "<div class='segmented-control' data-control-name='NAME'></div>"

