  jQuery.fn.maska = function(classa) {

  $(this).hover(function(){
      $(this).find(classa).stop().animate({height:'25px',opacity: '0.8'}, 400);
      },function () {
        $(this).find(classa).stop().animate({height:'0',opacity: '0'}, 400);
        });
  }

	$(document).ready(function(){
		var is_main = $("#url").html();	
		if (is_main=='/')
		{
			$('.box').maska('.maska'); 
			var t = document.getElementById('features'); 
			var theight = t.offsetHeight; 
		//	alert(theight);
			$('#features .lb').css("height", (theight?theight:277));
			$('#properties .lb').css("height", theight);
			$('#invitation .lb').css("height", theight);
		}
	}); 
	
	 $(".lastblock").hover(
      function () {
        $(this).css({ backgroundColor:"#e9ffdb" });
      }, 
      function () {
        $(this).css({ backgroundColor:"#faf9f2"});
      }
    );

//additional properties for jQuery object
$(document).ready(function(){
 //align element in the middle of the screen
 $.fn.alignCenter = function() {
 //get margin left
 var marginLeft = Math.max(40, parseInt($(window).width()/2 - $(this).width()/2)) + 'px';
 //get margin top
 var marginTop = Math.max(40, parseInt($(window).height()/2 - $(this).height()/2)) + 'px';
 //return updated element
 return $(this).css({'margin-left':marginLeft, 'margin-top':marginTop});
 };

});

//close pop-up box
function closePopup()
 {
 $('#opaco').toggleClass('hidden').removeAttr('style');
 $('#popup').toggleClass('hidden');
 return false;
 }

//open pop-up
function showPopup(popup_type)
 {
  //when IE - fade immediately
 if($.browser.msie)
 {
 $('#opaco').height($(document).height()).toggleClass('hidden');
 }
 else
 //in all the rest browsers - fade slowly
 {
 $('#opaco').height($(document).height()).toggleClass('hidden');//fadeTo('slow', 0.7);
 }

 $('#popup')
 .html($('#popup_' + popup_type).html())
 .alignCenter()
 .toggleClass('hidden');

 return false;
 }
 
 
 
  String.prototype.PA = function (_hamper,_prefix,_postfix,_face)
 {
 _hamper=_prefix+"@"+this+(_postfix || '');
 document.write(_face+(_hamper).link("mailto:"+_hamper));
 }
 

