diff --git src/bp-activity/bp-activity-cssjs.php src/bp-activity/bp-activity-cssjs.php
index 396f7d0..144fa6d 100644
--- src/bp-activity/bp-activity-cssjs.php
+++ src/bp-activity/bp-activity-cssjs.php
@@ -53,3 +53,48 @@ function bp_activity_mentions_script() {
 }
 add_action( 'bp_enqueue_scripts', 'bp_activity_mentions_script' );
 add_action( 'bp_admin_enqueue_scripts', 'bp_activity_mentions_script' );
+
+/**
+ * Extends the buddypress.js script data with the activity queried arguments.
+ *
+ * @since BuddyPress (?)
+ *
+ * @global $wp_scripts
+ * @global $activities_template
+ * @uses bp_activity_do_heartbeat()
+ */
+function bp_activity_heartbeat_add_script_data() {
+	global $wp_scripts, $activities_template;
+
+	if ( ! bp_activity_do_heartbeat() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+		return;
+	}
+
+	$handle  = 'bp-legacy-js';
+	$handles = array( 'bp-parent-js', 'bp-child-js' );
+
+	foreach ( $handles as $h ) {
+		if ( isset( $wp_scripts->queue[ $h ] ) ) {
+			$handle = $h;
+			break;
+		}
+	}
+
+	$data = $wp_scripts->get_data( $handle, 'data' );
+
+	// Defaults to an empty array
+	$query_args = array();
+	if ( ! empty( $activities_template->query_args ) ) {
+		$query_args = (array) $activities_template->query_args;
+	}
+
+	// Extend the script data
+	$script = 'var BP_Activity_Args = ' . json_encode( $query_args ) . ';';
+
+	if ( $data ) {
+		$script = "$data\n$script";
+	}
+
+	$wp_scripts->add_data( $handle, 'data', $script );
+}
+add_action( 'activity_loop_start', 'bp_activity_heartbeat_add_script_data' );
diff --git src/bp-activity/bp-activity-filters.php src/bp-activity/bp-activity-filters.php
index 82f992a..459a252 100644
--- src/bp-activity/bp-activity-filters.php
+++ src/bp-activity/bp-activity-filters.php
@@ -532,11 +532,18 @@ function bp_activity_heartbeat_last_recorded( $response = array(), $data = array
 		return $response;
 	}
 
+	$heartbeat_args = array( 'since' => date( 'Y-m-d H:i:s', $data['bp_activity_last_recorded'] ) );
+
+	// Make sure to include template hardcoded args
+	if ( ! empty( $data['query_args'] ) ) {
+		$heartbeat_args = array_merge( $data['query_args'], $heartbeat_args );
+	}
+
 	// Use the querystring argument stored in the cookie (to preserve
 	// filters), but force the offset to get only new items
 	$activity_latest_args = bp_parse_args(
 		bp_ajax_querystring( 'activity' ),
-		array( 'since' => date( 'Y-m-d H:i:s', $data['bp_activity_last_recorded'] ) ),
+		$heartbeat_args,
 		'activity_latest_args'
 	);
 
