/* promobox projektz HP */
$(document).ready(function(){
	$("#naviBox span").click(function(){
		var cislo = parseInt($(this).find("a").text()) - 1;
		$("#naviBox span").removeClass("act");
		$(this).addClass("act");
  
		$("#promoBox").find(".box:visible").fadeOut("slow", function(){
			$("#promoBox").find(".box").eq(cislo).fadeIn("slow"); 
		});
		return false;
	});  

});
/* end. promobox projektz HP */   



(function ($) {
    $.fn.vAlign = function(container) {
        return this.each(function(i){
	   if(container == null) {
	      container = 'div';
	   }
	   var paddingPx = 10; //change this value as you need (It is the extra height for the parent element)
	   $(this).html("<" + container + ">" + $(this).html() + "</" + container + ">");
	   var el = $(this).children(container + ":first");
	   var elh = $(el).height(); //new element height
	   var ph = $(this).height(); //parent height
	   if(elh > ph) { //if new element height is larger apply this to parent
	       $(this).height(elh + paddingPx);
	       ph = elh + paddingPx;
	   }
	   var nh = (ph - elh) / 2; //new margin to apply
	   $(el).css('margin-top', nh);
        });
     };
})(jQuery);

(function($) {
  '$:nomunge'; // Used by YUI compressor.
  
  // Method: jQuery.fn.equalizeBottoms
  // 
  // Equalize the bottoms of all selected elements.
  // 
  // Usage:
  // 
  // > jQuery('selector').equalizeBottoms( [ bottom ] );
  // 
  // Arguments:
  // 
  //  bottom - (Number) An optional bottom y position to force selected element
  //    bottoms to. If omitted, bottom is computed automatically by measuring
  //    height of all selected elements and choosing the bottom-most bottom. You
  //    will probably never, ever use this.
  // 
  // Returns:
  // 
  //  (jQuery) The initial jQuery collection of elements.
  
  $.fn.equalizeBottoms = function( bottom ) {
    
    if ( isNaN( bottom ) ) {
      bottom = 0;
      
      // Reset height first, then get the bottom-most bottom.
      this.each(function(){
        var that = $(this).css({ height: 'auto' });
        bottom = Math.max( bottom, that.offset().top + that.outerHeight() );
      });
    }
    
    // Update all bottoms, taking padding and border height into consideration.
    return this.each(function(){
      var that = $(this);
      that.height( bottom - that.offset().top - that.outerHeight() + that.height() );
    });
    
  };
  
})(jQuery);

function equalize(){
	$('#contentMain').each(function(){
	$(this).find('.actionBox > :last-child').equalizeBottoms();
});
$('#contentMain').equalizeBottoms();
};
