// JavaScript Document

Cufon.replace('h1');

Cufon.now();


//jquery
$(document).ready(function(){ 
						 

////////////////////////////////////////////
	$(function(){$(document).pngFix();});					   
						   
////////////////////////////////////////////						   
						   
	$("#SliderInner").slider({ 
	orientation: 'vertical',
	animate: true,
	min: 0,
	max: 30,
	step: 30,
	value: 0,
	// Carp - value: 0,
	// Course - value: 10,
	// Sea - value: 20,
	// Fly - value: 30,
	change: function(event, ui) {
	var value = $('#SliderInner').slider('option', 'value');
	var result = null;

	$("#fly").removeClass("selected");
	$("#sea").removeClass("selected");
	$("#game").removeClass("selected");
	$("#carp").removeClass("selected");

	
	switch (value) {
		case 0: 
			result = 'Carp'; 
			$("#carp").addClass("selected");
			window.location="http://www.cyprinus.co.uk/?ref=slider" // place file name here
		break;
		case 10: 
		result = 'Game'; 
			$("#game").addClass("selected");
			window.location="#game" // place file name here
		break;
		case 20: 
		result = 'Sea'; 
			$("#sea").addClass("selected");
			window.location="#sea" // place file name here
		break;
		case 30: 
		result = 'Fly'; 
			$("#fly").addClass("selected");
			window.location="http://www.flextec.co.uk/?ref=slider" // place file name here
		break;
		default: 
		result = 'Error';
	}
	//alert(result);
	}

	});
						   
/////////////////////////////////////////////						   
						   
						   
		// initialise plugins
		jQuery(function(){
			jQuery('ul#menuElem').superfish();
		});
						   
//////////////////////////////////////////
//Bookmark sript
   // add a "rel" attrib if Opera 7+  
     if(window.opera) {  
         if ($("a.bookmark").attr("rel") != ""){ // don't overwrite the rel attrib if already set  
             $("a.bookmark").attr("rel","sidebar");  
         }  
     }  
   
     $("a.bookmark").click(function(event){  
         event.preventDefault(); // prevent the anchor tag from sending the user off to the link  
         var url = this.href;  
         var title = this.title;  
   
         if (window.sidebar) { // Mozilla Firefox Bookmark  
             window.sidebar.addPanel(title, url,"");  
         } else if( window.external ) { // IE Favorite  
             window.external.AddFavorite( url, title);  
         } else if(window.opera) { // Opera 7+  
             return false; // do nothing - the rel="sidebar" should do the trick  
         } else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)  
              alert('Unfortunately, this browser does not support the requested action,'  
              + ' please bookmark this page manually.');  
         }  
   
     });  

///////////////////////////////////////////
	


});
