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

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

    
23
});
(3-3/5)