
/************************************************************************
	
	JS Document // Main
	Fridge Bar
	Created by Salt Design (http://www.saltdesign.org.uk).

	1 - SCROLLING

************************************************************************/





/************************************************************************

	1 - SMOOTH SCROLLING
	
************************************************************************/

// After the DOM has loaded
$(document).ready( function() {
	
	
	// Scroll - Back to Top
	$("a[href='#top']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#top', scrollTime);
		return false;
	});
	
	// Scroll - 01
	$("a[href='#01']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#01', scrollTime);
		return false;
	});
	
	// Scroll - 02
	$("a[href='#02']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#02', scrollTime);
		return false;
	});
	
	// Scroll - 03
	$("a[href='#03']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#03', scrollTime);
		return false;
	});
	
	// Scroll - 04
	$("a[href='#04']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#04', scrollTime);
		return false;
	});
	
	// Scroll - 05
	$("a[href='#05']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#05', scrollTime);
		return false;
	});
	
	// Scroll - xmas
	$("a[href='#xmas']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#xmas', scrollTime);
		return false;
	});
	
	// Scroll - mondays
	$("a[href='#mondays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#mondays', scrollTime);
		return false;
	});
	
	// Scroll - tuesdays
	$("a[href='#tuesdays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#tuesdays', scrollTime);
		return false;
	});
	
	// Scroll - wednesdays
	$("a[href='#wednesdays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#wednesdays', scrollTime);
		return false;
	});
	
	// Scroll - thursdays
	$("a[href='#thursdays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#thursdays', scrollTime);
		return false;
	});
	
	// Scroll - fridays
	$("a[href='#fridays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#fridays', scrollTime);
		return false;
	});
	
	// Scroll - saturdays
	$("a[href='#saturdays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#saturdays', scrollTime);
		return false;
	});

	// Scroll - sundays
	$("a[href='#sundays']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#sundays', scrollTime);
		return false;
	});
	
	// Scroll - Jan
	$("a[href='#january']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#january', scrollTime);
		return false;
	});
	
	// Scroll - Feb
	$("a[href='#february']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#february', scrollTime);
		return false;
	});
	
	// Scroll - Mar
	$("a[href='#march']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#march', scrollTime);
		return false;
	});
	
	// Scroll - Apr
	$("a[href='#april']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#april', scrollTime);
		return false;
	});
	
	// Scroll - May
	$("a[href='#may']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#may', scrollTime);
		return false;
	});
	
	// Scroll - June
	$("a[href='#june']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#june', scrollTime);
		return false;
	});
	
	// Scroll - July
	$("a[href='#july']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#july', scrollTime);
		return false;
	});
	
	// Scroll - Aug
	$("a[href='#august']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#august', scrollTime);
		return false;
	});
	
	// Scroll - Sept
	$("a[href='#september']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#september', scrollTime);
		return false;
	});
	
	// Scroll - Oct
	$("a[href='#october']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#october', scrollTime);
		return false;
	});
	
	// Scroll - Nov
	$("a[href='#november']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#november', scrollTime);
		return false;
	});
	
	// Scroll - Dec
	$("a[href='#december']").click(function(){
		var scrollTime = $(document).height() / 2.5; // This number defines the speed of the scroll; the lower, the slower.
		$.scrollTo('div#december', scrollTime);
		return false;
	});
	
});


/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 9/11/2008
 * @author Ariel Flesler
 * @version 1.4
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
