jQuery.noConflict();

jQuery(document).ready(function() {
	var pageWidth = 1024;//jQuery(document).width();
	var pageHeight = 1024;//jQuery(document).height();
	var currentPage;
	jQuery("#vp").css("overflow-x", "hidden");
	jQuery("#vp").css("overflow-y", "hidden");
	jQuery("#hp1 img").css("margin", "0");
	//move("#home");
	Cufon.replace('h1', {
	textShadow: '#000 1px 1px'
	});
	Cufon.replace('h2', {
	textShadow: '#000 1px 1px'
	});
	Cufon.replace('h3', {
	textShadow: '#000 1px 1px'
	});
	Cufon.replace('h4', {
	textShadow: '#000 1px 1px'
	});
	Cufon.replace('h5', {
	textShadow: '#000 1px 1px'
	});
	Cufon.replace('h6', {
	textShadow: '#000 1px 1px'
	});
	Cufon.replace('a', {
	textShadow: '#000 1px 1px'
	});
	
	jQuery("ul#tonight_slides").cycle({
		fx: 'fade',
		pause: 1,
		prev: '#tonight_prev',
		next: '#tonight_next'
	});
	
	jQuery('#mon').click(function() { 
		jQuery('ul#tonight_slides').cycle(0); 
		return false; 
	});
	 
	jQuery('#tue').click(function() { 
		jQuery('ul#tonight_slides').cycle(1); 
		return false; 
	});
	 
	jQuery('#wed').click(function() { 
		jQuery('ul#tonight_slides').cycle(2); 
		return false; 
	});
	 
	jQuery('#thu').click(function() { 
		jQuery('ul#tonight_slides').cycle(3); 
		return false; 
	});
	 
	jQuery('#fri').click(function() { 
		jQuery('ul#tonight_slides').cycle(4); 
		return false; 
	});
	 
	jQuery('#sat').click(function() { 
		jQuery('ul#tonight_slides').cycle(5); 
		return false; 
	});
	 
	jQuery('#sun').click(function() { 
		jQuery('ul#tonight_slides').cycle(6); 
		return false; 
	});
	
	jQuery(window).hashchange(function(e) {
  		var hash = location.hash;
  		move(hash);
	});
	
	function loadthispage() {
		var hash = location.hash;
		if (hash != "") {
			if (hash != "#") {
				move(hash);
			}
		} else {
			move ('#home');
		}
	}
	loadthispage();
});

