﻿(function(a){a.fn.rotator=function(j){var c={speed:600,interval:3500,maxDisplay:6,stop:null},f=false;c=a.extend(c,j);return this.each(function(){function k(){if(!f){d===b.length-1?(d=0):d++;for(var i=[],l=0,g=1,e=d;e<b.length+d;e++){if(g===b.length)g=0;i[l++]=b[g++]}b=i;if(a.support.opacity){a(b[0]).animate({top:120,left:200,opacity:0.95,fontSize:"1em"},c.speed,"easeInOutQuad",function(){a(this).css("z-index",40)});a(b[0]).find("img").animate({width:225},c.speed);a(b[1]).animate({top:85,left:0,opacity:0.85, fontSize:"0.95em"},c.speed,"easeInOutQuad",function(){a(this).css("z-index",30)}).css("cursor","default");a(b[1]).find("img").animate({width:215},c.speed);a(b[2]).animate({top:20,left:40,opacty:0.75,fontSize:"0.90em"},c.speed,"easeInOutQuad",function(){a(this).css("z-index",10)}).css("cursor","default");a(b[2]).find("img").animate({width:205},c.speed);a(b[3]).animate({top:0,left:220,opacity:0.65,fontSize:"0.85em"},c.speed,"easeInOutQuad",function(){a(this).css("z-index",0)}).css("cursor","default"); a(b[3]).find("img").animate({width:195},c.speed);a(b[4]).animate({top:20,left:370,opacity:0.55,fontSize:"0.80em"},c.speed,"easeInOutQuad",function(){a(this).css("z-index",10)}).css("cursor","default");a(b[4]).find("img").animate({width:185},c.speed);a(b[5]).animate({top:85,left:400,opacity:0.45,fontSize:"0.75em"},c.speed,"easeInOutQuad",function(){a(this).css("z-index",20)}).css("cursor","default");a(b[5]).find("img").animate({width:175},c.speed)}else{a(b[0]).animate({top:120,left:180,opacity:1}, c.speed,function(){a(this).css("z-index",40)});a(b[1]).animate({top:85,left:0,opacity:0.95},c.speed,function(){a(this).css("z-index",30)});a(b[2]).animate({top:20,left:20,opacty:0.9},c.speed,function(){a(this).css("z-index",10)});a(b[3]).animate({top:0,left:180,opacity:0.85},c.speed,function(){a(this).css("z-index",0)});a(b[4]).animate({top:20,left:300,opacity:0.8},c.speed,function(){a(this).css("z-index",10)});a(b[5]).animate({top:85,left:340,opacity:0.75},c.speed,function(){a(this).css("z-index", 20)})}for(e=c.maxDisplay;e<b.length;e++)a(b[e]).animate({top:85,left:400,opacity:0},c.speed,"easeInOutQuad",function(){a(this).css("z-index",0)});a.support.opacity?a("#mayfest-promo-content div").eq(d).siblings(":visible").fadeOut(500,function(){a("#mayfest-promo-content div").eq(d).fadeIn(50)}):setTimeout(function(){a("#mayfest-promo-content div").eq(d).siblings(":visible").hide();a("#mayfest-promo-content div").eq(d).show()},c.speed)}}a(this).addClass("rotator-ul").css("margin-left",a(this).parent().width()/ 2-300);var b=a("#"+this.id+" li");if(a.support.opacity){a(b[0]).css({top:120,left:200,"z-index":40,"font-size":"1em"}).fadeTo(0,0.95);a(b[0]).find("img").css("width",225);a(b[1]).css({top:85,left:0,"z-index":20,cursor:"default","font-size":"0.95em"}).fadeTo(0,0.85);a(b[1]).find("img").css("width",215);a(b[2]).css({top:20,left:40,"z-index":10,cursor:"default","font-size":"0.9em"}).fadeTo(0,0.75);a(b[2]).find("img").css("width",205);a(b[3]).css({top:0,left:220,"z-index":0,cursor:"default","font-size":"0.85em"}).fadeTo(0, 0.65);a(b[3]).find("img").css("width",195);a(b[4]).css({top:20,left:370,"z-index":10,cursor:"default","font-size":"0.80em"}).fadeTo(0,0.55);a(b[4]).find("img").css("width",185);a(b[5]).css({top:85,left:400,"z-index":20,cursor:"default","font-size":"0.85em"}).fadeTo(0,0.45);a(b[5]).find("img").css("width",175)}else{a(b[0]).css({top:120,left:180,"z-index":40}).fadeTo(0,1);a(b[1]).css({top:85,left:0,"z-index":20,cursor:"default"}).fadeTo(0,0.95);a(b[2]).css({top:20,left:20,"z-index":10,cursor:"default"}).fadeTo(0, 0.9);a(b[3]).css({top:0,left:180,"z-index":0,cursor:"default"}).fadeTo(0,0.85);a(b[4]).css({top:20,left:300,"z-index":10,cursor:"default"}).fadeTo(0,0.8);a(b[5]).css({top:85,left:340,"z-index":20,cursor:"default"}).fadeTo(0,0.75)}for(var h=c.maxDisplay;h<b.length;h++)a(b[h]).css({top:25,left:0,"z-index":0}).fadeTo(0,0);var d=0;c.stop&&c.stop.hover(function(){f=true},function(){f=false});a(this).show();setInterval(k,c.interval)}).hover(function(){f=true},function(){f=false})}})(jQuery);