if($(".slidetabs").length > 0){
	$(".slidetabs").tabs("#featured .slides > article", {

		// enable "cross-fading" effect
		effect: 'fade',
		fadeOutSpeed: 300,

		// start from the beginning after the last tab
		rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
		autoplay: true,
		clickable: false,
		interval: 7000
	});
}

//featured2 text peek

$("#featured2 article").click(function (){
	location.href = $(this).find('a').attr('href');
}).hover(function(){
	
	$('.thumb-container', this).stop( true, false ).animate({
		height: 57
	}, 300, 'swing');
	
}, function(){
	$('.thumb-container', this).stop( true, false ).animate({
		height: 117
	}, 300, 'swing');
}
);


//location switcher

$('#locations .current div').fadeIn(300);

$('#locations a').click(function() {
	$('#locations .current div').fadeOut(300);
	$('#locations li').removeClass();
	$(this).parent().addClass('current');
	$('#locations .current div').fadeIn(300);
	
	return false;
});

//sselect
if ( $('#mreza').length ){

	$('#mreza').sSelect({ddMaxHeight: '250px'});

	$('#mreza').change(function() {

		var destSelectVal = $(this).val();

		if(destSelectVal != 0) window.location = destSelectVal;

	});
}

//colorbox
	if ( $('#galleries').length || $('.product-table').length ){

		$('.thumb a, .product-table .colorBoxLink').colorbox({
				opacity: 0.4,
				maxWidth : '90%',
				maxHeight : '90%',		
			onComplete: function(){

				if($('#flowPlayer').length > 0){
					flowplayer('flowPlayer', 'http://toshiba.euroart93.net/includes/flowplayer-3.1.5.swf');
				}
			}
		});
	}
/*
	if ( $('#calc-button').length ){

		$('#calc-button').colorbox({
				opacity: 0.4,
				innerWidth : 300,
				innerHeight : 200,
				inline: true, 
				href: "#soon"
		});
	}
*/	
