$(document).ready(function() {
	
	
				 var playerVersion = swfobject.getFlashPlayerVersion(); 
				if (playerVersion.major >7){
							
				}
				else {

						 $('#flReplace1').html('<div class="htmlHeaderFront"><img alt="wedding venue in leicester" src="/images/wedding_venue_leicester.jpg" width="962" height="631" border="0" usemap="#Map" />          <map name="Map" id="Map">            <area shape="rect" coords="26,144,119,188" href="/about-the-platinum-suite/" alt="About the platinum suite" />            <area shape="rect" coords="114,145,189,190" href="/events-at-the-platinum-suite/" alt="Upcoming events and goings on at our venue" />            <area shape="rect" coords="187,144,285,188" href="/the-platinum-suite-facilities/" alt="Our venue facilities and benefits" />            <area shape="rect" coords="286,146,369,197" href="/the-platinum-suite-photo-gallery/" alt="Photo Gallery of our venue in Leicester" />            <area shape="rect" coords="363,145,474,198" href="/the-platinum-suite-conferences/" alt="Conference Venue Hire" />            <area shape="rect" coords="471,143,646,191" href="/weddings-and-parties/" alt="Weddings and Party Venue in Leicester" />            <area shape="rect" coords="643,145,748,201" href="/the-platinum-suite-packages/" alt="Wedding Venue Packages" />            <area shape="rect" coords="749,145,848,187" href="/the-platinum-suite-services/" alt="Our Wedding Venue Services" />            <area shape="rect" coords="840,147,953,197" href="/contact-the-platinum-suite/" alt="Contact the Platinum Suite" />          </map>        <br />      </div>');	
						 
						 
						 			 $('#flReplaceHead').html('<div class="htmlHeader">          <map name="Map" id="Map">            <area shape="rect" coords="28,145,121,189" href="/about-the-platinum-suite/" alt="About the platinum suite" />            <area shape="rect" coords="114,145,189,190" href="/events-at-the-platinum-suite/" alt="Upcoming events and goings on at our venue" />            <area shape="rect" coords="183,144,281,188" href="/the-platinum-suite-facilities/" alt="Our venue facilities and benefits" />            <area shape="rect" coords="285,146,368,197" href="/the-platinum-suite-photo-gallery/" alt="Photo Gallery of our venue in Leicester" />            <area shape="rect" coords="361,145,472,198" href="/the-platinum-suite-conferences/" alt="Conference Venue Hire" />            <area shape="rect" coords="470,143,645,191" href="/weddings-and-parties/" alt="Weddings and Party Venue in Leicester" />            <area shape="rect" coords="643,145,748,201" href="/the-platinum-suite-packages/" alt="Wedding Venue Packages" />            <area shape="rect" coords="749,145,848,187" href="/the-platinum-suite-services/" alt="Our Wedding Venue Services" />            <area shape="rect" coords="847,147,960,197" href="/contact-the-platinum-suite/" alt="Contact the Platinum Suite" />          </map>          <a href="/home/"><img alt="Conference Venue Hire" src="/images/leceister_wedding_venue.png" width="973" height="189" border="0" usemap="#Map" /></a><img alt="Wedding Venue Hire"  src="/images/venue_images.jpg" width="965" height="175" /> </div>');	
						 
						 
						 
						 
						 			
				}	
				
				
	
	
				
				
				
	
	$("img:not([alt])").css("border","3px solid red")
 
 $('#article').highlight('Website Leasing');
 $('#article p').first().css('font-weight', 'bold');
 
 $('h1').highlight('IMPORTANCE');
 
  
 	$("img:not([title])").each(function() {
  		if($(this).attr("alt") != '') $(this).attr("title", $(this).attr("alt"))
  		else $(this).attr("title", $(this).attr("src"))
  	})
 
$('.rightHead').hide().delay(1200).fadeIn(600);
$('h1').hide().delay(400).fadeIn(800);
$('#testBox').hide().delay(1400).fadeIn(600);



$('blockquote').quovolver();
		



if(typeof document.body.style.maxHeight === "undefined") {
  
} else {
      $(function() {
			 
			
			 
			//When the mouse is over
			$(".imagefade").hover(function () {
				
				//Make the opacity 100% and fade it in slowly
			$(this).stop().animate({
			opacity:0.5
			});
			},
			 
			//When the mouse is not over it
			function() {
			 
			//set the opacity back to 50%
			$(this).stop().animate({
			opacity:1.0
			});
			});
			 
			});
			 
			 
 
}



 
 
 
});

