// JavaScript Document


	$.expr[':'].Contains = function(x, y, z){
			return jQuery(x).text().toUpperCase().indexOf(z[3].toUpperCase())>=0;
	};


	$(document).ready(function() {
														 
		// Code for header											 
		$('#logoSection .telephone').each(function() {												 
			$('<li class="telephone">' + $(this).text() + '</li>').insertBefore('#headerContainer .quickCartSection .cont ul li.title');	
			$('#logoSection .telephone').remove();
		}); 

		// Product Listing Pages
		if ($('.productListThbSection').length) {	
			$('.productListThbBlock div.imgBlock div.priceBlock').each(function(){
				 $(this).closest('div.imgBlock').after(this);
			});
			$('.productListThbBlock').each(function(){
				 $(this).find('div.priceBlock').appendTo($(this).find('div.descBlock'));
			});
			$('.productListThbBlock a.moreInfo').each(function() {
					$(this).parent().append(this);
					$('.productListThbBlock a.moreInfo').text('Full details...');
			});
		}

		// Code for a product detail page
		if ($('.productDetailsSection').length) {	
			$('.productDetailsSection #optForm .productPriceBlock #buy_button').attr('value', 'Add to Basket');
			$('.productDetailsSection #optForm .productPriceBlock #buy_button').addClass('wide_buy_btn');	
			if ( $('.productDetailsSection #optForm .productOptionsBlock .blk span label:Contains("Size")').length > 0 ) {
				$('.productDetailsSection #optForm .productOptionsBlock .blk span label:Contains("Size")').replaceWith('<label>Please select your size:</label>');
				$('div.buy-option-links-before').insertBefore('.productDetailsSection #optForm .productPriceBlock');	
			}
			$('div.buy-option-links-after').insertAfter('.productDetailsSection #optForm .productPriceBlock');	
			$('div.faqs').remove();
		}
		
	});

