function mapStart() {
    var coords = new google.maps.LatLng(55.66777, 12.5567);
    var mapOptions = {
        zoom: 16,
        center: coords,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("contact-map"), mapOptions);
     var marker = new google.maps.Marker({
      position: coords,
      title:"Hello World!"
  });
  
  // To add the marker to the map, call setMap();
  marker.setMap(map);
}

$(function() {
    // CONTACT
    $('#person-left').mouseenter(function() {
        $('.person-info', this).slideDown('normal');
    });
    $('#person-left').mouseleave(function() {
        $('.person-info', this).slideUp('normal');
    });
    $('#person-right').mouseenter(function() {
        $('.person-info', this).slideDown('normal');
    });
    $('#person-right').mouseleave(function() {
        $('.person-info', this).slideUp('normal');
    });

	if ($('body').hasClass('page-template-tplcontact-php')) {
	    $("a.show-contact-map").fancybox({
	        'autoScale' : false,
	        'onStart': mapStart
	    });
    }
    
    
    // CONTACT END

    // ARCHIVE
    $('.archive-row-top').click(function() {
        if ($(this).parent('.archive-row').children('.details').is(':visible')) {
	     	$(this).children('.right').removeClass('sign-up');
            $(this).children('.right').addClass('sign-plus');
            $(this).parent('.archive-row').css('border-bottom-color', '#e0e0e0');
        } else {
        	$(this).children('.right').removeClass('sign-plus');
            $(this).children('.right').addClass('sign-up');
            $(this).parent('.archive-row').css('border-bottom-color', '#3573ff');
        }
        $(this).parent('.archive-row').children('.details').slideToggle('normal');
    });
    // ARCHIVE END

    // REFERENCES
    $('.row-reference:last-child').css({marginBottom:'0'});
    // REFERENCES END
});


// cufon - font replacement
Cufon.replace('#page-info h1, #footer .copyright, .contact-wrapper h5, #topmenu ul li a, .sidebar h3, #content h3, #persons-wrapper .person-wrapper .person-info h4, .archive-row .left h3, .archive-row-header .left, .archive-row-header .right, .archive-row .details .download-link, .archive-row .details .download-info,.blog-wrapper .top h3, .blog-wrapper .date .day-month, .row-reference .reference-element h3, .intro h3', { fontFamily: 'Helvetica-75-bold', hover: true });
Cufon.replace('.slogan-slider h2', { fontFamily: 'Helvetica-85-heavy', hover: true });
Cufon.replace('#page-info h2, .slogan-slider h2 span', { fontFamily: 'Helvetica-35-thin', hover: true });
