/**
 * @projectname     Muzeul National Al Carpatiolor Rasariteni
 * @version         1.0 2010.06.18
 * @copyright       Copyright (C) 2008 - 2010 All rights reserved.
 * @license         Comertial
 * @author          Székely Csaba / csaba@szekely.ro / http://www.csaba.szekely.ro
 * 
 * @desc            Product accordion menu script / inspired by : Ryan Stemkoski's accordion_menu
 */

 jQuery(document).ready(function() { 
 F8b55a7d8(); 
 F75e963df();

}); 
 function F75e963df(){  
 var V5e3732f3 = jQuery(".men_menu_items_container>ul") ;
var V4340fd73 = V5e3732f3.find("ul").parent();
var V42da6c96 = jQuery('#document_root').val(); 
 var V5574e958 = jQuery('#default_template').val(); 
 V4340fd73.hover(
 function(e){
 jQuery(this).children('a:eq(0)').addClass('selected')
 },
 function(e){
 jQuery(this).children('a:eq(0)').removeClass('selected')
 }
)  
 V4340fd73.each(function(i){ 
 var V199ef3ab = jQuery(this).css({zIndex: 100-i}); 
 var V8f1f2d2e = jQuery(this).find('ul:eq(0)').css({display:'block'});

 V8f1f2d2e.data('timers', {}) 
 this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:V8f1f2d2e.outerWidth(), subulh:V8f1f2d2e.outerHeight()}; 
 this.istopheader=V199ef3ab.parents("ul").length==1? true : false ; 
 V8f1f2d2e.css({top:this.istopheader ? this._dimensions.h+"px" : 0}); 
 V199ef3ab.children("a:eq(0)").append('<img src="'+ V42da6c96 + '/templates/'+ V5574e958 +'/img/arrow_meniu_blue.png" '+'" class="'+ (this.istopheader ? 'main_down_menu_arrow' : 'sub_down_menu_arrow') +'" />');

 V199ef3ab.hover(
 function(e){ 
 var Vcf90f11a = V8f1f2d2e; 
 var V099fb995 = V199ef3ab.get(0) 
 $(this).children("a:eq(0)").children('img').attr('src', V42da6c96 + '/templates/'+ V5574e958 +'/img/arrow_meniu_alb.png' ); 
 clearTimeout(Vcf90f11a.data('timers').hidetimer) 
 Vcf90f11a.data('timers').showtimer=setTimeout(function(){ 
 V099fb995._offsets = {left:V199ef3ab.offset().left, top:V199ef3ab.offset().top};
var menuleft = V099fb995.istopheader ? 0 : V099fb995._dimensions.w; 
 menuleft=(V099fb995._offsets.left+menuleft+V099fb995._dimensions.subulw>$(window).width()) ? (V099fb995.istopheader ? -V099fb995._dimensions.subulw+V099fb995._dimensions.w : -V099fb995._dimensions.w) : menuleft 
 if (Vcf90f11a.queue().length<=1){  
 Vcf90f11a.css({left:menuleft+"px"}).animate({Vb435e227:'show',opacity:'show'}, 200) 
 } 
 }) 
 }, 
 function(e){ 
 var Vcf90f11a = V8f1f2d2e; 
 var V099fb995 = V199ef3ab.get(0)
 $(this).children("a:eq(0)").children('img').attr('src', V42da6c96 + '/templates/'+ V5574e958 +'/img/arrow_meniu_blue.png' );
clearTimeout(Vcf90f11a.data('timers').showtimer)
 Vcf90f11a.data('timers').hidetimer=setTimeout(function(){
 Vcf90f11a.animate({Vb435e227:'hide', opacity:'hide'}, 200)
 })
 }
) 
 }) 
 V5e3732f3.find("ul").css({display:'none', visibility:'visible'})
} 
 function F8b55a7d8(){ 
 var V06f46652 = 'empty'; 
 jQuery('.accordionButton').click(function() { 
 jQuery('.accordionButton').removeClass('on'); 
 jQuery('.accordionContent').slideUp('normal'); 
 jQuery('.accordion_expand_btn').html('+'); 
 if(jQuery(this).next().is(':hidden') == true) { 
 jQuery(this).addClass('on'); 
 jQuery(this).next().slideDown('normal'); 
 jQuery('.accordion_expand_btn', this).html('-');
} 
 }); 
 jQuery('.accordion_expand_all_btn').click(function() { 
 jQuery('.accordionContent').show();
}); 
 jQuery('.accordionButton').mouseover(function() {
 jQuery(this).addClass('over'); 
 }).mouseout(function() {
 jQuery(this).removeClass('over'); 
 }); 
 jQuery('.accordionContent').hide(); 
 jQuery('.accordion_expand_btn').html('+'); 
 jQuery("#open").trigger('click');
jQuery("#open").find('.accordion_expand_btn').html('-');
} 
