// JavaScript Document
	$(document).ready(function(){	
		// Add pdf icons to pdf links
		$("a[href$='.pdf']").addClass("pdf");		
		
		
		// Captions
	
		 $('img.captionedright').each(function() {
			//$(this).removeClass('captionedright');
			$(this).wrap('<div class="captionright"></div>').after('<div class="caption">' + $(this).attr('title') + '</div>');
			$('.captionright').width($(this).width()).children('div').each(function() {
			  $(this).parent().css({width: $(this).siblings('img.captionedright').width() , opacity: 100, display: 'block'});
			});

		  });
		 $('img.captioned').each(function() {
			$(this).wrap('<div class="captioned"></div>').after('<div class="caption">' + $(this).attr('title') + '</div>');
			$('.captioned').width($(this).width()).children('div').each(function() {
			  $(this).css({width: $(this).siblings('img').width() - 20, opacity: 100, display: 'block'});
			});

		  });
		 // Tabs 
		  $("#tabs").semantictabs({
			panel:'.tab',                //-- Selector of individual panel body
			head:'h2.tab_header',        //-- Selector of element containing panel head
			active:':first'               //-- Selector of panel to activate by default
		});
		  
		    $("a.enquiry").fancybox({
				'width':		610,
				'height':  		610,
				'hideOnContentClick': true,
			      'zoomSpeedIn':	400, 
				'zoomSpeedOut':	400, 
				'overlayShow':	false,
				'titlePosition'	:	'over'
			});
	 });
