
jQuery.noConflict();


jQuery(document).ready(function() {
	
	var tabset = jQuery(".tabmenu > ul:not(.thumbs)").tabs({
	  load: function(event, ui) {
			if(jQuery('a[rel*=lightbox]').length > 0) {
				jQuery('a[rel*=lightbox]').lightBox(
													{
													imageLoading: 'assets/snippets/maxigallery/lightboxv2/images/loading.gif',
													imageBtnClose: 'assets/snippets/maxigallery/lightboxv2/images/closelabel.gif',
													imageBtnPrev: 'assets/snippets/maxigallery/lightboxv2/images/prevlabel.gif',
													imageBtnNext: 'assets/snippets/maxigallery/lightboxv2/images/nextlabel.gif'
													}
				);
			}
	    },
		spinner: 'Retrieving data...'
		});
		
		

	jQuery("#inforequestform").hide();
	
	jQuery("#quickinfoLink").click(function() {
		
		jQuery("#inforequestform").slideToggle();
		
		return false;
	});
	
	//Show the dynamic price bit
	jQuery("#dynamicPrice").show();
	//Hide the summary table
	jQuery("#altfees").hide();
	
	// Update total project price based on selection of duration
	jQuery("#durationdd").change(function() {
		
		
		if(jQuery("#optfees").length > 0) {
			//There are additional fees to add to the total
			si = jQuery("#durationdd")[0].selectedIndex;
			//si++;
			spanname = 'ocf'+si;
			ocfval = jQuery("#"+spanname).html();
			jQuery("#ocf span").html(ocfval);
			pfcost = jQuery("#durationdd option:selected").val();
			jQuery("#pmf span").html(pfcost);
			totalcost = parseFloat(ocfval) + parseFloat(pfcost);
			
		}
		else {
			totalcost = jQuery("#durationdd option:selected").val();
		}
		
		jQuery("#tpc span").html(totalcost);
		
		jQuery("#tpc").animate({ 
			borderWidth: 3,
			opacity: "toggle"
		  }, 200 ).animate({
			borderWidth: 1,
			opacity: "toggle"  
		  }, 200 );
	});
	
});

