$(document).ready(function() {
						   
	$('#postcode, #email, #search, #voucher').click(function() {//click event
		$('#' + $(this).attr('id') + 'L').fadeOut('slow');//fadeout label copy
	});
	
	$('#postcode, #email, #search, #voucher').blur(function() {//lose focus event
		if($(this).val().toString().length < 1) {//check if input has value...
			$('#' + $(this).attr('id') + 'L').fadeIn('slow');//fadein original label copy
		}
	});
	
	//$('#viewBasket').hover(function() {
	//	$('#miniBasketMore').slideDown('slow');
	//});
	
	//$('#viewBasketHide').click(function() {
	//	$('#miniBasketMore').slideUp('slow');
	//});
	
	$('#nav').superfish();
	
	$(document).pngFix();
	
	$('#showMore').click(function() {
		$('#more').slideDown('slow');
                return false;
	});
	$('#hideMore').click(function() {
		$('#more').slideUp('slow');
                return false;
	});

    $('.googleTranslate').click(function(){
        var lang = $(this).attr('id');
        var url = 'http://translate.google.co.uk/translate?&sl=en&tl=' + lang;
        url += '&u=' + encodeURIComponent(location.href);
        location.href = url;
        return false;
    });

    $(".scroll").click(function(event){
        //goto that anchor by setting the body scroll top to anchor top
        $('html, body').animate({scrollTop:0}, 500);
    });
    
    $('#newsletterEmail').focus(function(){
       if ($(this).val() == 'Enter your email address') {
           $(this).val('');
       } 
    }).blur(function(){
       if ($(this).val() == '') {
           $(this).val('Enter your email address');
       }  
    });
});


Cufon.replace('h1, h2, h3, h4, #strapline, #subStrapline, #subSubStrapline, #nav a, #whereToBuy legend, a.viewProducts, #historyTable td.date, .recepieYouWillNeed ul,a.askTheChef, #deliveryDetails p.intro,#christmasInfo p.intro', {
	fontFamily: 'Giovanni Book',
	hover: true
});

Cufon.replace('#strapline strong, .giovanniBold', { 
	fontFamily: 'Giovanni Bold' 
});

Cufon.replace('#masthead p,#buttonGold, div.rockwell', { 
	fontFamily: 'Rockwell' 
});

Cufon.replace('.festival p.headline, .festivalCompetition p.headline', {
    textShadow: '1px 1px rgba(0,0,0,0.3)',
    fontFamily: 'Rockwell',
	hover: true})

$(document).ready(function() {
$("a.enlarge").fancybox();
$("a.terms").fancybox();
$("a.competitionLightbox").fancybox({
            'width': 423,
            'height': 568,
            'type': 'iframe'
        });
//$("a#christmasDelivery").fancybox({'width': 700,'height': 600});
$("a.infopopup").fancybox({
            'width': 700,
            'height': 600
        });
});


