// JavaScript Document
	var url = location.pathname;
	var lnx = "";

	var pag = window.location.pathname;
	var qry = parent.document.URL;
	var noToggle = "Crafts";

	var myLNX=[];
	var myURL=[];
	
	var strSrchA = "visinfo";
	var strSrchB = "ydales";
	var inDales = 0; 

	var lnk; 
	var lnkX="";

	var pre="";
	
/*
	jQuery(document).ready(function(){
		var lnk = ""; var lst = 0; var strSrc; qry=location.search.substring(1); 		
									
		$(".YIC h4").each(function(){$(this).next("ul").slideUp(0);});								

		$(".YIC li").each(function(){
		strSrc=$(this).parents().attr("id"); lnk=$(this).html();
		
			if (pag.indexOf(strSrc)>0){$(this).parents().slideDown(0); $(this).removeClass(); if(lnk.indexOf(qry)>0){$(this).addClass("col4LinkON");};};
		});

	$(".YDL h4").each(function(){$(this).next("ul").slideUp(0);});					
									
	$(".Cotts h4").each(function(){$(this).next("ul").slideUp(0);})
	$(".Hotels h4").each(function(){$(this).next("ul").slideUp(0);})
	$(".Farms h4").each(function(){$(this).next("ul").slideUp(0);})									
								
			
	if(url.indexOf("cott")>0){
		$(".Cotts h4").each(function(){$(this).next("ul").slideDown(0);});
		$(".Hotels h4").each(function(){$(this).next("ul").slideUp(0);});
	   	$(".Farms h4").each(function(){$(this).next("ul").slideUp(0);});
	};	

	if(url.indexOf("hotel")>0){
		$(".Cotts h4").each(function(){$(this).next("ul").slideUp(0);});
		$(".Hotels h4").each(function(){$(this).next("ul").slideDown(0);});
	   	$(".Farms h4").each(function(){$(this).next("ul").slideUp(0);});
	};	

	if(url.indexOf("bandb")>0 || url.indexOf("farms.htm")>0){
		$(".Cotts h4").each(function(){$(this).next("ul").slideUp(0);});
		$(".Hotels h4").each(function(){$(this).next("ul").slideUp(0);});
	   	$(".Farms h4").each(function(){$(this).next("ul").slideDown(0);});
	};		

	myURL=url.split("/");
	
	$("#col1 li a").each(function(){lnx = $(this).attr("href");
		if(lnx.indexOf(myURL[parseInt(myURL.length)-1])>0){$(this).addClass("boldLink");};
	});
								

	if (pag.indexOf(strSrchA)>0 && pag.indexOf(strSrchB)>0){
		$(".YDL h4").each(function(){$(this).next("ul").slideDown(0);}); 
		$(".YDL li").each(function(){lnk = $(this).html(); if (lnk.indexOf(pag)>0){$(this).addClass("col4LinkON");}else{$(this).removeClass();};});
	};
	
	$(".YIC h4").click(function(){var pre = $(this).html(); $(".YIC h4").each(function(){if ($(this).html()!=pre){var me=$(this).html(); if (me.indexOf(noToggle)<1){$(this).next("ul").slideUp();}}});
	if(pre.indexOf(noToggle)<1){$(this).next("ul").slideToggle();}});
		
	});
*/
	
//-------------------------------------------------------------------------------

