/*
 * Theme specific scripts
 *
 * Additional third party scripts live in scripts/ sub-directory
 */



 /*
  * External Links
  * Open links with rel="external" in a new window.
  */
Drupal.behaviors.gmaplinker = function (context) {

  $('a.linker').each(function(i){
      $(this).bind('click', function(){
         GEvent.trigger(Drupal.settings.gmap.auto1map.markers[i].marker, "click");
          return false;
      });
  });


//  Drupal.gmap.addHandler('gmap',function(elem) {
//    var obj = this;
//    obj.bind('checkresize',function() {
//      obj.map.checkResize();
//      obj.map.setCenter(new GLatLng(obj.vars.latitude,obj.vars.longitude), obj.vars.zoom);
//    });
//  });
//
//	$('a.linker').each(function(i){
//		$(this).bind('mouseover', function(){
//			GEvent.trigger(Drupal.settings.gmap.auto1map.markers[i].marker, "mouseover");
//			return false;
//		});
//		$(this).bind('mouseout', function(){
//			GEvent.trigger(Drupal.settings.gmap.auto1map.markers[i].marker, "mouseout");
//			return false;
//		});
//	});
}


 Drupal.behaviors.externalLinks = function (context) {
   $('a[rel="external"], .map-link a, .field-field-files a').click( function() {
       window.open( $(this).attr('href') );
       return false;
   });
 }                                                                  


