// JavaScript Document

function initialize() {	
	jQuery('#page1accord').accordion({
		autoheight: false
	});
	

jQuery('#crossslider').crossSlide({
  speed: 20,
  fade: 1
}, [
  { src: '../photos/general1.jpg', dir: 'up'   },
  { src: '../photos/general2.jpg', dir: 'up'   },  
  { src: '../photos/dales1.jpg', dir: 'up'   },
  { src: '../photos/dales2.jpg',   dir: 'down' },
  { src: '../photos/dales3.jpg',  dir: 'up'   },
  { src: '../photos/dales4.jpg', dir: 'down' },
  { src: '../photos/dales5.jpg', dir: 'up'   },
  { src: '../photos/dales6.jpg',   dir: 'down' },
  { src: '../photos/dales7.jpg',   dir: 'down' },
  { src: '../photos/dales8.jpg',  dir: 'up'   }
]);
	
	// jQuery('#crossslider').crossSlide({
	  // fade: 1
	// }, [
	  // {
		// src:  '../photos/dales1.jpg',
		// href: '',
		// from: '100% 80% 1x',
		// to:   '100% 0% 1.7x',
		// time: 8
	  // }, {
		// src:  '../photos/dales2.jpg',
		// href: '',
		// from: 'top left',
		// to:   'bottom right 1.5x',
		// time: 6
	  // }, {
		// src:  '../photos/dales3.jpg',
		// href: '',
		// from: '100% 80% 1.5x',
		// to:   '80% 0% 1.1x',
		// time: 6
	  // }, {
		// src:  '../photos/dales4.jpg',
		// href: '',
		// from: '100% 50%',
		// to:   '30% 50% 1.5x',
		// time: 6
	  // }, {
		// src:  '../photos/dales5.jpg',
		// href: '',
		// from: '100% 50%',
		// to:   '30% 50% 1.5x',
		// time: 6
	  // }, {
		// src:  '../photos/dales6.jpg',
		// href: '',
		// from: '100% 50%',
		// to:   '30% 50% 1.5x',
		// time: 6
	  // }, {
		// src:  '../photos/dales7.jpg',
		// href: '',
		// from: '100% 50%',
		// to:   '30% 50% 1.5x',
		// time: 6
	  // }
	// ]);
	
	
	
			var map = null;
			var vicPoint = new GLatLng(54.308999999999997, -1.8280000000000001);
			var myHtml = "Dales Holiday Property<br />The Old School, Low Row, Richmond, DL11 6NA<br />Tel: 01748 886351";

	
      		if (GBrowserIsCompatible()) {
   				try {
        	var map = new GMap2(document.getElementById("map_canvas"));
        		map.setCenter(new GLatLng(54.308999999999997, -1.8280000000000001), 9);
        		map.setUIToDefault();
				map.setMapType(G_PHYSICAL_MAP);
  			} catch (err) { };
  				try {
					
  			} catch (err) { }
				var myIcon = new GIcon();
					myIcon.image = '../images/markers/image.png';
					myIcon.shadow = '../images/markers/shadow.png';
					myIcon.iconSize = new GSize(100,52);
					myIcon.shadowSize = new GSize(126,52);
					myIcon.iconAnchor = new GPoint(50,52);
					myIcon.infoWindowAnchor = new GPoint(50,0);
					myIcon.printImage = '../images/markers/printImage.gif';
					myIcon.mozPrintImage = '../images/markers/mozPrintImage.gif';
					myIcon.printShadow = '../images/markers/printShadow.gif';
					myIcon.transparent = '../images/markers/transparent.png';
					myIcon.imageMap = [63,2,69,3,74,4,78,5,81,6,83,7,85,8,87,9,89,10,91,11,92,12,93,13,94,14,95,15,96,16,96,17,97,18,97,19,97,20,97,21,97,22,97,23,97,24,97,25,96,26,96,27,95,28,94,29,93,30,92,31,90,32,89,33,87,34,85,35,83,36,80,37,77,38,73,39,69,40,62,41,56,42,55,43,54,44,53,45,52,46,51,47,50,48,49,49,49,50,48,50,47,49,46,48,45,47,44,46,43,45,42,44,41,43,40,42,37,41,30,40,25,39,22,38,19,37,16,36,14,35,12,34,10,33,8,32,7,31,6,30,5,29,4,28,3,27,3,26,1,25,1,24,1,23,1,22,1,21,1,20,1,19,1,18,2,17,3,16,4,15,5,14,6,13,7,12,8,11,10,10,11,9,13,8,16,7,18,6,21,5,25,4,29,3,36,2];

				var markerOptions = {icon:myIcon, draggable: false}
				var marker = new GMarker(vicPoint,markerOptions );
	
	
	
				GEvent.addListener(marker, "click", function () {
					marker.openInfoWindowHtml(myHtml);
				});
		
				GEvent.addListener(marker, "dragstart", function() {
					map.closeInfoWindow();
				});
				try {
				map.addOverlay(marker);
				} catch (err) { }
/*				marker.openInfoWindowHtml(myHtml);*/
			}
			
			$('#gallery a').lightBox();
			
			/* code to display the flash calendar on Availability page */			
			var flashvars = {};
			var params = {};
			var attributes = {};
			swfobject.embedSWF("flash/calendar.swf", "flashDiv2", "500", "510", "8.0.0", "flash/expressInstall.swf", flashvars, params, attributes);
			
			/* code to display the flash icons on Strawberry page */			
			var flashvars = {};
			var params = {};
			var attributes = {};
			swfobject.embedSWF("flash/StrawberryFacilityIcons.swf", "flashDiv3", "500", "112", "8.0.0", "flash/expressInstall.swf", flashvars, params, attributes);			
				
			/* code to display the flash icons on Blueberry page */			
			var flashvars = {};
			var params = {};
			var attributes = {};
			swfobject.embedSWF("flash/BlueberryFacilityIcons.swf", "flashDiv4", "500", "112", "8.0.0", "flash/expressInstall.swf", flashvars, params, attributes);
			
			/* code to display the flash icons on cottages page */			
			var flashvars = {};
			var params = {wmode:'transparent'};
			var attributes = {};
			swfobject.embedSWF("flash/cottageBtns.swf", "flashDiv5", "900", "600", "8.0.0", "flash/expressInstall.swf", flashvars, params, attributes);
	
}



