	
/*============================================= 
  = Main Template Javascript File
  = http://www.jshoptemplates.com files and template sets (c)2009-2015
  = PG Web Development
  = JShop files (c)2003-2009 Whorl Ltd - http://www.jshop.co.uk/ 
  = All Rights Reserved
  = Redistribution of this, and any included template set files is strictly prohibited.
  ==============================================*/
  


/* ###################
Colorbox - image viewer like lightbox
http://colorpowered.com/colorbox/
#################### */

function colorBox() {
	//Examples of how to assign the ColorBox event to elements
	$("a[rel='colorbox']").colorbox({transition:'elastic', speed:500, maxWidth:'800px', scalePhotos:true, preloading:true});
	// $("a.gallery").colorbox({transition:"fade",arrowkey:true,iframe:true}); 
	// $("a[rel='colorbox']").colorbox({width:"710px", height:"700px", transition:"fade",slideshow:true});
	};
	
/* ###################
JQuery Swapimage - for product extra images
http://code.google.com/p/jquery-swapimage/
#################### */	

$(function(){
	$.swapImage(".swapImageDisjoint");
	});


/************************
// Cufon font replacement
// Cufon font replacement - see homepage for details: http://wiki.github.com/sorccu/cufon/usage - DOMAIN NEEDS SETTING IN SCRIPT
****************************/

function cufonFont() {
Cufon.set('fontFamily', 'Le Havre');
	Cufon.replace('.section-top-content,.section-top-content-homepage,.section-content');
	// Cufon.replace('.section-top-content p,.section-top-content a,.section-top-content-homepage p,.section-content p', { fontSize:'20px'});
Cufon.set('fontFamily', 'Estilo Pro Medium');
	Cufon.replace('#left-nav-bar a', {textShadow: '#000000 0px 3px'});
	Cufon.replace('h1,h2,h3,.section-top-content h1,.section-top-content h2,.section-top-content h3, .leadin,.section-content-nobox p,#footer-nav,.res-mayfair,.res-city'); 
};


/************************
// Easy Slider jQuery Plugin
// http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider
****************************/

function sliderGlobe() {	
			$("#slider").easySlider({
				auto:false,
				speed:1400,
				pause:6000,
				continuous: true,
				controlsShow: true // false
			});
		};

/***********************
* ONLOAD functions script
***********************/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}


addLoadEvent(colorBox);
addLoadEvent(sliderGlobe);
addLoadEvent(cufonFont);
addLoadEvent(function() {
  /* more code to run on page load */
});


