$(document).ready(function() {

$('.tabslider>div').hide();
var width=$('.inner-page').width()+'px';
$('.tabslider>div').css('width','98%');
	var linkTitle = window.location.href;
	var activetab=linkTitle.split('=')[1];
	if(activetab){
	$('.tabslider>div:eq('+activetab+')').show();
	}else{
		$('.tabslider>div:first-child').show();
	}
$('.tabs span').click(function(){
	var id=$(this).attr('id').split('-')[1];
	$('.tabslider>div').hide();
	$('.tabslider>div:eq('+id+')').css('margin-left', width);
	$('.tabslider>div:eq('+id+')').show();
	$('.tabslider>div:eq('+id+')').animate({ 
        marginLeft: "-="+width
    	}, 1000 );


});

	
	$('.video').hide();
	$('.hide').hide();
	$('.show').click(function(){
		var id =$(this).attr('id').split('_')[1];
		$('#show_'+id).hide();
		$('#hide_'+id).show();
		$('#video_'+id).show();
		var swf=$(this).attr('rel');
		$('#video_'+id).flash(
			{ src: swf,
			  width: 230,
			  height: 193 },
			{ version: 8 }
		);
	});
	$('.hide').click(function(){
		var id =$(this).attr('id').split('_')[1];
		$('#show_'+id).show();
		$('#hide_'+id).hide();
		$('#video_'+id).html('');
		$('#video_'+id).hide();
	});
	$(".tab_item").click(function() {
			$('.video').html('');
			$('.video').hide();
			$('.hide').hide();
			$('.show').show();
	});
});
