$(document).ready(function(){
    
    var splash = getCookie("name");
    if(splash != "ransplash")
    {
        <!-- sets up entry splash page -->
        $("#home_green").fadeTo(1, 1, function() {
                $("#gh").fadeTo(1, 1);
                $("#td").fadeTo(1, 1);
                $("#gh").animate({left: "300px"}, 500);
                $("#td").delay(500).animate({left: "300px"}, 500, function() {
                    $("#home_green").delay(500).fadeTo(1500, 0, function () {
                        $("#home_green").delay(2000).css({display: "none"});
                    });
                    $("#gh").delay(1000).fadeTo(1000, 0);
                    $("#td").delay(1000).fadeTo(1000, 0);
                    
                });
        });     <!-- END entry splash page -->
        setCookie("name", "ransplash", 360);
    }
    
    $("#portfolio_over").mouseover(function() {
        $("#portfolio_over").css({display: "block"});
    });
    
    
    
    $("#portfolio_over").mouseout(function() {
        
            $("#portfolio_over").css({display: "none"});
        
    });
    
    <!-- shows and clears dotted border for top menu -->
    $(".topmenu ul:first-child > li:nth-child(2) > a").mouseover(function() {
    $(".topmenu ul:first-child > li:nth-child(2) > a").css("border-left", "1px dotted #9d9d9d");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(2) > a").mouseout(function() {
    $(".topmenu ul:first-child > li:nth-child(2) > a").css("border-left", "1px dotted white");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(3) > a").mouseover(function() {
    $(".topmenu ul:first-child > li:nth-child(3) > a").css("border-left", "1px dotted #9d9d9d");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(3) > a").mouseout(function() {
    $(".topmenu ul:first-child > li:nth-child(3) > a").css("border-left", "1px dotted white");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(2) > ul").mouseover(function() {
    $(".topmenu ul:first-child > li:nth-child(2) > a").css("border-left", "1px dotted #9d9d9d");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(2) > ul").mouseout(function() {
    $(".topmenu ul:first-child > li:nth-child(2) > a").css("border-left", "1px dotted white");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(3) > ul").mouseover(function() {
    $(".topmenu ul:first-child > li:nth-child(3) > a").css("border-left", "1px dotted #9d9d9d");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(3) > ul").mouseout(function() {
    $(".topmenu ul:first-child > li:nth-child(3) > a").css("border-left", "1px dotted white");
        
       });
       
    $(".topmenu ul:first-child > li:nth-child(5) > a").mouseover(function() {
    $(".topmenu ul:first-child > li:nth-child(5) > a").css("border-left", "1px dotted #9d9d9d");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(5) > a").mouseout(function() {
    $(".topmenu ul:first-child > li:nth-child(5) > a").css("border-left", "1px dotted white");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(5) > ul").mouseover(function() {
    $(".topmenu ul:first-child > li:nth-child(5) > a").css("border-left", "1px dotted #9d9d9d");
        
       });
    
    $(".topmenu ul:first-child > li:nth-child(5) > ul").mouseout(function() {
    $(".topmenu ul:first-child > li:nth-child(5) > a").css("border-left", "1px dotted white");
        
       });
    
    //makes portfolio image boxes clickable
    $("#portfolio_over").click(function(){
     window.location=$(this).find("a").attr("href");
     return false;
	});
	   	
   	$("#portfolio_over").hover(
   		function() {
   			$("#portfolio_over").addClass('makepointer');
   		},
   		function() {
   			$("#portfolio_over").removeClass('makepointer');
   		}
   	);
  
});     <!-- END document ready -->

function port_over (wdiv) {
    var position = $(wdiv).position();
    var pleft = position.left + "px";
    if ($.browser.msie && $.browser.version.substr(0,1)<8) {
        var ptop = position.top + "px";
    }
    else{
        var ptop = position.top + "px";
    }
    var alttag = $(wdiv).children().attr("alt");
    var thelink = $(wdiv).attr("href");
    var thecode = "<a href='" + thelink + "'>" + alttag + "</a>";
    $("#portfolio_over").css({left: pleft, top: ptop});
    $("#port_txt").html(thecode);
    $("#portfolio_over").css({display: "block"});

}

function port_out () {
    $("#portfolio_over").fadeTo(500, 0, function() {
        $("#portfolio_over").css({display: "none"});
    });
}

function showLoading() {
    $("#loading").show();
}

function hideLoading() {
    $("#loading").hide();
}

function lmv (lnum) {
    var myArr = new Array("4", "233", "462", "690", "920");
    var lone = "-" + myArr[lnum] + "px";
    var hll = $(divone).css("left");
    $(divone).animate({left: lone}, "fast");
    
    $(txtbox).text(hll);
}

function fadeNow (offset, parent_id, page, cnt) {
    
   
    
    $.get(page, { offset: offset, project_id: parent_id, page: page},
        function(data) {
            $('#gal_left').fadeTo(250, 0, function() {
                $('#gal_left').html(data.rpimg);
                if(data.orientation)
                {
                    $('#gal_left').animate({width: "548px"}, "fast");
                    $('#gal_right').animate({width: "277px"}, "fast");
                }
                else
                {
                    $('#gal_left').animate({width: "320px"}, "fast");
                    $('#gal_right').animate({width: "505px"}, "fast");
                }
                $('#gal_left').fadeTo(250, 1);
                $('#gal_nav').html(data.rpnav);
                
                });
        }, "json");
    
    
}

function getOrientation (width, height)
{
    if(width > height)
    {
        $('#gal_left').animate({width: "548px"}, "fast");
        $('#gal_right').animate({width: "277px"}, "fast");
    }
    else
    {
        $('#gal_left').animate({width: "320px"}, "fast");
        $('#gal_right').animate({width: "505px"}, "fast");
    }
                
}

function testGet (num) {
    
    $.get('data2.php', { numb: num, name: 'joe' },
        function(data) {
            $(divone).html(data.page);
            
                                
               
        }, "json");
}

function testGet2 () {
    alert($('li').get(-1));
}


function showBorder (id)
{
    $(id).css("border-left", "1px dotted #9d9d9d");

}

function hideBorder (id)
{
    $(id).css("border-left", "1px dotted white");

}

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}


