first slider attemp

first slider attemp

by Berker Yüceer

HTML

<div id="slidingmenu">
  <img src="http://www.hayvansevgisi.net/resimler/wallpaper/ceylan-1.jpg" alt="main1.png" />
  <img src="http://www.belgeselizlesek.com/wp-content/uploads/hayvanlar-resimi-4.jpeg" alt="main2.png" />
  <img src="http://img03.blogcu.com/v2/images/orj/h/a/y/hayvanlaralemi/hayvanlaralemi_13323141966.jpg" alt="main3.png" />
  <img src="http://img03.blogcu.com/v2/images/orj/h/a/y/hayvanlaralemi/hayvanlaralemi_1333958876147.jpg" alt="main4.png" />
  <img src="http://www.hayvansevgisi.net/resimler/wallpaper/kus-1503.jpg" alt="main5.png" />
  <img src="http://ipekbozbay.files.wordpress.com/2011/04/hayvanlar0034qm5.jpg" alt="main6.png" />
  <img src="http://g.mynet.com/i/42/122715-hayvanlar-noel---13.jpg" alt="main7.png" />
  <img src="http://elmusavvir.files.wordpress.com/2008/10/koala-doga-canli-agac-resim-hayvanlar.jpg" alt="main8.png" />
</div>

CSS

#slidingmenu {
  width: 380px;
  height: 225px;
  border-top: 10px solid silver;
  border-right: 10px solid gray;
  border-bottom: 10px solid silver;
  border-left: 10px solid gray;
}

JavaScript

/*
 * Copyright (c) 2013 BERKER YUCEER
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
 * and associated documentation files (the "Software"), 
 * to deal in the Software without restriction, 
 * including without limitation the rights to 
 * use, copy, modify, merge, publish, distribute, sublicense, 
 * and/or sell copies of the Software, and to permit persons to whom 
 * the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all 
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
 * OTHER DEALINGS IN THE SOFTWARE.
 */
(function($, undefined) {
  $.widget("ui.bslider", {
    options: {
      width: 0,
      height: 0,
      interval: 5000,
      count: 0,
      speed: 'fast',
      urlLeft: 'http://img842.imageshack.us/img842/613/arrowleftr.png',
      urlRight: 'http://img7.imageshack.us/img7/4593/arrowrightq.png',
      autoSlide: true,
      animation: 'slide'
    },
    _create: function() {
      var width = this.options.width || this.element.width(),
        height = this.options.height || this.element.height(),
        interval = this.options.interval,
        count = this.options.count || this.element.children('img').length,
        speed = this.options.speed,
        urlLeft = this.options.urlLeft,
        urlRight = this.options.urlRight,
        autoSlide = this.options.autoSlide,
        animation = this.options.animation,
        img = new Array([]),
   ...