<!----------------------------- scroll control ----------------------------->

/*function initialize() {	

	var flashvars = {};
	var params = {};
	var attributes = {};
	swfobject.embedSWF("http://www.njmroofing.com/V2/flash/servicesystem.swf", "flashDiv2", "400", "400", "8.0.0", "http://www.njmroofing.com/V2/flash/expressInstall.swf", flashvars, params, attributes);
	swfobject.embedSWF("http://www.njmroofing.com/V2/flash/fabrication.swf", "flashDiv3", "860", "250", "8.0.0", "http://www.njmroofing.com/V2/flash/expressInstall.swf", flashvars, params, attributes);
	swfobject.embedSWF("http://www.njmroofing.com/V2/flash/design.swf", "flashDiv4", "455", "450", "8.0.0", "http://www.njmroofing.com/V2/flash/expressInstall.swf", flashvars, params, attributes);
	
	$("#nav ul").tabs("#panes > div", {effect: 'fade', fadeOutSpeed: 400});
	

/*	$("div.scrollable").scrollable({
		vertical:true, 
		size: 1
	}).mousewheel();*/
	
	
/*	$("#mainport,div.scrollable").scrollable({

	vertical: true,
	size: 1,
	clickable: false,
/*	keyboard: 'static',

	onSeek: function(i) {
		horizontal.scrollable(i).focus();
	}*/

/*	}).navigator("#main_navi");
	
	var horizontal = $(".scrollable2").scrollable({size: 1}).circular().navigator(".navi");
	
	horizontal.eq(0).scrollable().focus();

};
*/



