$(document).ready(function(){

$('#loading').show();
$('#wrapper').hide();
$('#chalkboardback').css({top: -370});

// PAGE LOAD EFFECTS
	$(window).load(function(){
		$('#loading').slideToggle(500);
		$('#wrapper').slideToggle(1000, function(){
			$('#chalkboardback').animate(
			{top: $(this).position().top - 297},
			{duration: 1250, easing: 'easeOutElastic', queue: false}
			);
		});
					
		$('.photos').cycle({
			fx: 'shuffle',
			timeout: 0,
			next: '.photos',
			speed: 500
		});			
	});

$(".popup-link").popup({
    width: 640,
    height: 560
});


// TOP NAVIGATION HOVER EFFECT
$('#topnav img').hover(function() {

 $(this)
 .stop(true)
 .animate(
 {opacity: '0'},
 {duration: 500, easing: 'easeOutCirc'}
 )},function() {
 $(this)
 .stop(true)
 .animate(
 {opacity:'100'},
 {duration: 500, easing: 'easeInCirc'}
 );
 
});



//END DOC READY
});

//<!-- Begin textarea counter for gift card message
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}
// End -->
