// JavaScript Document
$(function(){
	/*	  $('.membersOnly').hover(function(){
										   
				$(this).css('position','relative').append('<div class="memberToolTip"></div>');						   
										   },function(){
						$(this).children('.memberToolTip').remove();					   
											   }); */
		  $('.inputText').click(function(){
										 $(this).attr('value','').unbind('click');
										 });
		  $('#quickLinks li').hover(function(){
											 $(this).addClass('hoverClass');},function(){
												 $(this).removeClass('hoverClass');
											 });
		//  Code below is used for Submit News
			var title1 = 0;
			var summary1 = 0;
			var article1 = 0;
			
			$('#title').click(function(){
				if(title1 == 0){
					$(this).attr('value','');
					title1 = 1;
				}	
			});
		
			$('#summary_text').click(function(){
				if(summary1 == 0){
					$(this).attr('value','');
					summary1 = 1;
				}	
			});
			
			$('#article_text').click(function(){
				if(article1 == 0){
					$(this).attr('value','');
					article1 = 1;
				}	
			});
			
			//////  WS - Change here 4 .net ID's  ///////
			$('.titClear').click(function(){
				if(title1 == 0){
					$(this).attr('value','');
					title1 = 1;
				}	
			});
		
			$('.sumClear').click(function(){
				if(summary1 == 0){
					$(this).attr('value','');
					summary1 = 1;
				}	
			});
			
			$('.artClear').click(function(){
				if(article1 == 0){
					$(this).attr('value','');
					article1 = 1;
				}	
			});
			///////////////////////////////////////
			
			$('input.http').blur(function(){
				var str = $(this).attr('value');
				result = str.split('http://');
				if(result[1] == undefined){
					var newvalue = "http://" + $(this).attr('value'); 
					$(this).attr('value', newvalue);
				}
			});
		//End Submit News
		//conference proposals
		$("#speaker1 a.add-another-speaker").click(function(){
		$("#speaker2").slideDown();
		$(this).css("display","none");
		return false;
	});
	$("#speaker2 a.add-another-speaker").click(function(){
		$("#speaker3").slideDown();
		$(this).css("display","none");
		return false;
	});
	$("#speaker3 a.add-another-speaker").click(function(){
		$("#speaker4").slideDown();
		$(this).css("display","none");
		return false;
	});

		randomBg();
			function randomBg () {
				var bgImages = new Array('turtle','polarbear','seal','frog','bird');
				var randomArrayItem = Math.floor(Math.random()*bgImages.length);
				$('#banner').addClass(bgImages[randomArrayItem]);
				}
				
//Adds bottom padding to items with no ul in the leftNav
	innerPadding = $("#leftNav div.inner").children("ul").html();	
	if(innerPadding == null){
		$("#leftNav div.inner").css("padding-bottom", "12px");
	}		
});