$(document).ready(function(){
	
	Cufon.replace('h1');
	Cufon.replace('h2');
	Cufon.replace('h4');
	Cufon.replace('h5');
	Cufon.replace('caption');
	Cufon.replace('.tabs li a');

	//Tabs	
	var currentTab = 0; // Starting Tab
	
	//Software Links
	$("a.software").fancybox({
		'frameWidth': 	380,
		'frameHeight': 	560
	});
	$("a.iframe").fancybox({
		'frameWidth': 	380,
		'frameHeight': 	560
	});

	function openTab(clickedTab) {
		var thisTab = $(".wrapper_tabs .tabs a").index(clickedTab);
		$(".wrapper_tabs .tabs li a").removeClass("active");	
		$(".wrapper_tabs .tabs li a:eq("+thisTab+")").addClass("active");
		$(".wrapper_tabs .tabs_content").hide();
		$(".wrapper_tabs .tabs_content:eq("+thisTab+")").show();
		currentTab = thisTab;
	}
		
	$(".wrapper_tabs .tabs li a").click(function() { 
		openTab($(this)); return false; 
	});
	
	$(".wrapper_tabs .tabs li a:eq("+currentTab+")").click()
	
		//Price
		var select = '#select_price';
		$(select).attr('selectedIndex', '0');
		$(select).change(function () {
			$(select + ' option').each(function () {
				$('.' + this.value).hide();
			});
			$(select + ' option:selected').each(function () {
				$('.' + this.value).show();
			});
		}).change(); 
	
}); 