// Font functions
Cufon.replace('#navigation a', {
	fontFamily: 'Sansation',
	fontWeight: '400'
});

Cufon.replace('#content h1, .inner h1, .inner_bg h1, .inner_bgmarginal h1', {
	fontFamily: 'Sansation',
	fontWeight: '400'
});

Cufon.replace('#content_965 .content h2, #content_965 .content h2.first, h4.headline_comments', {
	fontFamily: 'Sansation',
	fontWeight: '400'
});

Cufon.replace('h3.headline_comments', {
	fontFamily: 'Sansation',
	fontWeight: '400'
});

Cufon.replace('.accordionDescHeader', {
	fontFamily: 'Sansation',
	fontWeight: '400'
});

// Contentscroll functions
$(function() {
	$('#content_scroll_about').jScrollPane({
		topCapHeight: 67,
		bottomCapHeight: 97,
		scrollbarMargin: 30, 
		dragMinHeight: 10,
		dragMaxHeight: 10
	});
});

$(function() {
	$('#content_scroll_newslist').jScrollPane({
		topCapHeight: 10,
		bottomCapHeight: 17,
		scrollbarMargin: 30, 
		dragMinHeight: 10,
		dragMaxHeight: 10
	});
});

$(function() {
	$('#content_scroll_single, #content_scroll_category').jScrollPane({
		topCapHeight: 97,
		bottomCapHeight: 97,
		scrollbarMargin: 30, 
		dragMinHeight: 10,
		dragMaxHeight: 10
	});
});

// Gallery functions
function viewThumbBig(obj, src_full, src_medium, width, height) {
	// Remove active class
	$(".thumbs ul li").children(".active").attr("style", "");
	$(".thumbs ul li").children(".active").removeClass('active').addClass('inactive');
	
	// Add active class
	$(obj).removeClass('inactive').addClass('active');
	
	// Change big image
	$('#gallery_left a').attr("href", src_full);
	$('#gallery_left img').attr("src", src_medium);
	$('#gallery_left img').attr("width", width);
	$('#gallery_left img').attr("height", height);
	$('#gallery_left img').attr("style", "display:none;");
	$('#gallery_left img').fadeIn("0.3");
}

$(document).ready(function() {
	$("#footer_home .right img, #footer .right img").hover(
	function() {
		$(this).stop().animate({"opacity": "1"}, "0.1");
	},
	function() {
		$(this).stop().animate({"opacity": "0.4"}, "0.1");
	});
	
	$(".thumbs ul li img").hover(
	function() {
		if (this.className == 'inactive' || this.className == 'first inactive') {
			$(this).stop().animate({"opacity": "1"}, "0.1");
		}
	},
	function() {
		if (this.className == 'inactive' || this.className == 'first inactive') {
			$(this).stop().animate({"opacity": "0.4"}, "0.1");
		}
	});
	
	$('#gallery_left a').lightBox({
		overlayBgColor: '#000000',
		overlayOpacity: 0.6,
		imageLoading: 'http://www.tisix-art.com/portfolio/wp-content/themes/tisixart/images/lightbox/loading.gif',
		imageBtnClose: 'http://www.tisix-art.com/portfolio/wp-content/themes/tisixart/images/lightbox/close.gif',
		imageBtnPrev: 'http://www.tisix-art.com/portfolio/wp-content/themes/tisixart/images/lightbox/prev.gif',
		imageBtnNext: 'http://www.tisix-art.com/portfolio/wp-content/themes/tisixart/images/lightbox/next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Image',
		txtOf: 'de'
	});
});

// Slider functions
var g_themePathWP = "http://www.tisix-art.com/portfolio/wp-content/themes/tisixart";
var g_pathWP = "http://www.tisix-art.com/portfolio";
var g_playBtnDesc = "Turn off/on slider";
var g_nextBtnDesc = "Next slide";
var g_prevBtnDesc = "Previous slide";
var g_showControlPanel = true;
var g_sliderAutoPlay = true;
var g_sliderTimerInterval = 4500;
var g_sliderTimerIntervalLoop = 9000; 
