(function(B){var C={};var A=B.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);B.fn.views_rotator=function(D){return this.each(function(){B.views_rotator(this,D)})};B.views_rotator=function(D,E){var G={transition_time:"normal",interval_time:2000,area_height:"auto",vclass:"views_rotator",children:null,mouseover_pause:0,back_next_buttons:0};if(E){B.extend(G,E)}if(G.children===null){var H=B(D).children()}else{var H=B(D).children(G.children)}if(H.length>1){C[G.id]={current:1,last:0};B(D).css("position","relative").css("height",G.area_height).addClass(G.vclass);for(var F=0;F<H.length;F++){B(H[F]).css("z-index",String(H.length-F)).css("position","absolute").hide()}C[G.id].timeoutID=setTimeout(function(){B.views_rotator.next(H,G)},G.interval_time);B(H[0]).show();if(G.mouseover_pause==1){B("."+G.id).mouseout(function(){if(typeof (C[G.id].timeoutID)!="undefined"){clearTimeout(C[G.id].timeoutID);delete C[G.id].timeoutID}C[G.id].timeoutID=setTimeout((function(){B.views_rotator.next(H,G)}),G.interval_time);if(G.back_next_buttons==1){B("."+G.id+" .views-rotator-prev").removeClass("views-rotator-prev-hover");B("."+G.id+" .views-rotator-next").removeClass("views-rotator-next-hover")}}).mouseover(function(){if(typeof (C[G.id].timeoutID)!="undefined"){clearTimeout(C[G.id].timeoutID);delete C[G.id].timeoutID}if(G.back_next_buttons==1){B("."+G.id+" .views-rotator-prev").addClass("views-rotator-prev-hover");B("."+G.id+" .views-rotator-next").addClass("views-rotator-next-hover")}})}else{if(G.back_next_buttons==1){B("."+G.id).mouseover(function(){B("."+G.id+" .views-rotator-prev").addClass("views-rotator-prev-hover");B("."+G.id+" .views-rotator-next").addClass("views-rotator-next-hover")}).mouseout(function(){B("."+G.id+" .views-rotator-prev").removeClass("views-rotator-prev-hover");B("."+G.id+" .views-rotator-next").removeClass("views-rotator-next-hover")})}}if(G.back_next_buttons==1){B(D).parent().css("height",G.area_height);B("."+G.id).prepend('<div class="views-rotator-prev"><a></a></div><div class="views-rotator-next"><a></a></div>');B("."+G.id+" .views-rotator-prev a").click(function(){var J=C[G.id].current;var I=C[G.id].last;if((I-1)<0){J=H.length-1}else{J=I-1}if(A){B.views_rotator.clearTypeFix(B(H[I]));B.views_rotator.clearTypeFix(B(H[J]))}B(H[I]).fadeOut(G.transition_time,function(){if(this.style.removeAttribute){this.style.removeAttribute("filter")}});B(H[J]).fadeIn(G.transition_time,function(){if(this.style.removeAttribute){this.style.removeAttribute("filter")}});if((J+1)<H.length){J=J+1;I=J-1}else{J=0;I=H.length-1}C[G.id].current=J;C[G.id].last=I});B("."+G.id+" .views-rotator-next a").click(function(){var J=C[G.id].current;var I=C[G.id].last;if(A){B.views_rotator.clearTypeFix(B(H[I]));B.views_rotator.clearTypeFix(B(H[J]))}B(H[I]).fadeOut(G.transition_time,function(){if(this.style.removeAttribute){this.style.removeAttribute("filter")}});B(H[J]).fadeIn(G.transition_time,function(){if(this.style.removeAttribute){this.style.removeAttribute("filter")}});if((J+1)<H.length){J=J+1;I=J-1}else{J=0;I=H.length-1}C[G.id].current=J;C[G.id].last=I})}}};B.views_rotator.next=function(F,D){var G=C[D.id].current;var E=C[D.id].last;if(A){B.views_rotator.clearTypeFix(B(F[E]));B.views_rotator.clearTypeFix(B(F[G]))}B(F[E]).fadeOut(D.transition_time,function(){if(this.style.removeAttribute){this.style.removeAttribute("filter")}});B(F[G]).fadeIn(D.transition_time,function(){if(this.style.removeAttribute){this.style.removeAttribute("filter")}});if((G+1)<F.length){G=G+1;E=G-1}else{G=0;E=F.length-1}C[D.id].current=G;C[D.id].last=E;if(typeof (C[D.id].timeoutID)!="undefined"){clearTimeout(C[D.id].timeoutID);delete C[D.id].timeoutID}C[D.id].timeoutID=setTimeout((function(){B.views_rotator.next(F,D)}),D.interval_time)};B.views_rotator.clearTypeFix=function(F){function E(G){var G=parseInt(G).toString(16);return G.length<2?"0"+G:G}function D(I){for(;I&&I.nodeName.toLowerCase()!="html";I=I.parentNode){var G=B.css(I,"background-color");if(G.indexOf("rgb")>=0){var H=G.match(/\d+/g);return"#"+E(H[0])+E(H[1])+E(H[2])}if(G&&G!="transparent"){return G}}return"#ffffff"}F.each(function(){B(this).css("background-color",D(this))})}})(jQuery);if(Drupal.jsEnabled){$(document).ready(function(){$.each(Drupal.settings.views_rotator,function(){$("#"+this.id).views_rotator(this);if(this.auto_height==1){var A=null;$("#"+this.id+" li").each(function(){var B=$(this).height();if(B>A){A=B}});$("#"+this.id).height(A)}})})};