var isResizing = false;

$(function() {

    if ($('.container').length > 0) {
        $('.container').cycle({
            fx:     'scrollLeft',
            timeout: 7000,
            pager:  '.current-img'
        });
		
		$('.container').hover(function(){
			$('.container').cycle("pause");
		}, function(){
			$('.container').cycle("resume");
		});
    }

    $('.totop a').click(function () {
        $('body,html').animate({
            scrollTop: 0
        }, 800);
        return false;
    });

	$("#seclick").click(function(){
		$('#seinfo').toggle();
	});
	
	/*
	var win = $(window);
	// Full body scroll
	win.bind(
		'resize',
		function()
		{
			var container = $('#wrapper');
			if (!isResizing && container.attr("rel") != "jsPane") {
				isResizing = true;
				container.attr("rel", "jsPane");
				// Temporarily make the container tiny so it doesn't influence the
				// calculation of the size of the document
				container.css({'width': 1,'height': 1});
				// Now make it the size of the window...
				container.css({'width': win.width(),'height': win.height()});
				
				container.jScrollPane({'showArrows': true});
				isResizing = false;
				container.attr("rel", "");
			}
		}
	).trigger('resize');

	// Workaround for known Opera issue which breaks demo (see
	// http://jscrollpane.kelvinluck.com/known_issues.html#opera-scrollbar )
	$('body').css('overflow', 'hidden');

	// IE calculates the width incorrectly first time round (it
	// doesn't count the space used by the native scrollbar) so
	// we re-trigger if necessary.
	if ($('#wrapper').width() != win.width()) {
		win.trigger('resize');
	}*/
});
