$(document).ready(function(){
	
	sIFR.replaceElement("h2.topten", "/static/swf/sifr2.swf", "#89bb40", named({sWmode : "opaque"}));
	sIFR.replaceElement("h2.main", "/static/swf/sifr2.swf", "#89bb40", named({sWmode : "opaque"}));
	sIFR.replaceElement("h2", "/static/swf/sifr2.swf", "#d9004d", named({sWmode : "opaque"}));
	sIFR.replaceElement("h3.press-archive-header", "/static/swf/sifr2.swf", "#515151", named({sWmode : "opaque"}));
	sIFR.replaceElement("strong.place-sumup", "/static/swf/sifr2.swf", "#000000", named({sWmode : "opaque"}));
	
	
	$("#toilets-list li").click(function(){
		var id = $(this).attr("id").slice(1);
		$("#toilets-list li.active").removeClass("active");
		$(this).addClass("active");
		openPlaceInfoById(id,12,true);
	});
	
	$("#toilets-categories-list").change(function(){
		$(this).parents("form").submit();
	});
    
    $("a.watch-movie").fancybox({
        'zoomSpeedIn':	300, 
		'zoomSpeedOut':	300,
		'frameWidth': 540,
		'frameHeight': 296,
		'overlayShow':	true,
		'overlayOpacity': 0.9
	});
    
	$("#research-links-menu a").click(function(){
		var cls = $(this).attr("class");
		if(cls != 'active') {
			var id = $(this).attr("href");
			$(this).parents("ul").find("a.active").removeClass("active");
			$(this).addClass("active");
			$('.presentation').fadeOut('normal', function(){
				$(id).fadeIn('normal');
			});
		};
		return false;
	});
});