/*
	$(function(){$(".YDL h4").click(function(){pre = $(this).html(); $(".YDL h4").each(function(){if ($(this).html()!=pre){$(this).next("ul").slideUp();}});$(this).next("ul").slideToggle();});});
	
	//---Cottages Slider ---\\

	$(function(){$(".Cotts h4").click(function(){
		pre = $(this).html();$(".Cotts h4").each(function(){if ($(this).html()!=pre){$(this).next("ul").slideUp();}});$(this).next("ul").slideToggle();
		$(".Hotels h4").each(function(){$(this).next("ul").slideUp(250);});
		$(".Farms h4").each(function(){$(this).next("ul").slideUp(250);});
	});});	

	//---Hotels Slider ---\\

	$(function(){$(".Hotels h4").click(function(){
		pre = $(this).html();$(".Hotels h4").each(function(){if ($(this).html()!=pre){$(this).next("ul").slideUp();}});$(this).next("ul").slideToggle();
		$(".Cotts h4").each(function(){$(this).next("ul").slideUp(250);});
		$(".Farms h4").each(function(){$(this).next("ul").slideUp(250);});
	});});

	//---Farms Slider ---\\

	$(function(){$(".Farms h4").click(function(){
		pre = $(this).html();$(".Farms h4").each(function(){if ($(this).html()!=pre){$(this).next("ul").slideUp();}});$(this).next("ul").slideToggle();
		$(".Cotts h4").each(function(){$(this).next("ul").slideUp(250);});
		$(".Hotels h4").each(function(){$(this).next("ul").slideUp(250);});	
	});});
*/

//-------------------------------------------------------------------------------

function insertReadOffers(){
	var src = 'http://www.yorkshirenet.co.uk/yn3_files/adverts/sidebar.asp';
	var myHTML = '<IFRAME SRC="' + src + '" width=150 height=1095 marginHeight=0 marginWidth=0 frameborder=0 scrolling=no style="padding:0px; margin:0px; border-top:6px solid #ffffff;"></IFRAME>';
	document.write(myHTML);
}

//-------------------------------------------------------------------------------

function ynOpenWin(url){
	var strPre="http://"
	var strSuf=""
	
	window.open(strPre + url + strSuf);
}

function preLoadImages(){

var image1X = new Image(); image1X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/btn-about-up.gif";
var image2X = new Image(); image2X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/btn-about-dn.gif";
var image3X = new Image(); image3X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/topnav-bg.gif";

var image4X = new Image(); image4X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/topnav-marker-on.gif";

var image5X = new Image(); image5X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/leftnav-heading.gif";
var image6X = new Image(); image6X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/midnav-heading.gif";
var image7X = new Image(); image7X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/rightnav-heading.gif";
var image8X = new Image(); image8X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/rightnav-heading2.gif";

var image9X = new Image(); image9X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/midnav-heading-1line.gif";
var image10X = new Image(); image10X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/rightnav-heading.gif";

var image11X = new Image(); image11X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/sidenav-marker-on.gif";
var image12X = new Image(); image12X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/sidenav-marker-off.gif";

var image13X = new Image(); image13X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/leftnav-bg.gif";
var image14X = new Image(); image14X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/midnav-bg.gif";
var image15X = new Image(); image15X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/siteDesign/rightnav-bg.gif";

var image16X = new Image(); image16X.src = "http://www.yorkshirenet.co.uk/yn3_files/images/accgde/listing-bg.gif";


var str = top.window.location + "";
if ( str.indexOf("kilnseyshow") <1 ) {} else {$('.mapLink').hide();}

//alert(str);

}

$(function(){
	$.getScript('https://apis.google.com/js/plusone.js');
var ic='<span align="center" style="position:fixed; width:32px; top:10px; right:10px;">';
ic += '<a href="javascript:void(0);" onClick="javascript:window.open(\'http://www.facebook.com/YorkshireNet\');"><img src="/nav/images/facebook.png" width="32" height="32" alt="Follow us on Facebook" title="Follow us on Facebook" style="border:none;"/></a><br />';
ic += '<a href="javascript:void(0);" onClick="javascript:window.open(\'http://www.flickr.com/photos/64864873@N06/\');"><img src="/nav/images/flickr.png" width="32" height="32" vspace="10" alt="YorkshireNet Photos on Flickr" title="YorkshireNet Photos on Flickr" style="border:none;"/></a>';
ic += '<g:plusone count=\'false\'></g:plusone><br /><br />';
ic += '<a href="https://plus.google.com/102456808475792149334?prsrc=3" style="text-decoration:none;"><img src="https://ssl.gstatic.com/images/icons/gplus-32.png" alt="" style="border:0;width:32px;height:32px;"/></a>';
ic += '</span>';

	
$("#siteWrapper").append(ic);


});
