jQuery(function($) {
		var open = false;
		jQuery('#footerSlideButton').click(function () {
			if(open === false) {
				jQuery('#footerSlideContent').animate({ height: '250px' });
				jQuery(this).css('backgroundPosition', 'bottom left');
				open = true;
			} else {
				jQuery('#footerSlideContent').animate({ height: '0px' });
				jQuery(this).css('backgroundPosition', 'top left');
				open = false;
			}
		});		
	});
	




/* container sliding start */
jQuery(function() {
         jQuery('ul.menu a').bind('click',function(event){
         var $anchor = jQuery(this);
                    
         jQuery('html, body').stop().animate({
             scrollTop: jQuery($anchor.attr('href')).offset().top
          }, 1500,'easeInOutExpo');
                   /* 
                    if you don't want to use the easing effects: 
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1000);
                    */
          event.preventDefault();
      });
});
/* container sliding end */

/* start for slider */
jQuery(function(){

	/* for hover effekt on images */
	jQuery('.lightbox-image').prepend('<span></span>').hover(function(){jQuery(this).find('img').stop().animate({opacity:.5})},function(){jQuery(this).find('img').stop().animate({opacity:1})})
	
	/* for list */ 
	jQuery('.list-1 li a').prepend('<span><span></span></span>')

	/* for slider */
	jQuery('#slides').slides({
		effect: 'fade',
		fadeSpeed:1000,
		preload: true,
		play: 6000,
		pause: 6000,
		generateNextPrev: true,
		generatePagination: false,
		crossfade: true,
		hoverPause: true,
		animationStart: function(current){
			jQuery('.caption').animate({opacity:0}).css({display:'none'});
				if (window.console && console.log) {
					console.log('animationStart on slide: ', current);
				};
			},
			animationComplete: function(current){
				jQuery('.caption').animate({opacity:1}).css({display:'block'});
					if (window.console && console.log) {
						console.log('animationComplete on slide: ', current);
					};
				},
			slidesLoaded: function() {
				jQuery('.caption').animate({opacity:1}).css({display:'block'});
		}
	});
	
	
	
	/* for portfolio */
	
	jQuery("#portfolio-filter a").bind("mouseenter",function(){	   
	   name = jQuery(this).data("name");	   
	   jQuery('#portfolio-content ul.portfolio-circles').find('.'+name).stop().animate({backgroundPosition: '-170px 0px'},300);
	   
	}).bind("mouseleave",function(){	   
	   name = jQuery(this).data("name");
	    jQuery('#portfolio-content ul.portfolio-circles').find('.'+name).stop().animate({backgroundPosition: '0px 0px'},300);
	
	});
	
	jQuery('#portfolio-content ul.portfolio-circles li').bind("mouseenter",function(){
		jQuery(this).find('.circle-p').stop().animate({backgroundPosition: '-170px 0px'},300);
	
	}).bind("mouseleave",function(){
		jQuery(this).find('.circle-p').stop().animate({backgroundPosition: '0px 0px'},300);
	
	});	
});	

/* start function for big circles under the slider */
jQuery(function() {
	jQuery('#sti-menu').iconmenu({
		animMouseenter	: {
			'mText' : {speed : 400, easing : 'easeOutBack', delay : 200, dir : -1},
			'sText' : {speed : 400, easing : 'easeOutBack', delay : 400, dir : -1},
			'icon'  : {speed : 400, easing : 'easeOutBack', delay : 0, dir : -1}
		},
		animMouseleave	: {
			'mText' : {speed : 200, easing : 'easeInExpo', delay : 150, dir : 1},
			'sText' : {speed : 200, easing : 'easeInExpo', delay : 300, dir : 1},
			'icon'  : {speed : 200, easing : 'easeInExpo', delay : 0, dir : 1}
		}
	});
});
/* end function for big circles under the slider */

jQuery(function() {
	/* if is small window, then the container is NOT going under the menu and logo */
	jQuery(window).scroll(function(){
		//box one
		var $win = jQuery(window);
		jQuery('#left-sidebar').css('left', 0 -$win.scrollLeft());
	});
	
	
	
	jQuery(document).ready(function(){
		jQuery("a#example1").fancybox();				
		jQuery("#contactform").validate(); /* contact form validate */
	}); 


	/* start scripts for menu when user scrolls then will menu changing color on current section */
	jQuery(document).ready(function() {
	  jQuery('#main-menu').onePageNav({
		begin: function() {
		  console.log('start')
	    },
	    end: function() {
		  console.log('stop')
	    }
	  });
	});
	

	
	
	jQuery(document).ready(function() {
	  jQuery('#main-menu2').onePageNav({
	    begin: function() {
		  console.log('start')
	    },
	    end: function() {
		  console.log('stop')
	    }
	  });
	});	
	/* end scripts for menu when user scrolls then will menu changing color on current section */
});

/* start stuff for portfolio - ajax showing portfolio items with some FADE */
function refreshContent(a) {
	jQuery("#neke").fadeOut("slow", function(){
		jQuery("#contentt").load(a,false, function() {
			jQuery("#contentt").fadeIn("slow");
	    });
	})
	return false;
}
	
function back() {
 	jQuery("#contentt").fadeOut("slow");
 	jQuery("#neke").fadeIn("slow");
	return false;
}		
/*		
function showPortfolioItem(a) {
  	$("#vsi").fadeOut("slow", function(){
		$("#eden").load(a,false, function() {
			$("#eden").fadeIn("slow");
    	});
  	})
	return false;
}
*/

function showPortfolioItem(a, b) {
  	jQuery("#vsi").fadeOut("slow", function(){

		jQuery("#eden").load(a,false, function() {
			jQuery("#eden").fadeIn("slow");
    	});
		
		jQuery('html, body').stop().animate({
	
             scrollTop: jQuery('#'+b).offset().top
          }, 1500,'easeInOutExpo', function(){ 
		  
		  jQuery("#eden").load(a,false, function() {
				jQuery("#eden").fadeIn("slow");	
			});
		});
		
  	})
	return false;
}

function backToPorfolios() {
  	jQuery("#eden").fadeOut("slow");
   	jQuery('#vsi').delay(1000).fadeIn("slow");
	return false;
}
/* end stuff for portfolio - ajax showing portfolio items with some FADE */

