/* jQuery.noConflict(); */
try{
		jQuery(document).ready(function(){
			var fly=new Object(); //fly weight object
					
			jQuery('#right-column div.packages div.rotate') 
				.after('<div id="nav">') 
				.cycle({ 
					fx:     'fade', 
					speed:  'slow', 
					timeout: 8000, 
					pager:  '#right-column div.packages #nav',
					next:'#right-column div.packages .next',
					prev:'#right-column div.packages .previous'
				});
				
			jQuery('#right-column div.packages #nav a').addClass("link");
			
			if(!jQuery("#main-content-menu").hasClass("no-script")){
				jQuery('#main-content-menu li a').click(function() {
				   var elementClicked = jQuery(this).attr("href");
				   elementClicked=elementClicked.substr(1);
				   var destination = jQuery("a[name="+elementClicked+"]").offset().top;
				   jQuery("html:not(:animated),body:not(:animated)").animate({ 
						scrollTop: destination-20
					}, 1000, "easeOutQuad" );
				   return false;
				});
				
				jQuery('.top-anchor a').click(function() {
				   var elementClicked = jQuery(this).attr("href");
				   var destination = jQuery(elementClicked).offset().top;
				   jQuery("html:not(:animated),body:not(:animated)").animate({ 
						scrollTop: destination-20
					}, 1000, "easeOutQuad" );
				   return false;
				});
			}
			
				
			if(jQuery().fancybox){
				
					jQuery("#mod_pukkaPictures div.picture a, a[rel*=lightbox]").fancybox({ 
						'zoomSpeedIn': 500,
						'zoomSpeedOut': 500,
						'zoomOpacity':true
					});

jQuery("a.zoom").click(function(){
						var link=jQuery(this);
						console.log(jQuery("ul.mediaAttachmentList li.mediaAttachmentItem:first a",link.parent().parent()));
						jQuery("ul.mediaAttachmentList li.mediaAttachmentItem:first a",link.parent().parent()).click();
						return false;
					});				
			
			
				jQuery("#footer li.ebrochure a").addClass("iframe");
				jQuery("#footer li.ebrochure a").fancybox({
					'hideOnContentClick': false,
					'frameWidth':980,
					'frameHeight':700
				});
			
			}
			
			
			jQuery("#gallery-images").jCarouselLite({
				btnNext: ".gallery .nav-bar .next",
				btnPrev: ".gallery .nav-bar .previous"
			});

		});
}catch(error){

}
