jQuery(document).ready(function(){
    $(".frp_tabs li").click(function(){
        $(".frp_tab_section").removeClass("frp_tab_visible");
        $(".frp_tabs li").removeClass("frp_tab_active");
        $(this).addClass("frp_tab_active");
        var targetSection = $(this).attr("title") + "TabSection";
        $("#" + targetSection).addClass("frp_tab_visible")
    });

    $(".frp_tabs li[title=Location]").click(function(){
    	// Fix for the google map not loading properly.  This has to do
    	// with the "draw" location.  Below we force the browser into thinking the browser window
    	// is resizing, which forces the browser to redraw elements
    	if(widgetController){
	    	$(".frp_google_map").each(function(){
	    		var wId = this.getAttribute("id");
	    		var w = widgetController.getWidget(wId);
	    		if(w){ w.redrawMap(); }
	    	});
	    }
    });
});
