if (navigator.appVersion.indexOf('6.0')<1) {jQuery("head").append('<link rel="stylesheet" type="text/css" href="css/jquerycssmenu.css" />');}

var cOver, cTimeout, cRow = 0, cCol = 0, cTm = 1;

jQuery(function(){  
		   
	jQuery('#searchbar').focus(function(){if(jQuery(this).attr('value')=='Search'){jQuery(this).attr('value','').attr('class','.search_active')}});
	

	//jQuery('.gallery_item').each(function(){ if (cTm!=4) { jQuery(this).attr('style','margin-right: 20px;'); cTm++; } else { cTm = 1; }}); 
	
	jQuery('body').append('<div id="float_col2"><div id="float_col_layover_for_ie62"><form><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><strong>Your Email Address</strong></td><td align="right"><a href="#" class="closeme2"><img src="images/closure.jpg" alt="" width="18" height="18" border="0" /></a></td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="left" colspan="2"><input name="your_email" type="text" id="your_email" value="" /></td></tr><tr><td align="left" colspan="2"><strong>Your Friend\'s Email Address</strong></td></tr><tr><td align="left" colspan="2"><input name="your_friends_email" type="text" id="your_friends_email" value="" /></td></tr><tr><td align="left" colspan="2"><strong>Notes</strong></td></tr><tr><td align="left" colspan="2"><textarea name="notes" id="notes" class="friend_notes" cols="1" rows="1"></textarea></td></tr><tr><td align="left" valign="top"><input class="norm" name="interest" id="interest" type="checkbox" value="1" /></td><td align="left"><label for="interest">I am interested in receiving updates from time to time about special events and promotions specific to the Monmouth. I understand my email address will not be shared with any 3rd Party mailing services or companies.</label></td></tr><tr><td colspan="2" align="left"><div class="bump_down"><a href="#" title="" id="submit_friend" class="generic_button"><span></span>Send Email</a></div><img id="preload" class="hide" src="/images/preload.gif" width="16" height="16" alt="submitting" vspace="5" hspace="5" /></td></tr><tr><td colspan="2" class="privacy"><small><a href="/index.aspx?id=402">privacy policy</a></small></td></tr></table></form></div><img src="images/send_your_friend_bg.png" alt="" width="255" height="386" /></div>');
	
	jQuery('.font_size_1').click(function() {
		jQuery('.font_size_2').attr('class','font_size_2');
		jQuery('.font_size_3').attr('class','font_size_3');
		jQuery(this).attr('class','font_size_1 current');
		jQuery('*','#page_content').css('font-size','100%');
		jQuery('*','.no_text_resize').css('font-size','');
		return false;
	});
	
	jQuery('.font_size_2').click(function() {
		jQuery('.font_size_1').attr('class','font_size_1');
		jQuery('.font_size_3').attr('class','font_size_3'); 
		jQuery(this).attr('class','font_size_2 current');
		jQuery('*','#page_content').css('font-size','105%');
		jQuery('*','.no_text_resize').css('font-size','');
		return false;
	});
	
	jQuery('.font_size_3').click(function() {
		jQuery('.font_size_2').attr('class','font_size_2');
		jQuery('.font_size_1').attr('class','font_size_1');
		jQuery(this).attr('class','font_size_3 current');
		jQuery('*','#page_content').css('font-size','110%');
		jQuery('*','.no_text_resize').css('font-size','');
		return false;
	});
	
	/* ===== Dropdown graphic ===== */
	jQuery('#select_month_year_btn a').click(function(){
		jQuery('#select_month_year_selbox').slideToggle();
		return false;
	});
	jQuery('#select_month_year_selbox').mouseover(function(){
		clearTimeout(cTimeout); cOver=1;
	});
	jQuery('#select_month_year_selbox').mouseout(function(){
		if(cOver)cTimeout=setTimeout(function(){ if (!jQuery('#select_month_year_selbox').is(':hidden')) jQuery('#select_month_year_selbox').hide();},100);
		return false;
	});
	jQuery('#select_month_year_selbox a').click(function(){
		cOver=0;
		clearTimeout(cTimeout);
		jQuery('#select_month_year_selbox').slideToggle();
		return true;
	});
	jQuery('.icon_print a').click(function() {
		window.print();								  
	});
	
	
	// Styling for tables that have data headers.
	
	jQuery('.green_table').children().each(function() {
		cRow = 0;
		jQuery(this).children().each(function(){
			
			cRow++;
			cCol = 0;
			
			jQuery(this).children().each(function(){
				
				cCol++;
				if (cRow==1) {
					if (cCol==jQuery(this).parent().children().size()) {
						jQuery(this).attr('class','f_row');
					} else {
						jQuery(this).attr('class','f_row wr_border');
					}
				} 
				
				if (cRow>3) { cRow = 2; }
				
				if (cRow==2) {
					if (cCol==jQuery(this).parent().children().size()) {
						jQuery(this).attr('class','fd_row');
					} else {
						jQuery(this).attr('class','fd_row r1_border');
					}
				}
				
				if (cRow==3) {
					if (cCol==jQuery(this).parent().children().size()) {
						jQuery(this).attr('class','sd_row');
					} else {
						jQuery(this).attr('class','sd_row r2_border');
					}
				}
				
			});
		});
	});
});
 

