/* * * * * * * * * * * * * * * * * *
 * PepinNini                       *
 * misc. javascript                *
 * Greg Smith                      *
 * http://lightbulbdigital.com.au  *
 * * * * * * * * * * * * * * * * * */

var tabsHidden;

function handleResize() {
	// static tabs horizontal
	if (jQuery(window).width() < 1175) { // if window is too small
		jQuery('#static_tabs').css('right', '-70px'); // hide tabs
		tabsHidden = true;
	}
	else {
		jQuery('#static_tabs').css('right', '0'); // show tabs
		tabsHidden = false;
	}
	
	// static tabs vertical
	var margin = (jQuery(window).height() - 150) / 2;
	jQuery('#static_tabs').css('top', margin + 'px');
}


jQuery(window).resize(function() {
	handleResize();
});

jQuery(document).ready(function() {
	handleResize();

	jQuery('#static_tabs').hover(function() {
		if (tabsHidden) {
			jQuery(this).animate({right: '0px'}, 200);
		}
	}, function() {
		if (tabsHidden) {
			jQuery(this).animate({right: '-70px'}, 200);
		}
	});
});

