;/**
  * Explore Holidays
  * 
  */
EH = 
{
    init: function()
    { 		
		
    },
		printBtn: function()
    { 		
			$(".printBtn").bind('click', function(event){
				event.preventDefault();															
				window.print();
			});
		
    },
		snipDescription: function(field, amount) {
			if(field!=null) {
				var prodDesc=$(field).html();
				var sliceSpot = prodDesc.indexOf(" ", 160);	
				var newText = prodDesc.slice(0,sliceSpot)
				return newText;
			}
			return '';
		},
		
		ourFavourites: function() {			
			$('.ourfavourite-item span.desc').each(function(){
				var snipped = EH.snipDescription(this);
				$(this).html(snipped+'.. ');
				//FCL.UTIL.truncateText($(this), {finish:'..', stopChar:''});
			});
			
		},
		
		checkExpiredProduct: function(){
			var mytext = $('#product-sku').text();
			if(mytext==''){
				$("#product-content").hide();
				$(".expired-product").show();
			}
		},
		
		bookmark: function(){
			$("a.bookmark").bind('click', function(e){
				e.preventDefault(); // this will prevent the anchor tag from going the user off to the link
				var bookmarkUrl = this.href;
				var bookmarkTitle = this.title;
			 
				if (window.sidebar) { // For Mozilla Firefox Bookmark
					window.sidebar.addPanel(bookmarkTitle, bookmarkUrl,"");
				} else if( window.external || document.all) { // For IE Favorite
					window.external.AddFavorite( bookmarkUrl, bookmarkTitle);
				} else if(window.opera) { // For Opera Browsers
					$("a.jQueryBookmark").attr("href",bookmarkUrl);
					$("a.jQueryBookmark").attr("title",bookmarkTitle);
					$("a.jQueryBookmark").attr("rel","sidebar");
				} else { // for other browsers which does not support
					 alert('Your browser does not support this bookmark action');
					 return false;
				}
			});
		}
};

$(document).ready(function(){
	EH.printBtn();
	EH.bookmark();
});
