function onLoadPage() {
	jQuery(".contentUpMenuOption a").each(function(){
		jQuery(this)
		.mouseover(function(){jQuery(this).animate({color:"#8cab29"},150)})
		.mouseout(function(){jQuery(this).animate({color:"#FFFFFF"},150)});
	});
	
	jQuery("#promatek").click(function(){
		jQuery(this).attr("target","_blank");
	});
}

function createScrollableBanner() {
	var S=jQuery("div.scrollable");
	S.scrollable({
		size:1,
		loop:true,
		speed:2000,
		clickable: false
	}).autoscroll({
		autoplay: true,
		interval:6000
	});
	
	jQuery(".contentUpBannerNavLeft img")
		.click(function(){ S.scrollable().prev(); })
		.mouseover(function(){ jQuery(this).attr("src","/files/framework/produkty3DArrowLeftOn.jpg"); })
		.mouseout(function(){ jQuery(this).attr("src","/files/framework/produkty3DArrowLeft.jpg"); });
	
	jQuery(".contentUpBannerNavRight img")
		.click(function(){ S.scrollable().next(); })
		.mouseover(function(){ jQuery(this).attr("src","/files/framework/produkty3DArrowRightOn.jpg"); })
		.mouseout(function(){ jQuery(this).attr("src","/files/framework/produkty3DArrowRight.jpg"); });
}

function preloadImage(obrazki)
{
	var tabelaObrazki=obrazki.split(",");
	
	for (i=0; i<tabelaObrazki.length; i++){
		picture= new Image;
		picture.src = "/files/framework/"+tabelaObrazki[i];
	}
}

function preloadBanner() {
    var img = jQuery(".itemm img");
    var loaded = 0;
    var count = img.length;
	
    img.each(function(i) {
        var tempSrc = jQuery(this).attr("src");
		jQuery(this).attr("src","");
		
        jQuery(this).load(function() {
            loaded++;
			
            if (count == loaded) {
                jQuery('.scrollable').css({ 'visibility': 'visible' });
				createScrollableBanner()
            }
        }).attr("src", tempSrc);
    });
}

function createLightbox(id) {
	jQuery(id).lightBox();
}

function createFlash(id,src,width,height) {
	$(id).flash({
		src: src,
		width: width,
		height: height
	},{ version: 9 });
}

function createTooltip(id){
	$(id).tooltip({
		track: true, 
		delay: 0, 
		showURL: false, 
		opacity: 1, 
		fixPNG: true, 
		showBody: " - ", 
		extraClass: "pretty fancy",
		top: -15, 
		left: 5 
	});
}


