// strParentRule - css rule to find parent elements // strHoverClass - if not empty add this class on mouseover to parent element// strChildRule - css rule to find child element inside parent and apply its href (or href of first found <a> inside child )// dontHide - whether do hide child element// UseLightBox - apply UseLightBox.start instead of window.location changefunction JGNT_LinkBoxes( strParentRule, strHoverClass, strChildRule, dontHide, UseLightBox ) {	var ParentElementArray = $$(strParentRule);	for (var k=0; k<ParentElementArray.length; k++){		if( strHoverClass ){			ParentElementArray[k].observe( 'mouseover', function( event ){ 				this.addClassName( strHoverClass ); } )			ParentElementArray[k].observe( 'mouseout', function( event ){ 				this.removeClassName( strHoverClass ); } )		}				if( strChildRule ){			var targetElement = ParentElementArray[k].select(strChildRule)[0];			if( targetElement ){				var strHref = "";				if( targetElement.readAttribute( "href" ) ){					strHref = targetElement.readAttribute( "href" );					ChildHref = targetElement;				} else {					ChildHref = targetElement.select('[href!=""]')[0];					if( ChildHref )						strHref = ChildHref.readAttribute( "href" );				}								if( strHref != "" ){					if( UseLightBox ){						ParentElementArray[k].observe( 'click', ( function( event ){ Shadowbox.open(this); Event.stop(event); } ).bind( ChildHref ) );						ParentElementArray[k].observe( 'keypress', ( function( event ){ Shadowbox.open(this); Event.stop(event); } ).bind( ChildHref ) );					} else if( strHref.startsWith('javascript:') ) {						ParentElementArray[k].observe( 'click', ( function( event ){ strHref } ).bind( ChildHref ) );						ParentElementArray[k].observe( 'keypress', ( function( event ){ strHref } ).bind( ChildHref ) );					} else {						ParentElementArray[k].observe( 'click', ( function( event ){ window.location = this.href; } ).bind( ChildHref ) );						ParentElementArray[k].observe( 'keypress', ( function( event ){ window.location = this.href; } ).bind( ChildHref ) );					}				}				if( ! dontHide )					targetElement.hide();			}		}	}}function JGNT_AddHover( strCssRule, strClassName ){	var ElementArray = $$( strCssRule );	for (var k=0; k<ElementArray.length; k++){		ElementArray[k].observe( 'mouseover', function( event ){ 			this.addClassName( strClassName ); } )		ElementArray[k].observe( 'mouseout', function( event ){ 			this.removeClassName( strClassName ); } )	};}function JGNT_ShowText( nText ){	$$("div[id^='jgnt_text_']").each(function(obj, ind ) {  		if(obj.visible() && ind != nText )  			obj.fade({ duration: 0.2, queue: 'end' });	});	$("jgnt_text_"+nText).appear({ duration: 0.2, queue: 'end' });}function JGNT_GetProcessing( nHeight ){	if( ! nHeight )		nHeight = 32;	nMargin = Math.floor( nHeight / 2 ) - 16;	return "<div style=\"width: 32px; margin: " + nMargin + "px auto 0 auto;\"><img src=\"/images/jgnt/loading.gif\" alt=\"loading...\" width=\"32\" height=\"32\"/></div>";}var curvyCornersNoAutoScan = true;document.observe( 'dom:loaded', function () { /*	if( curvyCorners.init )		curvyCorners.init();*/	JGNT_LinkBoxes( "div.jgnt_pic_upper", "hover", "a", false, Shadowbox );			//	JGNT_LinkBoxes( ".jgnt_gallery_foto, .jgnt_gallery_foto_right", "jgnt_gallery_foto_hover", "a", false, myLightBox );} );