function linksExternal(){
   if (document.getElementsByTagName){

     var anchors = document.getElementsByTagName("a");

     for (var i=0; i<anchors.length; i++){

       var anchor = anchors[i];

       if (anchor.getAttribute("rel") == "external"){
           anchor.target = "_blank";
	 	 }

      }

    }

 }

linksExternal();
function calcHeight(){
var height = $(window).height();
if (height <= 770){
	$("#hotelsHolder").css({'height':'770px'});
		
}else{
	$("#hotelsHolder").css({'height':height});	
}
}

$(document).ready(function() {
linksExternal();						   
$.preloadCssImages();
calcHeight();					   
$(window).bind('resize', function() {
calcHeight();	
});
					   
$('#polisLink a,#apolamareLink a').click(function() { 
		
		$.blockUI({ message: '<div class="waitMsg"><h1 class="waitMsgText">Please Wait...</h1><div class="waitMsgLoader"></div></div>', 
				  	css: { 
        padding:        0, 
        margin:         0, 
        width:          '380px',
		height:			'60px',
        top:            '40%',  
        left:           '35%',  
        textAlign:      'center',  
        color:          '#000',  
        border:         '', 
        backgroundColor:'', 
        cursor:         'wait' 
						 } 
						 
				 });  

if (this.href == "javascript:void(0)"){
	$.unblockUI();
	return false;	
}else{
	window.location = this.href;
}

}); 
if ((window.XMLHttpRequest == undefined) && (ActiveXObject != undefined)){
	$('#apolamareInnerHolder, #polisInnerHolder').ifixpng();
}
});
