$.fn.swapit = function(a) {
return this.each(function() {
    if($(this).get(0).tagName.toUpperCase() == 'IMG') {
        var original = $(this).attr("src");
        if(original.indexOf('_over') == -1) {
            var over = original.split('.');
            if(over.length >= 2) {
                over[over.length-2] += a;
                over = over.join('.');
            } else {
                over = original + a;
            }
            $(this).mouseover(function() { $(this).attr('src', over); }).mouseout(function() { $(this).attr('src', original); });
        }
    }
});
}

$.reload = function () {
    window.location.reload(true);
}
$.preloadimages = function()
{   for(var i = 0; i<arguments.length; i++)
    {   img = new Image();
        img.src = arguments[i];
    }
}


$(document).ready(function() {

    $.preloadimages('images/lo/nav/portfolio_over.gif',
                    'images/lo/nav/process_over.gif',
                    'images/lo/nav/people_over.gif',
                    'images/lo/nav/news_over.gif',
                    'images/lo/nav/login_over.gif',
                    'images/lo/nav/contact_over.gif');
                    
    $('.swap').swapit('_over');



	$('h2.showBtn').click(function() {
		$(this).next().toggle('slow');						  
	});
	
	if ($('.hiddenDiv').length) {
		$('.hiddenDiv').hide();
	}
	
/* $('.tipStyle').tooltip(); */
	
	
});


