/*
 *	Dn_Main.V21.04.js (14Nov11)
 *	www.Bonsors.com
 *	Damen Ltd.
 *	All rights acknowledged &/or reserved 
*/

/* 3RD PARTY  = = = = = = = = = = =	*/
/* jCarousel by Sorgalla  - - - - -	*/
	/* see 'jcarousel' .js file for full info incl credits & license */
/* General Use */

function mycarousel_initCallback(carousel) {
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
		auto: 1,
        wrap: 'circular',
		scroll: 1,
		animation: 'slow',
        initCallback: mycarousel_initCallback
    });
});

/* Accordion by jQuery  - - - - - -	*/	
	/* see 'jquery-ui' .js file for full info incl credits & license */
/* General Use */

$(function(){

	$("#Dn_Accordion-AutoHeight").accordion({ header: "h2" });

	$("#Dn_Accordion-FixedHeight").accordion({ header: "h2", fillSpace: true });

	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
	);

	// Activate a specific section
	$("#Dn_Accordion-Section1").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 0 );
          return false;
    });
	$("#Dn_Accordion-Section2").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 1 );
          return false;
    });
	$("#Dn_Accordion-Section3").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 2 );
          return false;
    });
	$("#Dn_Accordion-Section4").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 3 );
          return false;
    });
	$("#Dn_Accordion-Section5").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 4 );
          return false;
    });
	$("#Dn_Accordion-Section6").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 5 );
          return false;
    });
	$("#Dn_Accordion-Section7").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 6 );
          return false;
    });
	$("#Dn_Accordion-Section8").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 7 );
          return false;
    });
	$("#Dn_Accordion-Section9").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 8 );
          return false;
    });
	$("#Dn_Accordion-Section10").click(function(){
          $( "#Dn_Accordion-AutoHeight, #Dn_Accordion-FixedHeight" ).accordion( "activate", 9 );
          return false;
    });
});

/* OTHER  = = = = = = = = = = = = =	*/
/* Layer Swapping - - - - - - - - -	*/
/* General Use */

function Dn_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=Dn_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function Dn_showHideLayers() { //v6.0
  var i,p,v,obj,args=Dn_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=Dn_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

/* End of File */

