function products(){
	var setHref='';	
	var zooms = $$(".content_wide .product_zoom");
	zooms.each(function(zoom, i) {
		zoom.addEvent("click", function(e) {
			new Event(e).stop();
			new Fx.Style($(this.id+'_image'), 'opacity', {duration:600}).set(0);
			
			setHref=$(this.id+'_image').src;
		
			$(this.id+'_image').src=this.href;
			
			new Fx.Style($(this.id+'_image'), 'opacity', {duration:600}).start(0,1);
			
			this.href=setHref;
		});
	});
}

function rotate(type){
	var div=1;
	var url = '/inc/'+type+'.php';
 
	var timer = 6;
	var dur = 600;
	var periodical, dummy; 
	var log;
 
	var refresh = (function() {
		log = $('rotate'+div);
		new Ajax(url, {
			
			update: log,
			
			onComplete: function(){
				new Fx.Style($('rotate'+div), 'opacity', {duration:dur}).start(0,1);
				div=(div==2 ? 1 : 2);
				new Fx.Style($('rotate'+div), 'opacity', {duration:(dur+200)}).start(1,0)
			}
		}).request();
	}); 

	periodical = refresh.periodical(timer * 1000, this);
}


function popupWindow(url) {
        window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=400,height=200,screenX=150,screenY=150,top=150,left=150')
} 


