function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank";
	}
}

function add_loader_bg(selector) {
    $(selector).addClass('loader');
}

function add_loader(selector) {
    $(selector).html('<div class="loadingImage"><img src="skins/default/images/ajax-loader-light-blue.gif" alt=""/></div>')
}

$.fn.pause = function(duration) {
    $(this).animate({dummy: 1}, duration);
    return this;
};

$.extend($.fn.disableTextSelect = function() {
    return this.each(function(){
        if($.browser.mozilla){//Firefox
            $(this).css('MozUserSelect','none');
        }else if($.browser.msie){//IE
            $(this).bind('selectstart',function(){
                return false;
            });
        }else{//Opera, etc.
            $(this).mousedown(function(){
                return false;
            });
        }
    });
});

function fav(item_id,module,title,link) {
    $('#fav').load('fav.php','item_id='+ item_id +'&module='+ module +'&title='+ title +'&link='+ link);
}

/*

$(document).ready(function(){

	$('ul#topMenu li').hover(
		function(){
			$(this).children(".topMenuMask").fadeIn(300);
			$(this).addClass("active");
			$(this).children(".topMenuMask").fadeOut(300);
		},
		function(){
			$(this).removeClass("active");
		}
	);
});
*/
