$(window).load(function(){
	
	$('#menu #fomenu li#kbplast').hover(
		function (){
			$(this).prepend('<img style="position: absolute; left: 15px;" src="cssimg/menuhover.gif" alt="" />');
			$('#main').css({"margin-top":"0px"});			
		},
		function() {
			$('#menu #fomenu li#kbplast img').remove();
	});
	
	$('#menu #fomenu li#referencie').hover(
		function (){
			$(this).prepend('<img style="position: absolute; left: 200px;" src="cssimg/menuhover.gif" alt="" />');
			$('#main').css({"margin-top":"0px"});
		},
		function() {
			$('#menu #fomenu li#referencie img').remove();
	});
	
	$('#menu #fomenu li#proces').hover(
		function (){
			$(this).prepend('<img style="position: absolute; left: 420px;" src="cssimg/menuhover.gif" alt="" />');
			$('#main').css({"margin-top":"0px"});
		},
		function() {
			$('#menu #fomenu li#proces img').remove();
	});
	
	$('#menu #fomenu li#akcie').hover(
		function (){
			$(this).prepend('<img style="position: absolute; left: 610px;" src="cssimg/menuhover.gif" alt="" />');
			$('#main').css({"margin-top":"0px"});
		},
		function() {
			$('#menu #fomenu li#akcie img').remove();
	});
	
	$('#menu #fomenu li#kontakt').hover(
		function (){
			$(this).prepend('<img style="position: absolute; left: 750px;" src="cssimg/menuhover.gif" alt="" />');
			$('#main').css({"margin-top":"0px"});
		},
		function() {
			$('#menu #fomenu li#kontakt img').remove();
	});
	
	var h=$('#content').height();
	h+=450;
	
	if(!($.browser.msie&&($.browser.version=="6.0"))) {
		$('#main').height(h+"px");
	}
	
	if(!($.browser.msie&&($.browser.version=="6.0"))) {

	$('#ablakok .wwrapper:not(:first)').fadeOut("fast");
	
	$('#ablakok .wwrapper input[value!= ]').parent().fadeIn("fast");
	
	$('#ablakok .wwrapper:not(:last)').append('<p class="addlink">prida&#357; &#271;al&#353;&#237;<p>');
	
	$('#ablakok .wwrapper .addlink').click(function(){
		$(this).fadeOut("fast");
		$(this).parent().next().fadeIn("fast");	
		
		var h2=$('#main').height();
		h2+=30;
		$('#main').height(h2+"px");
	});
	
	}
	
	$("#produkt-content .titlediv:has(img) h2").addClass("prodmargin");
	$("#produkt-content .titlediv:has(img)").addClass("prodmargindiv");
	
	$('.kbe a img').hoverpulse({
        size: 10,  // number of pixels to pulse element (in each direction)
        speed: 200 // speed of the animation 
    });

	$('.kommerling a img').hoverpulse({
        size: 10,  // number of pixels to pulse element (in each direction)
        speed: 200 // speed of the animation 
    });

	$('.hormann a img').hoverpulse({
        size: 5,  // number of pixels to pulse element (in each direction)
        speed: 200 // speed of the animation 
    });
	
	if($.browser.msie) {
		$('#right1').css({"margin-top":"10px"});	
		$('#right2').css({"margin-top":"25px"});	
	}
	
	$('.oneref .ppy-enlarge').click(function() {
		$(this).parent().parent().parent().parent().siblings().removeClass('showontop');
		$(this).parent().parent().parent().parent().addClass('showontop');
		/*var he=$('#main').height();
		he+=500;
		$('#main').height(he+"px");*/
	});
  
  
});

$(document).ready(function() {
  if($.browser.msie) {
		$("#pikame").PikaChoose({show_prev_next:false, slide_enabled:false, auto_play:false});
	}
	else {
		$("#pikame").PikaChoose({slide_enabled:false, show_prev_next:false, auto_play:false, thumb_width:80, thumb_height:60});
	}
});