$(function(){
	//NAV ITEMS
	$('#nav_top li a').not(':has(span)').wrapInner('<span/>');
	$('#nav_top li').hover(function() {
		$(this).addClass('hover');
	},function(){
		$(this).removeClass('hover');
	});
	//LINKS THAT OPEN NEW BROWSER WINDOW
	$('a[class*="popup"]').each(function() {
		var $a = $(this), m = $a.attr('class').match(/popup\((\d+),(\d+)\)/);
		if (m) {
			$a.click(function() {
				window.open(this.href, '', 'scrollbars=yes,width=' + m[1] + ',height=' + m[2] + '');
				return false;
			});
		}
	});
});

//NIVO SLIDER
$(window).load(function() {
	if (!fn_isdev() && window.XMLHttpRequest && $('.slider').nivoSlider)
	$('.slider').nivoSlider();
});

function fn_isdev() {
	var a = window.location.host.split('.');
	return (a[a.length - 1] == 'local');
}

