/**
 * @autor:Toni Feistauer
 * Ironshark Entertainment
 */


var CartMini = Class.create();
 CartMini.prototype = {
 	initialize: function(){
		cartMiniClass = this;
 		cartMiniClass.addListenerCart(document.getElementById('cartApplet'));
 	},
 	showHideCart: function(id,show)
	{
 		if (show) 
 			document.getElementById(id).style.display = 'block';
 		else 
 			document.getElementById(id).style.display = 'none';
 	},
	addListenerCart: function(obj)
	{
		obj.onmouseover = function()
		{
			cartMiniClass.showHideCart('cartBox',true);
			$$('.closeSizesBox').invoke('observe','click',function(){
				cartMiniClass.showHideCart('cartBox',false);
			});
		}

		if(navigator.userAgent.search(/msie/i)!= -1) {
			obj.onmouseleave= function()
			{
				cartMiniClass.showHideCart('cartBox',false);
			}
		} else {
			obj.onmouseout= function()
			{
				cartMiniClass.showHideCart('cartBox',false);
			}
		} 
	}
}

Event.observe(window,'load',function()
{	
	cartMini = new CartMini();
});

/*
$('area').observe("click",function()
{
    var url = $('carturl').href;
    console.log(url);
    //location.href = url;
}
);
*/