Cufon.replace('h1', { fontFamily:'Garamond',
					 fontSize:'50px'
					 });

Cufon.replace('h3', { fontFamily:'platinum',
					 fontSize:'50px'
					 });

Cufon.replace('.rightSub', { fontFamily:'platinum',
					 fontSize:'43px'
					 });


		Cufon.replace('h4',{ fontFamily: 'Garamond' });

		Cufon.replace('.flTxt',{ fontFamily: 'Garamond' });

jQuery.fn.highlight = function(pat) {

 function innerHighlight(node, pat) {
  var skip = 0;
  if (node.nodeType == 3) {
   var pos = node.data.toUpperCase().indexOf(pat);
   if (pos >= 0) {
    var spannode = document.createElement('span');
    spannode.className = 'color';
    var middlebit = node.splitText(pos);
    var endbit = middlebit.splitText(pat.length);
    var middleclone = middlebit.cloneNode(true);
    spannode.appendChild(middleclone);
    middlebit.parentNode.replaceChild(spannode, middlebit);
    skip = 1;
   }
  }
  else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
   for (var i = 0; i < node.childNodes.length; ++i) {
    i += innerHighlight(node.childNodes[i], pat);
   }
  }
  return skip;
 }
 return this.each(function() {
  innerHighlight(this, pat.toUpperCase());
 });
};

/*
 * jQuery Quovolver v1.0 - http://sandbox.sebnitu.com/jquery/quovolver
 *
 * By Sebastian Nitu - Copyright 2009 - All rights reserved
 * 
 */

(function($) {
	$.fn.quovolver = function(speed, delay) {
		
		/* Sets default values */
		if (!speed) speed = 250;
		if (!delay) delay = 12000;
		
		// If "delay" is less than 4 times the "speed", it will break the effect 
		// If that's the case, make "delay" exactly 4 times "speed"
		var quaSpd = (speed*4);
		if (quaSpd > (delay)) delay = quaSpd;
		
		// Create the variables needed
		var	quote = $(this),
			firstQuo = $(this).filter(':first'),
			lastQuo = $(this).filter(':last'),
			wrapElem = '<div id="quote_wrap"></div>';
		
		// Wrap the quotes
		$(this).wrapAll(wrapElem);
		
		// Hide all the quotes, then show the first
		$(this).hide();
		$(firstQuo).show();
		
		// Set the hight of the wrapper
		$(this).parent().css({height: $(firstQuo).height()});		
		
		// Where the magic happens
		setInterval(function(){
			
			// Set required hight and element in variables for animation
			if($(lastQuo).is(':visible')) {
				var nextElem = $(firstQuo);
				var wrapHeight = $(nextElem).height();
			} else {
				var nextElem = $(quote).filter(':visible').next();
				var wrapHeight = $(nextElem).height();
			}
			
			// Fadeout the quote that is currently visible
			$(quote).filter(':visible').fadeOut(speed);
			
			// Set the wrapper to the hight of the next element, then fade that element in
			setTimeout(function() {
				$(quote).parent().animate({height: wrapHeight}, speed);
			}, speed);
			
			if($(lastQuo).is(':visible')) {
				setTimeout(function() {
					$(firstQuo).fadeIn(speed*2);
				}, speed*2);
				
			} else {
				setTimeout(function() {
					$(nextElem).fadeIn(speed);
				}, speed*2);
			}
			
		}, delay);
	
	};
})(jQuery);


