/**
 * @author lucius <lucius@worldofwolf.ch>
 * @copyright worldofwolf.ch 
 */
(function(d){var b=new Array();var c=null;var a={init:function(e){var f={none:"none",maxDist:600};return this.each(function(){if(e){d.extend(f,e)}c=f;var g=this.getElementsByTagName("img");center=(d(this).width()-d(g).width())/2;d(g).css("margin",center+"px 0 0 "+center+"px");b.push([this,g])})},update:function(f){d.each(b,function(k,i){var j=d(i[0]).offset();var h=f.pageX-j.left;var g=f.pageY-j.top;var l=Math.atan2(h,g);var m=Math.sqrt((h*h)+(g*g));m=Math.sin((m>c.maxDist?1:m/c.maxDist));center=(d(i[0]).width()-d(i[1]).width())/2;var e=center+Math.round(Math.sin(l)*center*m);var n=center+Math.round(Math.cos(l)*center*m);d(i[1]).css("margin",n+"px 0 0 "+e+"px")})}};d.fn.eye=function(e){if(a[e]){return a[e].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof e==="object"||!e){return a.init.apply(this,arguments)}else{d.error("Method "+e+" does not exist on jQuery.eye")}}}})(jQuery);$(document).ready(function(){$(document).mousemove(function(a){$().eye("update",a)})});