function move(obj) {
	
	var homePos;
	var specialsPos;
	var galleryPos;
	var pricesPos;
	var functionsPos;
	var contactPos;
	var nmrsDisp;
	var nmvbDisp;
	var nmrbDisp;
	var vbPos;
	var rbPos

	currentPage = obj;
	pageWidth = 1024;
	pageHeight = 1024;

	switch(obj) {
		case "#home":
		homePos = 1;
		specialsPos = 3;
		galleryPos = 5;
		pricesPos = 7;
		functionsPos = 9;
		contactPos = 11;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		break;
		case "#specials":
		homePos = -2;
		specialsPos = 1;
		galleryPos = 3;
		pricesPos = 5;
		functionsPos = 7;
		contactPos = 9;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		break;
		case "#gallery":
		homePos = -4;
		specialsPos = -2;
		galleryPos = 1;
		pricesPos = 3;
		functionsPos = 5;
		contactPos = 7;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		break;
		case "#prices":
		homePos = -6;
		specialsPos = -4;
		galleryPos = -2;
		pricesPos = 1;
		functionsPos = 3;
		contactPos = 5;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		break;
		case "#functions":
		homePos = -8;
		specialsPos = -6;
		galleryPos = -4;
		pricesPos = -2;
		functionsPos = 1;
		contactPos = 3;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		break;
		case "#contact":
		homePos = -10;
		specialsPos = -8;
		galleryPos = -6;
		pricesPos = -4;
		functionsPos = -2;
		contactPos = 1;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		break;
		case "#vodka-bar":
		homePos = 4;
		specialsPos = 4;
		galleryPos = 4;
		pricesPos = 4;
		functionsPos = 4;
		contactPos = 4;
		nmrsDisp = 0;
		nmvbDisp = 1;
		nmrbDisp = 0;
		break;
		case "#rock-bar":
		homePos = 4;
		specialsPos = 4;
		galleryPos = 4;
		pricesPos = 4;
		functionsPos = 4;
		contactPos = 4;
		nmrsDisp = 0;
		nmvbDisp = 0;
		nmrbDisp = 1;
		break;
		default:
		homePos = 1;
		specialsPos = 3;
		galleryPos = 5;
		pricesPos = 7;
		functionsPos = 9;
		contactPos = 11;
		nmrsDisp = 1;
		nmvbDisp = 0;
		nmrbDisp = 0;
		winNum = 0;
	}

	if(nmrsDisp == 1) {
		jQuery('#nmrs').animate({'top': 10 }, 300);
		jQuery('#nmvb').animate({'top': -300 }, 300);
		jQuery('#nmrb').animate({'top': -300 }, 300);
		vbPos=3;
		rbPos=3;
	} else if (nmvbDisp == 1) {
		jQuery('#nmrs').animate({'top': -300 }, 300);
		jQuery('#nmvb').animate({'top': 10 }, 300);
		jQuery('#nmrb').animate({'top': -300 }, 300);
		vbPos=1;
		rbPos=3;
	} else {
		jQuery('#nmrs').animate({'top': -300 }, 300);
		jQuery('#nmvb').animate({'top': -300 }, 300);
		jQuery('#nmrb').animate({'top': 10 }, 300);
		vbPos=3;
		rbPos=1;
	}
	
	jQuery('#hp1').animate({'left': homePos*pageWidth/2-1024/2 }, 100);
	jQuery('#hp2').animate({'left': homePos*pageWidth/2-1024/2+212 }, 300);
	jQuery('#hp3').animate({'left': homePos*pageWidth/2-1024/2+824 }, 400);
	jQuery('#hp4').animate({'left': homePos*pageWidth/2-1024/2+237 }, 200);
	jQuery('#hp5').animate({'left': homePos*pageWidth/2-1024/2+504 }, 500);
	
	jQuery('#pp1').animate({'left': pricesPos*pageWidth/2-1024/2 }, 500);
	jQuery('#pp2').animate({'left': pricesPos*pageWidth/2-1024/2 }, 400);
	jQuery('#pp3').animate({'left': pricesPos*pageWidth/2-1024/2+347 }, 300);
	jQuery('#pp4').animate({'left': pricesPos*pageWidth/2-1024/2+694 }, 200);
	jQuery('#pp5').animate({'left': pricesPos*pageWidth/2-1024/2 }, 100);
	jQuery('#pp6').animate({'left': pricesPos*pageWidth/2-1024/2 }, 500);
	
	jQuery('#gp1').animate({'left': galleryPos*pageWidth/2-1024/2 }, 300);
	jQuery('#gp2').animate({'left': galleryPos*pageWidth/2-1024/2 }, 400);
	jQuery('#gp3').animate({'left': galleryPos*pageWidth/2-1024/2+630 }, 200);
	jQuery('#gp4').animate({'left': galleryPos*pageWidth/2-1024/2+307 }, 200);
	
	jQuery('#sp1').animate({'left': specialsPos*pageWidth/2-1024/2 }, 100);
	jQuery('#sp2').animate({'left': specialsPos*pageWidth/2-1024/2 }, 400);
	jQuery('#sp3').animate({'left': specialsPos*pageWidth/2-1024/2+285 }, 300);
	
	jQuery('#fp1').animate({'left': functionsPos*pageWidth/2-1024/2 }, 500);
	jQuery('#fp2').animate({'left': functionsPos*pageWidth/2-1024/2 }, 400);
	jQuery('#fp3').animate({'left': functionsPos*pageWidth/2-1024/2+694 }, 200);
	jQuery('#fp4').animate({'left': functionsPos*pageWidth/2-1024/2 }, 100);
	
	jQuery('#cp1').animate({'left': contactPos*pageWidth/2-1024/2 }, 400);
	jQuery('#cp2').animate({'left': contactPos*pageWidth/2-1024/2 }, 500);
	jQuery('#cp3').animate({'left': contactPos*pageWidth/2-1024/2+347 }, 200);
	jQuery('#cp5').animate({'left': contactPos*pageWidth/2-1024/2+347 }, 400);
	
	jQuery('#nm').animate({'top': contactPos*pageWidth/2-1024/2+694 }, 300);
	jQuery('#nm').animate({'top': contactPos*pageWidth/2-1024/2+347 }, 400);
	
	jQuery('#vbp2').animate({'left': vbPos*pageWidth/2-1024/2 }, 200);
	jQuery('#vbp3').animate({'left': vbPos*pageWidth/2-1024/2+347 }, 100);
	
	jQuery('#rbp2').animate({'left': rbPos*pageWidth/2-1024/2 }, 200);
	jQuery('#rbp3').animate({'left': rbPos*pageWidth/2-1024/2+500 }, 100);

}