diff --git src/bp-activity/bp-activity-template.php src/bp-activity/bp-activity-template.php
index 95d0cf7..445b26f 100644
--- src/bp-activity/bp-activity-template.php
+++ src/bp-activity/bp-activity-template.php
@@ -744,6 +744,9 @@ function bp_has_activities( $args = '' ) {
 
 	$activities_template = new BP_Activity_Template( $r );
 
+	// Attach the orginal args to the $activities_template global
+	$activities_template->query_args = wp_parse_args( $args, array() );
+
 	/**
 	 * Filters whether or not there are activity items to display.
 	 *
diff --git src/bp-templates/bp-legacy/buddypress-functions.php src/bp-templates/bp-legacy/buddypress-functions.php
index 7b7f1b9..1f53754 100644
--- src/bp-templates/bp-legacy/buddypress-functions.php
+++ src/bp-templates/bp-legacy/buddypress-functions.php
@@ -233,7 +233,7 @@ class BP_Legacy extends BP_Theme_Compat {
 		// Enqueue the global JS, if found - AJAX will not work
 		// without it
 		if ( isset( $asset['location'], $asset['handle'] ) ) {
-			wp_enqueue_script( $asset['handle'], $asset['location'], bp_core_get_js_dependencies(), $this->version );
+			wp_enqueue_script( $asset['handle'], $asset['location'], bp_core_get_js_dependencies(), $this->version, true );
 		}
 
 		// Add words that we need to use in JS to the end of the page
@@ -271,7 +271,7 @@ class BP_Legacy extends BP_Theme_Compat {
 			) );
 
 			// Enqueue script
-			wp_enqueue_script( $asset['handle'] . '-password-verify', $asset['location'], $dependencies, $this->version);
+			wp_enqueue_script( $asset['handle'] . '-password-verify', $asset['location'], $dependencies, $this->version, true );
 		}
 	}
 
@@ -836,6 +836,12 @@ function bp_legacy_theme_post_update() {
 	$last_recorded = ! empty( $_POST['since'] ) ? date( 'Y-m-d H:i:s', intval( $_POST['since'] ) ) : 0;
 	if ( $last_recorded ) {
 		$activity_args = array( 'since' => $last_recorded );
+
+		// Make sure to include template hardcoded args
+		if ( ! empty( $_POST['query_args'] ) ) {
+			$activity_args = array_merge( $_POST['query_args'], array( 'since' => $last_recorded ) );
+		}
+
 		$bp->activity->last_recorded = $last_recorded;
 		add_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10, 1 );
 	} else {
diff --git src/bp-templates/bp-legacy/js/buddypress.js src/bp-templates/bp-legacy/js/buddypress.js
index 6b85ed0..4b008bc 100644
--- src/bp-templates/bp-legacy/js/buddypress.js
+++ src/bp-templates/bp-legacy/js/buddypress.js
@@ -1,15 +1,283 @@
 /* jshint undef: false, unused:false */
-// AJAX Functions
-var jq = jQuery;
 
-// Global variable to prevent multiple AJAX requests
-var bp_ajax_request = null;
+( function( jq ){
 
-// Global variables to temporarily store newest activities
-var newest_activities = '';
-var activity_last_recorded  = 0;
+	// Global variables
+	var bp_ajax_request = null, newest_activities = '', activity_last_recorded  = 0;
+
+	/* Setup activity scope and filter based on the current cookie settings. */
+	bp_init_activity = function() {
+		/* Reset the page */
+		jq.cookie( 'bp-activity-oldestpage', 1, {
+			path: '/'
+		} );
+
+		if ( null !== jq.cookie('bp-activity-filter') && jq('#activity-filter-select').length ) {
+			jq('#activity-filter-select select option[value="' + jq.cookie('bp-activity-filter') + '"]').prop( 'selected', true );
+		}
+
+		/* Activity Tab Set */
+		if ( null !== jq.cookie('bp-activity-scope') && jq('.activity-type-tabs').length ) {
+			jq('.activity-type-tabs li').each( function() {
+				jq(this).removeClass('selected');
+			});
+			jq('#activity-' + jq.cookie('bp-activity-scope') + ', .item-list-tabs li.current').addClass('selected');
+		}
+	}
+
+	/* Setup object scope and filter based on the current cookie settings for the object. */
+	bp_init_objects = function( objects ) {
+		jq(objects).each( function(i) {
+			if ( null !== jq.cookie('bp-' + objects[i] + '-filter') && jq('#' + objects[i] + '-order-select select').length ) {
+				jq('#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').prop( 'selected', true );
+			}
+
+			if ( null !== jq.cookie('bp-' + objects[i] + '-scope') && jq('div.' + objects[i]).length ) {
+				jq('.item-list-tabs li').each( function() {
+					jq(this).removeClass('selected');
+				});
+				jq('#' + objects[i] + '-' + jq.cookie('bp-' + objects[i] + '-scope') + ', #object-nav li.current').addClass('selected');
+			}
+		});
+	}
+
+	/* Filter the current content list (groups/members/blogs/topics) */
+	bp_filter_request = function( object, filter, scope, target, search_terms, page, extras, caller, template ) {
+		if ( 'activity' === object ) {
+			return false;
+		}
+
+		if ( null === scope ) {
+			scope = 'all';
+		}
+
+		/* Save the settings we want to remain persistent to a cookie */
+		jq.cookie( 'bp-' + object + '-scope', scope, {
+			path: '/'
+		} );
+		jq.cookie( 'bp-' + object + '-filter', filter, {
+			path: '/'
+		} );
+		jq.cookie( 'bp-' + object + '-extras', extras, {
+			path: '/'
+		} );
+
+		/* Set the correct selected nav and filter */
+		jq('.item-list-tabs li').each( function() {
+			jq(this).removeClass('selected');
+		});
+		jq('#' + object + '-' + scope + ', #object-nav li.current').addClass('selected');
+		jq('.item-list-tabs li.selected').addClass('loading');
+		jq('.item-list-tabs select option[value="' + filter + '"]').prop( 'selected', true );
+
+		if ( 'friends' === object || 'group_members' === object ) {
+			object = 'members';
+		}
+
+		if ( bp_ajax_request ) {
+			bp_ajax_request.abort();
+		}
+
+		bp_ajax_request = jq.post( ajaxurl, {
+			action: object + '_filter',
+			'cookie': bp_get_cookies(),
+			'object': object,
+			'filter': filter,
+			'search_terms': search_terms,
+			'scope': scope,
+			'page': page,
+			'extras': extras,
+			'template': template
+		},
+		function(response)
+		{
+			/* animate to top if called from bottom pagination */
+			if ( caller === 'pag-bottom' && jq('#subnav').length ) {
+				var top = jq('#subnav').parent();
+				jq('html,body').animate({scrollTop: top.offset().top}, 'slow', function() {
+					jq(target).fadeOut( 100, function() {
+						jq(this).html(response);
+						jq(this).fadeIn(100);
+					});
+				});
+
+			} else {
+				jq(target).fadeOut( 100, function() {
+					jq(this).html(response);
+					jq(this).fadeIn(100);
+				});
+			}
+
+			jq('.item-list-tabs li.selected').removeClass('loading');
+		});
+	}
+
+	/* Activity Loop Requesting */
+	bp_activity_request = function(scope, filter) {
+		/* Save the type and filter to a session cookie */
+		jq.cookie( 'bp-activity-scope', scope, {
+			path: '/'
+		} );
+		jq.cookie( 'bp-activity-filter', filter, {
+			path: '/'
+		} );
+		jq.cookie( 'bp-activity-oldestpage', 1, {
+			path: '/'
+		} );
+
+		/* Remove selected and loading classes from tabs */
+		jq('.item-list-tabs li').each( function() {
+			jq(this).removeClass('selected loading');
+		});
+		/* Set the correct selected nav and filter */
+		jq('#activity-' + scope + ', .item-list-tabs li.current').addClass('selected');
+		jq('#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected').addClass('loading');
+		jq('#activity-filter-select select option[value="' + filter + '"]').prop( 'selected', true );
+
+		/* Reload the activity stream based on the selection */
+		jq('.widget_bp_activity_widget h2 span.ajax-loader').show();
+
+		if ( bp_ajax_request ) {
+			bp_ajax_request.abort();
+		}
+
+		bp_ajax_request = jq.post( ajaxurl, {
+			action: 'activity_widget_filter',
+			'cookie': bp_get_cookies(),
+			'_wpnonce_activity_filter': jq('#_wpnonce_activity_filter').val(),
+			'scope': scope,
+			'filter': filter
+		},
+		function(response)
+		{
+			jq('.widget_bp_activity_widget h2 span.ajax-loader').hide();
+
+			jq('div.activity').fadeOut( 100, function() {
+				jq(this).html(response.contents);
+				jq(this).fadeIn(100);
+
+				/* Selectively hide comments */
+				bp_legacy_theme_hide_comments();
+			});
+
+			/* Update the feed link */
+			if ( null !== response.feed_url ) {
+				jq('.directory #subnav li.feed a, .home-page #subnav li.feed a').attr('href', response.feed_url);
+			}
+
+			jq('.item-list-tabs li.selected').removeClass('loading');
+
+		}, 'json' );
+	}
+
+	/* Hide long lists of activity comments, only show the latest five root comments. */
+	bp_legacy_theme_hide_comments = function() {
+		var comments_divs = jq('div.activity-comments'),
+			parent_li, comment_lis, comment_count;
+
+		if ( !comments_divs.length ) {
+			return false;
+		}
+
+		comments_divs.each( function() {
+			if ( jq(this).children('ul').children('li').length < 5 ) {
+				return;
+			}
+
+			comments_div = jq(this);
+			parent_li = comments_div.parents('#activity-stream > li');
+			comment_lis = jq(this).children('ul').children('li');
+			comment_count = ' ';
+
+			if ( jq('#' + parent_li.attr('id') + ' a.acomment-reply span').length ) {
+				comment_count = jq('#' + parent_li.attr('id') + ' a.acomment-reply span').html();
+			}
+
+			comment_lis.each( function(i) {
+				/* Show the latest 5 root comments */
+				if ( i < comment_lis.length - 5 ) {
+					jq(this).addClass('hidden');
+					jq(this).toggle();
+
+					if ( !i ) {
+						jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
+					}
+				}
+			});
+
+		});
+	}
+
+	/* Helper Functions */
+	checkAll = function() {
+		var checkboxes = document.getElementsByTagName('input'),
+			i;
+
+		for(i=0; i<checkboxes.length; i++) {
+			if(checkboxes[i].type === 'checkbox') {
+				if($('check_all').checked === '') {
+					checkboxes[i].checked = '';
+				}
+				else {
+					checkboxes[i].checked = 'checked';
+				}
+			}
+		}
+	}
+
+	/**
+	 * Deselects any select options or input options for the specified field element.
+	 *
+	 * @param {String} container HTML ID of the field
+	 * @since BuddyPress (1.2.0)
+	 */
+	clear = function( container ) {
+		container = document.getElementById( container );
+		if ( ! container ) {
+			return;
+		}
+
+		var radioButtons = container.getElementsByTagName( 'INPUT' ),
+			options = container.getElementsByTagName( 'OPTION' ),
+			i       = 0;
+
+		if ( radioButtons ) {
+			for ( i = 0; i < radioButtons.length; i++ ) {
+				radioButtons[i].checked = '';
+			}
+		}
+
+		if ( options ) {
+			for ( i = 0; i < options.length; i++ ) {
+				options[i].selected = false;
+			}
+		}
+	}
+
+	/* Returns a querystring of BP cookies (cookies beginning with 'bp-') */
+	bp_get_cookies = function() {
+		var allCookies = document.cookie.split(';'),  // get all cookies and split into an array
+			bpCookies      = {},
+			cookiePrefix   = 'bp-',
+			i, cookie, delimiter, name, value;
+
+		// loop through cookies
+		for (i = 0; i < allCookies.length; i++) {
+			cookie    = allCookies[i];
+			delimiter = cookie.indexOf('=');
+			name      = jq.trim( unescape( cookie.slice(0, delimiter) ) );
+			value     = unescape( cookie.slice(delimiter + 1) );
+
+			// if BP cookie, store it
+			if ( name.indexOf(cookiePrefix) === 0 ) {
+				bpCookies[name] = value;
+			}
+		}
+
+		// returns BP cookies as querystring
+		return encodeURIComponent( jq.param(bpCookies) );
+	}
 
-jq(document).ready( function() {
 	/**** Page Load Actions *******************************************************/
 
 	/* Hide Forums Post Form */
@@ -144,13 +412,14 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'post_update',
-			'cookie': bp_get_cookies(),
-			'_wpnonce_post_update': jq('#_wpnonce_post_update').val(),
-			'content': content,
-			'object': object,
-			'item_id': item_id,
-			'since': last_date_recorded,
-			'_bp_as_nonce': jq('#_bp_as_nonce').val() || ''
+			'cookie'               : bp_get_cookies(),
+			'_wpnonce_post_update' : jq('#_wpnonce_post_update').val(),
+			'content'              : content,
+			'object'               : object,
+			'item_id'              : item_id,
+			'since'                : last_date_recorded,
+			'query_args'           : BP_Activity_Args,
+			'_bp_as_nonce'         : jq('#_bp_as_nonce').val() || ''
 		},
 		function(response) {
 
@@ -1693,6 +1962,7 @@ jq(document).ready( function() {
 		}
 
 		data.bp_activity_last_recorded = activity_last_recorded;
+		data.query_args                = BP_Activity_Args;
 
 		last_recorded_search = bp_get_querystring('s');
 
@@ -1717,279 +1987,6 @@ jq(document).ready( function() {
 		}
 
 		jq( '#buddypress ul.activity-list' ).prepend( '<li class="load-newest"><a href="#newest">' + BP_DTheme.newest + '</a></li>' );
-	});
-});
-
-/* Setup activity scope and filter based on the current cookie settings. */
-function bp_init_activity() {
-	/* Reset the page */
-	jq.cookie( 'bp-activity-oldestpage', 1, {
-		path: '/'
 	} );
 
-	if ( null !== jq.cookie('bp-activity-filter') && jq('#activity-filter-select').length ) {
-		jq('#activity-filter-select select option[value="' + jq.cookie('bp-activity-filter') + '"]').prop( 'selected', true );
-	}
-
-	/* Activity Tab Set */
-	if ( null !== jq.cookie('bp-activity-scope') && jq('.activity-type-tabs').length ) {
-		jq('.activity-type-tabs li').each( function() {
-			jq(this).removeClass('selected');
-		});
-		jq('#activity-' + jq.cookie('bp-activity-scope') + ', .item-list-tabs li.current').addClass('selected');
-	}
-}
-
-/* Setup object scope and filter based on the current cookie settings for the object. */
-function bp_init_objects(objects) {
-	jq(objects).each( function(i) {
-		if ( null !== jq.cookie('bp-' + objects[i] + '-filter') && jq('#' + objects[i] + '-order-select select').length ) {
-			jq('#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').prop( 'selected', true );
-		}
-
-		if ( null !== jq.cookie('bp-' + objects[i] + '-scope') && jq('div.' + objects[i]).length ) {
-			jq('.item-list-tabs li').each( function() {
-				jq(this).removeClass('selected');
-			});
-			jq('#' + objects[i] + '-' + jq.cookie('bp-' + objects[i] + '-scope') + ', #object-nav li.current').addClass('selected');
-		}
-	});
-}
-
-/* Filter the current content list (groups/members/blogs/topics) */
-function bp_filter_request( object, filter, scope, target, search_terms, page, extras, caller, template ) {
-	if ( 'activity' === object ) {
-		return false;
-	}
-
-	if ( null === scope ) {
-		scope = 'all';
-	}
-
-	/* Save the settings we want to remain persistent to a cookie */
-	jq.cookie( 'bp-' + object + '-scope', scope, {
-		path: '/'
-	} );
-	jq.cookie( 'bp-' + object + '-filter', filter, {
-		path: '/'
-	} );
-	jq.cookie( 'bp-' + object + '-extras', extras, {
-		path: '/'
-	} );
-
-	/* Set the correct selected nav and filter */
-	jq('.item-list-tabs li').each( function() {
-		jq(this).removeClass('selected');
-	});
-	jq('#' + object + '-' + scope + ', #object-nav li.current').addClass('selected');
-	jq('.item-list-tabs li.selected').addClass('loading');
-	jq('.item-list-tabs select option[value="' + filter + '"]').prop( 'selected', true );
-
-	if ( 'friends' === object || 'group_members' === object ) {
-		object = 'members';
-	}
-
-	if ( bp_ajax_request ) {
-		bp_ajax_request.abort();
-	}
-
-	bp_ajax_request = jq.post( ajaxurl, {
-		action: object + '_filter',
-		'cookie': bp_get_cookies(),
-		'object': object,
-		'filter': filter,
-		'search_terms': search_terms,
-		'scope': scope,
-		'page': page,
-		'extras': extras,
-		'template': template
-	},
-	function(response)
-	{
-		/* animate to top if called from bottom pagination */
-		if ( caller === 'pag-bottom' && jq('#subnav').length ) {
-			var top = jq('#subnav').parent();
-			jq('html,body').animate({scrollTop: top.offset().top}, 'slow', function() {
-				jq(target).fadeOut( 100, function() {
-					jq(this).html(response);
-					jq(this).fadeIn(100);
-				});
-			});
-
-		} else {
-			jq(target).fadeOut( 100, function() {
-				jq(this).html(response);
-				jq(this).fadeIn(100);
-			});
-		}
-
-		jq('.item-list-tabs li.selected').removeClass('loading');
-	});
-}
-
-/* Activity Loop Requesting */
-function bp_activity_request(scope, filter) {
-	/* Save the type and filter to a session cookie */
-	jq.cookie( 'bp-activity-scope', scope, {
-		path: '/'
-	} );
-	jq.cookie( 'bp-activity-filter', filter, {
-		path: '/'
-	} );
-	jq.cookie( 'bp-activity-oldestpage', 1, {
-		path: '/'
-	} );
-
-	/* Remove selected and loading classes from tabs */
-	jq('.item-list-tabs li').each( function() {
-		jq(this).removeClass('selected loading');
-	});
-	/* Set the correct selected nav and filter */
-	jq('#activity-' + scope + ', .item-list-tabs li.current').addClass('selected');
-	jq('#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected').addClass('loading');
-	jq('#activity-filter-select select option[value="' + filter + '"]').prop( 'selected', true );
-
-	/* Reload the activity stream based on the selection */
-	jq('.widget_bp_activity_widget h2 span.ajax-loader').show();
-
-	if ( bp_ajax_request ) {
-		bp_ajax_request.abort();
-	}
-
-	bp_ajax_request = jq.post( ajaxurl, {
-		action: 'activity_widget_filter',
-		'cookie': bp_get_cookies(),
-		'_wpnonce_activity_filter': jq('#_wpnonce_activity_filter').val(),
-		'scope': scope,
-		'filter': filter
-	},
-	function(response)
-	{
-		jq('.widget_bp_activity_widget h2 span.ajax-loader').hide();
-
-		jq('div.activity').fadeOut( 100, function() {
-			jq(this).html(response.contents);
-			jq(this).fadeIn(100);
-
-			/* Selectively hide comments */
-			bp_legacy_theme_hide_comments();
-		});
-
-		/* Update the feed link */
-		if ( null !== response.feed_url ) {
-			jq('.directory #subnav li.feed a, .home-page #subnav li.feed a').attr('href', response.feed_url);
-		}
-
-		jq('.item-list-tabs li.selected').removeClass('loading');
-
-	}, 'json' );
-}
-
-/* Hide long lists of activity comments, only show the latest five root comments. */
-function bp_legacy_theme_hide_comments() {
-	var comments_divs = jq('div.activity-comments'),
-		parent_li, comment_lis, comment_count;
-
-	if ( !comments_divs.length ) {
-		return false;
-	}
-
-	comments_divs.each( function() {
-		if ( jq(this).children('ul').children('li').length < 5 ) {
-			return;
-		}
-
-		comments_div = jq(this);
-		parent_li = comments_div.parents('#activity-stream > li');
-		comment_lis = jq(this).children('ul').children('li');
-		comment_count = ' ';
-
-		if ( jq('#' + parent_li.attr('id') + ' a.acomment-reply span').length ) {
-			comment_count = jq('#' + parent_li.attr('id') + ' a.acomment-reply span').html();
-		}
-
-		comment_lis.each( function(i) {
-			/* Show the latest 5 root comments */
-			if ( i < comment_lis.length - 5 ) {
-				jq(this).addClass('hidden');
-				jq(this).toggle();
-
-				if ( !i ) {
-					jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
-				}
-			}
-		});
-
-	});
-}
-
-/* Helper Functions */
-
-function checkAll() {
-	var checkboxes = document.getElementsByTagName('input'),
-		i;
-
-	for(i=0; i<checkboxes.length; i++) {
-		if(checkboxes[i].type === 'checkbox') {
-			if($('check_all').checked === '') {
-				checkboxes[i].checked = '';
-			}
-			else {
-				checkboxes[i].checked = 'checked';
-			}
-		}
-	}
-}
-
-/**
- * Deselects any select options or input options for the specified field element.
- *
- * @param {String} container HTML ID of the field
- * @since BuddyPress (1.2.0)
- */
-function clear( container ) {
-	container = document.getElementById( container );
-	if ( ! container ) {
-		return;
-	}
-
-	var radioButtons = container.getElementsByTagName( 'INPUT' ),
-		options = container.getElementsByTagName( 'OPTION' ),
-		i       = 0;
-
-	if ( radioButtons ) {
-		for ( i = 0; i < radioButtons.length; i++ ) {
-			radioButtons[i].checked = '';
-		}
-	}
-
-	if ( options ) {
-		for ( i = 0; i < options.length; i++ ) {
-			options[i].selected = false;
-		}
-	}
-}
-
-/* Returns a querystring of BP cookies (cookies beginning with 'bp-') */
-function bp_get_cookies() {
-	var allCookies = document.cookie.split(';'),  // get all cookies and split into an array
-		bpCookies      = {},
-		cookiePrefix   = 'bp-',
-		i, cookie, delimiter, name, value;
-
-	// loop through cookies
-	for (i = 0; i < allCookies.length; i++) {
-		cookie    = allCookies[i];
-		delimiter = cookie.indexOf('=');
-		name      = jq.trim( unescape( cookie.slice(0, delimiter) ) );
-		value     = unescape( cookie.slice(delimiter + 1) );
-
-		// if BP cookie, store it
-		if ( name.indexOf(cookiePrefix) === 0 ) {
-			bpCookies[name] = value;
-		}
-	}
-
-	// returns BP cookies as querystring
-	return encodeURIComponent( jq.param(bpCookies) );
-}
+} )( jQuery );
