/*
 * Campaign-specific stuff can be included here
 *
 */



// To allow cross-frame or cross-browser scripting 
//document.domain = 'movember.dm';




// Setup the search box background to disappear when focussed or containing a search term...
$(document).ready(function(){
    $( '#hd_search-input' ).focus( function() { $( this ).addClass( 'focus' ) } );
    $( '#hd_search-input' ).blur( function() {
        var value = $( this ).val();
        //alert( 'value is:' + value + '::' );
        if( value == '' )
            $( this ).removeClass( 'focus' );
    });
});


/* load samurai text via ajax */
function samurai_loadText(id,placeholder_id)
{
	$.getJSON('/campaign/samurai/load-text/id/' + id,
		function(jsonObj){
			if( jsonObj )
			{
				$('#'+placeholder_id).html(jsonObj.text);

				if ( $('#samurai_cms_menu').length > 0 )
				{
					$( "span.samurai_editable" ).mouseenter( function() {
						samurai_displayNinja( this );
					});
					samurai_cms_update_ninjas();
				}
			}
		}
	);
}