jQuery.preloadImages = function() {
  for(var i = 0; i<arguments.length; i++) {
	 jQuery('<img>').attr('src', arguments[i]);
  }
}
	
function addBookmark() {
	title = 'Litér Információs Portál';
	url = 'http://www.liter.hu';

	if($.browser.mozilla) {
		window.sidebar.addPanel(title,url,'');
	} else if($.browser.msie) {
		window.external.AddFavorite(url,title);
	} else {
		return true;
	}
}

function setHomePage() {
	if($.browser.msie) {
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.liter.hu');
	}
}

$(document).ready(function() {
  $('input[@type=radio],input[@type=checkbox]').each(function() {
		$(this).css('border-width','0px');
		$(this).css('background-color','transparent');
		$(this).css('background-image','none');
	});

	$('img.hover').each(function() {
		var imgSrc = $(this).attr('src');

		$(this).mouseover(function() {
			$(this).attr('src',imgSrc.replace(/off\./,'on.'));
		});

		$(this).mouseout(function() {
			$(this).attr('src',imgSrc.replace(/on\./,'off.'));
		});
	});

	$('form[@name=form-newForumTopic]').each(function() {
		$(this).submit(function() {
			if($('#message').val() == '') {
				alert('A hozzászólás megadása kötelező!');
				return false;
			}
		});
	});
});