$(document).ready(function() {
    
    $('#search_bar')
    .add('.quick-links')
    .add('.home-bottom-section-right-group')
    .add('.round-block-top')
    .add('.round-block-bottom')
    .supersleight();
    
    // show the menu dropdown when they click on about livewell colorado
    $('#nav-5').mouseenter(function(){
        $('#join-the-movement-nav').fadeOut('fast');
        $('#about-livewell-nav').fadeIn('fast');
        
        return false;
    });
    // hide the menu dropdown when they mouse out of it
    $('#about-livewell-nav').mouseleave(function(){
        $('#about-livewell-nav').fadeOut('fast');
    });

    $('#nav-4').mouseenter(function(){
        $('#about-livewell-nav').fadeOut('fast');
        $('#join-the-movement-nav').fadeIn('fast');
        return false;
    });
    // hide the menu dropdown when they mouse out of it
    $('#join-the-movement-nav').mouseleave(function(){
        $('#join-the-movement-nav').fadeOut('fast');
    });
    $("a.cruz_family").fancybox({
        'autoDimensions'        : false,
        'padding'               : 30,
        'height'                : 450
    });

	// Clear Text Fields for BMI Calc
	$("input.input_clear").focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
	
	$('a.facebook-tab-share').live('click', function() { 
		var href = $(this).attr('href');
		window.open(href, 'facebook', 'width=550,height=400,scrollbars=1');
		return false; 
	});

});


// JavaScript Document

/*
forge = {};
(function() {
this.smartSite = $('<div class="smartsite"/>').appendTo('body');
this.start = {x: 0, y: 0};
this.hPageNav = function(e) {
var $page = $('.' + e.target.id),
newPos = $page.position().left,
extraWidth = $page.width();
$page.nextAll().each(function() {
extraWidth += parseInt($(this).width(), 10);
});
if (extraWidth < $(window).width()) {
$('#wrapper').css('padding-right', $(window).width() - extraWidth - 100);
} else {
$('#wrapper').css('padding-right', 0);
}
$('html,body').animate({
scrollLeft: newPos - 100
},
750);
e.preventDefault();
};
this.vPageNav = function(e) {
var $page = $('.' + e.target.id),
newPos = $page.position().top,
extraHeight = $page.height();
$page.nextAll().each(function() {
extraHeight += parseInt($(this).width(), 10);
});
if (extraHeight < $(window).height()) {
$('#wrapper').css('padding-bottom', $(window).height() - extraHeight);
} else {
$('#wrapper').css('padding-bottom', 0);
}
$('html,body').animate({
scrollTop: newPos - 40
},
750);
e.preventDefault();
};
this.setupNav = function() {
// Force a redraw to fix FF 3.6 bug in rendering nav correctly when changing media queries
$('body').append('<div class="redraw"/>'); $('.redraw').text(' ').remove();
$('nav').unbind('click');
if (forge.mediaQuery == 2) {
$('nav').bind('click', forge.hPageNav);
} else {
$('nav').bind('click', forge.vPageNav);
}
};
this.mediaQueryTest = function() {
forge.mediaQuery = parseInt(forge.smartSite.css('font-size'), 10);
forge.smartSite.trigger('mediaQueryChange', [parseInt(forge.smartSite.css('font-size'), 10)]);
};
}).apply(forge);
$(document).ready(function() {
// Smartsite
forge.smartSite.bind('mediaQueryChange', forge.setupNav);
$(window).bind('resize', forge.mediaQueryTest);
forge.mediaQueryTest();
$(document).ready(function() {
$("#twitter").getTwitter({
userName: "forgeideas",
numTweets: 4,
loaderText: "Loading tweets...",
slideIn: false,
showHeading: false,
headingText: "Latest Tweets",
showProfileLink: false
});
});
});
*/
