﻿///<reference path="jquery-1.3.2-vsdoc.js"/>

function loaded(){
	$(document.body).fadeIn(1100);
	//for (i=0;i<document.images.length;i++) { $(document.images[i]).fadeIn('slow'); }
};	

$(document).ready(function() {
   // begin menu algorithm
   $("div.wrapper_head div ul.top_menu span").css({
      'height': '100%',
      'width': '100%',
      'opacity': '0'
   });
   $("div.wrapper_head div ul.top_menu span").hover(function() {
      $(this).stop().animate({
         opacity: 1
      },
        400);
      //$(this).parent().parent().children("ul.sub_menu").stop(false, true).slideDown("fast").show();
   },

    function() {
       if (!($(this).parent().parent().attr("id") == $("input.contentPage").attr("value"))) {
          $(this).stop().animate({
             opacity: 0
          },
            500);
       }
    });
   var currPage = $("input.contentPage").attr("value");

   switch (currPage) {
      case 'home':
         $("div.wrapper_head li#home a span").css({
            'height': '100%',
            'width': '100%',
            'opacity': '1'
         });
         break;
      case 'portfolio':
         $("div.wrapper_head li#portfolio a span").css({
            'height': '100%',
            'width': '100%',
            'opacity': '1'
         });
         break;
      case 'blog':
         $("div.wrapper_head li#blog a span").css({
            'height': '100%',
            'width': '100%',
            'opacity': '1'
         });
         break;
      case 'resume':
         $("div.wrapper_head li#resume a span").css({
            'height': '100%',
            'width': '100%',
            'opacity': '1'
         });
         break;
   } //end menu algorithm  
});