All pastes #923310 Raw Edit

Someone

public text v1 · immutable
#923310 ·published 2008-02-29 13:22 UTC
rendered paste body
$(document).ready(function(){
	
	$('#meniu_ascuns_wrap').hide();
	
	// Slide ministry index - up or down
	$('#index_tab').toggle(function()
		{
			$('#meniu_ascuns_wrap:hidden').slideDown();
			$('#index_tab')[0].blur();
			$(this).addClass('on');
			return false;
		},
		function()
		{
			$('#meniu_ascuns_wrap:visible').slideUp();
			$('#index_tab')[0].blur();
			$(this).removeClass('on');
			return false;
		}
	);

	var prev_menu_open = function() {
		$('ul#produse>li>a').each(function(i) {
			var url = this.href;
			$(this).click ( function(e){
				e.preventDefault();		
				$("#flycontent").slideUp({
					duration: 1000,
					easing: 'easeInOutExpo', 
					complete: function() {
						var self = this;
						$(self).load(url, null, function() {
							$(self).slideDown(1000, 'easeOutQuint');
							prev_categ_open();
						});	
					}
				})
			})
		});	
	return false;		
	}
//prev_menu_open();

	var prev_categ_open = function() {
		$('ul#categ>li>a').each(function(i) {
			var url = this.href;
			$(this).click ( function(e){
				e.preventDefault();	
                console.log("prev_categ_open");				
				$("#flycontent").slideUp({
					duration: 1000,
					easing: 'easeInOutExpo', 
					complete: function() {
						var self = this;
						$(this).load(url, null, function() {
							$(this).slideDown(1000, 'easeOutQuint');
							prev_categ_open();
							 $('a[rel*=facebox]').facebox();
						});	
					}
				})
			})
		});							
	}
	prev_categ_open();
	
	$("#flycontent").addClass("initial");

var produse = $("#categ");
var despre_noi = $("#despre-noi");

	//jQuery.easing.def = "string";
	$(".ultra-meniu").hrzAccordion({
		handlePosition      : "left",
		openOnLoad          :  2,
		handleClass         : "handle",
		handleClassOver     : "handleOver",
		handleClassSelected : "handleSelected",	
		closeEaseAction : "easein",
		closeEaseSpeed : 500,
		openEaseAction : "easein",
		openEaseSpeed : 500,		
		//containerClass      : "hrzContainer3",
		//listItemClass       : "listItem3",					
		//contentStartClass   : "contentStart3",
		//contentEndClass     : "contentEnd3",
		//contentWrapper      : "contentWrapper3",
		//contentInnerWrapper : "contentInnerWrapper3",
		//customHandleClass   : "custom"
		callbacks: {
			0: function(){
				$("#flycontent").slideUp({
					duration: 1000,
					easing: 'easeInOutExpo', 
					complete: function() {	
					$("#content").empty();
					$("#content").append(produse);
					prev_categ_open();
					prev_menu_open();
					$(this).slideDown(1000, 'easeOutQuint');
					}
				})
			return false;		
			},
			1: function(){
				if(!$("#flycontent").is("initial")) {
					$("#flycontent").slideUp({
						duration: 1000,
						easing: 'easeInOutExpo', 
						complete: function() {
							$("#content").empty();
							$("#content").append(despre_noi);
							$(this).slideDown(1000, 'easeOutQuint');
							$("#flycontent").removeClass('initial');
							console.log("first despre-noi.html");	
						}
					})
				}
				else {
						$("#content").empty();
						$("#content").append(despre_noi);
						$("#flycontent").removeClass('initial');
				}
			return false;			
			}
		}
	});
	
	jQuery.easing.def = 'easeOutBounce';

var certificate = $("#certificate");
var contact = $("#contact");
	
	$("#certificate-tab").click(function(e){
		e.preventDefault();
		$("#flycontent").slideUp({
			duration: 1000, 
			easing: 'easeInOutExpo', 
			complete: function() {
				$("#content").empty();
				$("#content").append(certificate);
				$(this).slideDown(1000, 'easeOutQuint');
			}
		})
	return false;		
	});
	
	$("#contact-tab").click(function(e){
		$("#flycontent").slideUp({
			duration: 1000, 
			easing: 'easeInOutExpo', 
			complete: function() {
				$("#content").empty();
				$("#content").append(contact);
				$(this).slideDown(1000, 'easeOutQuint');
			}
		})
		return false;
	});
	
});