

/* EXIT NOTICE */
/*************************************************/
$(function() {
	$('.homeBPB-in p a, a.lbox, li.page-item-162 a, li.page-item-268 a, a.pop').leaveNotice({
		siteName: "Bank of Houston",
		timeOut: 0,
		overlayAlpha: 0.8,
		exitMessage: "<p><strong>You are about to leave the Bank of Houston website and link to one of our trusted third-party vendors.</strong></p><p>The information on these websites is created, published and maintained by the vendors. Bank of Houston does not guarantee the accuracy or completeness of the information provided and therefore cannot be held liable for content. Any use of the information obtained from third-party vendor websites is voluntary.</p>"
	});
});

/* SLIDESHOW */
/*************************************************/
$(function() {
	$('.slideshow').cycle({
		speed: 400,
		timeout: 6000,
		pager: '.jnav',
		pagerEvent: 'click',
		pauseOnPagerHover: true,
		pause: true,
		fx: 'fade'
	});
});
/* CAROUSEL */
/*************************************************/
$(document).ready(function() {
    $('#mycarousel').jcarousel({
		scroll: 1,
		wrap: "first"
	});
});
/* BACK TO TOP */
/*************************************************/
function backToTop() {
    var x1 = x2 = x3 = 0;
    var y1 = y2 = y3 = 0;

    if (document.documentElement) {
        x1 = document.documentElement.scrollLeft || 0;
        y1 = document.documentElement.scrollTop || 0;
    }

    if (document.body) {
        x2 = document.body.scrollLeft || 0;
        y2 = document.body.scrollTop || 0;
    }

    x3 = window.scrollX || 0;
    y3 = window.scrollY || 0;

    var x = Math.max(x1, Math.max(x2, x3));
    var y = Math.max(y1, Math.max(y2, y3));

    window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));

    if (x > 0 || y > 0) {
        window.setTimeout("backToTop()", 25);
    }
}



