$(document).ready(function() {

	$('ul.sf-menu').superfish({ 
        delay:       500,                             // .5 second delay on mouseout 
        animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
        speed:       'fast',                          // faster animation speed 
        autoArrows:  false                           // disable generation of arrow mark-up 
  });

	$.fn.cycle.defaults = { 
	    timeout:       4000,  // milliseconds between slide transitions (0 to disable auto advance) 
	    speed:         1000,  // speed of the transition (any valid fx speed value) 
	    next:          null,  // id of element to use as click trigger for next slide 
	    prev:          null,  // id of element to use as click trigger for previous slide 
	    before:        null,  // transition callback (scope set to element to be shown) 
	    after:         null,  // transition callback (scope set to element that was shown) 
	    height:        325,   // container height 
	    sync:          1,     // true if in/out transitions should occur simultaneously 
	    fit:           1,     // force slides to fit container 
	    pause:         0,     // true to enable "pause on hover" 
	    delay:         0,     // additional delay (in ms) for first transition (hint: can be negative) 
	    slideExpr:     null  // expression for selecting slides (if something other than all children is required) 
	};

	$('#stand-slideshow').cycle();
});


// Load location maps
function loadCbrMap() {
	document.getElementById("map").innerHTML = '' +
		'<iframe width="420" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?hl=en&amp;ie=UTF8&amp;msa=0&amp;msid=107439889616320044336.0004626ddb7b5af70d41e&amp;s=AARTsJoFbfC25AoWg6nABEyW8Wlphn3hvA&amp;ll=40.184513,-8.437757&amp;spn=0.021311,0.037336&amp;z=14&amp;output=embed"></iframe>';
}

function loadLraMap() {
	document.getElementById("map").innerHTML = '' +
		'<iframe width="420" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=107439889616320044336.0004626ddb7b5af70d41e&amp;ll=39.73828,-8.808632&amp;spn=0.0198,0.036049&amp;z=14&amp;output=embed"></iframe>';
}

function loadLxMap() {
	document.getElementById("map").innerHTML = '' +
		'<iframe width="420" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=207351364836519974512.0004626ddb7b5af70d41e&ll=38.771484,-9.094706&spn=0.019339,0.035577&z=15&amp;output=embed"></iframe>';
}

function loadCAMap() {
	document.getElementById("map").innerHTML = '' +
		'<iframe width="420" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?hl=en&amp;ie=UTF8&amp;s=AARTsJoFbfC25AoWg6nABEyW8Wlphn3hvA&amp;msa=0&amp;msid=107439889616320044336.0004626ddb7b5af70d41e&amp;ll=37.338739,-121.893353&amp;spn=0.011089,0.018668&amp;z=15&amp;output=embed"></iframe>';
}

function loadPorMap() {
	document.getElementById("map").innerHTML = '' +
		'<iframe width="420" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=207351364836519974512.0004626ddb7b5af70d41e&ll=41.177717,-8.604612&spn=0.01867,0.035577&z=15&amp;output=embed"></iframe>';
}


/*
// Disable right mouse click Script
function clickIE4() { if (event.button == 2) { return false; } }
function clickNS4(e){ 
	if (document.layers || document.getElementById && !document.all) {
		if (e.which == 2 || e.which == 3) {
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS4;
} else if (document.all && !document.getElementById){
	document.onmousedown = clickIE4;
}

document.oncontextmenu = new Function("return false")
*/
