Project

General

Profile

1
$(document).ready(function()
2
{
3

    
4
        if($(".jcalendar").length) {
5
            $.insert(WB_URL+"/include/jscalendar/calendar-system.css");
6
          }
7

    
8
        if($(".jsadmin").length) {
9
            $.insert(WB_URL+"/modules/jsadmin/backend.css");
10
          }
11

    
12
	//Add external link class to external links -
13
	$('a[href^="http://"]').filter(function() {
14
		//Compare the anchor tag's host name with location's host name
15
	    return this.hostname && this.hostname !== location.hostname;
16
	  }).addClass("external").attr("target", "_blank");
17

    
18
	/* Add internal link class to external links -   */
19
	$('a[href^="http://"]').filter(function() {
20
		//Compare the anchor tag's host name with location's host name
21
	    return this.hostname && this.hostname == location.hostname;
22
	  }).addClass("internal");
23

    
24
});
(1-1/2)