
//create custom animation algorithm for jQuery called "drop"
$.easing.drop = function (x, t, b, c, d) {
	return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
};

$(document).ready(function() {
	/**
	 * opens the direct-to-cart overlay
	 */
	productBox.init();


	// track mouse movement to be able to put the arrow from the
	// produkt box on the exact right position
	// messuring the offset left from the button didnt work out
	if (navigator.userAgent.indexOf('iPad')==-1 ){
	document.onmousemove = function(e) {
		e = e || window.event;
		var cursor = {x:0, y:0};
		try{
			if (e.pageX || e.pageY) {
				cursor.x = e.pageX;
				cursor.y = e.pageY;
			}
			else {
				if (cursor)
				{
					cursor.x = e.clientX +
						(document.documentElement.scrollLeft ||
									document.body.scrollLeft) -
									document.documentElement.clientLeft;
					cursor.y = e.clientY +
						(document.documentElement.scrollTop ||
									document.body.scrollTop) -
									document.documentElement.clientTop;
				}
			}
			vars.mouseX = cursor.x;
			vars.mouseY = cursor.y;
			panoramaCarouselMouseHandler(cursor.x,cursor.y);
		}
		catch(e){
		}
	};
	}


});


