	$(document).ready(function() {$('.nninput').val(1);});


        jQuery(document).ready(function() {
            jQuery('#mycarousel').jcarousel({
                visible: 1,
                auto: 3,
                scroll: 1,
                wrap: 'last'
            });
        });

$(document).ready(function () {

	// if user clicked on button, the overlay layer or the dialogbox, close the dialog	
	$('a.btn-ok, #dialog-overlay, #dialog-box').click(function () {		
		$('#dialog-overlay, #dialog-box').hide();		
		return false;
	});
	
	// if user resize the window, call the same function again
	// to make sure the overlay fills the screen and dialogbox aligned to center	
	$(window).resize(function () {
		
		//only do it if the dialog box is not hidden
		if (!$('#dialog-box').is(':hidden')) popup();		
	});	
	
	
});


//Popup dialog
function popup(message) {
		
	// get the screen height and width  
	var maskHeight = $(document).height();  
	var maskWidth = $(window).width();
	
	// calculate the values for center alignment
	var dialogTop =  (maskHeight/3) - ($('#dialog-box').height());  
	var dialogLeft = (maskWidth/2) - ($('#dialog-box').width()/2); 
	
	// assign values to the overlay and dialog box
	$('#dialog-overlay').css({height:maskHeight, width:maskWidth}).show();
	$('#dialog-box').css({top:dialogTop, left:dialogLeft}).show();
	
	// display the message
	$('#dialog-message').html(message);
			
}




function slideSwitch() {
    var $numberimages = $('#slideshow IMG');
    if ( $numberimages.length != 1 )
	{
	    var $active = $('#slideshow IMG.active');

	    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

	    var $next =  $active.next().length ? $active.next()
	        : $('#slideshow IMG:first');

	    $active.addClass('last-active');

	    $next.css({opacity: 0.0})
	        .addClass('active')
	        .animate({opacity: 1.0}, 1600, function() {
	            $active.removeClass('active last-active');
	        }); 
	}
}


$(function() {
    setInterval( "slideSwitch()", 6000 );
});




$(document).ready(function() {
  $('#body').height($(window).height()-242);
  $('#text_content').height($(window).height()-242);

$(window).resize(function() {
  $('#body').height($(window).height()-242);
  $('#text_content').height($(window).height()-242);
  $('.jScrollPaneContainer').height($(window).height()-242);
  $('#text_content').jScrollPane();
  $('#text_content').jScrollPane();
});
});
	$(function()
	{
		$.extend($.fn.jScrollPane.defaults, {showArrows:true});
		$('#text_content').jScrollPane();

	});

	$(function()
	{
		setTimeout(function() {$('#text_content').jScrollPane();}, 1500);
	});


	$(document).ready(function(){
	$('#arr_cal_icon').attr('src', '/images/stylesheet/minical2.gif');
	});






