
/* Most Popular */
function tabs( group, tab, panel ) {
	
	var obj = group;
	var el = tab;
	var items = panel;

	var temp = $(obj + ' ' + el);

	if (temp != null) {
	    temp.click(function() {

	        // close all tabs
	        $(obj + ' ' + items).removeClass("here");

	        $(this).parents(items).toggleClass("here");

	    });
	}
}

/* Helper Text */
function helperText( el ) {
    var el = $(el);
    if (el != null) {

        var txt = el.attr("title");
        el.val(txt);

        el.bind('focus', function() {
            el.val('');
        });
    }
}


$( document ).ready( function() {

	tabs( '.most-popular', 'h3', 'li' );
	
	helperText( "fieldset.daily-report-search input" );

});
