// JavaScript Document
$(document).ready(function($){
         $('ul.gallery li').hover(function(){
		         $(this).children('.imgCnt').stop().animate({'bottom' : '8px', 'left' : '8px'}, 500);
		 }, function(){$(this).children('.imgCnt').stop().animate({'bottom' : '-122px', 'left' : '8px'}, 500);});
});

$(document).ready(function($) {
	var indicator = $('#indicator'), indicatorHalfWidth = indicator.width()/2, lis = $('ul.Vslide').children('li');
	var scr = $(".scrol").scrollable({ circular: true, mousewheel: false, size:1,
					onSeek: function(event, index) {
						var li = lis.eq(index),
						newPos = li.position().top + (li.height()/2) - indicatorHalfWidth;
						indicator.stop(true).animate({ top: newPos }, 250, 'easeInOutExpo');
						var info = this.getItems();
						$('.info').animate({opacity:1},800);
						}, onBeforeSeek: function(){
							$('.info').animate({opacity:0.1},500);
					//alert(info.attr('title'));
							}
					}).autoscroll(300000).navigator({
	navi:'ul.Vslide'
	});
	
	
	window.scroller = scr.data("scrollable");
	$('.pause').click(function(){
	scroller.pause();
	});
	
	
	$(".VslideHold").scrollable({ vertical: true, size: 5, mousewheel: false, next:'.arrow_down', prev:'.arrow_up'});
	var scrollable = jQuery(".VslideHold").data("scrollable");				
	var size = 4;
	
	scrollable.onSeek(function(event, index) {
	if (this.getIndex() >= this.getSize() - size) {
	  $(".arrow_up").addClass("disabled");
	}
	});
	
	scrollable.onBeforeSeek(function(event, index) {
	if (this.getIndex() >= this.getSize() - size) {
	  if (index > this.getIndex()) {
		return false;
	  }
	
	}
   });
	
	

	
	//ALUMNI scroller
	$(".Alscroll").scrollable({circular: true, vartical:false, mousewheel: false, size:5, next:'#ArrowBlk_rt', prev:'#ArrowBlk_lt'}).autoscroll(3000);
	
	
	/*$('.Expand').click(function(){
	if($(this).parent().width() == '120px')
	{
		$(this).parent().animate({ width: '0px' }, 250, 'easeInOutExpo').find('.extURLtxt').animate({opacity: 0, right: '-90px' }, 250, 'easeInOutExpo')
		return false;
	}
		$(this).parent().animate({ width: '120px' }, 250, 'easeInOutExpo').find('.extURLtxt').animate({opacity: 1, right: '20px' }, 250, 'easeInOutExpo');
		//$(this).parent().find('.extURLtxt').show();
	})*/
	$(".Expand").click(function () {
		//alert("click");
 		if ($('.extURL').is(":hidden")) {
 			$('.extURL').show();
			$('.extURL3').hide();
 		} else {
 			$('.extURL').hide();
 		}
 	});
	$(".Expand2").click(function () {
		//alert("click");
 		if ($('.extURL2').is(":hidden")) {
			$('#Hd_search').css({right:'140px'});
 			$('.extURL2').show().animate({width: '118px' }, 250, 'easeInOutExpo');
			$('.extURL4').hide();
 		} else {
			$('#Hd_search').css({right:'16px'});
 			$('.extURL2').hide().css({width: '0px' }, 250, 'easeInOutExpo');
 		}
 	});
	$(".Expand3").click(function () {
		//alert("click");
 		if ($('.extURL3').is(":hidden")) {
 			$('.extURL3').show().animate({width: '118px' }, 250, 'easeInOutExpo');
			$('.extURL').hide();
 		} else {
 			$('.extURL3').hide().css({width: '0px' }, 250, 'easeInOutExpo');
 		}
 	});
	$(".Expand4").click(function () {
		//alert("click");
 		if ($('.extURL4').is(":hidden")) {
			$('.extURL2').hide();
			$('#Hd_search').css({right:'16px'});
 			$('.extURL4').show().animate({width: '118px' }, 250, 'easeInOutExpo');
 		} else {
			
 			$('.extURL4').hide().css({width: '0px' }, 250, 'easeInOutExpo');
 		}
 	});


});

function showSlidingDiv(){
$("#slidingDiv").animate({"height": "toggle"}, { duration: 100 });
}

function swapTabs(s){
	for(var i = 1; i<=6; i++)
	{
		if(i==s)
		{
			$('#port_ct'+i).fadeIn('slow');
			$('.tab'+i).parent().addClass('current');
		}
		else
		{
			$('#port_ct'+i).fadeOut('fast');
			$('.tab'+i).parent().removeClass('current');
		}
	}
	
}

