$(document).ready(function(){
	searchboxtext='Pesquisar';
	$('#searchbox').attr('value',searchboxtext);
	$('#searchbox').focus(function(e){  
    	$(this).addClass('active'); 
		if($(this).attr('value')==searchboxtext) $(this).attr('value','');
	});  
	$('#searchbox').blur(function(e){ 
		if($(this).attr('value')==''){
			$(this).removeClass("active");
			$(this).attr('value',searchboxtext); 
		}
	}); 
	$('#searchbox').keypress(function(e){
		if($.browser.msie){
			if(e.which==13){
				jQuery(this).blur();
				jQuery('#sendquery').focus().click();
			}
		}
    });
});
function search(){
	var query=$('#searchbox').attr('value');
	if(query!=''){
		window.location.href=root+'pesquisa/'+query;
	}
}



























/*
lastVolume=0;
function toggleLights(){
	if(lights){
		$('body').css('overflow','hidden');
		$('#video-space').css('border-color','#000');
		$('#light').css('color','#333');
		$('#light').html('Clarear a tela');
		$('#overlay').fadeTo('slow',0.98);
		$('#volumeicon').fadeOut('fast');
		$('#fullscreen').fadeOut('fast');
		$('#volume').fadeOut('fast');
		$('#controls').css('background-color','#000');
		lights=false;
	}else{
		$('#video-space').css('border-color','#ccc');
		$('#light').css('color','#555');
		$('#light').html('Escurecer a tela');
		$('#overlay').fadeOut('fast',function(){
			$('body').css('overflow','auto');
		});
		$('#volumeicon').fadeIn();
		$('#fullscreen').fadeIn();
		$('#volume').fadeIn();
		$('#controls').css('background-color','#f4f4f4');
		lights=true;
	}
}
function toggleSound(){
	var p=typeof playerfx=='undefined' ? player : playerfx;
	if(p.settings.volume!=0){
		lastVolume=p.settings.volume;
		p.settings.volume=0;
	}else{
		if(lastVolume==0){
			p.settings.volume=100;
		}else{
			p.settings.volume=lastVolume;
		}
	}
	$("#volume").slider("option","value",p.settings.volume);
	volumeicon(p.settings.volume);
}
function fullScreen(){
	var p=typeof playerfx=='undefined' ? player : playerfx;
	p.fullScreen=true;	
}
function volumeicon(value){
	var icon;
	if(value==0){
		pos=3;
	}else if(value<33){
		pos=2;
	}else if(value<66){
		pos=1;
	}else{
		pos=0
	}
	$('#volumeicon').css('background-position','0 -'+(28*pos)+'px');
	return 'img/'+icon+'.gif';
}


$(document).ready(function(){
	
	if($.browser.msie && $.browser.version.substr(0,1)<7){
		$('#volumeicon').css('background','url(../img/volume.gif)');
	}
	
	lights=true;
	
	var p=typeof playerfx=='undefined' ? player : playerfx;
	
	p.settings.volume=0;
	
	volumeicon(p.settings.volume);
	
	$('#volumevalue').html(p.settings.volume);
	$('#volume').slider({
		'min':0,
		'max':100,
		'step':1,
		'value':p.settings.volume,
		'animate':true,
		'slide':function(event,ui){
			p.settings.volume=ui.value;
			volumeicon(ui.value);
		},
		'stop':function(event,ui){
			
		}
	});
	
	
	
 	
	
	
	
	
	
 
 	//player.settings.volume=70;
	//player2.settings.volume=70;
	
	//alert(player2.settings.volume);
 

	$('#album li').mouseenter(function(event){
		var target=$(event.currentTarget);
		target.children('.photo-options').fadeIn('fast');
		
	});
	$('#album li').mouseleave(function(event){
		var target=$(event.currentTarget);
		target.children('.photo-options').fadeOut('fast');
	});

 
});

*/
 
 

