(function(a){a(document).ready(function(){var b=a("#how_content p"),l=a("#how_nav a"),i=1,c=null,j=[{x:347,y:57,radius:17,click:function(){d(1);},mouseover:f,mouseout:k},{x:231,y:366,radius:17,click:function(){d(2);},mouseover:f,mouseout:k},{x:34,y:69,radius:17,click:function(){d(3);},mouseover:f,mouseout:k},{x:251,y:25,radius:17,click:function(){d(4);},mouseover:f,mouseout:k}];function f(o){a(o).addClass("hover");}function k(o){a(o).removeClass("hover");}function d(o){h(o);c.removeClass("selected");c=a("#how_nav a:eq("+(o-1)+")").addClass("selected");}function h(o){a(b.get(parseInt(i)-1)).fadeOut(250,function(){a(b.get(parseInt(o)-1)).fadeIn(250);});i=o;}b.hide();a(b.get(0)).fadeIn(500);i=1;c=a(l.get(0)).addClass("selected");l.each(function(){a(this).click(function(o){o.preventDefault();h(this.href.charAt(this.href.length-1));c.removeClass("selected");c=a(this).addClass("selected");});});a("#how_img img").click(m);a("#how_img img").mousemove(e);function g(r,p,o){var w,t,u,s,v,q;v=a(p).position();w=r.pageX;t=r.pageY;u=v.left+o.x;s=v.top+o.y;q=Math.sqrt((w-u)*(w-u)+(t-s)*(t-s));if(q<o.radius){return true;}else{return false;}}function m(p){p.preventDefault();for(var o=0;o<j.length;o++){if(g(p,this,j[o])){j[o].click();break;}}}var n=false;function e(q){q.preventDefault();for(var p=0;p<j.length;p++){var o=g(q,this,j[p]);if(n&&!o){if(j[p].hoverState){n=false;j[p].hoverState=false;j[p].mouseout(this);}}else{if(!n&&o){j[p].hoverState=true;n=true;j[p].mouseover(this);}}}}});})(jQuery);