// login
$(document).ready(function(){var loginhidden=1;$('p.login-links a.login-link').click(function(event){event.preventDefault();if(loginhidden==1){$("#login").animate({"marginTop":"0px"},"slow");$(this).html('Close');loginhidden=0}else{$("#login").animate({"marginTop":"-47px"},"slow");$(this).html('Login');loginhidden=1}})});

// rotater
$.include({'/public/library/jquery/plugins/jquery.scrollto.min.js':null},function(){$(document).ready(function(){var speed=5000;var run=setInterval('slider(0)',speed);$('.rotating-content div:first, .content-position a:first').addClass('selected');$('#rotating-content').hover(function(){clearInterval(run)},function(){run=setInterval('slider(0)',speed)});$('.content-position a').click(function(event){event.preventDefault();var id=$(this).attr('id');var next_slide=$('.rotating-content #rotating-'+id);var current_square=$('.content-position a.selected');var next_square=$(this);$('.rotating-content div, .content-position a').removeClass('selected');next_slide.addClass('selected');$(this).addClass('selected');$('.rotating-content').scrollTo(next_slide,1000);rotateSquares(current_square,next_square)})})});function slider(prev){var current_slide=$('.rotating-content div.selected').length?$('.rotating-content div.selected'):$('.rotating-content div:first');var current_square=$('.content-position a.selected').length?$('.content-position a.selected'):$('.content-position a:first');if(prev){var next_slide=(current_slide.prev().length)?current_slide.prev():$('.rotating-content div:last');var next_square=(current_square.prev().length)?current_square.prev():$('.content-position a:last')}else{var next_slide=(current_slide.next().length)?current_slide.next():$('.rotating-content div:first');var next_square=(current_square.next().length)?current_square.next():$('.content-position a:first')}$('.rotating-content div, .content-position a').removeClass('selected');next_slide.addClass('selected');next_square.addClass('selected');$('.rotating-content').scrollTo(next_slide,1000);rotateSquares(current_square,next_square)}function rotateSquares(current,next){$('.content-position #'+current.attr('id')+' img').fadeOut(1000);$('.content-position #'+next.attr('id')+' img').fadeIn(1000);return false;}