/*!
 *
 * copyright 2011 mark marano
 * 
 * all rights reserved
 * 
 * terms of use: http://markmarano.com/copyright
 * 
 */
var $m=(function(){return{finestra:{w:0,h:0,cw:0,ch:0,animating:false,resizing:false,lastW:0,lastH:0,hideScrollbars:true},mm:{imgWidth:0,imgHeight:0,marginTop:0,marginLeft:0,top:0,left:0,where:""},foto:{current:"",next:"",prev:"",slideshow:false,mouseX:0,mouseY:0},gallery:{h:0,w:0,firstFoto:"",loading:false,query:"",preloaded:false,youtubePlaying:false},home:{galleryThumbnail:{home2:new Array(),home4:new Array(),home6:new Array(),home8:new Array(),home1:new Array(),home3:new Array(),home7:new Array(),home9:new Array(),},galleryThumbnailCurrent:{home2:0,home4:0,home6:0,home8:0,home1:0,home3:0,home7:0,home9:0,},firstLoad:7000,menuGridSize:302,showJournalFirst:true},timer:{rotateHomeThumbnail:0,homeResize:0,fotoResize:0,aboutResize:0,about:0,rotateHomeThumbnailFast:0},track:function(a){try{pageTracker._trackPageview(a)}catch(b){}},ajaxUrl:"/mm/2010/mm.php?",hideHomeGrid:function(c,b){$m.finestra.animating=true;$j("#footerMenuTwo").fadeOut(500);var e=48;var d=e*6;$j("#footerMenu a").each(function(){$j(this).delay(d).fadeOut(500);d=d-e;if(d<0){d=0}});$j("#mmHome").fadeOut(500);$j("#homeGallery .menuHover").css("z-index","-1000");for(var a=1;a<=9;a++){if("home"+a!=c){$j("#home"+a).delay(Math.floor(Math.random()*800)+100).fadeOut(500)}}$j("#"+c).delay(1500).fadeOut(1000,function(){if(b){$m.stopTheHomeGridMovies()}$m.finestra.animating=false})},stopTheHomeGridMovies:function(){if($m.home.galleryThumbnail.youtubePlaying){$m.home.galleryThumbnail.youtubePlaying=false;$j("#home1 .menuImg").replaceWith('<img src="'+$m.home.galleryThumbnail.home1[0]+'" class="menuImg" />');$j("#home3 .menuImg").replaceWith('<img src="'+$m.home.galleryThumbnail.home3[0]+'" class="menuImg" />');$j("#home9 .menuImg").replaceWith('<img src="'+$m.home.galleryThumbnail.home9[0]+'" class="menuImg" />')}},gotoGallery:function(a,b){if(!$m.gallery.preloaded){$j("#imageViewControls").append('<img src="/mm/2010/after.png" width="24" height="24" id="next" /><img src="/mm/_.gif" width="12" height="12" /><img src="/mm/2010/x.png" width="24" height="24" id="back" /><img src="/mm/_.gif" width="12" height="12" /><img src="/mm/2010/menu.png" width="24" height="24" id="menu" /><img src="/mm/_.gif" width="12" height="12" /><img src="/mm/2010/play.png" width="24" height="24" id="play" /><img src="/mm/_.gif" width="12" height="12" /><img src="/mm/2010/before.png" width="24" height="24" id="prev" />');$j("#imageViewNav").append('<div id="navAfter"><img src="/mm/2010/after.png" id="navNext" /></div><div id="navBefore"><img src="/mm/2010/before.png" id="navPrev" /></div>');$j("#mm").append('<div class="item"><a href="/" class="nohover"><img src="/mm/2010/mm.png" alt="mark marano" /><img src="/mm/2010/mmHover.png" class="mmMenuHover" /></a></div>');$j("#mm").click($m.gotoOpening);$j("#imageViewControls #next").click(function(){$m.switchFoto("n")});$j("#imageViewControls #prev").click(function(){$m.switchFoto("p")});$j("#imageViewNav #navAfter").click(function(){$j(this).blur();$j(this).find("#navNext").fadeOut(500);$m.switchFoto("n")});$j("#imageViewNav #navBefore").click(function(){$j(this).blur();$j(this).find("#navPrev").fadeOut(500);$m.switchFoto("p")});$j("#imageViewControls #back").click($m.hideFoto);$j("#imageViewControls #menu").click($m.fotoMenu);$j("#imageViewControls #play").click($m.fotoSlideShow);$j("#imageViewNav #navAfter").hover(function(){$j(this).find("#navNext").fadeIn(500)},function(){$j(this).find("#navNext").fadeOut(500)});$j("#imageViewNav #navAfter").mousemove(function(c){if($j(this).find("#navNext").css("display")=="none"&&($m.foto.mouseX!=c.pageX||$m.foto.mouseY!=c.pageY)){$j(this).find("#navNext").fadeIn(500)}$m.foto.mouseX=c.pageX;$m.foto.mouseY=c.pageY});$j("#imageViewNav #navBefore").hover(function(){$j(this).find("#navPrev").fadeIn(500)},function(){$j(this).find("#navPrev").fadeOut(500)});$j("#imageViewNav #navBefore").mousemove(function(c){if($j(this).find("#navPrev").css("display")=="none"&&($m.foto.mouseX!=c.pageX||$m.foto.mouseY!=c.pageY)){$j(this).find("#navPrev").fadeIn(500)}$m.foto.mouseX=c.pageX;$m.foto.mouseY=c.pageY});$m.gallery.preloaded=true;$j.ImagePreload("/mm/2010/pause.png")}if(!$m.finestra.animating&&!$m.finestra.resizing&&!$m.gallery.loading){$m.mm.where="gallery.loading";$m.gallery.query=a.replace("+","%2B");$m.gallery.loading=true;$m.hideHomeGrid(b,true);new Ajax.Request($m.ajaxUrl+"&m=gallery&q="+$m.gallery.query,{onSuccess:function(v){var s=v.responseText.evalJSON();$j("#movingGallery").css("display","block");$m.gallery.w=$m.finestra.w;$m.gallery.h=$m.finestra.h;var g=$m.finestra.w;var l=$m.finestra.h;var w=g*l;var m=w/(s.length+7);var A=Math.floor(Math.sqrt(m));if(A>150){A=150}var n=A;while(true){var F=Math.floor(($m.finestra.w-8)/n);var G=Math.floor(($m.finestra.h-8)/n);var g=F*n;var l=G*n;if(F*G>=(s.length+7)){break}n=n-1}var D=Math.floor(($m.finestra.w-g)/2);var d=$m.finestra.w-g-D;var B=Math.floor(($m.finestra.h-l)/2);var h=$m.finestra.h-l-B;$j("#movingGallery").css("padding",B+"px "+d+"px "+h+"px "+D+"px");var e=new Array();for(var o=1;o<=G;o++){e[o]=new Array();for(var C=1;C<=F;C++){e[o][C]=false}}var o=Math.floor(Math.random()*(G-1))+2;if(o>G-1){o=G-1}var C=Math.floor(Math.random()*(F-4))+4;var u=(Math.random()<0.5?false:true);var E=G*F-s.length;if(E>F){o=1;for(var j=1;j<=F;j++){e[o][j]="logo"}var q=1+Math.ceil((F-1)/2);for(var j=F;j>F-(E-F);j--){e[G][j]="logo"}}else{var y=C;var i=C;e[o][C]="logo";for(var j=E-1;j>0;j--){var k=C;var f=false;while(true){k=k+(u?-1:1);if((k==1||k==F)&&!f){u=!u;f=1}else{if(k<1||k>F){u=!u;f++}else{if(e[o][k]==false){e[o][k]="logo";if(u){y=k}else{i=k}break}else{if(f>2){break}}}}}u=!u}var q=y+Math.ceil((i-y)/2)+0.5}var t=o;$m.gallery.firstFoto="";s.each(function(z,x){if($m.gallery.firstFoto==""){$m.gallery.firstFoto=z[1]}while(true){var I=Math.floor(Math.random()*(G))+1;var J=Math.floor(Math.random()*(F))+1;if(e[I][J]==false){e[I][J]=z[1];break}}var H=String.fromCharCode(38);$j("#movingGallery").append('<div class="anImage" id="image'+z[1]+'"><img src="/mm/_.gif" id="filter" width="150" height="150" />'+(z[2]=="youtube"?'<iframe class="theSlide" src="/mm/youtube.php?m='+z[0]+H+"w="+n+H+"h="+n+'" width="'+n+'" height="'+n+'" frameborder="0" scrolling="no"></iframe>':'<img class="theSlide" src="'+z[0]+'" width="'+n+'" height="'+n+'" />')+"</div>");$j("#movingGallery #image"+z[1]).click(function(){if(!$m.finestra.animating){$m.gotoFoto(z[1])}});$j("#movingGallery #image"+z[1]).css("top",((I-1)*n+B)+"px");$j("#movingGallery #image"+z[1]).css("left",((J-1)*n+D)+"px");$j("#movingGallery #image"+z[1]).css("width",n+"px");$j("#movingGallery #image"+z[1]).css("height",n+"px");$j("#movingGallery #image"+z[1]).hover(function(){if(!$m.finestra.animating){var c=(n<75?Math.floor(n*2):150);$j(this).css("width",c+"px");$j(this).css("height",c+"px");$j(this).css("margin-top","-"+Math.floor((c-n)/2)+"px");$j(this).css("margin-left","-"+Math.floor((c-n)/2)+"px");$j(this).css("z-index","99");$j(this).css("box-shadow","0px 0px 56px #333");$j(this).css("-moz-box-shadow","0px 0px 56px #333");$j(this).css("-webkit-box-shadow","0px 0px 56px #222");$j(this).css("-opera-box-shadow","0px 0px 56px #333");$j(this).css("-khtml-box-shadow","0px 0px 56px #444");$j(this).find(".theSlide").height(c);$j(this).find(".theSlide").width(c);if(z[2]=="youtube"){$j(this).find(".theSlide").attr("src","/mm/youtube.php?m="+z[0]+H+"w="+c+H+"h="+c)}}},function(){if(!$m.finestra.animating){if(z[2]=="youtube"){$j(this).find(".theSlide").attr("src","/mm/youtube.php?m="+z[0]+H+"w="+n+H+"h="+n)}$j(this).find(".theSlide").height(n);$j(this).find(".theSlide").width(n);$j(this).css("box-shadow","");$j(this).css("-moz-box-shadow","");$j(this).css("-webkit-box-shadow","");$j(this).css("-opera-box-shadow","");$j(this).css("-khtml-box-shadow","");$j(this).css("z-index","0");$j(this).css("margin-top","0px");$j(this).css("margin-left","0px");$j(this).css("width",n+"px");$j(this).css("height",n+"px")}})});var p=setInterval(function(){if(!$m.finestra.animating){clearInterval(p);$m.finestra.animating=true;$m.mm.where="gallery";$m.track("gallery/"+$m.gallery.query);$m.mm.imgWidth=(n<120?Math.ceil(n*7.5):900);$m.mm.imgHeight=(n<120?n:120);$m.mm.marginTop="-"+(Math.ceil(n/2))+"px";$m.mm.marginLeft="-"+(Math.ceil((n*7.5)/2))+"px";$m.mm.top=((t-1)*n+B+Math.floor(n/2))+"px";$m.mm.left=((q-1)*n+D)+"px";$j("#mm img").width($m.mm.imgWidth);$j("#mm img").height($m.mm.imgHeight);$j("#mm").css("margin-top",$m.mm.marginTop);$j("#mm").css("margin-left",$m.mm.marginLeft);$j("#mm").css("top",$m.mm.top);$j("#mm").css("left",$m.mm.left);var r=0;var c=0;$j("#movingGallery .anImage").each(function(){if($j(this).html()!=""){var x=0;x=$j(this).css("top");if(Math.random()<0.333&&x!=0&&x!="0px"){x=parseInt(x.substring(0,x.length-2));$j(this).css("top",x+(Math.random()<0.5?-1*$m.finestra.h:$m.finestra.h)+"px");$j(this).delay(r).fadeIn(700+Math.random()*(c<6?777:4444/c)).animate({top:x+"px"},1000)}else{if(Math.random()<0.5&&x!=0&&x!="0px"){var x=$j(this).css("left");x=parseInt(x.substring(0,x.length-2));$j(this).css("left",x+(Math.random()<0.5?-1*$m.finestra.w:$m.finestra.w)+"px");$j(this).delay(r).fadeIn(700+Math.random()*(c<6?777:4444/c)).animate({left:x+"px"},1000)}else{$j(this).delay(r).fadeIn(700+Math.random()*(c<6?777:4444/c))}}r=r+(c<6?777:4444/c);c++}});$j("#mm").delay((r*3/4)+Math.random()*r/4).fadeIn(2000);setTimeout(function(){$j("#movingGallery .anImage").each(function(){$j(this).css("cursor","pointer")});$m.gallery.loading=false;$m.finestra.animating=false},r+1500)}},250)}})}return(false)},switchFoto:function(a){var b=(a=="n"?$m.foto.next:(a=="p"?$m.foto.prev:$m.foto.current));if(b!=""){$j("#imageView").css("box-shadow","");$j("#imageView").css("-moz-box-shadow","");$j("#imageView").css("-webkit-box-shadow","");$j("#imageView").css("-opera-box-shadow","");$j("#imageView").css("-khtml-box-shadow","");if($j("#imageViewDetails").css("display")!="none"){$j("#imageViewDetails").fadeOut(250)}$j("#imageView").fadeOut(500,function(){$j("#imageView").html("");$m.gotoFoto(b)})}},gotoFoto:function(a){new Ajax.Request($m.ajaxUrl+"&m=foto&n="+a+"&ww="+($m.finestra.w-64)+"&h="+($m.finestra.h-64)+"&q="+$m.gallery.query,{onSuccess:function(g){$m.foto.current=a;var f=g.responseText.evalJSON();if(f[2]=="yt"){var e=String.fromCharCode(38);var d='<iframe src="/mm/youtube.php?m='+f[3]+e+"w="+f[4]+e+"h="+f[6]+'" width="'+f[4]+'" height="'+f[6]+'" frameborder="0" scrolling="no"></iframe>'}else{var d='<img src="'+f[3]+'" width="'+f[4]+'" height="'+f[6]+'" id="theImage" />'}$j("#imageView").html('<img src="/mm/_.gif" id="filter" width="'+f[4]+'" height="'+f[6]+'" />'+d);var c=f[1];c.replace("/","%2F");c.replace(":","%3A");a2a_linkname=f[0];a2a_linkurl=f[1];a2a_color_main="999999";a2a_color_border="ffffff";a2a_color_link_text="333333";a2a_color_link_text_hover="333333";a2a_color_bg="aaaaaa";a2a_color_arrow="333333";a2a_color_arrow_hover="333333";$j("#imageViewDetails").html("<p>"+f[0]+"</p><p>"+f[8]+"</p><p>"+f[9]+"</p><p>"+f[10]+'</p><p><a href="/mm/download.php?file='+f[7]+'" onclick="javascript: $m.track(\'/mm/download.php?file='+f[7]+'\');">Download</a></p><p>&nbsp;<a class="a2a_dd" href="http://www.addtoany.com/share_save?linkname=&amp;linkurl='+c+'" target="_blank">Share/Save</a><script type="text/javascript" src="http://static.addtoany.com/menu/page.js"><\/script></p>');$j("#imageView").css("width",f[4]+"px");$j("#imageView").css("height",f[5]+"px");$j("#imageView").css("margin-left","-"+(Math.floor(f[4]/2))+"px");$j("#imageView").css("margin-top","-"+(Math.floor(f[5]/2))+"px");$j("#imageViewNav").css("width",($m.finestra.w-64)+"px");$j("#imageViewNav").css("height",($m.finestra.h-64)+"px");$j("#imageViewNav").css("margin-left","-"+Math.floor(($m.finestra.w-64)/2)+"px");$j("#imageViewNav").css("margin-top","-"+Math.floor(($m.finestra.h-64)/2)+"px");$m.foto.next=f[11];$m.foto.prev=f[12];if(f[2]=="yt"){$m.foto.slideshow=false;$j("#imageViewControls #play").ImageSwitch({Type:"FadeIn",NewImage:"/mm/2010/play.png"})}new Ajax.Request($m.ajaxUrl+"&m=foto&n="+($m.foto.prev)+"&ww="+($m.finestra.w-64)+"&h="+($m.finestra.h-64),{onSuccess:function(i){var h=i.responseText.evalJSON();$j.ImagePreload(h[3])}});new Ajax.Request($m.ajaxUrl+"&m=foto&n="+($m.foto.next)+"&ww="+($m.finestra.w-64)+"&h="+($m.finestra.h-64),{onSuccess:function(i){var h=i.responseText.evalJSON();$j.ImagePreload(h[3])}});var b=setInterval(function(){if(!$m.finestra.animating){clearInterval(b);$j("#movingGallery").fadeOut(1000,function(){if($m.mm.where!="foto"){$j("#mm").fadeOut(1000,function(){$j("#mm img").width(240);$j("#mm img").height(32);$j("#mm").css("margin-top","-3px");$j("#mm").css("margin-left","-120px");$j("#mm").css("top","0px");$j("#mm").css("left","50%");$j("#mm").delay(500).fadeIn(1000)});$j("#imageViewControls").delay(1500).fadeIn(1000);$j("#imageViewNav").delay(2000).fadeIn(1000);$j("#movingGallery .anImage").each(function(){$j(this).find("iframe").attr("src","")})}$m.mm.where="foto";$m.track(f[1].substring(22));$j("#imageView").fadeIn(1000,function(){if(f[2]!="png"){$j("#imageView").css("box-shadow","0px 0px 56px #333");$j("#imageView").css("-moz-box-shadow","0px 0px 56px #333");$j("#imageView").css("-webkit-box-shadow","0px 0px 56px #222");$j("#imageView").css("-opera-box-shadow","0px 0px 56px #333");$j("#imageView").css("-khtml-box-shadow","0px 0px 56px #444")}})})}},250)}})},fotoSlideShow:function(){if($m.foto.slideshow){$m.foto.slideshow=false;$j("#imageViewControls #play").ImageSwitch({Type:"FadeIn",NewImage:"/mm/2010/play.png"});a=window.clearInterval(a);a=""}else{$m.foto.slideshow=true;$j("#imageViewControls #play").ImageSwitch({Type:"FadeIn",NewImage:"/mm/2010/pause.png"});var a=window.setTimeout("$m.fotoSlideShowTimer()",5000);$m.switchFoto("p")}},fotoSlideShowTimer:function(){if($m.foto.slideshow){$m.switchFoto("p");var a=window.setTimeout("$m.fotoSlideShowTimer()",5000)}},discreateGallery:function(){$j("#movingGallery .anImage").each(function(){$j(this).stop(true,true).css("display","none");$j(this).html("")});$j("#movingGallery").remove(".anImage");$j("#movingGallery").html("");$j("#freedom").remove("#movingGallery");$j("#freedom").append('<div id="movingGallery"></div>')},hideFoto:function(){$j("#imageViewDetails").fadeOut(750);$j("#imageViewNav").fadeOut(500);$j("#imageViewControls").delay(250).fadeOut(500);$j("#mm").fadeOut(500,function(){$j("#mm img").width($m.mm.imgWidth);$j("#mm img").height($m.mm.imgHeight);$j("#mm").css("margin-top",$m.mm.marginTop);$j("#mm").css("margin-left",$m.mm.marginLeft);$j("#mm").css("top",$m.mm.top);$j("#mm").css("left",$m.mm.left);$j("#imageView").css("box-shadow","");$j("#imageView").css("-moz-box-shadow","");$j("#imageView").css("-webkit-box-shadow","");$j("#imageView").css("-opera-box-shadow","");$j("#imageView").css("-khtml-box-shadow","");$j("#imageView").fadeOut(1000,function(){$m.mm.where="gallery";$j("#imageView").html("");if($m.finestra.h!=$m.gallery.h||$m.finestra.w!=$m.gallery.w){$m.discreateGallery();$m.mm.where="";$m.gotoGallery()}else{$j("#movingGallery").fadeIn(1000);$j("#mm").delay(500).fadeIn(1000)}})});if($m.foto.slideshow){$m.foto.slideshow=false;$j("#imageViewControls #play").ImageSwitch({Type:"FadeIn",NewImage:"/mm/2010/play.png"});slideshowInt=window.clearInterval(slideshowInt);slideshowInt=""}},keypress:function(f){var g=true;switch(f.keyCode){case 37:if($m.mm.where=="foto"){$m.switchFoto("n");g=false}else{if($m.mm.where=="gallery"&&!$m.finestra.animating){$m.gotoFoto($m.gallery.firstFoto);g=false}else{if($m.mm.where=="home"&&!$m.finestra.animating){var a=$j("#home4 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home4 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}}}break;case 38:if($m.mm.where=="foto"){$m.hideFoto();g=false}else{if($m.mm.where=="home"&&!$m.finestra.animating){var a=$j("#home2 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home2 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}else{if(!$m.finestra.animating){$m.gotoOpening();g=false}}}break;case 8:case 27:if($m.mm.where=="foto"){$m.hideFoto();g=false}else{if($m.mm.where=="init"){$j("#mmHomeInit").fadeOut(1000,function(){$m.opening()});g=false}else{if(!$m.finestra.animating){$m.gotoOpening();g=false}}}break;case 39:if($m.mm.where=="foto"){$m.switchFoto("p");g=false}else{if($m.mm.where=="gallery"&&!$m.finestra.animating){$m.gotoFoto($m.gallery.firstFoto);g=false}else{if($m.mm.where=="home"&&!$m.finestra.animating){var a=$j("#home6 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home6 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}}}break;case 32:if($m.mm.where=="foto"){$m.switchFoto("p");g=false}else{if($m.mm.where=="gallery"&&!$m.finestra.animating){$m.gotoFoto($m.gallery.firstFoto);g=false}else{if($m.mm.where=="home"&&!$m.finestra.animating){var a=$j("#home2 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home2 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}else{if($m.mm.where=="init"){$j("#mmHomeInit").fadeOut(1000,function(){$m.opening()});g=false}}}}break;case 40:if($m.mm.where=="foto"){$m.fotoMenu();g=false}else{if($m.mm.where=="home"&&!$m.finestra.animating){var a=$j("#home8 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home8 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}}break;case 13:if($m.mm.where=="foto"){$m.fotoSlideShow();g=false}else{if($m.mm.where=="gallery"&&!$m.finestra.animating){$m.gotoFoto($m.gallery.firstFoto);g=false}else{if($m.mm.where=="home"&&!$m.finestra.animating){var a=$j("#home8 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home8 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}else{if($m.mm.where=="init"){$j("#mmHomeInit").fadeOut(1000,function(){$m.opening()});g=false}}}}break;case 84:if($m.mm.where=="home"){var c=$j("#home1 a").attr("href");var h=$j("#home1 a").parent().parent().attr("id");$m.gotoJournalPage(c,h);g=false}break;case 78:if($m.mm.where=="home"){var a=$j("#home2 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home2 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}case 76:case 83:if($m.mm.where=="home"){var c=$j("#home3 a").attr("href");var h=$j("#home3 a").parent().parent().attr("id");$m.gotoJournalPage(c,h);g=false}break;case 51:case 80:if($m.mm.where=="home"){var a=$j("#home4 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home4 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}case 74:if($m.mm.where=="home"){var c=$j("#home5 a").attr("href");var h=$j("#home5 a").parent().parent().attr("id");$m.gotoJournalPage(c,h);g=false}break;case 73:if($m.mm.where=="home"){var a=$j("#home6 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home6 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}case 65:if($m.mm.where=="home"){var c=$j("#home7 a").attr("href");var h=$j("#home7 a").parent().parent().attr("id");$m.gotoJournalPage(c,h);g=false}break;case 70:case 71:if($m.mm.where=="home"){var a=$j("#home8 a").attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var i=a.split("/");var d=i[i.length-1];var b=$j("#home8 a").parent().parent().attr("id");$m.gotoGallery(d,b);g=false}case 87:if($m.mm.where=="home"){var c=$j("#home9 a").attr("href");var h=$j("#home9 a").parent().parent().attr("id");$m.gotoJournalPage(c,h);g=false}break}return(g)},fotoMenu:function(){if($j("#imageViewDetails").css("display")=="none"){$j("#imageViewDetails").fadeIn(750)}else{$j("#imageViewDetails").fadeOut(750)}},rotateHomeThumbnail:function(){if($m.mm.where=="home"){if(!$m.finestra.resizing){var a=0;if($m.home.galleryThumbnail.home2.length>0){$m.home.galleryThumbnailCurrent.home2++;if($m.home.galleryThumbnailCurrent.home2>=$m.home.galleryThumbnail.home2.length){$m.home.galleryThumbnailCurrent.home2=0}$j("#home2 .menuImg").attr("src",$m.home.galleryThumbnail.home2[$m.home.galleryThumbnailCurrent.home2]);if(($m.home.galleryThumbnailCurrent.home2+1)<$m.home.galleryThumbnail.home2.length){$j.ImagePreload($m.home.galleryThumbnail.home2[($m.home.galleryThumbnailCurrent.home2+1)])}}if($m.home.galleryThumbnail.home8.length>0){$m.home.galleryThumbnailCurrent.home8++;if($m.home.galleryThumbnailCurrent.home8>=$m.home.galleryThumbnail.home8.length){$m.home.galleryThumbnailCurrent.home8=0}$j("#home8 .menuImg").attr("src",$m.home.galleryThumbnail.home8[$m.home.galleryThumbnailCurrent.home8]);if(($m.home.galleryThumbnailCurrent.home8+1)<$m.home.galleryThumbnail.home8.length){$j.ImagePreload($m.home.galleryThumbnail.home8[($m.home.galleryThumbnailCurrent.home8+1)])}}if($m.home.galleryThumbnail.home4.length>0){$m.home.galleryThumbnailCurrent.home4++;if($m.home.galleryThumbnailCurrent.home4>=$m.home.galleryThumbnail.home4.length){$m.home.galleryThumbnailCurrent.home4=0}$j("#home4 .menuImg").attr("src",$m.home.galleryThumbnail.home4[$m.home.galleryThumbnailCurrent.home4]);if(($m.home.galleryThumbnailCurrent.home4+1)<$m.home.galleryThumbnail.home4.length){$j.ImagePreload($m.home.galleryThumbnail.home4[($m.home.galleryThumbnailCurrent.home4+1)])}}if($m.home.galleryThumbnail.home6.length>0){$m.home.galleryThumbnailCurrent.home6++;if($m.home.galleryThumbnailCurrent.home6>=$m.home.galleryThumbnail.home6.length){$m.home.galleryThumbnailCurrent.home6=0}$j("#home6 .menuImg").attr("src",$m.home.galleryThumbnail.home6[$m.home.galleryThumbnailCurrent.home6]);if(($m.home.galleryThumbnailCurrent.home6+1)<$m.home.galleryThumbnail.home6.length){$j.ImagePreload($m.home.galleryThumbnail.home6[($m.home.galleryThumbnailCurrent.home6+1)])}}}$m.timer.rotateHomeThumbnail=window.setTimeout("$m.rotateHomeThumbnail()",3500)}},rotateHomeThumbnailFast:function(){if($m.mm.where=="home"){if(!$m.finestra.resizing){var a=0;if(!$m.home.galleryThumbnail.youtubePlaying){$m.home.galleryThumbnail.youtubePlaying=true;var c=String.fromCharCode(38);var b="NuoE3Q0B1qU";if($m.home.galleryThumbnail.home1.length==0){$m.home.galleryThumbnail.home1[0]=$j("#home1 .menuImg").attr("src")}$j("#home1 .menuImg").replaceWith('<iframe class="menuImg" src="/mm/youtube.php?m='+b+c+"w="+$m.home.menuGridSize+c+"h="+$m.home.menuGridSize+'" width="'+$m.home.menuGridSize+'" height="'+$m.home.menuGridSize+'" frameborder="0" scrolling="no"></iframe>');var b="aw2_33I8sRI";if($m.home.galleryThumbnail.home3.length==0){$m.home.galleryThumbnail.home3[0]=$j("#home3 .menuImg").attr("src")}$j("#home3 .menuImg").replaceWith('<iframe class="menuImg" src="/mm/youtube.php?m='+b+c+"w="+$m.home.menuGridSize+c+"h="+$m.home.menuGridSize+'" width="'+$m.home.menuGridSize+'" height="'+$m.home.menuGridSize+'" frameborder="0" scrolling="no"></iframe>');var b="0VwjuZ6l0lA";if($m.home.galleryThumbnail.home9.length==0){$m.home.galleryThumbnail.home9[0]=$j("#home9 .menuImg").attr("src")}$j("#home9 .menuImg").replaceWith('<iframe class="menuImg" src="/mm/youtube.php?m='+b+c+"w="+$m.home.menuGridSize+c+"h="+$m.home.menuGridSize+'" width="'+$m.home.menuGridSize+'" height="'+$m.home.menuGridSize+'" frameborder="0" scrolling="no"></iframe>')}if($m.home.galleryThumbnail.home7.length>0){$m.home.galleryThumbnailCurrent.home7++;if($m.home.galleryThumbnailCurrent.home7>=$m.home.galleryThumbnail.home7.length){$m.home.galleryThumbnailCurrent.home7=0}$j("#home7 .menuImg").attr("src",$m.home.galleryThumbnail.home7[$m.home.galleryThumbnailCurrent.home7]);if(($m.home.galleryThumbnailCurrent.home7+1)<$m.home.galleryThumbnail.home7.length){$j.ImagePreload($m.home.galleryThumbnail.home7[($m.home.galleryThumbnailCurrent.home7+1)])}}}$m.timer.rotateHomeThumbnail=window.setTimeout("$m.rotateHomeThumbnailFast()",1111)}},init:function(){$m.mm.where="init";$j(window).resize($m.resize);$m.resize();window.setTimeout("$m.loadHomeGalleryThumbnailList();",3000);$j(document).keydown(function(a){if($m.keypress(a)==false){return(false)}});$j("#homeGallery .menuitem").hover(function(){$j(".menuHover",this).fadeIn(500)},function(){$j(".menuHover",this).fadeOut(500)});$j(".galleryRotate a").click(function(){var a=$j(this).attr("href");if(a[a.length]=="/"){a=a.substring(0,a.length-2)}var d=a.split("/");var c=d[d.length-1];var b=$j(this).parent().parent().attr("id");$m.gotoGallery(c,b);return(false)});$j(".journalPage a").click(function(){var a=$j(this).attr("href");var b=$j(this).parent().parent().attr("id");$m.gotoJournalPage(a,b);return(false)});$j("#mmHome").click($m.gotoOpening);$j("#oldBrowser").delay(8000).fadeOut(1000);$j("#header").click($m.gotoOpening);$j("#homeGallery .menuHover").css("z-index","-1000");$j("#mmHomeInit").click(function(){$j("#mmHomeInit").fadeOut(1000,function(){$m.opening()});return(false)})},gotoJournalPage:function(a,b){if(!$m.finestra.animating&&!$m.finestra.resizing){$m.mm.where="journalPage.loading";$m.hideHomeGrid(b,false);$m.timer.journal=setInterval(function(){if(!$m.finestra.animating){clearInterval($m.timer.journal);$m.mm.where="journalPage";$j("#header").fadeIn(1000);document.location.href=a}},250)}return(false)},gotoOpening:function(){var a=setInterval(function(){if(!$m.finestra.animating){clearInterval(a);var b=0;$m.finestra.animating=true;$j("#header").fadeOut(500);$j("#mm").fadeOut(500);if($m.mm.where=="foto"){if($m.foto.slideshow){$m.foto.slideshow=false;$j("#imageViewControls #play").ImageSwitch({Type:"FadeIn",NewImage:"/mm/2010/play.png"})}$j("#imageViewNav").fadeOut(500);$j("#imageViewControls").delay(250).fadeOut(500);$j("#imageViewDetails").fadeOut(750);$j("#imageView").css("box-shadow","");$j("#imageView").css("-moz-box-shadow","");$j("#imageView").css("-webkit-box-shadow","");$j("#imageView").css("-opera-box-shadow","");$j("#imageView").css("-khtml-box-shadow","");$j("#imageView").fadeOut(1000,function(){$j("#imageView").html("");$m.finestra.animating=false})}else{if($m.mm.where=="gallery"){$j("#movingGallery .anImage").each(function(){if($j(this).html()!=""){$j(this).delay(b).fadeOut(500);b=b+32}});$j("#movingGallery").delay(b).fadeOut(500,function(){$m.finestra.animating=false})}else{if($m.mm.where=="home"){$m.mm.where="";$m.hideHomeGrid("home5",false)}else{$m.finestra.animating=false}}}var c=setInterval(function(){if(!$m.finestra.animating){clearInterval(c);$m.discreateGallery();$m.track("/");$m.opening()}},250)}},250);return(false)},opening:function(){$m.mm.where="home";clearTimeout($m.timer.rotateHomeThumbnail);clearTimeout($m.timer.rotateHomeThumbnailFast);$j("#home1").delay(1000).fadeIn(1000);$j("#home2").delay(500).fadeIn(1000);$j("#home3").delay(1000).fadeIn(1000);$j("#home4").delay(750).fadeIn(1000);$j("#home5").delay(($m.home.showJournalFirst?0:1250)).fadeIn(1000);$m.home.showJournalFirst=!$m.home.showJournalFirst;$j("#home6").delay(750).fadeIn(1000);$j("#home7").delay(1000).fadeIn(1000);$j("#home8").delay(500).fadeIn(1000);$j("#home9").delay(1000).fadeIn(1000);$j("#mmHome").delay(2000).fadeIn(1000,function(){$j("#homeGallery .menuHover").css("z-index","1000")});var a=5000;var b=250;$j("#footerMenu a").each(function(){$j(this).delay(a).fadeIn(1000);a=a+b});$j("#footerMenuTwo").delay(a+3*b).fadeIn(1000);$m.timer.rotateHomeThumbnail=window.setTimeout("$m.rotateHomeThumbnail()",(3500+$m.home.firstLoad));$m.timer.rotateHomeThumbnailFast=window.setTimeout("$m.rotateHomeThumbnailFast()",(1111+$m.home.firstLoad));$m.home.firstLoad=0},resize:function(){$m.finestra.w=$m.getWindowSize("w");var e=990;e=555;if($m.finestra.w<e){$m.finestra.w=e}$m.finestra.h=$m.getWindowSize("h");var g=542;g=444;if($m.finestra.h<g){$m.finestra.h=g-1}$m.finestra.cw=Math.floor($m.finestra.w/2);$m.finestra.ch=Math.floor($m.finestra.h/2);$j("body").css("overflow",($m.finestra.h<g||!$m.finestra.hideScrollbars?"auto":"hidden"));$j("#freedom").css("height",($m.finestra.h<g?g:$m.finestra.h)+"px");$j("#freedom").css("min-width","inherit");var a=($m.finestra.w<$m.finestra.h?$m.finestra.w:$m.finestra.h);var h=50;var b=302;var f=$m.home.menuGridSize;if(a<b*3+2*h){$m.home.menuGridSize=Math.floor((a-2*h)/3)}else{$m.home.menuGridSize=302}if(f!=$m.home.menuGridSize){$m.stopTheHomeGridMovies()}if($m.home.menuGridSize%2!=0){$m.home.menuGridSize--}$j(".menuitem").css("width",$m.home.menuGridSize+"px");$j(".menuitem").css("height",$m.home.menuGridSize+"px");$j(".menuitem img").css("width",$m.home.menuGridSize+"px");$j(".menuitem img").css("height",$m.home.menuGridSize+"px");$j(".menuHover").css("height",$m.home.menuGridSize+"px");$j(".menuHover").css("width",($m.home.menuGridSize-16)+"px");$j(".menuHover").css("padding-top",(0.5*$m.home.menuGridSize-Math.ceil(0.5*(32*$m.home.menuGridSize/302))-4)+"px");$j(".menuHover").css("font-size",Math.floor(32*$m.home.menuGridSize/302)+"px");$j("#home1").css("margin-left","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#home1").css("margin-top","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#home2").css("margin-left","-"+(0.5*$m.home.menuGridSize)+"px");$j("#home2").css("margin-top","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#home3").css("margin-left",(0.5*$m.home.menuGridSize+1)+"px");$j("#home3").css("margin-top","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#home4").css("margin-left","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#home4").css("margin-top","-"+(0.5*$m.home.menuGridSize)+"px");$j("#home5").css("margin-left","-"+(0.5*$m.home.menuGridSize)+"px");$j("#home5").css("margin-top","-"+(0.5*$m.home.menuGridSize)+"px");$j("#home6").css("margin-left",(0.5*$m.home.menuGridSize+1)+"px");$j("#home6").css("margin-top","-"+(0.5*$m.home.menuGridSize)+"px");$j("#home7").css("margin-left","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#home7").css("margin-top",(0.5*$m.home.menuGridSize+1)+"px");$j("#home8").css("margin-left","-"+(0.5*$m.home.menuGridSize)+"px");$j("#home8").css("margin-top",(0.5*$m.home.menuGridSize+1)+"px");$j("#home9").css("margin-left",(0.5*$m.home.menuGridSize+1)+"px");$j("#home9").css("margin-top",(0.5*$m.home.menuGridSize+1)+"px");$j("#mmHome").css("margin-bottom","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#mmHome").css("margin-right",(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenu").css("margin-top",(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenu").css("margin-left","-"+(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenu a").css("font-size",Math.ceil(11*$m.home.menuGridSize/302)+"px");$j("#footerMenu a").css("letter-spacing",($m.home.menuGridSize<200?1:2)+"px");$j("#footerMenu ul li").css("padding-right",Math.floor(20*Math.pow(($m.home.menuGridSize/302),(1/0.5)))+"px");$j("#footerMenu ul").css("padding-top",1+Math.floor(9*$m.home.menuGridSize/302)+"px");$j("#footerMenuTwo").css("margin-top",(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenuTwo").css("margin-left",(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenuTwo").css("margin-top",(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenuTwo").css("margin-left",(1.5*$m.home.menuGridSize+1)+"px");$j("#footerMenuTwo").css("padding-left",($m.home.menuGridSize>151?0:Math.floor(1.8*(151-$m.home.menuGridSize))+"px"));if(!$m.finestra.resizing){$m.timer.fotoResize=setInterval(function(){if($m.finestra.lastW==$m.finestra.w&&$m.finestra.lastH==$m.finestra.h){$m.finestra.resizing=false}$m.finestra.lastW=$m.finestra.w;$m.finestra.lastH=$m.finestra.h;if(!$m.finestra.resizing){clearInterval($m.timer.fotoResize);if($m.mm.where=="foto"){$m.switchFoto("c")}}},500)}$m.finestra.resizing=true;var d=new Date();var c=new Date();c.setTime(d.getTime()+(1000*60*60*24*365));document.cookie="w="+escape($m.finestra.w)+"; expires="+c.toGMTString()+"; path=/";document.cookie="h="+escape($m.finestra.h)+"; expires="+c.toGMTString()+"; path=/"},getWindowSize:function(a){if(typeof(window.innerWidth)=="number"){thebrowserwidth=window.innerWidth;thebrowserheight=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){thebrowserwidth=document.documentElement.clientWidth;thebrowserheight=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){thebrowserwidth=document.body.clientWidth;thebrowserheight=document.body.clientHeight}}}if(a=="w"){var b=thebrowserwidth}else{var b=thebrowserheight}return(b)},loadHomeGalleryThumbnailList:function(a){if(!(a>1)){a=1}new Ajax.Request($m.ajaxUrl+"&m=homeGalleryThumbnails&p="+a,{onSuccess:function(f){var c=f.responseText.evalJSON();var d=false;for(var e=1;e<=9;e++){if(e==5){e++}var b=$m.home.galleryThumbnail["home"+e].length;c["home"+e].each(function(h,g){$m.home.galleryThumbnail["home"+e][b]=h;b++;d=true});if(b>0){$j.ImagePreload($m.home.galleryThumbnail["home"+e][1])}}if(d){setTimeout(function(){$m.loadHomeGalleryThumbnailList(a+1)},25000)}}})}}}());var $j="";var $j=jQuery.noConflict();var mmLoaded=false;var RecaptchaOptions={theme:"clean"};var fileref=document.createElement("link");fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href","/mm/2010/init.css");if(typeof fileref!="undefined"){document.getElementsByTagName("head")[0].appendChild(fileref)}jQuery(document).ready(function(){var a=jQuery.noConflict();if(mmLoaded==false){$m.init();mmLoaded=true}});
