/*
======================================================================
    
    Feature Module script v.10
    Requires jQuery 1.2.1 or above.
    
    By Neil Ford - www.neilford.net
    
======================================================================
*/       
           
        $(document).ready(function() {
	
            $("div#rep").replaceWith("<div id='featureModule'><a id='featureLink' href='contact.php'><img id='screen' src='pi/test1.jpg' alt='Large image' /></a><ul id='featureNav'><li id='featureNav1'><a id='fl1' class='here' href='pi/test1.jpg' title='Image 1'>B&amp;B from &pound;25.00&hellip;</a></li><li id='featureNav2'><a id='fl2' href='pi/test2.jpg' title='Image 2'>Start the day well&hellip;</a></li><li id='featureNav3'><a id='fl3' href='pi/test3.jpg' title='Image 3'>Beautiful scenery&hellip;</a></li><li id='featureNav4'><a id='fl4' href='pi/test4.jpg' title='Image 4'>Things to do&hellip;</a></li></ul></div>");
        
        	$("#featureNav a").click(function(){
        	
        		var largePath = $(this).attr("href");
        		var largeAlt = $(this).attr("title");
        		var largeLink = $(this).attr("id");
        		
        		
        		
        		if(largeLink === "fl1"){
        		    $("#featureNav a").removeClass("here");
        		    $("#featureLink").attr({ href: "contact.php" });
        		    $(this).addClass("here");
        		    
        		}
        		
        		if(largeLink === "fl2"){
        		    $("#featureNav a").removeClass("here");
        		    $("#featureLink").attr({ href: "breakfast.php" });
        		    $(this).addClass("here");
        		}
        		
        		if(largeLink === "fl3"){
        		    $("#featureNav a").removeClass("here");
        		    $("#featureLink").attr({ href: "orkney.php" });
        		    $(this).addClass("here");
        		}
        		
        		if(largeLink === "fl4"){
        		    $("#featureNav a").removeClass("here");
        		    $("#featureLink").attr({ href: "orkney.php" });
        		    $(this).addClass("here");
        		}
        		
        		
        		
        		$("#screen").attr({ src: largePath, alt: largeAlt });
        		
        		return false;
        	});
        	
        });