
jQuery('.portfolio_item_overlay').hover(function(){
	jQuery(this).children('a').stop().animate({ top: 70 }, 500, 'easeOutBack');
}, function(){
	jQuery(this).children('a').stop().animate({ top: 180 }, 500);
});

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	}
});

jQuery(document).bind('cbox_open', function(){
		jQuery('.flash').each( function() {
			jQuery(this).height(jQuery(this).height());
		});
        jQuery('.flash').children().hide();
});

jQuery(document).bind('cbox_closed', function(){
        jQuery('.flash').children().show();
});

/*
jQuery('.show_button').click(function() {
	var id = jQuery(this).attr('id');
	var list = id.split('_');
	var offset = -1 * 1020 * (list[2]-1);
	jQuery('#show_content').stop().animate({ marginLeft: offset }, 1000);
});*/

var show_counter_1 = 0;
var show_counter_2 = 0;

jQuery('#show_slider').nivoSlider({
	animSpeed:500, // Slide transition speed
	pauseTime:4000, // How long each slide will show
	directionNav:false, // Next & Prev navigation
	controlNav:false, // 1,2,3... navigation
	captionOpacity:0.8, // Universal caption opacity
	beforeChange: function(){
		if(show_counter_1 < 2) {
			show_counter_1++;
			jQuery('#show_marker').stop().animate({ left: show_counter_1*320-20 }, 1000);
		}else {
			show_counter_1 = 0;
			jQuery('#show_marker').stop().animate({ left: show_counter_1*320-20 }, 1000);
		}
	}, // Triggers before a slide transition
	afterChange: function(){}, // Triggers after a slide transition
	slideshowEnd: function(){}, // Triggers after all slides have been shown
	lastSlide: function(){}, // Triggers when last slide is shown
	afterLoad: function(){
		jQuery('#show_marker').show();
	} // Triggers when slider has loaded
});
/*
jQuery('.ln_item').mouseenter(function() {
	jQuery('#ln_preview').empty();
	jQuery('.ln_item').removeClass('active');
	jQuery(this).addClass('active').children('.ln_image').clone().appendTo('#ln_preview').show();
});

jQuery('.ln_item:first-child').mouseenter();*/



