jQuery(function( $ ){
	/**
	 * Most jQuery.localScroll's settings, actually belong to jQuery.ScrollTo, check it's demo for an example of each option.
	 * @see http://flesler.demos.com/jquery/scrollTo/
	 * You can use EVERY single setting of jQuery.ScrollTo, in the settings hash you send to jQuery.LocalScroll.
	 */
	
	// The default axis is 'y', but in this demo, I want to scroll both
	// You can modify any default like this
	$.localScroll.defaults.axis = 'xy';
	$('.post').localScroll();
	$('.pan').localScroll();
	$('#navx').localScroll();

	// Scroll initially if there's a hash (#something) in the url 
	$.localScroll.hash({
		target: '#page-wrap', // Could be a selector or a jQuery object too.
		queue:true,
		duration:1500
	});
	
	/**
	 * NOTE: I use $.localScroll instead of $('#navigation').localScroll() so I
	 * also affect the >> and << links. I want every link in the page to scroll.
	 
	$.localScroll({
		target: '#inner', // could be a selector or a jQuery object too.
		queue:true,
		duration:1000,
		hash:true,
		onBefore:function( e, anchor, $target ){
			// The 'this' is the settings object, can be modified
		},
		onAfter:function( anchor, settings ){
			// The 'this' contains the scrolled element (#content)
		}
	});*/
});

$(function(){
$("#page-wrap").wrapInner(document.createElement("tr"));
$("#page-wrap").wrapInner(document.createElement("table"));
$(".post").wrap("<td>");
$(".pan").wrap("<td>");
 //if(getDocHeight() <= 624){
//	 element('alertframe').src='alertheight.php';
 //}

 $(".weddinglink").click(function () {
      if ($(".weddingnav").is(":hidden")) {
		   $(".weddingnav").slideDown("slow");
		   $(".worknav").slideUp("slow");
	  } else {
		   $(".weddingnav").slideUp("slow");
	  }
   })
		  
 $(".worklink").click(function () {
      if ($(".worknav").is(":hidden")) {
		  
		   $(".worknav").slideDown("slow");
		   $(".weddingnav").slideUp("slow");
		   
	  } else {
		  
		   $(".worknav").slideUp("slow");
	  }
   })
		  
		  

 });


function clickIE4(){
if (event.button==2){
//alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
//alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false");



function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}




function getDocHeightid(id) {
    var D = document;
    return Math.min(element(id).scrollHeight,element(id).offsetHeight,element(id).clientHeight);
} 


function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
} 


