  var banners_rotate = {
	banners:	false,

	obj_picture:	false,
	obj_title:	false,
	obj_price:	false,

	current:	-1,
	timer:		false,

	tmp:		false,

	init:		function(arr) {
				this.obj_picture = this.gobj("sfb_picture");
				this.obj_title = this.gobj("sfb_title");
				this.obj_price = this.gobj("sfb_price");

				this.banners = arr;

				this.put();
			},

	click:		function(n) {
				this.current = n - 2;
				this.tmp = true;
				this.put();

			},

	put:		function() {
				this.current ++;

				if (this.banners.length - 1 < this.current) this.current = 0;

				this.obj_picture.style.backgroundImage = "url('" + _locale_url_static + "content/offers/large/" + this.banners[this.current].i + "')";
				this.obj_title.innerHTML = this.banners[this.current].t;
				this.obj_price.innerHTML = this.banners[this.current].p;

				for (q=0; q<this.banners.length; q++)
					this.gobj("sfb_page"+(q+1)).className = "page2";

				this.gobj("sfb_page"+(this.current+1)).className = "page2_sel";

				var _self = this;

				this.obj_picture.onclick = function() {
					if (!_self.tmp) {
						document.location.href = _self.banners[_self.current].u;
					} else {
						_self.tmp = false;
					}
				}

				this.obj_picture.onmouseover = function() { clearTimeout(_self.timer); }
				this.obj_picture.onmouseout = function() { _self.repeat(); }

				this.repeat();
			},

	repeat: 	function() {
				this.TimeoutUpDown( 5 * 1000 );
			},

	TimeoutUpDown:	function (ms) {
        			var _self = this;
				clearTimeout(_self.timer);
        			_self.timer = setTimeout(function(ms){
            				_self.put();
            			}, ms);
			},

	gobj:		function(id) {
				return document.getElementById(id);
			}
  }
