/*$(window).load(function() {
	
	$("#pageWrap").dcCreate({
		imgPrefix: "/images/theme/page-fade-",
		fileType: ".gif",
		expand: "17 17 0",
		radius: "35 35 0",
		position: "outside",
		resize: "img",
		exclude: "bottom-right, bottom, bottom-left"
	})//.find(">.dcbottom-left,>.dcbottom,>.dcbottom-right").css("display","none");
	
});*/
	
function untilValue(ele,txt) {
	// onCall
	( g = $(ele) ).val() != txt ? g.addClass("active") : g.removeClass("active");
	// onFocus, onBlur
	g.bind("focus blur", function(){
		( g = $(this) ).val() == txt ?
		g.val("").addClass("active") :	
		g.val() == "" ? g.val(txt).removeClass("active") : null
	})
}
pageLocation = window.location.href.replace("http://" + window.location.host, "");


$(function() {
	
    // Remove Financial Info fly-out by request
    $("#navWrap ul ul ul:contains('SEC ')").remove();
	
	untilValue("#header .txtQuery","Search For...")

    $("#sidebarLeft li a").each(
        function() {
            var curItem = $(this);
            if (curItem.attr("href") == pageLocation) {
                curItem.css("font-weight", "bold").css("color", "#06465F");
                if (curItem.parents('ul:eq(0)').css("display") == "none") {
                    curItem.parents('ul:eq(0)').css("display", "block");
                }
                else if (curItem.siblings("ul").css("display") == "none") {
                    curItem.siblings("ul").css("display", "block");
                }
            }
        }
    );
    var loc = location.hostname;
    var lstExclusions = [loc, 'www.netteller.com'];
    var allLinks = $('a');
    allLinks.filter(function() {
        return this.hostname && jQuery.inArray(this.hostname, lstExclusions) == -1
        // add target _blank to links in the primary nav that do not open in a new window/tab
    }).attr("target", "_blank").click(function() { return confirm('You are about to leave Jersey Shore State Bank Website.') });
		
		
    $("#header").find(".logo").bind("contextmenu",function(e){
			alert("If you are interested in using the JSSB logo, please contact us at contactus@jssb.com")
			return false;
    });
		
});