// global highslide configuration options
hs.graphicsDir = 'fileadmin/design/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.showCredits = false;
hs.anchor = 'right';
hs.wrapperClassName = 'draggable-header';


/**
* Set fixed positions
*/
/*hs.Expander.prototype.onBeforeExpand = function() {
	// get the current dimensions of the page
	hs.getPageSize();

	// set x and y positions relative to the scrolling margins
	this.x.pos = hs.page.scrollLeft + 15;
	this.y.pos = hs.page.scrollTop + 15;
}*/

/**
* Set margin top to 15, but not if there's a 100px banner in the top
*/
hs.Expander.prototype.onInit = function() {
	// get the current dimensions of the page
	hs.getPageSize();

	// set hs.marginTop dynamically
	hs.marginTop = 15; // ideal
	if (hs.page.scrollTop < 145) hs.marginTop = 160 - hs.page.scrollTop;
}

/******************************************
* Set navigation icons beside the "X"
******************************************/


hs.Expander.prototype.onAfterGetContent = function (sender) {   
   // get the controlbar
   var ul = sender.content.getElementsByTagName("ul")[0];

   // create a list item
   var li = document.createElement("li");
   ul.insertBefore(li, ul.childNodes[3]);

   // create an anchor
   var a = document.createElement("a");
   a.setAttribute('href','#');
   a.setAttribute('onclick','return hs.next()');
   a.setAttribute('title','Pfeiltasten auf der Tastatur');
   a.className = "highslideinfodown";
   
   // create a text node
   // var text = document.createTextNode("Custom");
   // a.appendChild(text);
   li.appendChild(a);
   
   
      // create an anchor
   var a = document.createElement("a");
   a.setAttribute('href','#');
   a.setAttribute('onclick','return hs.previous()');
   a.setAttribute('title','Pfeiltasten auf der Tastatur');   
   a.className = "highslideinfoup";
   
   // create a text node
   // var text = document.createTextNode("Custom");
   // a.appendChild(text);
   li.appendChild(a);
   
}
