/* API Javascript acepetmoving.com */


$(function(){
  $('a').click(function(){
   this.blur();
 });
 
 $(".blog-overview").hide();
 
 $(".toggle-overview").toggle(
    function(){
        $(".blog-overview").slideToggle();
        $(this).removeClass("down").addClass("up");
     },
     function(){
        $(".blog-overview").slideToggle();
        $(this).removeClass("up").addClass("down");
     }
  );
 
 $('a[href^=http://]')
    .not('a[href^="http://acepetmoving.com"]')
    .not('a[href^="http://www.acepetmoving.com"]')
    .not('a[href^="http://acepetmoving.ch"]')
    .not('a[href^="http://www.acepetmoving.ch"]')
    .attr({ target: "_blank" });
    
 $('#content a[href^=http://]')
    .not('a[href^="http://acepetmoving.com"]')
    .not('a[href^="http://www.acepetmoving.com"]')
    .not('a[href^="http://acepetmoving.ch"]')
    .not('a[href^="http://www.acepetmoving.ch"]')
    .addClass('external-link');
 
 // PNG-fix for IE < 7
  if ( $.browser.msie && $.browser.version < 7 )
  {
    correctPNG();
  }
  
  
  // map.search.ch
  $('.map').hide();
  $('.mapme').html('<img src="/assets/templates/upag/gfx/open.png" alt="open map" />');

  $('.mapme').toggle(function(){

    $(this).parent('p').next('.map').show('slow');
    $(this).html('<img src="/assets/templates/upag/gfx/close.png" alt="close map" />');

  },function(){

    $(this).parent('p').next('.map').hide('slow');
    $(this).html('<img src="/assets/templates/upag/gfx/open.png" alt="open map" />');

  });
  
});


