jQuery.noConflict();
jQuery(document).ready(function() {



 jQuery('.tx-products4neuero-pi1 .showImages')
 	.click(function() {			
			jQuery(this).parents('.singleProduct').next('.images').show(300);		
		});
 jQuery('.tx-products4neuero-pi1 .close')
 	.click(function() {			
			jQuery(this).parents('.images').hide(300);		
		});
 /*jQuery('.tx-products4neuero-pi1 .zoom')
	.click(function() {			
			//$(this).parents('.images').prev('.singleProduct').children('.image a').trigger('click');		
			//$(this).parents('.images').prev('.singleProduct').children('.image').children('a').trigger('click');
			//$(this).parents('.images').prev('.singleProduct').children('.image').children('a').css('border','1px solid red');
			$.slimbox('');	
		});*/
	  i=jQuery('.bigTeaser').length-1;
	  
   
});

function switcher() {

    
     //alert(i);
     
       x=i-1;
       if(x==-1)
       {
        x= jQuery('.bigTeaser').length-1;
       }
  	//alert('i:'+i+' / x:'+x);
    	 
      
      jQuery('.bigTeaser').eq(i).css('z-index','3');
      jQuery('.bigTeaser').eq(x).css('z-index','2');
      jQuery('.bigTeaser').eq(x).show();
       //
      jQuery('.bigTeaser').eq(x).show(function() {
      //alert(i+':'+x);
        
        jQuery('.bigTeaser').eq(i).fadeOut(300,function(){
        jQuery('.bigTeaser').eq(i).css('z-index','1');
		jQuery('.bigTeaser').eq(i).show();
        });
      });
      if(i==0)
      { 
        i=jQuery('.bigTeaser').length-1;
      }
      else{
        i--; 
      }
       
  	


    /*jQuery('.bigTeaser').fadeOut(1000,function() {
        //$('#SwitchImage2').css('z-index','1');

    });  */
  
}


/*Need for ShaddowBox*/
/* Listbox-Height */
var client = {

	getPage: function() { 
		
		// Default-Values for 1024x768
		var pageWidth = 720;
		var pageHeight = 576;
		
		var scrollArr = this.getScroll();
		var winArr = this.getWindow();
		pageWidth = winArr.width + scrollArr.left;
		pageHeight = winArr.height + scrollArr.top;
	
		return { scrollX: scrollArr.left, scrollY: scrollArr.top, winW: winArr.width, winH: winArr.height, pageW: pageWidth, pageY: pageHeight };
	}, 
	
	getScroll: function() { 
		return { left: this.scrollLeft(), top: this.scrollTop() };
	}, 
	
	getWindow: function() { 
		return { width: this.windowWidth(), height: this.windowHeight() };
	},
	
	scrollLeft: function() {
		var xScroll = 0;
		if (self.pageXOffset)
			xScroll = self.pageXOffset;
		else if (document.documentElement && document.documentElement.scrollLeft) 
			xScroll = document.documentElement.scrollLeft;
		else if (document.body)
			xScroll = document.body.scrollLeft;
			
		return xScroll;
	},
	
	scrollTop: function() {
		var yScroll = 0;
		if (self.pageYOffset)
			yScroll = self.pageYOffset;
		else if (document.documentElement && document.documentElement.scrollTop)
			yScroll = document.documentElement.scrollTop;
		else if (document.body)
			yScroll = document.body.scrollTop;
			
		return yScroll;
	},
	
	windowWidth: function() {
		var xWin = 720;
		if (self.innerHeight)
			xWin = self.innerWidth; 
		else if (document.documentElement && document.documentElement.clientWidth) 
			xWin = document.documentElement.clientWidth; 
		else if (document.body) 
			xWin = document.body.clientWidth;
			
		return xWin; 
	},
	
	windowHeight: function() { 
		var yWin = 576;
		if (self.innerHeight)
			yWin = self.innerHeight;
		else if (document.documentElement && document.documentElement.clientHeight)
			yWin = document.documentElement.clientHeight;
		else if (document.body)
			yWin = document.body.clientHeight;
			
		return yWin; 
	}
};
var updateShowBox;
var lastShowBox;
var yScroll;
function showBox( id, type )
{
	
	yScroll = client.scrollTop();
	jQuery(id).css('top', yScroll );
	
	
	if( type == 0 ) {
		lastShowBox = id;
		// $('#overFrameInner').html(showBoxContent[id]['text']);
		
		jQuery(id).fadeIn(1000, function(){ 
			jQuery(id+' .shadow_box_player').css('display', 'block');
			showBox(id, 2); 
		});
	}
	else if( type == 1 ) {
		lastShowBox = '';
		jQuery(id+' .shadow_box_player').css('display', 'none');
		jQuery(id).fadeOut(2000);
	}
	else if( lastShowBox == id ) {
		updateShowBox = setTimeout('showBox("' + id + '", 2)', 500);
	}
}

