/*

Javascript & jQuery mumbo jumbo! 

*/

// CLEAR TEXT
function clearText(field){

    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;

}

$(document).ready(function() {
	
// EMAIL SLIDER


	$(".topMenuAction").click( function() {
		if ($("#openCloseIdentifier").is(":hidden")) {
			$("#slider").animate({ 
				marginTop: "-300px"
				}, 500 );
			$("#emailLink").html('EMAIL ME');
			$("#openCloseIdentifier").show();
		} else {
			$("#slider").animate({ 
				marginTop: "0px"
				}, 500 );
			$("#emailLink").html('CLOSE');
			$("#openCloseIdentifier").hide();
		}
	});  




// SLIDESHOW



	$('#slideshow').after('<div id="nav" class="nav">').cycle({
		cleartypeNoBg: true,
        fx:     'fade',
        speed:  'slow',
		timeout:8000,
        pager:  '#nav'
    });


// IMAGE FADE

	$('div.art').each(function() {
        $(this).hover(function() {
 
            $('img', this).stop().animate({ opacity: 1.0 }, 0);
        },
       function() {
           $('img', this).stop().animate({ opacity: 0.65 }, 0);
       });
    });

// MAKE ENTIRE DIV LINK
$(".imgbox").click(function(){
     window.location=$(this).find("a").attr("href");
     return false;
});
//
});

