var teaser={
	start:function(){
	
		/*var Tips3 = new Tips($$('.tips'), {
			showDelay: 400,
			hideDelay: 400,
			fixed: false
		});*/
	
		if($('box_categories')){
			teaser.appearText();
		}
	},
	
	appearText:function(){
		var timer=0;
		var sideblocks=$$('#box_categories li');
		var slidefxs=[];
		var colorfxs=[];
		sideblocks.each(function(el,i){
			teaser.createOver(el,i);
		},this);
	},

createOver:function(el,i){
	var first=el;
	var overfxs=new Fx.Styles(first,{
		'duration':200,
		'wait':false,
		transition:Fx.Transitions.Sine.easeOut
	});
	var tocolor='1a3814';
	var fromcolor='26521d';
	
	if (first.className != "activeCat"){
	
		el.mouseouted=true;
		el.addEvent('mouseenter',function(e){
			overfxs.start({
				'color':tocolor,
				'margin-left':10
			});
		});
		el.addEvent('mouseleave',function(e){
			overfxs.start({
				'color':fromcolor,
				'margin-left':0
			});
		});
	}
	}
};

window.addEvent('load',teaser.start);

var highlight = {

	start:function(){
		if ($('prodList')){
			highlight.appearText();
			highlight.addSomeEffect();
		}
	},
	
	appearText:function(){
		var timer=0;
		var sideblocks=$$('#prodList .imgCenterDefault');
		var slidefxs=[];
		var colorfxs=[];
		/*sideblocks.each(function(el,i){
			el.setStyle('opacity',0.75);
		},this);*/
	},
	
	addSomeEffect:function(){
		var sideblocks1 = $$('#prodList .subcl');
		var sideblocks2 = $$('#prodList .subc');
		var sideblocks3 = $$('#prodList .subcr');
		
		sideblocks1.each(function(el,i){
			if (el.innerHTML != "&nbsp;"){
				el.addEvent('mouseenter',function(e){
					el.addClass('productListingItemHighlight');
				});
				el.addEvent('mouseleave',function(e){
					el.removeClass('productListingItemHighlight');
				});
				
				// Pic?
				/*if ($('pic'+el.id)){
					el.addEvent('mouseenter',function(e){
						overfxs=new Fx.Styles($('pic'+el.id),{'duration':200,'wait':false,transition:Fx.Transitions.Sine.easeOut}).start({'opacity':1});
					});
					el.addEvent('mouseleave',function(e){
						overfxs=new Fx.Styles($('pic'+el.id),{'duration':200,'wait':false,transition:Fx.Transitions.Sine.easeOut}).start({'opacity':0.75});
					});				
				}*/
				
				// Link?
				/*var first = el.getFirst().getFirst();
				if(first || first.getTag()=='a'){
					if (first.href != "undefined"){
						el.addEvent('click',function(e){
							window.location.href = first.href;
						});
					}
				}*/
			}
		},this);
		
		sideblocks2.each(function(el,i){
			if (el.innerHTML != "&nbsp;"){		
				el.addEvent('mouseenter',function(e){
					el.addClass('productListingItemHighlight');
				});
				el.addEvent('mouseleave',function(e){
					el.removeClass('productListingItemHighlight');
				});
				
				// Pic?
				/*if ($('pic'+el.id)){
					el.addEvent('mouseenter',function(e){
						overfxs=new Fx.Styles($('pic'+el.id),{'duration':200,'wait':false,transition:Fx.Transitions.Sine.easeOut}).start({'opacity':1});
					});
					el.addEvent('mouseleave',function(e){
						overfxs=new Fx.Styles($('pic'+el.id),{'duration':200,'wait':false,transition:Fx.Transitions.Sine.easeOut}).start({'opacity':0.75});
					});				
				}*/
				
				// Link?
				/*var first = el.getFirst().getFirst();
				if(first || first.getTag()=='a'){
					if (first.href != "undefined"){
						el.addEvent('click',function(e){
							window.location.href = first.href;
						});
					}
				}*/
			}
		},this);
		
		sideblocks3.each(function(el,i){
			if (el.innerHTML != "&nbsp;"){
				el.addEvent('mouseenter',function(e){
					el.addClass('productListingItemHighlight');
				});
				el.addEvent('mouseleave',function(e){
					el.removeClass('productListingItemHighlight');
				});
				
				// Pic?
				/*if ($('pic'+el.id)){
					el.addEvent('mouseenter',function(e){
						overfxs=new Fx.Styles($('pic'+el.id),{'duration':200,'wait':false,transition:Fx.Transitions.Sine.easeOut}).start({'opacity':1});
					});
					el.addEvent('mouseleave',function(e){
						overfxs=new Fx.Styles($('pic'+el.id),{'duration':200,'wait':false,transition:Fx.Transitions.Sine.easeOut}).start({'opacity':0.75});
					});				
				}
				
				// Link?
				var first = el.getFirst().getFirst();
				if(first || first.getTag()=='a'){
					el.addEvent('click',function(e){
						window.location.href = first.href;
					});
				}*/
			}
		},this);
	}	
}
window.addEvent('load',highlight.start);
