$(document).ready(function() {
	$("a[class ^= 'view-']").click(function() 
	{
//     	url = $(this).attr('rel');
		classname = $(this).attr('class');
        temp = classname.split('-');
        id = temp[1];
        $.post("/updateview.php", { 'id': id, 'type': 'view'}, function(data)
        {
//          window.open(url);
        }, "text");
    });

    $("li[class = 'h1']").hover(function(){
        $(this).addClass("hovered");
    },
    function(){
        $(this).removeClass("hovered");
    });

	$("input[value='Search populii..']").click(function() {
		if (this.value == 'Search populii..')
		{
			this.value = '';
		}
	});

	$("input[name='query']").blur(function(){
		if (this.value == '')
		{
			this.value = 'Search populii..';
		}
	});

	$("input[value='username']").click(function() {
		if (this.value == 'username')
		{
			this.value = '';
		}
	});
	
	$("input[name='username']").blur(function(){
		if (this.value == '')
		{
			this.value = 'username';
		}
	});


/*	$("li[class = 'pag']").hover(function(){
		$(this).removeClass("pag");
		$(this).addClass("paghov");
	},
	function(){
		$(this).removeClass("paghov");
		$(this).addClass("pag");
	});*/
});

