$(document).ready(function() {
	var win_w = $.browser.mozilla ? $(window).attr('innerWidth'): document.body.clientWidth;		
	if (win_w>950){
		$('#side-float-ads').css('display', 'block');
	}
		
	if (!window.goo_srch_type || window.goo_srch_type=='data')
		$($('.gsbox-1-opt').get(0)).attr('class', 'gsbox-1-opt-pr');
	else{
		$('.gsbox-1-opt').each(function(){
			if ($(this).attr('id')==window.goo_srch_type)
				$(this).attr('class', 'gsbox-1-opt-pr');
		});
	}
	
	$('.gsbox-1-opt, .gsbox-1-opt-pr').click(function(){
		$('.gsbox-1-opt-pr').attr('class', 'gsbox-1-opt');
		$(this).attr('class', 'gsbox-1-opt-pr');
		$(this).css('color', '#444');
	});	
	
	$('.gsbox-1-opt').hover(function(){
		if ($(this).attr('class')=='gsbox-1-opt-pr')
			$(this).css('color', '#fff');
		else
			$(this).css('color', '#70BD1F');
	},function(){
		$(this).css('color', '');
	});
		
	$('#sa').click(function(){
	});	
});

function search_google(){
	var what = $('.gsbox-1-opt-pr').attr('id');
	$('#srch_type').val(what);
	var q = $('#q').val();		
	if (!q)
		return false;
	
	switch(what){
		case 'web':
				return true;
			break;
		case 'yahav':
				$('#sitesearch').val('www.yahav.org');
			break;
		default:
			$('#sitesearch').val('www.yahav.org');
			q = q + ' ' + goo_srch_options[what]
			$('#q').val(q)				
	}
}
