
var $j = jQuery.noConflict();  
$j(document).ready(function(){
	  var oWidth = 90;
	  var oHeight = 90;
	  var mpx = (oWidth/oHeight);

	  var img = $j('.relatedList .singleImageBox img');
	  if (img) {
		$j('.relatedList .singleImageBox img').addClass('image-onbot');
			 
		$j('.relatedList .singleImageBox img').hover(function(){
				$j(this).addClass("image-ontop");
			$j(this).stop().animate({					
						width: (oWidth * 2) +'px',
						height: (oHeight * 2) +'px'
						
					},1000);
			},
			//this is just like a mouseOut effect to take the img back to the original size
			function(){
				$j(this)
					//stops the event from happening in case of an abrupt mouseOut
					.stop()
					.animate({
						width: oWidth +'px',
						height: oHeight +'px'
					},1000,'',function(){$j(this).removeClass("image-ontop");$j('.relatedList .singleImageBox img').addClass('image-onbot');});
				 
			});
		}
	});
	
	
$j(document).ready(function(){
    var clickedEl
    menuDown = function(v){
     $j("#div"+v).slideDown("slow");
     $j("#sp"+v).show();
    }
    menuUp = function(v){
     $j("#div"+v).slideUp("slow");
     $j("#sp"+v).hide();
    }
    
	var h2 = $j('.relatedList h2');
	if (h2) {
		$j('.relatedList h2').click(function(ev){
			var el = $j(ev.target).parent().children(".hidden");
			var els= $j('.hidden'); /*get a reference to all products*/
		
			/*make all the open products closed*/
			for (i=0;i<els.length;i++){
				 if (els[i].id != el.attr('id') && $j("#"+ els[i].id).css("display")=="block") {
					$j("#"+ els[i].id).slideToggle("slow");
					$j("#"+ els[i].id).parent().css({'background':'url(fileadmin/template/img/arrow_1.gif) no-repeat 0 8px'});
				  }
			}
			/*slide the selected product open*/
			el.slideToggle("slow", function(){
				 if (el.css("display") == "block"){
					el.parent().css({'background':'url(fileadmin/template/img/arrow_1_down.gif) no-repeat 0 8px'})
				} else {
					el.parent().css({'background':'url(fileadmin/template/img/arrow_1.gif) no-repeat 0 8px'})
				}
			});
		});
	}
	

	/* language menue */
	$j("div#languagemenu li.langcurent span").html($j("div#languagemenu li.langactive").html() + "&#124;");
	$j("div#languagemenu li").mouseover(
		function () {
			$j(this).parent().find("ul.languages").css("display", "block");
		}
	).mouseout(
		function(){
			$j(this).parent().find("ul.languages").css("display", "none");
    	}
	);
	
	
});

