path = '<%baseurl%>/files/gimgs/';

$(document).ready(function()
{
	setTimeout('move_up()', 1);
	
		$('.projectpager').click(function(){
	        var link = $(this).attr('href');
	        $('#slidewrap').fadeOut('slow', function(){
	            window.location.href = link;
	        });
	        return false;
	    });

		$('.thumb-img').hover(function() {
			$(this).stop().fadeTo('slow', 1);
		},
		function() {
			$(this).stop().fadeTo('slow', .3);
		});

		$('ul.column').mouseleave(function() {
  			$('.thumb-img').stop().fadeTo('slow', 1);
		});
		$('ul.column').mouseenter(function() {
  			$('.thumb-img').fadeTo('slow', .3);
		});

		$('.thumb-img').click(function() {
			var link = $(this).attr('href');
	        $('ul.column').fadeOut('fast', function(){
	            window.location.href = link;
	        });
	        return false;
	    });
});



function navigateTo(sel, target, newWindow) {
	var url = sel.options[sel.selectedIndex].value;
	if($('#slidewrap').length != 0)
	{
		$('#slidewrap').fadeOut('slow', function() {
		    if (newWindow) {
		        window.open(url, target);
		    } else {
		        window[target].location.href = url;
		    }
			return false;
		});
	}
	if($('.thumb-img').length != 0)
	{
		$('.thumb-img').fadeOut('slow', function() {
		    if (newWindow) {
		        window.open(url, target);
		    } else {
		        window[target].location.href = url;
		    }
			return false;
		});
	}
}

function UnCryptMailto( s )
{
    var n = 0;
    var r = "";
    for( var i = 0; i < s.length; i++)
    {
        n = s.charCodeAt( i );
        if( n >= 8364 )
        {
            n = 128;
        }
        r += String.fromCharCode( n - 1 );
    }
    return r;
}

function linkTo_UnCryptMailto( s )
{
    location.href=UnCryptMailto( s );
}
