$(document).ready(function(){
	
	// The small arrow that marks the active search icon:
	var arrow = $('<span>',{className:'arrow'}).appendTo('ul.icons');
	
	$('ul.icons li').click(function(){
		var el = $(this);
		
		if(el.hasClass('active')){
			// The icon is already active, exit
			return false;
		}
		
		el.siblings().removeClass('active');
		el.addClass('active');
		
		// Move the arrow below this icon
		arrow.stop().animate({
			left		: el.position().left,
			marginLeft	: (el.width()/2)-4
		});
		
		document.getElementById('tsear').value=el.attr('data-searchType');
		
		// Set the search type
		
		$('#more').fadeOut();
	});
	
	// Adding the site domain as a label for the first radio button:
	
	
	// Marking the Search tutorialzine.com radio as active:
	
	
	// Marking the web search icon as active:
	$('li.web').click();
	
	// Focusing the input text box:
	$('#s').focus();

	
	

	
	

	
});

