/* Author: 
	REISM
*/

$(function(){
	//Copyright +Year
	D=new Date();
	var Y=D.getFullYear();
	$("#Y").prepend(Y);
	
	//RollOver
	$(".fade a").hover(function(){
        $(this).fadeTo(100,0.7);
    	},
    	function(){
        $(this).fadeTo(100,1.0);
    });
    
    //To Top
	$("a").click(function(){
		$("html,body").animate({ scrollTop: $($(this).attr("href")).offset().top }, "slow","swing");
		return false;
	});
	
	//Index News
	$("#news ul").innerfade({
		animationtype: "fade",
		timeout: 7000,
		containerheight: "1.2em"
	});
	
	//forRent Tab
	$('#search ul > li.tab').click(function(){
		if (!$(this).hasClass('select')){
			$('#search ul > li.tab').removeClass('select');
			$(this).addClass('select');
			$('#searchBox div:not(:animated)').slideUp(500);
			$('#searchBox div:eq(' + $('#search ul > li.tab').index(this) + ')').slideDown(500);
		}else{
			$('#search ul > li.tab').removeClass('select');
			$('#searchBox div:not(:animated)').slideUp(500);
		}
	});
	
	//Lightbox
	$('.lb a').lightBox();
});

/* Jump Menu */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
/* Open Window Default */
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/* Open Form Window */
function openform(theURL) { //v2.0
  window.open(theURL,'form','toolbar=yes,scrollbars=yes,resizable=yes,width=700,height=600');
}
/* Open Window "Max Size" */
function openMaxWindow(add){
maxWin = window.open(add,"new","toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=yes");
maxWin.moveTo(0,0);
maxWin.resizeTo(screen.availWidth,screen.availHeight);
}
