var eurostile = {src: FONT_LOCATION+'eurostile.swf'};

sIFR.activate(eurostile);

sIFR.replace(eurostile, {
	selector: 'h1.heading',
	fitExactly: true,
	css: [
		'.sIFR-root { font-size: 25px; color: #cccccc; letter-spacing: 1; }',
		'strong { font-style: bold; }',
		'em { font-style: italic; }'
		],
	wmode: 'transparent'
});

$(document).ready(function() {
	Shadowbox.init();
	$(".sig a").tooltip({
		extraClass: "pla_sig",
	    track: true,
	    delay: 0,
	    showURL: true,
	    showBody: " :: "
	});
	$("input[type=text],input[type=password],textarea").each(function() {  
		$(this).focus(function() { 
			if($(this).val()==this.defaultValue) $(this).val(""); 
		});
		$(this).blur(function() { 
			if($(this).val()=="") $(this).val(this.defaultValue); 
		});
	});
});

$.listen("click","a.shadowbox",function() {
	Shadowbox.open({
		player: "img",
		title: $(this).attr("title"),
		content: $(this).attr("href")
	});
	return false;
});

function GoogleMaps(lat,lng,zoom,title) {
	if(zoom==null) zoom = 13;
	if(title==null) title = "Plan d'Accès Google Maps";
    Shadowbox.open({
        player: "html",
        title: title,
        content: "",
        width: 750,
        height: 500,
        options: {
            onFinish: function(item){
                if(GBrowserIsCompatible()){
                    var map = new GMap2(document.getElementById("shadowbox_content"));
                    map.setCenter(new GLatLng(lat,lng),zoom);
                    var point = new GLatLng(lat,lng);
                    map.addOverlay(new GMarker(point));     
                    map.addControl(new GSmallMapControl());
                    map.addControl(new GMapTypeControl());
                }
            }
        }
    });
}

function VisiteVirtuelle(src,title) {
	Shadowbox.open({
        player: "iframe",
        title: "Visite Virtuelle - "+title,
        content: "templates/media/"+src+"/index.html",
        width: 650,
        height: 430
    });
}

function ZoomDrag(img,title) {
	Shadowbox.open({
        player: "img",
        title: title+" - déplacer la carte avec votre souris",
        content: "templates/media/"+img,
        options: { handleOversize: "drag" }
    });
}

function openPage(img) {
	Shadowbox.open({
        player: "img",
        title: "La Carte - déplacer la carte avec votre souris",
        content: img,
        options: { handleOversize: "drag" }
    });
}

function pngFix(items) {
	if($.browser.msie&&(parseInt($.browser.version)==6)) DD_belatedPNG.fix(items);
}
