// JavaScript Document

jQuery(document).ready(function() {
								
	//jQuery('.popup-cont a').lightBox();
	jQuery( "table.mod-comment-body a:not(.mod-item-body-a, .mod-category-body-a, .page_navigator)" ).each(
	function(){
		var img_link = jQuery(this).attr('href');
		img_link= img_link.replace(/\&amp;/g,'&');
		jQuery(this).attr('rel', 'prettyPhoto[img]');
		jQuery(this).attr('href', 'http://www.selfcateringleitrim.ie/view_img.php?url='+img_link);
	});
	
	jQuery( "a.mod-item-body-a" ).each(
	function(){
		var img_link = jQuery(this).attr('href');
		img_link= img_link.replace(/\&amp;/g,'&');
		jQuery(this).attr('rel', 'prettyPhoto[img2]');
		jQuery(this).attr('href', 'http://www.selfcateringleitrim.ie/view_img.php?url='+img_link);
	});
	
	jQuery("a[rel^='prettyPhoto']").prettyPhoto({
					opacity: 0.55, /* Value betwee 0 and 1 */
					allowresize: false,
					theme: 'light_rounded'
			});
	
	var query = self.location.href;
  	if( query.indexOf('car-sale.php') == -1 ){ }else{ jQuery("#side-menu").html('&nbsp;'); }
	
	if( query.indexOf('car-sale.php') == -1 ){ }else{ jQuery("#side-menu").html('&nbsp;'); }
	
	var hmenu1 = jQuery(".top-menu a:contains('Photo Gallery'), .bottom-menu a:contains('Photo Gallery')").parent("td");
	hmenu1.html('&nbsp');
	hmenu1.prev().html('&nbsp');
	
	jQuery(".top-menu a:contains('Self Catering Leitrim - Luxury 3 Bed Holiday Homes')").text("Home");
	
	
	//jQuery('.popupimage a').lightBox();
	
	if (jQuery("#main-title:contains('Home')").size() > 0) { jQuery('#main-subm-holder').html('<ul id="submenu-ul"></ul>'); }
	if (jQuery("#main-title:contains('Contact Us')").size() > 0) { jQuery('#main-subm-holder').html('<ul id="submenu-ul"></ul>'); }
	
	if( query.indexOf('guest-comments.php') == -1){ }else{ jQuery('#main-subm-holder').html('<ul id="submenu-ul"></ul>'); } 
	if( query.indexOf('how-to-book.php') == -1){ }else{ jQuery('#main-subm-holder').html('<ul id="submenu-ul"></ul>'); } 
	if( query.indexOf('how-to-find-us.php') == -1){ }else{ jQuery('#main-subm-holder').html('<ul id="submenu-ul"></ul>'); }
	if( query.indexOf('book-now.php') == -1){ }else{ jQuery('#main-subm-holder').html('<ul id="submenu-ul"></ul>'); }
	
	jQuery("#main-title:contains('Home')").html('Mc Guire\'s Cottages');
	jQuery("#main-title:contains('Things To Do')").html('Things to Do in Leitrim and NW of Ireland');
	
	jQuery("#holder").prepend('<a href="/luxury-holiday-home-break-draw.php" style="position: absolute; margin-top: 152px; margin-left: 670px;"><img src="/images/free-short-break.png" border="0" /></a>');

} );