﻿	window.addEvent('domready', function() {
		
		var nS1 = new noobSlide({
			box: $('box1'),
			items: [0,1,2,3],
			size: 658,
			autoPlay: true
		});
	
		//variables for making things more simple below
		var itemsHolder = $('slidecontainer');
		var myItems = $$('.item');
		var thePrevBtn = $('prev_btn');
		var theNextBtn = $('next_btn');
		
		
		//create an instance of the slider, and start it up
		var mySlider = new SL_Slider({
			slideTimer: 6000,
			isPaused: false,
			container: itemsHolder,
			items: myItems,
			prevBtn: thePrevBtn,
			nextBtn: theNextBtn
		});
		mySlider.start();
		
		
		//adding a little animated rollover highlight to the play and prev/next buttons
		var origBkgdColor = thePrevBtn.getStyle('background-color');
		var newBkgdColor = "#fff";
		var btnArray = new Array(thePrevBtn, theNextBtn);
		
		btnArray.each(function(e, i){
			e.set('tween', {duration: 350, transition: 'cubic:out', link: 'cancel'});
			e.addEvents({ 
				'mouseenter' : function() {
					this.tween('background-color', newBkgdColor);
				},
				'mouseleave' : function() {
					this.tween('background-color', origBkgdColor);
				}
			});
		});
			
	
	});
	

		function add_basket(geturl,getid) {

          var req = new Request({
              method: 'get',
              url: geturl,
              data: { 'do' : '1' },
             onComplete: function() { 		basket_count++; document.getElementById(getid).innerHTML='<b>Eklendi</b>';document.getElementById(getid).style.color='red';document.getElementById(getid).removeAttribute('onclick');  document.getElementById('basket_header_holder').innerHTML="Sepetiniz ("+basket_count+")"; }
  }).send();
			$(getid).removeEvent('click');
	
		
		
		
		}
