// preload please
var preload = new Image(6, 40);
preload.src = '/wp-content/themes/lrany/images/cap_left_on.png';
preload = new Image(6, 40);
preload.src = '/wp-content/themes/lrany/images/cap_right_on.png';
preload = new Image(3, 40);
preload.src = '/wp-content/themes/lrany/images/nav_bg_on.png';


function toggleField(f, on, text) {

	if (on) {
		if (f.value == text) f.value = "";
	} else {
		if (f.value == "") f.value = text;
	}

}

jQuery(document).ready(function() {

	// set up nav
	jQuery('#menu-primary-navigation li').hover(
		function() {
			jQuery(this).addClass('hover');
		},
		function() {
			jQuery(this).removeClass('hover');
		}
	);
	
	
	// pimp links for Archives
	jQuery('.widget_archive ul li a').each(function() {
		jQuery(this).before('&raquo; ');
	});
	
	
	// pimp the Comment Form
	var comment_author = jQuery('#commentform .comment-form-author').length;
	if (comment_author > 0) {
		jQuery('#commentform .comment-form-author, #commentform .comment-form-email, #commentform .comment-form-url').wrapAll('<div id="commentleft"></div>');
		jQuery('#commentform .form-submit').css({
			float: 'right',
			marginRight: '170px'
		});
	} else {
		jQuery('#commentform .form-submit').css({
			marginLeft: '150px'
		});
	}

});
