ddaccordion.init({
	headerclass: "submenuheader",
	contentclass: "submenu",
	revealtype: "click",
	mouseoverdelay: 200, 
	collapseprev: true, 
	defaultexpanded: [],
	onemustopen: false,
	animatedefault: false,
	persiststate: true,
	toggleclass: ["", ""],
	togglehtml: ["prefix", "<img src='imagesv1/plus.gif '   class='statusicon' />", "<img src='imagesv1/minus.gif  ' class='statusicon' />"], 
	animatespeed: "fast", 
	oninit:function(headers, expandedindices){ 
	},
	onopenclose:function(header, index, state, isuseractivated){ 
	}
})


var clip = null;
function init() {
// setup single ZeroClipboard object for all our elements
clip = new ZeroClipboard.Client();
clip.setHandCursor( true );
var x;var y;var mouseY=null;

$().mouseover(function(e){x=e.pageX;y=e.pageY;if(y>=(mouseY+40)||y<=(mouseY-40)){$("#codepop").fadeOut(200);};});
var codepopText='Click to copy code';
$('#pagestart').after('<div id="codepop">'+codepopText+'</div>');

// assign a common mouseover function for all elements using jQuery
$('a.ggscode').mouseover( function() {
mouseY=y;
// set the clip text to our innerhtml
clip.setText( this.innerHTML );
// Store the href in a variable inside the object
clip.this_href = this.href; 

if(clip.div){clip.receiveEvent('mouseout',null);clip.reposition(this);}
else clip.glue(this);
clip.receiveEvent('mouseover',null);

} );

// Add an event handler which pops a tip
clip.addEventListener('onMouseOver',my_mouse_over_handler);
function my_mouse_over_handler(client){$("#codepop").css({"left":x+0+"px","top":y+20+"px"}).fadeIn(200);}
clip.addEventListener('onMouseOut',my_mouse_out_handler);
function my_mouse_out_handler(client){$("#codepop").fadeOut(200);clip.hide();}


// Add an event handler which opens a new window after text is copied
clip.addEventListener('complete', function(client, text) {
params='top=0'+',left='+screen.width/2+',height='+screen.height/2+',width='+screen.width/2+',status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes';win2=window.open(clip.this_href,'ggs',params);win2.blur();window.focus();return false;
} ); 

}
