//######### the cornering ##########
$(function() {	// shorthand for $(document).ready() BTW

        //$('div.showhide,search').hide();   // this is to hide the search
          $('li:contains("Search")').removeClass('navsearch');
          $('li:contains("Search")').addClass('nav');

        $('div.showhide2').hide();   // this is to hide the jonlist
          $('p:contains("Subscribe")').removeClass('hide');
		  $('p:contains("Subscribe")').addClass('jslink');
	  
	    $('div.odd').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#odd span').wrap("<code></code>");

        $('div.even').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#even span').wrap("<code></code>");

        $('div.footer').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#footer span').wrap("<code></code>");

        $('div.roundedc').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundedc span').wrap("<code></code>");

        $('div.roundedt').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundedt span').wrap("<code></code>");

        $('div.roundedi').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundedi span').wrap("<code></code>");

        $('div.roundedm').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundedm span').wrap("<code></code>");

        $('div.roundc').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundc span').wrap("<code></code>");

        $('div.roundch').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundch span').wrap("<code></code>");

        $('div.roundih').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundih span').wrap("<code></code>");

        $('div.roundct').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span.hide', this).text());
        });
        $('#roundct span.hide').wrap("<code></code>");

        $('div.roundtt').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span.hide', this).text());
        });
        $('#roundtt span.hide').wrap("<code></code>");

        $('div.roundit').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span.hide', this).text());
        });
        $('#roundit span.hide').wrap("<code></code>");

        $('div.roundg').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundg span').wrap("<code></code>");

        $('div.roundt').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundt span').wrap("<code></code>");

        $('div.roundth').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundth span').wrap("<code></code>");

        $('div.roundi').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundi span').wrap("<code></code>");
 /*
        $('div.roundm').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundm span.hidem').wrap("<code></code>");
*/
        $('div.roundm').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#roundm span').wrap("<code></code>");

        $('div.container').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span.hidden', this).text());
        });
        $('#container span.hidden').wrap("<code></code>");
/*
        $('div.staffprofileA').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#staffprofileA span').wrap("<code></code>");

        $('div.staffprofile').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('span', this).text());
        });
        $('#staffprofile span').wrap("<code></code>");
*/
        //this one toggles the show hide of the search
        $('#togglesearch').hover( function() {
        $(this).addClass('hover');
        }, function () {
        $(this).removeClass('hover');
        });


        //this one toggles the show hide of the search
        $('#togglesearch').click( function() {
        $('div.hide-with-script,search').toggle();//showhide
        $("div.hide-with-script")//showhide
        	.animate({ queue: false, duration: 3000 })
			//.animate({ backgroundColor: "orange" }, 1000)
			//.animate({opacity:"0.4"}, 1000)
            .animate({ backgroundColor: "yellow" }, 1000)
            .animate({opacity:"1.0"}, 1000)
            .animate({ backgroundColor: "white" }, 1000);
        });

        //this one toggles the show hide of the search
        $('#togglesignup').hover( function() {
        $(this).addClass('hover');
        }, function () {
        $(this).removeClass('hover');
        });

        //this one toggles the show hide of the search
        $('#togglesignup').click( function() {
        $('div.showhide2').toggle();
        $("div.showhide2")
        	.animate({ queue: false, duration: 3000 })
			//.animate({ backgroundColor: "orange" }, 1000)
			//.animate({opacity:"0.4"}, 1000)
            .animate({ backgroundColor: "yellow" }, 1000)
            .animate({opacity:"1.0"}, 1000)
            .animate({ backgroundColor: "white" }, 1000);
        });


        $("img.dropshadow").wrap("<div class='wrap1'><div class='wrap2'><div class='wrap3'>" + "</div></div></div>");
        $("img.dropshadowr").wrap("<div class='wrap1r'><div class='wrap2'><div class='wrap3'>" + "</div></div></div>");

});


/* this is the style switch from chap 3 of learning JQuery */
$(document).ready(function() {
  $('#switcher .button').click(function(event) {
    $('body').removeClass();
    if (this.id == 'switcher-narrow') {
      $('body').addClass('narrow');
    }
    else if (this.id == 'switcher-large') {
      $('body').addClass('large');
    }
    $('#switcher .button').removeClass('selected');
    $(this).addClass('selected');
    event.stopPropagation();
  });
});

$(document).ready(function() {
  $('#switcher .button').hover(function() {
    $(this).addClass('hover');
  }, function() {
    $(this).removeClass('hover');
  });
});

$(document).ready(function() {
  var toggleStyleSwitcher = function() {
    $('#switcher .button').toggleClass('hidden');
  };

  $('#switcher').click(toggleStyleSwitcher);

  $('#switcher-normal').click(function() {
    $('#switcher').click(toggleStyleSwitcher);
    $('#switcher').addClass('hover');
  });
  $('#switcher-narrow, #switcher-large').click(function() {
    $('#switcher').unbind('click', toggleStyleSwitcher);
    $('#switcher').removeClass('hover');
  });
});

$(document).ready(function() {
  $('#switcher').click();

          //this one is to hover over the text
        $('#switcher').hover( function() {
        $(this).addClass('hover');
        }, function () {
        $(this).removeClass('hover');
        });
});


/* this is chap 4
$(document).ready(function() {
  $('p.introcenter').hide();
  $('p.introhead').hover(function() {
        $('p.introcenter').animate({height: "show", width: "show", opacity:"show"}, 'slow');
    //$(this).hide();
  });
  $('p.introcenter').hide();
});
  */ 