try
{
	document.execCommand("BackgroundImageCache", false, true);
} catch(e) {}
$(document).ready(function() {
	$('#main-menu li ul').hide();

	$('#main-menu > li').mouseover(function() {
			$(this).addClass('active');
	}).mouseout(function() {
			$(this).removeClass('active');
	});	
	$('#main-menu > li:has(ul)').mouseover(function() {
			$(this).children('ul').show();
			$(this).addClass('active');
	}).mouseout(function() {
			$(this).children('ul').hide();
			$(this).removeClass('active');
	});
	
	
				$("#submit-btn").click(
				function()
				{
						var i;
						if($("#newsletter-checkbox").is(':checked')) 
							i= $("#newsletter-checkbox").val() ;
						else 
							i = 0;
					$.ajax({
						type: "POST",
						data: "email="+$("#jantom_email").val()+"&check="+i,
						url: "http://jantom.net/index.php/newsletter/zapisz",
						success: function(msg){
						$("#res").text(msg);
						if(msg == "Twój adres e-mail został zapisany na listę prenumeratorów Newslettera.")
								$("#jantom_email").val('');
						if(msg == "Twój adres e-mail został zapisany na listę prenumeratorów Newslettera.")
								$("#jantom_email").val('');
					
						}
			});
			return false;
		});
		
		$("#ulubione").click(function()
				{
				bookmark()});
});


	function bookmark(){
	    var title="Jantom - druk wielkoformatowy"
	    var url="http://jantom.net"
	
	    if (window.sidebar) window.sidebar.addPanel(title, url,"");
	
	    else if( window.opera && window.print )
	    {
	    var mbm = document.createElement('a');
	    mbm.setAttribute('rel','sidebar');
	    mbm.setAttribute('href',url);
	    mbm.setAttribute('title',title);
	    mbm.click();
	    }
	
	    else if( document.all ) window.external.AddFavorite( url, title);
	
	}
	
	
    $(function() {
        $('.images a').lightBox();
    });
    
