$(document).ready(function(){
		
	Cufon.replace('h1');
	Cufon.replace('h2');
	Cufon.replace('h4');
	Cufon.replace('h5');
	Cufon.replace('caption');
	Cufon.replace('.tabs li a');
	
	//Software Links
	$("a.software").fancybox({
		'frameWidth': 	380,
		'frameHeight': 	560
	});

	//Video Links
	$("a.video").fancybox({
		'frameWidth': 	670,
		'frameHeight': 	510
	});

	//flashmenu	
	var currentLink = 0; // Starting Link

	function openLink(clickedLink) {
		var thisLink = $("#howto_nav_list a").index(clickedLink);
		$("#howto_nav_list a").removeClass("active");	
		$("#howto_nav_list a:eq("+thisLink+")").addClass("active");
		currentLink = thisLink;
	}
	
	$("#howto_nav_list a").click(function() { 
		openLink($(this)); 
		
		var $this = $(this);
		var x = $this.attr("id");
		
		$('[id^=movie_]').not('#movie_' +x).hide();
			$('#movie_' +x).show();
		
		return false; 
	});
	
	$("#howto_nav_list a:eq("+currentLink+")").click()
	
	//Tabs	
	var currentTab = 0; // Starting Tab

	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(); 
}); 
