﻿Sys.Application.add_load(OnApplicationLoadHandler);

// ~~~~~~~~~~~~~~~~~~~~~~ AJAX scripts ~~~~~~~~~~~~~~~~~~~~~ 
function OnApplicationLoadHandler(sender, args) {
    
    // ~~ Fix for IE6.
    if ((Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7)) {
        // alert("Your browser is outdated (Internet Explorer 6). Please upgrade your browser.");
    }
    
}

// ~~~~~~~~~~~~~~~~~~~~  JQUERY scripts ~~~~~~~~~~~~~~~~~~~~
$(document).ready(function() {

    // Main Menu Hover
    $("#mainMenu li").hover(function() { $(this).addClass("active") }, function() { $(this).removeClass("active") });

	// Weather widget
	if ($("#weatherForecastPlaceholder").length == 1) { 
		$("#weatherForecastPlaceholder").html('<iframe frameborder="0" class="frameWE" src="http://poweredby.10best.com/location.process/OID_234B9E02/?hotelCode=0515&amp;lang=GB"></iframe>');
	}
	if ($("#weatherForecastButton").length == 1) { 
		$("#weatherForecastButton").html('<span>Local weather</span><iframe frameborder="0" scrolling="no" src="http://weather.yahoo.com/badge/?id=727232&u=c&t=blue&l=tiny"></iframe><div title="Weather forecast Amsterdam"><img src="/_images/wft.gif" style="width:150px; height:110px;" alt="" /></div>');
		$("#weatherForecastButton").click(function() {
			top.location.href="/pages/local-information-and-weather-in-amsterdam.aspx";
		})
		//setTimeout("$('div#weatherForecastButton').find('iframe').eq(0).contents().find('#tinybg').removeClass();",3000);
	}
	
	//Interactive floorplan
	if ($("#floorplan").length == 1) {
		$("#floorplan").colorbox();
	}
	
	// Gallery slideViewerPro Init
	$(window).bind("load", function() { 
		$("div#my-folio-of-works").slideViewerPro({ 
			thumbs: 6,  
			autoslide: true,  
			asTimer: 3500,  
			typo: true, 
			galBorderWidth: 0, 
			thumbsBorderOpacity: 0,  
			buttonsTextColor: "#707070", 
			buttonsWidth: 40, 
			thumbsActiveBorderOpacity: 0.8, 
			thumbsActiveBorderColor: "#00386e", 
			shuffle: false
		});
	});	
	

});
