$(document).ready(function() {

		
		// Preload all rollovers
		$(".buttonBox img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			//alert(rollsrc);
			rollON = rollsrc.replace(/.jpg$/ig,"_over.jpg");
			//alert(rollON);
			$("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		$(".buttonBox a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");
			//alert(imgsrc);
			matches = imgsrc.match(/_over/);
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.jpg$/ig,"_over.jpg"); // strip off extension
			//alert(imgsrcON);
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$(".buttonBox a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		$(".buttonBox a").click(function(){
			imgsrc = $(this).children("img").attr("src");
			matches = imgsrc.match(/_click/);
			if (!matches) {
			imgsrcClick = imgsrc.replace(/_over.jpg$/ig,"_click.jpg"); // strip off extension
			//alert(imgsrcClick);
			$(this).children("img").attr("src", imgsrcClick);
			imgsrc == imgsrcClick;
			}
	});
});
$(document).ready(function() {

		
		// Preload all rollovers
		$(".sbuttonContainer img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			//alert(rollsrc);
			rollON = rollsrc.replace(/.jpg$/ig,"_over.jpg");
			//alert(rollON);
			$("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		$(".sbuttonContainer a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");
			//alert(imgsrc);
			matches = imgsrc.match(/_over/);
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.jpg$/ig,"_over.jpg"); // strip off extension
			//alert(imgsrcON);
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$(".sbuttonContainer a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		$(".sbuttonContainer a").click(function(){
			imgsrc = $(this).children("img").attr("src");
			matches = imgsrc.match(/_click/);
			if (!matches) {
			imgsrcClick = imgsrc.replace(/_over.jpg$/ig,"_click.jpg"); // strip off extension
			//alert(imgsrcClick);
			$(this).children("img").attr("src", imgsrcClick);
			imgsrc == imgsrcClick;
			}
	});
	
	
	$('.buttonBox').click(function(){
		$(this).hide('slow');
		$(this).siblings().hide('slow');
	});
});

//slide toggle accordain dropdown

$(document).ready(function(){

	$('.points').hide();

	$('.header').click(function() {

		//$('.points').fadeOut('slow');

    	$(this).parent().find('.points').slideToggle();

  });

});
//animated gif for pastry shop.
$(function(){
	//$('.galleria_container').ready().html('<img src="images/arrows.gif">');
});
