// $Id: es_util.js,v 1.4 2007/01/11 23:29:46 bjaspan Exp $

JQ(document).ready(function() {
    // this should use jQuery's filter method, but it doesn't work
    // 6/15/07 Added 1shoppingcart to internal domains. And it Actually appears to be working
    //Menu Link Items that don't  require <a href=... are forced external, drupal adds <a href..
    JQ("a").
	each(function(a) {
	    var j = JQ(this);
	    var h = j.href();
	    if (h != null && h != '' && h != 'http://www.1shoppingcart.com/app/netcart.asp?merchantID=58104' &&
		h.indexOf('eventsolutions') == -1 &&
		h.indexOf('event-solutions') == -1 &&
		h.indexOf('1shoppingcart') == -1 &&
		h.indexOf('http://www.1shoppingcart.com/app/netcart.asp?merchantID=58104') == -1){
		j.
		    addClass("external").
		    click(function() { window.open(h); return false; });
	    }
	});

    //JQ("a[@rel='external']").addClass("external")
	//.click(function() { window.open(JQ(this).href()); return false; });

});
