/*
 Advanced CSS Animator
 Version: 1.0.4
 (c) 2011 DMXzone.com
 @build 25-05-2011 16:06:56
*/
(function(c){function j(a){return typeof a=="string"||a&&typeof a=="object"&&(a instanceof String||"substr"in a)}function h(a,b){if(j(a)){if(c.isFunction(window[a]))return window[a];if(j(a)&&/^\s*function\s*([\w\d_\$]+)?\s*\(/i.test(a)&&/\};?\s*$/.test(a)){var m;try{m=(new Function("return "+a))()}catch(d){alert("getFunction:\n\n"+d.message)}if(c.isFunction(m))return m}}if(c.isFunction(a))return a;if(b)return function(){return a};return a}function i(a){return String(a).replace(/\-(\w)/g,function(a,
b){return b.toUpperCase()})}function g(a){return String(a).replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()})}function d(a){if(!d.cache)d.cache={},d.style=document.createElement("div").style;var b=i(a);if(!(b in d.cache)){var c=d.style,f,e="",h=["Moz","Webkit","O","Khtml","Ms"];if(c[a]!==void 0)e=a;else if(c[b]!==void 0)e=b;else for(a=0;a<h.length;a++){f=h[a]+b.charAt(0).toUpperCase()+b.substr(1);if(c[f]!==void 0){e=f;break}f=g(f);if(c[f]!==void 0){e=f;break}}d.cache[b]=e}return d.cache[b]}
function b(a){var c={};jQuery.each(a,function(a,f){if(a.charAt(0)=="!"||a in b.customProperties)c[a]=f;else{var e=jQuery.cssProps?jQuery.cssProps[a]||d(a):d(a);e&&(c[e]=f)}});return c}function k(a){var a=b(jQuery.extend({},a)),c={},d;for(d in a)if(c[d]=h(a[d]),j(c[d])&&/^step:/.test(c[d]))try{steps.push(new Function("fx",c[d].replace(/^step:/,"")))}catch(f){alert("dmxAnimate:\n\n"+f.message)}finally{delete c[d]}return c}function l(a){a.elem.style&&a.elem.style[a.prop]!==null?a.elem.style[a.prop]=
Math.round(a.now):a.elem[a.prop]=Math.round(a.now)}function n(a,b,d,f){var e=c.extend({loop:1,stop:!1,clearQueue:!1,goToEnd:!1,delay:0,queue:!0,onStart:null,step:null,complete:null,duration:1E3,easing:"swing"},f),g=jQuery(a),i=[];e.step=h(e.step,!0);e.complete=h(e.complete,!0);var j=e.complete;e.complete=function(){j.call(this);(e.loop=="infinity"||!isNaN(e.loop)&&--e.loop>0)&&n(a,b,d,c.extend(f,{loop:e.loop}))};var l=e.step;e.step=function(a,b){l.call(this,a,b);jQuery.each(i,function(a,c){c(b)})};
var o=k(b),p=k(d);o.dummy=0;p.dummy=1;e.stop&&g.stop(!!e.clearQueue,!!e.goToEnd);g.delay(e.delay||0).queue("fx",function(){c(this).css(o);c(this).animate(p,c.extend(!0,{},e,{queue:e.queue!=!1}));c(this).dequeue()})}b.customProperties=function(a){for(var a=a.split(/\s*,\s*/),b=a.length,c={};b;)c[a[--b]]=1;return c}("transform, matrix, matrix3d, rotate, rotateX, rotateY, rotateZ, rotate3d, scale, scaleX, scaleY, scaleZ, scale3d, skew, skewX, skewY, translate, translateX, translateY, translateZ, translate3d, perspective, opacity, dummy, path, transformOrign");
c(function(){typeof c("body")[0].onmouseenter=="undefined"&&(c("[onmouseenter]").unbind("mouseenter.dmxzone").bind("mouseenter.dmxzone",function(){eval(c(this).attr("onmouseenter"))}),c("[onmouseleave]").unbind("mouseleave.dmxzone").bind("mouseleave.dmxzone",function(){eval(c(this).attr("onmouseleave"))}))});if(typeof c.fn.delay!="function")c.fn.delay=function(a,b){a=jQuery.fx?jQuery.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){jQuery.dequeue(c,b)},a)})};
c.fx.step.zIndex=l;c.fx.step.outlineOffset=l;c.fx.step.zoom=function(a){a.elem.style&&a.elem.style[a.prop]!==null?a.elem.style[a.prop]=a.now:a.elem[a.prop]=a.now};c.fx.step.dummy=function(){};c.extend(!0,{util:{css:{realName:d,vendorize:b,isSupported:function(a){a=String(a);return document.createElement("div").style[a]!==void 0||!!d(a)}}}});c.extend(!0,{dmxAnimate:n})})(jQuery);
function distanceTo(c,j,h){var c=jQuery(c),i=c.offset(),g={},d=jQuery(h||window),h={x:0,y:0};d.width();d.height();jQuery(window).scrollLeft();jQuery(window).scrollTop();var b={innerBox:{width:d.width(),height:d.height()},scrollTop:d.scrollTop(),scrollLeft:d.scrollLeft()};if(!d[0].nodeType||d[0].nodeType!==1)$.extend(b,{paddingBox:{width:b.innerBox.width,height:b.innerBox.height},borderBox:{width:b.innerBox.width,height:b.innerBox.height},marginBox:{width:b.innerBox.width,height:b.innerBox.height},
offset:{top:0,left:0},position:{top:0,left:0},borderWidth:{top:0,right:0,bottom:0,left:0}});else{$.extend(b,{paddingBox:{width:d.innerWidth(),height:d.innerHeight()},borderBox:{width:d.outerWidth(),height:d.outerHeight()},marginBox:{width:d.outerWidth({margin:!0}),height:d.outerHeight({margin:!0})},offset:d.offset(),position:d.position()});b.borderWidth={top:parseInt(d.css("borderTopWidth"),10),right:parseInt(d.css("borderRightWidth"),10),bottom:parseInt(d.css("borderBottomWidth"),10),left:parseInt(d.css("borderLeftWidth"),
10)};if(isNaN(b.borderWidth.top))b.borderWidth.top=0;if(isNaN(b.borderWidth.right))b.borderWidth.right=0;if(isNaN(b.borderWidth.bottom))b.borderWidth.bottom=0;if(isNaN(b.borderWidth.left))b.borderWidth.left=0}b.absoluteInnerVisibleBox={width:b.paddingBox.width,height:b.paddingBox.height,top:b.offset.top+b.borderWidth.top+b.scrollTop,left:b.offset.left+b.borderWidth.left+b.scrollLeft};var d=parseFloat(c.css("translateX").replace(/^\s*translate[xy]?\s*\(/i,"")),k=parseFloat(c.css("translateY").replace(/^\s*translate[xy]?\s*\(/i,
""));jQuery.browser.mozilla&&(i.left+=d,i.top+=k);switch(String(j).toLowerCase()){case "center":g.x=b.absoluteInnerVisibleBox.left+(b.absoluteInnerVisibleBox.width/2-c.outerWidth()/2);g.y=b.absoluteInnerVisibleBox.top+(b.absoluteInnerVisibleBox.height/2-c.outerHeight()/2);break;case "top":g.y=b.absoluteInnerVisibleBox.top;break;case "left":g.x=b.absoluteInnerVisibleBox.left;break;case "right":g.x=b.absoluteInnerVisibleBox.left+b.absoluteInnerVisibleBox.width-c.outerWidth();break;case "bottom":g.y=
b.absoluteInnerVisibleBox.top+b.absoluteInnerVisibleBox.height-c.outerHeight();break;default:return i}if("x"in g)h.x=g.x-i.left;if("y"in g)h.y=g.y-i.top;return h};

