$(function(){
		   
	//add classes	   
	$('#topmenu li:first-child').addClass('first-item');
	$('#topmenu li:last-child').addClass('last-item');
	
	$('.subnav li:first-child').addClass('first-item');
	$('.subnav li:last-child').addClass('last-item');
	
	$('.news:odd').addClass('odd');
	$('.news:even').addClass('even');
	
	//drop downs
	$('nav li').hover(function(){
		$(this).addClass('active');
		$(this).find('ul').stop(true, true).slideDown('fast');
	}, function(){
		$(this).removeClass('active');
		$(this).find('ul').stop(true, true).slideUp();	
		});
	
	//clear search field
	var value = $('#searchform input').attr('value');

	$('#searchform input').focus (function() {
		if ($(this).attr('value') == value) {
				$(this).val("")
		}
	});
	
	$('#searchform input').blur(function() {
		if ($(this).attr('value') == "") {
				$(this).val(value)
		}
	});
	
	//newsletter
	
	var name = $('input#name').attr('value');

	$('input#name').focus (function() {
		if ($(this).attr('value') == name) {
				$(this).val("")
		}
	});
	
	$('input#name').blur(function() {
		if ($(this).attr('value') == "") {
				$(this).val(name)
		}
	});
	
	var email = $('input#pkytyj-pkytyj').attr('value');

	$('input#pkytyj-pkytyj').focus (function() {
		if ($(this).attr('value') == email) {
				$(this).val("")
		}
	});
	
	$('input#pkytyj-pkytyj').blur(function() {
		if ($(this).attr('value') == "") {
				$(this).val(email)
		}
	});
	
// end jquery
});

