// JavaScript Document
function stickieNote(e) {
	//Get the A tag
		//var id = $(this).attr('href');
		var id = '#dialog2';
	
		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		//Set heigth and width to mask to fill up the whole screen
		$('#mask').css({'width':maskWidth,'height':maskHeight});
		
		//transition effect		
		$('#mask').fadeIn(1000);	
		$('#mask').fadeTo("slow",0.8);	
	
		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();
              
		//Set the popup window to center
		$(id).css('top',  winH/2-$(id).height()/2);
		$(id).css('left', winW/2-$(id).width()/2);
	
		//transition effect
		$(id).fadeIn(2000);	
}
function getSearch(id, type){

	$('#search').val('');
	
	$('li.active').removeClass("active").addClass("inactive"); 
	$("li.inactive").animate({ width: "130px"}, 500 );
	if (type=='a') {
		$("#bRoster").hide();
		$("#aRoster").show();
		$('ul#aRoster li').each(function() {
			if(!$(this).hasClass(id)) {
				$(this).fadeOut('normal').addClass('hidden');
			} else {
				$(this).fadeIn('slow').removeClass('hidden');
			}
			
		});
		$(".artistSlider li#"+id).removeClass("inactive").addClass("active");
		$("li.active").animate({ width: 350+"px"}, 500 );
		$('#artistExpand'+id).hide();
	} else if (type=='b'){
		$("#aRoster").hide();
		$("#bRoster").show();
		$('ul#bRoster li').each(function() {
			if(!$(this).hasClass(id)) {
				$(this).fadeOut('normal').addClass('hidden');
			} else {
				$(this).fadeIn('slow').removeClass('hidden');
				$(this).removeClass("inactive").addClass("active");
			}
			
		});
		$("li.active").animate({ width: 350+"px"}, 500 );
		$('#busExpand'+id).hide();
	};
	
	$("#display").empty();
	$("#display").hide();
	
	
}

 $(function () {
	

	
	// Watermark
	$("#search").Watermark("click the roster to search by first or last name", "#000");
	
	// Lazy Load
	/*
	$("img").lazyload({         
	     placeholder : "img/grey.gif",
	     container: $("#aRoster")
	 });
	$("img").lazyload({         
	     placeholder : "img/grey.gif",
	     container: $("#bRoster")
	 });
	*/
	
	
});