/**
 * All intellectual property rights in this Software throughout the world belong to UK Radioplayer, 
 * rights in the Software are licensed (not sold) to subscriber stations, and subscriber stations 
 * have no rights in, or to, the Software other than the right to use it in accordance with the 
 * Terms and Conditions at www.radioplayer.co.uk/terms. You shall not produce any derivate works 
 * based on whole or part of the Software, including the source code, for any other purpose other 
 * than for usage associated with connecting to the UK Radioplayer Service in accordance with these 
 * Terms and Conditions, and you shall not convey nor sublicense the Software, including the source 
 * code, for any other purpose or to any third party, without the prior written consent of UK Radioplayer.
 *
 * @name tipbox
 * @description returns the html view for tipboxes
 *
 * @param tipbox : {String} identifies which tipbox text to display
 * @param searchparameter : {String} the users search terms
 *
 * @author Cathy Bartlett <cathy.bartlett@bbc.co.uk>
 */
radioplayer.views.tipbox = {
	SEARCHBOX : 'Try entering a station name, presenter, programme, or genre. For local results, enter your postcode.',
	RESULTS: 'Refine your results by entering a combination of words.',
	
	getTipbox: function(tipbox, searchparameter) {
		var text;
		tipbox == 'search' ? text = this.SEARCHBOX : text = this.RESULTS;
		
		return glow.lang.interpolate('<div id="{tipbox}-tipbox">'+
					'<div class="tipbox-container">'+
					'<div class="tipbox-inner">' +
						'<p><span class="bold">Tip: </span>'+ text +'</p>'+
						'<p class="close"><a href="#" id="{tipbox}-tipbox-preference" title="Don\'t show this again">Don\'t show this again</a></p>' +
					'</div>' +
					'</div>' +					
				'</div>', {
					searchparameter: searchparameter,
					tipbox: tipbox
				});		
	}
};

