/* js enchanced functionality for dbs */

// Mootools is MODx standard javascript framework and it is used by the very useful QuickEdit
// front end editing module. I've bumped jQuery into no conflict mode which disables the $ alias
// in favour of 'jQuery' (minus quotes), and modified this file.
jQuery.noConflict();

 jQuery(document).ready(function() {

    /* Menu animations*/
/*
	//on link hover
	jQuery("div#primary-nav a").not("a.selected").hover(function(e){
		
        // Stop current animations
        jQuery(this).stop();
        
        //fade the bg colour
		jQuery(this).css({"backgroundColor": "#FFFFFF"}).animate({"backgroundColor": "#EC008C"}, { queue: false, duration: 75 });
        
		//fade the font colour
		jQuery(this).css({"color": "#666666"}).animate({"color": "#FFFFFF"}, { queue: false, duration: 75 });
	    e.preventDefault();
    },function(e){
		
        // Stop current animations
        jQuery(this).stop();
        
		//fade the bg colour
		jQuery(this).animate({"backgroundColor": "#FFFFFF"}, { queue: false, duration: 75 });
        
		//fade the font colour
		jQuery(this).animate({"color": "#666666"}, { queue: false, duration: 75 });
	    e.preventDefault();
	});
    
    
	jQuery("#level-2-nav li a:not(.selected)").not(jQuery("#level-2-nav li li a")).hover(function(e){
		
        // Stop current animations
        jQuery(this).stop();
        
        //fade the bg colour
		jQuery(this).css({"backgroundColor": "#FFFFFF"}).animate({"backgroundColor": "#CC0066"}, { queue: false, duration: 50 });
        
		//fade the font colour
		jQuery(this).css({"color": "#4B2432"}).animate({"color": "#FFFFFF"}, { queue: false, duration: 50 });
        
        //Swap the background image
       // jQuery(this).css({"background-image": "url('../images/template/level-2-white-arrow-on-pink.gif')"})
        
	    e.preventDefault();
    },function(e){
		
        // Stop current animations
        jQuery(this).stop();
        
		//fade the bg colour
		jQuery(this).animate({"backgroundColor": "#FFFFFF"}, { queue: false, duration: 100 });
        
		//fade the font colour
		jQuery(this).animate({"color": "#4B2432"}, { queue: false, duration: 100 });
        
        //Swap the background image
       // jQuery(this).css({"background-image": "url('../images/template/level-2-purple-arrow.gif')"})
	    e.preventDefault();
	});
    
	jQuery("#level-2-nav li li a:not(.selected)").hover(function(e){
		
        // Stop current animations
        jQuery(this).stop();
        
        //fade the bg colour
		jQuery(this).css({"backgroundColor": "#FFFFFF"}).animate({"backgroundColor": "#4B2432"}, { queue: false, duration: 50 });
        
		//fade the font colour
		jQuery(this).css({"color": "#EC008C"}).animate({"color": "#FFFFFF"}, { queue: false, duration: 50 });
        
        
	    e.preventDefault();
    },function(e){
		
        // Stop current animations
        jQuery(this).stop();
        
		//fade the bg colour
		jQuery(this).animate({"backgroundColor": "#FFFFFF"}, { queue: false, duration: 100 });
        
		//fade the font colour
		jQuery(this).animate({"color": "#EC008C"}, { queue: false, duration: 100 });
        
	    e.preventDefault();
	});  
	    jQuery('.extended-step-list li').each(function() {
        alert(this.text);
        var paragraph = document.createElement('p');
        paragraph.text(this.text);
        var round = document.createElement('img');
        round.src= "assets/images/template/generic-extended-step-list-rounded-end.gif";
        paragraph.append(round);
        this.text("");
        this.append(paragraph);  
    });  
    */    
    /* Arrow right for links that wrap over lines - inserts an image */
    var round = document.createElement('img');
    round.src= "assets/images/template/generic-extended-step-list-rounded-end.gif";
    jQuery('.extended-step-list li').append(round);
    
    


	
 });

 
 
