	var openOrClose = "close";
	var dayPageOpen = "false";
	var dayVariable = "";
	var companyPageOpen = "false";
	var companyPageVariable = "";
	var campaignPageOpen = "false";
	var campaignPageVariable = "";
	var contactPageOpen = "false";
	var contactPageVariable = "";
	var locationPageOpen = "false";
	var locationPageVariable = "";
	var sofaPageOpen = "false";
	var sofaPageVariable = "";
	var nightPageOpen = "false";
	var nightPageVariable = "";
	var designPageOpen = "false";
	var designPageVariable = "";
	var rightBarOpen = "true";
	var followusPageOpen = "false";
	var followusPageVariable = "";
	var pressPageOpen = "false";
	var pressPageVariable = "";
	var rsvpPageOpen = "false";
	var rsvpPageVariable = "";
	var productDetailsOpen = "false";
	var dayPageSpecific = "false";
	var sofaPageSpecific = "false";
	var nightPageSpecific = "false";
	var designPageSpecific = "false";
	
	$(document).ready(function() {
		$('#menu-second-level-bg').animate({opacity:0.6},0);
		$('#right-bar-bg').animate({opacity:0.6},0);
		$("#menu-second-level").css("position", "absolute");
		$("#menu-second-level").css("bottom", "22px");
		$("#menu-second-level-bg").css("position", "absolute");
		$("#menu-second-level-bg").css("bottom", "22px");
		$("#dim").css("height", $(document).height());
		$("#dim2").css("height", $(document).height());
		
		$('#dim').click(function() {
		  close_inner_content_from_close();
		});
		
		$(document).keydown(function(event) {
		  if(dayPageSpecific == "true" ||
			 nightPageSpecific == "true" ||
			 sofaPageSpecific == "true" ||
			 designPageSpecific == "true"){
			 if (event.keyCode == '39') {
				if($(".rarrow").attr("href") != "#"){
					eval($(".rarrow").attr("href").substring(11));
				}
   			 }else if(event.keyCode == '37'){
				if($(".larrow").attr("href") != "#"){
					eval($(".larrow").attr("href").substring(11));
				}
		  	}	
		  }
		});
		
		$("#logo").click(function () { 
      		if($.browser.msie && jQuery.browser.version == "7.0"){
   			}else{
				$.address.value('');	
			}
    	});
		
		$("#logo").mouseover(function(){
    		$("#logo").css("cursor","pointer");
		});

		 
		var options = {};
		$.preloadImages("images/menu-first-layer-bg.png", "images/global-header-bg.png","images/menu-second-layer-bg.png","images/right-menu-bg.png","images/hr.gif","images/global-header-menu-minus.png","images/menu-second-layer-bg.png","images/hr.gif","images/up.png","images/down.png","images/rightarrow.png","images/leftarrow.png","images/spinner.gif");
		$("#menu-second-level").hide("blind",options,0);
		//$('#supersize').resizenow();
		
		openOrClose = "close";
		companyPageOpen = "false";
		dayPageOpen = "false";
		campaignPageOpen = "false";
		contactPageOpen = "false";
	
	});
	
	jQuery.preloadImages = function(){
	  for(var i = 0; i<arguments.length; i++){
		jQuery("<img>").attr("src", arguments[i]);
	  }
	}
	

	$(window).bind("load", function(){
			$('#loading').hide();
			$('#logo').show();
                        $('#homepage-message').show();
			//$('#supersize').fadeIn('fast');
			$('#menu').show();
			$('#global-header').show();
			setTimeout(function() {
				$("#right-bar").animate({"right": "+=164px"}, "slow");
				$("#right-bar-bg").animate({"right": "+=164px"}, "slow");
				$("#leftarrow").animate({"right": "+=179px"}, "slow");
				rightBarOpen = "true";
    		}, 2000); 
		
		LoadAllImagesTwo();	
		});

	
	/*$(function(){
		$.fn.supersized.options = {  
			startwidth: 1700,  
			startheight: 827,
			minsize: .50,
			slideshow: 0,
			slideinterval: 50000  
		};
        $('#supersize').supersized(); 
    });*/
	
	function animate_up_second_menu(){
		if(openOrClose != "open"){
				$("#menu-second-level").show();
				$("#menu-second-level").animate({"bottom": "+=24px"}, "normal");
				$("#menu-second-level-bg").animate({"bottom": "+=24px"}, "normal");
				$("#right-bar-bottom-menu-one").animate({"bottom": "+=24px"}, "normal");
				$("#right-bar-bottom-menu-two").animate({"bottom": "+=24px"}, "normal");
				$("#right-bar-bottom-menu-three").animate({"bottom": "+=24px"}, "normal");
				openOrClose = "open";
		}
	}
	
	function menu_open_close(){
		if($('#global-header-dropdown').css('display') == 'none'){
			 $('#global-header-dropdown').css({'display' : 'block'});
			  $("#global-header-big-menu-open-close a").css({'background' : 'transparent url(images/global-header-menu-minus.png) no-repeat scroll left 2px'});
		}else{
			$('#global-header-dropdown').css({'display' : 'none'});
			$("#global-header-big-menu-open-close a").css({'background' : 'transparent url(images/global-header-menu-plus.png) no-repeat scroll left 2px'});
		}
	}
	function newsletter_open_close(){
		if($('#newsletter-header-dropdown').css('display') == 'none'){
			 $('#newsletter-header-dropdown').css({'display' : 'block'});
		}else{
			$('#newsletter-header-dropdown').css({'display' : 'none'});
		}
	}
	function close_dropdown_menu(){
		$("#global-header-big-menu-open-close a").css({'background' : 'transparent url(images/global-header-menu-plus.png) no-repeat scroll left 2px'});
		$('#global-header-dropdown').css({'display' : 'none'});
		
	}
	function close_newsletter_dropdown_menu(){
		$('#newsletter-header-dropdown').css({'display' : 'none'});
	}
	function open_category(category){
		var options = {};
		
		if(category == "collections"){		
			if(openOrClose != "open"){
				//alert("here");
				$("#menu-second-level").css("position", "absolute");
				$("#menu-second-level").css("bottom", "22px");
				$("#menu-second-level-bg").css("position", "absolute");
				$("#menu-second-level-bg").css("bottom", "22px");
				var bottomPx;
				var bottom;
				var bottomString;
				var bottom2;
				$("#menu-second-level").show();
				do{
					bottomPx = $('#menu-second-level').css('bottom').indexOf('px');
					bottom = $('#menu-second-level').css('bottom').substring(0,bottomPx);
					bottom2 = parseInt(bottom) +1;
					bottomString = bottom2 + "px"
					$("#menu-second-level-bg").css("bottom", bottomString);
					$("#menu-second-level").css("bottom", bottomString);
				}while(parseInt(bottom) < 45);
				$("#right-bar-bottom-menu-one").animate({"bottom": "+=24px"}, "normal");
				$("#right-bar-bottom-menu-two").animate({"bottom": "+=24px"}, "normal");
				$("#right-bar-bottom-menu-three").animate({"bottom": "+=24px"}, "normal");
				openOrClose = "open";
			}
		}else{
			if(openOrClose != "close"){
				//$("#menu-second-level").animate({"bottom": "-=24px"}, "normal");
				//$("#menu-second-level-bg").animate({"bottom": "-=24px"}, "normal");
				var bottomPx2;
				var bottom2;
				var bottomString2;
				var bottom22;
				//alert("here");
				do{
					bottomPx2 = $('#menu-second-level').css('bottom').indexOf('px');
					bottom2 = $('#menu-second-level').css('bottom').substring(0,bottomPx2);
					bottom22 = parseInt(bottom2) -1;
					bottomString2 = bottom22 + "px"
					$("#menu-second-level-bg").css("bottom", bottomString2);
					$("#menu-second-level").css("bottom", bottomString2);
				}while(parseInt(bottom2) > 23);
				
				$("#right-bar-bottom-menu-one").animate({"bottom": "-=24px"}, "normal");
				$("#right-bar-bottom-menu-two").animate({"bottom": "-=24px"}, "normal");
				$("#right-bar-bottom-menu-three").animate({"bottom": "-=24px"}, "normal");
				openOrClose = "close";
			}
		}
		
		if(category == "company"){	
			if(companyPageOpen == "false"){	
				load_company_page();
			}
		}
		if(category == "campaign"){	
			if(campaignPageOpen == "false"){	
				load_campaign_page();
			}
		}
		if(category == "contact"){	
			if(contactPageOpen == "false"){	
				load_contact_page();
			}
		}
		
		if(category == "location"){	
			if(locationPageOpen == "false"){	
				load_location_page();
			}
		}
		
	}
	function load_day(){
		dayPageSpecific = "false";
		close_inner_content();
		$("#prev2Btn").hide();
		$("#next2Btn").hide();
		$("#prev3Btn").hide();
		$("#next3Btn").hide();
		$("#prev4Btn").hide();
		$("#next4Btn").hide();
		dayPageOpen = "true";
		$.address.value('/collections/day/');
		add_inner_content_box_specific('#dayPage');
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		$("#inner-content-details-bg").hide();
		$("#inner-content-details").hide();
		if($('#dayPage').html().length == 0) {
			$.ajax({
				   type: "POST",
				   url: "day.php",
				   data: "ajax=yes",
				   success: function(msg){
					$("#loading-inner-content").hide();
					$("#dim").fadeIn();
					$("#dayPage").html(msg);
					if($("#daypaginatorcount").html() > 1){
						$('#inner-content-paginator').animate({opacity:0.6},0);
						$("#inner-content-paginator").fadeIn(225);
						Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
						Cufon.replace('#prevBtn,#nextBtn', { fontFamily: 'Gotham Rounded Medium' });
					}
					if($("#daypaginatorcount").html() == 1){
						$("#inner-content-paginator").fadeOut();
					}
				   }
			});
		} else {
			$("#loading-inner-content").hide();
			$("#dim").fadeIn();
			$('#dayPage').fadeIn(225);
			if($("#daypaginatorcount").html() > 1){
				$('#inner-content-paginator').animate({opacity:0.6},0);
				$("#inner-content-paginator").fadeIn(225);
				Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
				$("#dayslider").easySlider({
							prevText:'UP',
							nextText:'DOWN',
							orientation:'vertical'
				});
				Cufon.replace('#prevBtn,#nextBtn', { fontFamily: 'Gotham Rounded Medium' });
			}
			if($("#daypaginatorcount").html() == 1){
				$("#inner-content-paginator").fadeOut();
			}
		}
	}
	
	
	function load_day_specific(numeric){
		$('#inner-content-details-large-bg').animate({opacity:0},0);
		$('#inner-content-details-large-bg').hide();
		$('#inner-content-details-large').hide();
		productDetailsOpen = "false";
		$("#dim").fadeIn();
		$("#dayPageSpecific").html('');
		add_inner_content_box_specific('#dayPageSpecific');
		$("#dayPage").hide();
		$.ajax({
				   type: "POST",
				   url: "day_specific.php",
				   data: "id="+numeric+"&ajax=yes",
				   success: function(msg){
					$("#dayPageSpecific").html(msg);
					$("#loading-inner-content").hide();
				   }
		});
		$.address.value('/collections/day/?id=' + numeric);
	}
	
	function load_night(){
		nightPageSpecific = "false";
		close_inner_content();
		$("#prevBtn").hide();
		$("#nextBtn").hide();
		$("#prev3Btn").hide();
		$("#next3Btn").hide();
		$("#prev4Btn").hide();
		$("#next4Btn").hide();
		nightPageOpen = "true";
		$.address.value('/collections/night/');
		add_inner_content_box_specific('#nightPage');
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		$("#inner-content-details-bg").hide();
		$("#inner-content-details").hide();
		if($('#nightPage').html().length == 0) {
			$.ajax({
				   type: "POST",
				   url: "night.php",
				   data: "ajax=yes",
				   success: function(msg){
					$("#loading-inner-content").hide();
					$("#dim").fadeIn();
					$("#nightPage").html(msg);
					if($("#nightpaginatorcount").html() > 1){
						$('#inner-content-paginator').animate({opacity:0.6},0);
						$("#inner-content-paginator").fadeIn(225);
						Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
						Cufon.replace('#prev2Btn,#next2Btn', { fontFamily: 'Gotham Rounded Medium' });
					}
					if($("#nightpaginatorcount").html() == 1){
						$("#inner-content-paginator").fadeOut();
					}
				   }
			});
		} else {
			$("#loading-inner-content").hide();
			$("#dim").fadeIn();
			$('#nightPage').fadeIn(225);
			if($("#nightpaginatorcount").html() > 1){
				$('#inner-content-paginator').animate({opacity:0.6},0);
				$("#inner-content-paginator").fadeIn(225);
				Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
				$("#nightslider").easySlider2({
							prevText:'UP',
							nextText:'DOWN',
							orientation:'vertical'
				});
				Cufon.replace('#prev2Btn,#next2Btn', { fontFamily: 'Gotham Rounded Medium' });
			}
			if($("#nightpaginatorcount").html() == 1){
				$("#inner-content-paginator").fadeOut();
			}
		}
	}
	
	function load_night_specific(numeric){
		$('#inner-content-details-large-bg').animate({opacity:0},0);
		$('#inner-content-details-large-bg').hide();
		$('#inner-content-details-large').hide();
		productDetailsOpen = "false";
		$("#dim").fadeIn();
		$("#nightPageSpecific").html('');
		add_inner_content_box_specific('#nightPageSpecific');
		$("#nightPage").hide();
		$.ajax({
				   type: "POST",
				   url: "night_specific.php",
				   data: "id="+numeric+"&ajax=yes",
				   success: function(msg){
					$("#nightPageSpecific").html(msg);
					$("#loading-inner-content").hide();
				   }
		});
		$.address.value('/collections/night/?id=' + numeric);
	}
	
	function load_sofa(){
		sofaPageSpecific = "false";
		close_inner_content();
		$("#prevBtn").hide();
		$("#nextBtn").hide();
		$("#prev2Btn").hide();
		$("#next2Btn").hide();
		$("#prev4Btn").hide();
		$("#next4Btn").hide();
		sofaPageOpen = "true";
		$.address.value('/collections/sofa/');
		add_inner_content_box_specific('#sofaPage');
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		$("#inner-content-details-bg").hide();
		$("#inner-content-details").hide();
		if($('#sofaPage').html().length == 0) {
			$.ajax({
				   type: "POST",
				   url: "sofa.php",
				   data: "ajax=yes",
				   success: function(msg){
					$("#loading-inner-content").hide();
					$("#dim").fadeIn();
					$("#sofaPage").html(msg);
					if($("#sofapaginatorcount").html() > 1){
						$('#inner-content-paginator').animate({opacity:0.6},0);
						$("#inner-content-paginator").fadeIn(225);
						Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
						Cufon.replace('#prev3Btn,#next3Btn', { fontFamily: 'Gotham Rounded Medium' });
					}
					if($("#sofapaginatorcount").html() == 1){
						$("#inner-content-paginator").fadeOut();
					}
				   }
			});
		} else {
			$("#loading-inner-content").hide();
			$("#dim").fadeIn();
			$('#sofaPage').fadeIn(225);
			if($("#sofapaginatorcount").html() > 1){
				$('#inner-content-paginator').animate({opacity:0.6},0);
				$("#inner-content-paginator").fadeIn(225);
				Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
				$("#sofaslider").easySlider3({
							prevText:'UP',
							nextText:'DOWN',
							orientation:'vertical'
				});
				Cufon.replace('#prev3Btn,#next3Btn', { fontFamily: 'Gotham Rounded Medium' });
			}
			if($("#sofapaginatorcount").html() == 1){
				$("#inner-content-paginator").fadeOut();
			}
		}
	}
	
	function load_sofa_specific(numeric){
		$('#inner-content-details-large-bg').animate({opacity:0},0);
		$('#inner-content-details-large-bg').hide();
		$('#inner-content-details-large').hide();
		productDetailsOpen = "false";
		$("#dim").fadeIn();
		$("#sofaPageSpecific").html('');
		add_inner_content_box_specific('#sofaPageSpecific');
		$("#sofaPage").hide();
		$.ajax({
				   type: "POST",
				   url: "sofa_specific.php",
				   data: "id="+numeric+"&ajax=yes",
				   success: function(msg){
					$("#sofaPageSpecific").html(msg);
					$("#loading-inner-content").hide();
				   }
		});
		$.address.value('/collections/sofa/?id=' + numeric);
	}

	
	function load_design(){
		designPageSpecific = "false";
		close_inner_content();
		$("#prevBtn").hide();
		$("#nextBtn").hide();
		$("#prev2Btn").hide();
		$("#next2Btn").hide();
		$("#prev3Btn").hide();
		$("#next3Btn").hide();
		designPageOpen = "true";
		$.address.value('/collections/design/');
		add_inner_content_box_specific('#designPage');
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		$("#inner-content-details-bg").hide();
		$("#inner-content-details").hide();
		if($('#designPage').html().length == 0) {
			$.ajax({
				   type: "POST",
				   url: "design.php",
				   data: "ajax=yes",
				   success: function(msg){
					$("#loading-inner-content").hide();
					$("#dim").fadeIn();
					$("#designPage").html(msg);
					if($("#designpaginatorcount").html() > 1){
						$('#inner-content-paginator').animate({opacity:0.6},0);
						$("#inner-content-paginator").fadeIn(225);
						Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
						Cufon.replace('#prev4Btn,#next4Btn', { fontFamily: 'Gotham Rounded Medium' });
					}
					if($("#designpaginatorcount").html() == 1){
						$("#inner-content-paginator").fadeOut();
					}
				   }
			});
		} else {
			$("#loading-inner-content").hide();
			$("#dim").fadeIn();
			$('#designPage').fadeIn(225);
			if($("#designpaginatorcount").html() > 1){
				$('#inner-content-paginator').animate({opacity:0.6},0);
				$("#inner-content-paginator").fadeIn(225);
				Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
				$("#designslider").easySlider3({
							prevText:'UP',
							nextText:'DOWN',
							orientation:'vertical'
				});
				Cufon.replace('#prev4Btn,#next4Btn', { fontFamily: 'Gotham Rounded Medium' });
			}
			if($("#designpaginatorcount").html() == 1){
				$("#inner-content-paginator").fadeOut();
			}
		}
	}
	
	function load_design_specific(numeric){
		$('#inner-content-details-large-bg').animate({opacity:0},0);
		$('#inner-content-details-large-bg').hide();
		$('#inner-content-details-large').hide();
		$("#dim").fadeIn();
		$("#designPageSpecific").html('');
		add_inner_content_box_specific('#designPageSpecific');
		$("#designPage").hide();
		$.ajax({
				   type: "POST",
				   url: "design_specific.php",
				   data: "id="+numeric+"&ajax=yes",
				   success: function(msg){
					$("#designPageSpecific").html(msg);
					$("#loading-inner-content").hide();
				   }
		});
		$.address.value('/collections/design/?id=' + numeric);
	}
	
	function load_company_page(){
		close_inner_content();
		companyPageOpen = "true";
		$.address.value('/company/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(companyPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "company.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	companyPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(companyPageVariable);
			   }
			 });
		 }else{
		 	$("#loading-inner-content").hide();
		 	$("#inner-content").html(companyPageVariable);
		 }
	}
	
	// Load Campaign page
	function load_campaign_page(){
		close_inner_content();
		campaignPageOpen = "true";
		$.address.value('/campaign/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(campaignPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "campaign.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	campaignPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(campaignPageVariable);
			   }
			 });
		 }else{
		 	$("#loading-inner-content").hide();
			$("#inner-content").html(campaignPageVariable);
		 }
	}
	
	function load_contact_page(){
		close_inner_content();
		contactPageOpen = "true";
		$.address.value('/contact/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(contactPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "contact.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	contactPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(contactPageVariable);
			   }
			 });
		}else{
			$("#loading-inner-content").hide();
			$("#inner-content").html(contactPageVariable);
		}
	}
	
	function load_location_page(){
		close_inner_content();
		locationPageOpen = "true";
		$.address.value('/location/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(locationPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "location.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	locationPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(locationPageVariable);
			   }
			 });
		}else{
			$("#loading-inner-content").hide();
			$("#inner-content").html(locationPageVariable);
		}
	}
	
	function load_press(){
		close_inner_content();
		pressPageOpen = "true";
		$.address.value('/press/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(pressPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "press.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	pressPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(pressPageVariable);
			   }
			 });
		}else{
			$("#loading-inner-content").hide();
			$("#inner-content").html(pressPageVariable);
		}
	}
	
	function load_followus_page(){
		close_inner_content();
		followusPageOpen = "true";
		$.address.value('/followus/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(followusPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "followus.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	followusPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(followusPageVariable);
			   }
			 });
		}else{
			$("#loading-inner-content").hide();
			$("#inner-content").html(followusPageVariable);
		}
		$("#twitter").getTwitter({
			userName: "LazzoniNYC",
			numTweets: 6,
			loaderText: "Loading tweets...",
			slideIn: true,
			slideDuration: 350,
			showHeading: true,
			headingText: "Latest Tweets",
			showProfileLink: false,
			showTimestamp: false
		});
		Cufon.replace('#twitter h3,#followustwitterlogo span', { fontFamily: 'Gotham Rounded Medium' });
		$("#followustwitterlogo").fadeIn(225);
		$("#twitter").fadeIn(225);
	}
	
	function load_rsvp_page(){
		close_inner_content();
		rsvpPageOpen = "true";
		$.address.value('/rsvp/');
		add_inner_content_box();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		if(rsvpPageVariable == ""){
			$.ajax({
			   type: "POST",
			   url: "rsvp.php",
			   data: "ajax=yes",
			   success: function(msg){
			   	rsvpPageVariable = msg;
				$("#loading-inner-content").hide();
				$("#inner-content").html(rsvpPageVariable);
			   }
			 });
		}else{
			$("#loading-inner-content").hide();
			$("#inner-content").html(rsvpPageVariable);
		}
	}
	
	function close_inner_content(){
                $("#inner-content-details-bg").hide();
		$("#inner-content-details").hide();
		$('#inner-content-details-large-bg').animate({opacity:0},0);
		$('#inner-content-details-large-bg').hide();
		$('#inner-content-details-large').hide();
		$("#rightArrowSpecific").hide();
		$("#leftArrowSpecific").hide();
		$("#dayPage").hide();
		$("#dayPageSpecific").hide();
		$("#nightPage").hide();
		$("#nightPageSpecific").hide();
		$("#sofaPage").hide();
		$("#sofaPageSpecific").hide();
		$("#designPage").hide();
		$("#designPageSpecific").hide();
		$("#designPage").hide();
		$("#prevBtn").hide();
		$("#nextBtn").hide();
		$("#prev2Btn").hide();
		$("#next2Btn").hide();
		$("#prev3Btn").hide();
		$("#next3Btn").hide();
		$("#prev4Btn").hide();
		$("#next4Btn").hide();
		$("#inner-content-bg").fadeOut(0);
		$("#inner-content-close").fadeOut(0);
		$("#inner-content-close-bg").fadeOut(0);
		$("#inner-content").fadeOut(0);
		$('#inner-content-bg').animate({opacity:0},0);
		$('#inner-content-close-bg').animate({opacity:0},0);
		$('#inner-content-close-bg').animate({opacity:0},0);
		$('#inner-content-paginator').animate({opacity:0},0);
		$("#inner-content-paginator").fadeOut(0);
		$('#inner-content-paginator').animate({opacity:0},0);
		$("#inner-content-paginator").fadeOut(0);
		$("#inner-content").html('');
		companyPageOpen = "false";
		dayPageOpen = "false";
		campaignPageOpen = "false";
		rsvpPageOpen = "false";
		contactPageOpen = "false";
		locationPageOpen = "false";
		designPageOpen = "false";
		nightPageOpen = "false";
		sofaPageOpen = "false";
		designPageSpecific = "false";
		dayPageSpecific = "false";
		nightPageSpecific = "false";
		sofaPageSpecific = "false";
		if(followusPageOpen == "true"){
			$("#followustwitterlogo").fadeOut(0);
			$("#twitter").fadeOut(0);
		}
		followusPageOpen = "false";
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		//$.address.value("");
	}
	function close_inner_content_from_close(){
		$('#inner-content-details-large-bg').animate({opacity:0},0);
		$('#inner-content-details-large-bg').hide();
		$('#inner-content-details-large').hide();
		$("#rightArrowSpecific").hide();
		$("#leftArrowSpecific").hide();
		$("#dayPage").hide();
		$("#dayPageSpecific").hide();
		$("#nightPage").hide();
		$("#nightPageSpecific").hide();
		$("#sofaPage").hide();
		$("#sofaPageSpecific").hide();
		$("#designPage").hide();
		$("#designPageSpecific").hide();
		$("#designPage").hide();
		$("#prevBtn").hide();
		$("#nextBtn").hide();
		$("#prev2Btn").hide();
		$("#next2Btn").hide();
		$("#prev3Btn").hide();
		$("#next3Btn").hide();
		$("#prev4Btn").hide();
		$("#next4Btn").hide();
		$("#inner-content-bg").fadeOut(0);
		$("#inner-content-close").fadeOut(0);
		$("#inner-content-close-bg").fadeOut(0);
		$('#inner-content-details-bg').animate({opacity:0},0);
		$("#inner-content-details-bg").fadeOut(0);
		$("#inner-content-details").fadeOut(0);
		$("#inner-content").fadeOut(0);
		$('#inner-content-bg').animate({opacity:0},0);
		$('#inner-content-close-bg').animate({opacity:0},0);
		$('#inner-content-paginator').animate({opacity:0},0);
		$("#inner-content-paginator").fadeOut(0);
		$("#inner-content").html('');
		companyPageOpen = "false";
		dayPageOpen = "false";
		campaignPageOpen = "false";
		contactPageOpen = "false";
		locationPageOpen = "false";
		designPageOpen = "false";
		nightPageOpen = "false";
		sofaPageOpen = "false";
		if(followusPageOpen == "true"){
			$("#followustwitterlogo").fadeOut(0);
			$("#twitter").fadeOut(0);
		}
		followusPageOpen = "false";
		$("#dim").fadeOut();
		$("#inner-content-back-button-bg").hide();
		$("#inner-content-back-button").hide();
		$("#inner-content-share-button-bg").hide();
		$("#inner-content-share-button").hide();
		//$.address.value("");
	}
	function add_inner_content_box(){
		$("#loading-inner-content").show();
		$('#inner-content-bg').animate({opacity:0.6},0);
		$("#inner-content-bg").fadeIn(225);
		$('#inner-content-close-bg').animate({opacity:0.6},0);
		$('#inner-content-close-bg').fadeIn(225);
		$("#inner-content-close").fadeIn(225);
		$("#inner-content").fadeIn(225);
	}
	
	function add_inner_content_box_specific(param){
		$("#loading-inner-content").show();
		$('#inner-content-bg').animate({opacity:0.6},0);
		$("#inner-content-bg").fadeIn(225);
		$('#inner-content-close-bg').animate({opacity:0.6},0);
		$('#inner-content-close-bg').fadeIn(225);
		$("#inner-content-close").fadeIn(225);
		$(param).fadeIn(225);
	}
	
	function add_inner_content_box_with_paginator(){
		$("#loading-inner-content").show();
		$('#inner-content-bg').animate({opacity:0.6},0);
		$("#inner-content-bg").fadeIn(225);
		$('#inner-content-close-bg').animate({opacity:0.6},0);
		$('#inner-content-close-bg').fadeIn(225);
		$("#inner-content-close").fadeIn(225);
		$('#inner-content-paginator').animate({opacity:0.6},0);
		$("#inner-content-paginator").fadeIn(225);
		$("#inner-content").fadeIn(225);
		Cufon.replace('#inner-content-paginator h3', { fontFamily: 'Gotham Rounded Medium' });
	}
	
	function animate_product_details(){
		if(productDetailsOpen == "false"){
                        if(dayPageSpecific == "true"){
                            $('#inner-content-day-details-large-bg').animate({opacity:0.8},0);
                            $('#inner-content-day-details-large-bg').show();
                            $('#inner-content-day-details-large').show();
                        }
                        if(nightPageSpecific == "true"){
                            $('#inner-content-night-details-large-bg').animate({opacity:0.8},0);
                            $('#inner-content-night-details-large-bg').show();
                            $('#inner-content-night-details-large').show();
                        }
                        if(sofaPageSpecific == "true"){
                            $('#inner-content-sofa-details-large-bg').animate({opacity:0.8},0);
                            $('#inner-content-sofa-details-large-bg').show();
                            $('#inner-content-sofa-details-large').show();
                        }
                        if(designPageSpecific == "true"){
                            $('#inner-content-design-details-large-bg').animate({opacity:0.8},0);
                            $('#inner-content-design-details-large-bg').show();
                            $('#inner-content-design-details-large').show();
                        }
			productDetailsOpen = "true";
		}else{

                        if(dayPageSpecific == "true"){
                            $('#inner-content-day-details-large-bg').animate({opacity:0},0);
                            $('#inner-content-day-details-large-bg').hide();
                            $('#inner-content-day-details-large').hide();
                        }
                        if(nightPageSpecific == "true"){
                            $('#inner-content-night-details-large-bg').animate({opacity:0},0);
                            $('#inner-content-night-details-large-bg').hide();
                            $('#inner-content-night-details-large').hide();
                        }
                        if(sofaPageSpecific == "true"){
                            $('#inner-content-sofa-details-large-bg').animate({opacity:0},0);
                            $('#inner-content-sofa-details-large-bg').hide();
                            $('#inner-content-sofa-details-large').hide();
                        }
                        if(designPageSpecific == "true"){
                            $('#inner-content-design-details-large-bg').animate({opacity:0},0);
                            $('#inner-content-design-details-large-bg').hide();
                            $('#inner-content-design-details-large').hide();
                        }
			productDetailsOpen = "false";
            }
	}
	
	function close_right_bar(){
		if(rightBarOpen == "true"){
			$("#right-bar").animate({"right": "-=164px"}, "slow");
			$("#right-bar-bg").animate({"right": "-=164px"}, "slow");
			$("#leftarrow").animate({"right": "-=164px"}, "slow");
			rightBarOpen = "false"
			$("#leftarrow").html("<a href=\"javascript:close_right_bar();\" > <img src=\"images/leftarrow.png\" alt=\"\" /> </a>");
		}else{
			$("#right-bar").animate({"right": "+=164px"}, "slow");
			$("#right-bar-bg").animate({"right": "+=164px"}, "slow");
			$("#leftarrow").animate({"right": "+=164px"}, "slow");
			rightBarOpen = "true";
			$("#leftarrow").html("<a href=\"javascript:close_right_bar();\" > <img src=\"images/rightarrow.png\" alt=\"\" /> </a>");
		}
	}
	
	function share(){
		$('#dim2').animate({opacity:0.9},0);
		$("#dim2").fadeIn();
		$("#ps_websites2").fadeIn();
		$("#dim2").mouseover(function(){
     	 	$("#dim2").css("cursor","pointer");
    	});
		$("#dim2").click(function () { 
			$("#ps_websites2").fadeOut();
      		$("#dim2").fadeOut();
    	});
	}
	function share_on(param){
		if(param == "facebook"){
			window.open('http://www.facebook.com/share.php?u=' + escape(window.location) + '&t=Lazzoni.us');
		}
		if(param == "twitter"){
			window.open('http://twitter.com/home?status=' + escape(window.location));
		}
		if(param == "delicious"){
			window.open('http://del.icio.us/post?url=' + escape(window.location));
		}
		if(param == "digg"){
			window.open('http://digg.com/submit?phase=2&url=' + escape(window.location));
		}
		if(param == "linkedin"){
			window.open('http://www.linkedin.com/shareArticle?mini=true&ro=true&url=' + escape(window.location));
		}
		if(param == "reddit"){
			window.open('http://reddit.com/submit?url=' + escape(window.location));
		}
		if(param == "stumbleupon"){
			window.open('http://stumbleupon.com/submit?url=' + escape(window.location));
		}
		if(param == "tumblr"){
			window.open('http://www.tumblr.com/share?v=3&u=' + escape(window.location));
		}
	}

	document.ondragstart = function () { return false; };
            var title = document.title;
            $.address.init(function(event) {
				/*value: $.address.value(), 
                    path: $.address.path(),
                    pathNames: $.address.pathNames(),
                    parameterNames: $.address.parameterNames(),
                    queryString: $.address.queryString()*/
					//alert("value = " +  $.address.value());
					
					//alert($.address.parameterNames());
					
			if ($.address.value().substring(0,9) == "/contact/"){
				load_contact_page();
			}
			if ($.address.value().substring(0,10) == "/location/"){
				load_location_page();
			}
			if ($.address.value().substring(0,7) == "/press/"){
				load_press();
			}
			if ($.address.value().substring(0,10) == "/campaign/"){
				load_campaign_page();
			}
			if ($.address.value().substring(0,9) == "/company/"){
				load_company_page();
			}
			if($.address.value().substring(0,13) == "/collections/"){
				setTimeout(function() {
					animate_up_second_menu();
    			}, 1500); 
			}	
			
			if ($.address.value().substring(0,20) == "/collections/design/"){
				if($.address.value() == "/collections/design/"){
					setTimeout(function() {
						animate_up_second_menu();
    				}, 1500); 
					load_design();
				}else{	
					if($.address.value().substring(20,24) == "?id="){
						if(isNumeric($.address.value().substring(24))){
							load_design_specific($.address.value().substring(24));
						}else{
							setTimeout(function() {
								animate_up_second_menu();
    						}, 1500); 
							load_design();
						}
					}else{
						setTimeout(function() {
							animate_up_second_menu();
    					}, 1500); 
						load_design();
					}
				}
			}

			if ($.address.value().substring(0,19) == "/collections/night/"){
				if($.address.value() == "/collections/night/"){
					setTimeout(function() {
						animate_up_second_menu();
    				}, 1500); 
					load_night();
				}else{	
					if($.address.value().substring(19,23) == "?id="){
						if(isNumeric($.address.value().substring(23))){
							load_night_specific($.address.value().substring(23));
						}else{
							setTimeout(function() {
								animate_up_second_menu();
    						}, 1500); 
							load_night();
						}
					}else{
						setTimeout(function() {
							animate_up_second_menu();
    					}, 1500); 
						load_night();
					}
				}
			}
			
			if ($.address.value().substring(0,18) == "/collections/sofa/"){
				if($.address.value() == "/collections/sofa/"){
					setTimeout(function() {
						animate_up_second_menu();
    				}, 1500); 
					load_sofa();
				}else{	
					if($.address.value().substring(18,22) == "?id="){
						if(isNumeric($.address.value().substring(22))){
							load_sofa_specific($.address.value().substring(22));
						}else{
							setTimeout(function() {
								animate_up_second_menu();
    						}, 1500); 
							load_sofa();
						}
					}else{
						setTimeout(function() {
								animate_up_second_menu();
    					}, 1500); 
						load_sofa();
					}
				}
			}
			if ($.address.value().substring(0,17) == "/collections/day/"){
				if($.address.value() == "/collections/day/"){
					setTimeout(function() {
						animate_up_second_menu();
    				}, 1500); 
					load_day();
				}else{	
					if($.address.value().substring(17,21) == "?id="){
						if(isNumeric($.address.value().substring(21))){
							load_day_specific($.address.value().substring(21));
						}else{
							setTimeout(function() {
								animate_up_second_menu();
    						}, 1500); 
							load_day();
						}
					}else{
						setTimeout(function() {
								animate_up_second_menu();
    					}, 1500); 
						load_day();
					}
				}
				
			}
			if ($.address.value().substring(0,10) == "/followus/"){
				load_followus_page();
			}	
			if ($.address.value().substring(0,6) == "/rsvp/"){
				load_rsvp_page();
			}	
					
            }).change(function(event) {
                var names = $.map(event.pathNames, function(n) {
                    return n.substr(0, 1).toUpperCase() + n.substr(1);
                }).concat(event.parameters.id ? event.parameters.id.split('.') : []);
                var links = names.slice();
                var match = links.length ? links.shift() + ' ' + links.join('.') : 'Home';
                $('a').each(function() {
                    $(this).toggleClass('selected', $(this).text() == match);
                });
                $.address.title([title].concat(names).join(' | '));
            });
			
			function isNumeric(strString){
			   var strValidChars = "0123456789.-";
			   var strChar;
			   var blnResult = true;
			
			   if (strString.length == 0) return false;
			   for (i = 0; i < strString.length && blnResult == true; i++){
				  strChar = strString.charAt(i);
				  if (strValidChars.indexOf(strChar) == -1){
					 blnResult = false;
				  }
				}
			   return blnResult;
			  }
