$(document).ready(function() { $("a.lightbox").fancybox(); $(".csc-textpic-imagecolumn").removeAttr("style"); if($(".seite-1").length != 1){ $.ajax({ url: "http://www.geniale-bielefeld.de/fileadmin/template/scripts/get-image.php", cache: false, success: function(html){ $("aside.slideshow").append(html); $('.slideshow').cycle({ fx: 'fade'
});}
});}
if($("aside .location").length != 0) { $(".address strong").wrap(" <a href='#' class='show-map' title='Karten&bersicht anzeigenl'></a>"); $("article").wrapInner("<div id='article-wrap'></div>"); $("article").append("<div id='map' style='margin-top: 10px; text-align: right;'><a href='#' class='close-map' style=''>Karte schließen</a><div id='map_canvas' style='width: 476px; height: 500px'></div></div>"); $("#map").hide();}
$("#pagination_navi .first span, #pagination_navi .last span, #pagination_navi .previous span").each(function() { if($(this).text().length < 2) { $(this).remove();}
}); var eventtype = $(".event-type").text();$(".event-type").remove(); $("p.bodytext:first").prepend("<span class='event-type'>" + eventtype + " </span>"); $(".tx_kuloplayer_pi1-video").css("float","right");}); $(".tg.t-1").attr("title", "Zielgruppe: von 3-6 Jahren"); $(".tg.t-2").attr("title", "Zielgruppe: von 3-8 Jahren"); $(".tg.t-3").attr("title", "Zielgruppe: von 3-13 Jahren"); $(".tg.t-4").attr("title", "Zielgruppe: von 3-13 Jahren und Jugendliche"); $(".tg.t-5").attr("title", "Zielgruppe: Kinder, Jugendliche und Erwachsene"); $(".tg.t-6").attr("title", "Zielgruppe: von 6-8 Jahren"); $(".tg.t-7").attr("title", "Zielgruppe: von 6-13 Jahren"); $(".tg.t-8").attr("title", "Zielgruppe: von 6-13 Jahre und Jugendliche"); $(".tg.t-9").attr("title", "Zielgruppe: von 6-13 Jahre, Jugendliche und Erwachsene"); $(".tg.t-10").attr("title", "Zielgruppe: von 8-13 Jahren"); $(".tg.t-11").attr("title", "Zielgruppe: von 8-13 Jahren und Jugendliche"); $(".tg.t-12").attr("title", "Zielgruppe: von 8-13 Jahren, Jugendliche und Erwachsene"); $(".tg.t-13").attr("title", "Zielgruppe: Jugendliche"); $(".tg.t-14").attr("title", "Zielgruppe: Jugendliche und Erwachsene"); $(".tg.t-15").attr("title", "Zielgruppe: Erwachsene"); function initialize(address) { var image = 'http://geniale2.nklinke.de/fileadmin/template/img/mapicon.gif'; var map = null; var geocoder = null; var bielefeld = new google.maps.LatLng(52.01409,8.5185); var mapOptions = { zoom: 11, center: bielefeld, mapTypeControl: false, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.BOTTOM
}, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.ZOOM_PAN, position: google.maps.ControlPosition.TOP_RIGHT
}, scaleControl: true, scaleControlOptions: { position: google.maps.ControlPosition.BOTTOM_LEFT
}
}; var styledMapOptions = { map: map, name: "GENIALE 2011"
}
map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions); map.setCenter(bielefeld, 10); var genialeMap = new google.maps.StyledMapType(styledMapOptions); map.mapTypes.set('GENIALE', genialeMap); map.setMapTypeId('GENIALE'); geocoder = new google.maps.Geocoder(); if (geocoder) { geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { point = results[0].geometry.location; map.setCenter(point); var marker = new google.maps.Marker({ map: map, position: point, icon: image
}); map.setZoom(15); marker.setMap(map);} else { alert("Geocode was not successful for the following reason: " + status);}
});}
}
var isClicked = false; $(".show-map").live("click", function() { $("#article-wrap").hide(); $("#map").show(); var address = $(this).parent().find(".street-address").text() + ", " +$(this).parent().find(".postal-code").text() + " " + $(this).parent().find(".region").text(); if(initialize(address)) {}
return false;}); $(".close-map").live("click", function() { $("#article-wrap").show(); $("#map").hide(); return false;}); $(".event-list li").live("click", function() { var target= $(this).find("a").attr("href"); location.href= "http://www.geniale-bielefeld.de/" + target;}); /* $(".n-1 >a").click(function(event){ location.reload();});*/
