$(document).ready(function() {
      $('#ajaxform').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#eredmeny',
        type: 'post',  
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        success: function() { 
          // $('#eredmeny').fadeIn('slow'); 
          jQuery.fn.modalBox({ 
            directCall: { 
                element : '#eredmeny'
              }
            });
              
            }
          });
          
      $().piroBox({
            			my_speed: 400, //animation speed
            			bg_alpha: 0.3, //background opacity
            			slideShow : true, // true == slideshow on, false == slideshow off
            			slideSpeed : 4, //slideshow duration in seconds(3 to 6 Recommended)
            			close_all : '.piro_close,.piro_overlay'// add class .piro_overlay(with comma)if you want overlay click close piroBox
            
            	});
   /*
      $('a.tooltip').cluetip({width: '300', showTitle: true, local:true, arrows: true, cursor: 'pointer'});

      $("#datepicker").datepicker();
	    
	    $("#accordion").accordion({ 
          header: "h3" 
        });
   */      
      $('a[rel*=facebox]').facebox({
                    loading_image : 'loading.gif',
                    close_image   : 'closelabel.gif'
                  }) 
      
      $('.info').corner({
                tl: { radius: 10 },
                tr: { radius: 10 },
                bl: { radius: 10 },
                br: { radius: 10 },
                antiAlias: true,
                autoPad: true,
                validTags: ["div"]
        });
      
       $('.velemeny').corner({
                tl: { radius: 10 },
                tr: { radius: 10 },
                bl: { radius: 10 },
                br: { radius: 10 },
                antiAlias: true,
                autoPad: true,
                validTags: ["div"]
        });
       
       $('.kapcsolat').corner({
                tl: { radius: 10 },
                tr: { radius: 10 },
                bl: { radius: 10 },
                br: { radius: 10 },
                antiAlias: true,
                autoPad: true,
                validTags: ["div"]
        });
        
      $(".fade_img").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 30% when the page loads
						   $(".fade_img").hover(function(){
						   $(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
						   },function(){
						   $(this).fadeTo("slow", 0.6); // This should set the opacity back to 30% on mouseout 
						   });
			
			
			function mycarousel_initCallback(carousel)
        {
            // Disable autoscrolling if the user clicks the prev or next button.
            carousel.buttonNext.bind('click', function() {
                carousel.startAuto(0);
            });
        
            carousel.buttonPrev.bind('click', function() {
                carousel.startAuto(0);
            });
        
            // Pause autoscrolling if the user moves with the cursor over the clip.
            carousel.clip.hover(function() {
                carousel.stopAuto();
            }, function() {
                carousel.startAuto();
            });
        };


        $('#mycarousel').jcarousel({
            auto: 2,
            wrap: 'last',
            initCallback: mycarousel_initCallback
        });


			
   /*     
      //TAB
      $(".tab_content").hide(); //Hide all content
    	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
    	$(".tab_content:first").show(); //Show first tab content
    
    	//On Click Event
    	$("ul.tabs li").click(function() {
    
    	$("ul.tabs li").removeClass("active"); //Remove any "active" class
    	$(this).addClass("active"); //Add "active" class to selected tab
    	$(".tab_content").hide(); //Hide all tab content
    
    		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    		$(activeTab).fadeIn(); //Fade in the active ID content
    		return false;
      });
   

      $("#content-transparent").fadeTo("slow", 0.8); // This sets the opacity of the thumbs to fade down to 30% when the page loads
			
      $('#logo').frameAnimation({hoverMode:true, repeat:-1});
      
      $('#referenciak').galleryView({
    			panel_width: 720,
    			panel_height: 380,
    			frame_width: 100,
    			frame_height: 100
		  });
   
       
      //EXTRUDER
      $("#extruderLeft1").buildMbExtruder({
        position:"left",
        width:300,
        extruderOpacity:.6,
        hidePanelsOnClose:true,
        accordionPanels:true,
        onExtOpen:function(){},
        onExtContentLoad:function(){},
        onExtClose:function(){}
      });


      
      $("#extruderLeft2").buildMbExtruder({
        position:"left",
        width:300,
        extruderOpacity:.6,
        onExtOpen:function(){},
        onExtContentLoad:function(){},
        onExtClose:function(){}
      });
	*/	           
});
