﻿var currentFontSize = "12px";

function toggleTextSize() {
	if (currentFontSize == "12px") {
		jQuery('#middle-column').css('font-size', '14px');
		jQuery('.community-tab-content').css('font-size', '14px');
		jQuery('.home-left').css('font-size', '14px');
		currentFontSize = "14px";
	}
	else {
		jQuery('#middle-column').css('font-size', '12px');
		jQuery('.community-tab-content').css('font-size', '12px');
		jQuery('.home-left').css('font-size', '12px');
		currentFontSize = "12px";
	}
}

jQuery(document).ready(function($) {
    // main nav helpers

    $(".main-nav li").hover(
		function() { $(this).addClass("main-nav-hover"); },
		function() { $(this).removeClass("main-nav-hover"); }
	);

    $(".main-nav li.main-nav-first").hover(
		function() { $(this).addClass("main-nav-hover-first"); },
		function() { $(this).removeClass("main-nav-hover-first"); }
	);

    $(".main-nav li.main-nav-last").hover(
		function() { $(this).addClass("main-nav-hover-last"); },
		function() { $(this).removeClass("main-nav-hover-last"); }
	);

    if ($.browser.msie) {
        if ($.browser.version == "6.0" || $.browser.version == "7.0") {
            $("#find-a-community-button").colorbox({ opacity: .3, iframe: true, innerWidth: 870, innerHeight: 320, onComplete: function() { $("#cboxTitle").hide(); } });
        }
        else {
            $("#find-a-community-button").colorbox({ opacity: .3, iframe: true, innerWidth: 863, innerHeight: 305, onComplete: function() { $("#cboxTitle").hide(); } });
        }
    } else {
        $("#find-a-community-button").colorbox({ opacity: .3, iframe: true, innerWidth: 863, innerHeight: 305, onComplete: function() { $("#cboxTitle").hide(); } });
    }
    $('a.colorbox-link').colorbox({ opacity: .3, photo: true, onComplete: function() { $("#cboxTitle").hide(); }});

});

