ddsmoothmenu.init({
	mainmenuid: "topmenu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

$(document).ready(function() {
	$('.topmenu > li > a').each(function(index) {
		$(this).addClass('m'+(index+1));
		if($(this).text().length <= 8){
			$(this).addClass('short');
		}
	});
	$('blockquote').each(function(index){
		if($('h2',$(this)).length && $('table',$(this)).length){
			$('table',$(this)).hide();
			$('h2',$(this)).click(function(){
				$('table',$(this).parent('blockquote')).toggle();
			});
		}
	});
	   
	$('#slideshow').galleryView({
		gallery_width: 600,
		gallery_height: 500,
		nav_theme: 'light',
		frame_width: 120,
		frame_height: 90,
		pause_on_hover: true
	});
});

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=300,left = 327,top = 254');");
}

function decision(text,url){
	if (confirm(text)) { 
		window.location.href = url;
	}
}
function showComments(id){
	var obj = document.getElementById('comments_'+id);
	if(obj.style.display == 'none'){
		obj.style.display = '';
	}else{
		obj.style.display = 'none';
	}
}
function popupEvent(day, month, year, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	win = window.open("http://www.hilltoploghomes.com/newsite/calendar/popup.php?day=" + day + "&month=" + month + "&year=" + year + "","Calendar","scrollbars=yes, status=yes, location=no, toolbar=no, menubar=no, directories=no, resizable=yes, width=" + w + ", height=" + h + ", top=" + wint + ", left=" + winl + "");
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

