// start:defines.js
var undefined;

(function($){
	$.extend({
		tracking: {
			// *****************************************************************************
			// global tracked elements
			trackAddToCart: {
				linkType: 'o',
				linkName: '%page>add_to_cart',
				products: '%pdp;%upc',
				prop25: '%prop25',
				events: 'scAdd%events',
				eVar12: '%eVar12'
			},
			trackFindStore: {
				linkName: '%page>find_in_store'
			},
			// *****************************************************************************
			// pdp tracking
			trackDisplayToggle: {
				linkName: 'pdp>overview>alt_view',
				events: 'event2',
				products: ';%upc',
				eVar13: '%upc - %viewAngle'
			},
			trackZoom: {
				linkName: 'pdp>%zoom',
				events: 'event2',
				eVar13: '%upc - %evarZoom'
			},
			trackFreeTout: {
				linkName: 'pdp>tout_free_ship'
			},
			trackMoreResults: {
				linkName: 'pdp>more_results'
			},
			trackOtherStyles: {
				linkName: 'pdp>other_styles'
			},
			trackCreateReview: {
				linkName: 'pdp>create_review'
			},
			trackReportReview: {
				linkName: 'pdp>report_review'
			},
			// *****************************************************************************
			// footer links
			trackFreeShipping: {
				linkName: 'global_ft_free_shipping'
			},
			trackGetMail: {
				linkName: 'global_ft_getmail'
			},
			trackStayConnected: {
				linkName: 'global_ft_stay_connected'
			},
			trackAboutUs: {
				linkName: 'global_ft_about_us'
			},
			trackCustomerService: {
				linkName: 'global_ft_customer_service'
			},
			trackLegal: {
				linkName: 'global_ft_legal'
			},
			trackAffiliate: {
				linkName: 'global_ft_affiliate'
			},
			trackReturns: {
				linkName: 'global_ft_returns'
			},
			// *****************************************************************************
			// global header and nav links
			// the <a /> rel and text is used to complete this tag
			trackNav: {
				linkName: 'global_filter_'
			},
			trackPolarized: {
				linkName: 'global_filter_polarized'
			},
			trackSGHLogo: {
				linkName: 'global_sghlogo'
			},
			trackRegister: {
				linkName: 'global_register'
			},
			trackFreeArrow: {
				linkName: 'global_free_shipping_arrow'
			},
			trackProfile: {
				linkName: 'global_myprofile'
			},
			trackLogin: {
				linkName: 'global_login'
			},
			trackLogoff: {
				linkName: 'global_logoff'
			},
			trackStores: {
				linkName: 'global_stores'
			},
			trackOffers: {
				linkName: 'global_offers'
			},
			trackMarkdowns: {
				linkName: 'global_markdowns'
			},
			trackGiftcards: {
				linkName: 'global_giftcards'
			},
			trackCart: {
				linkName: 'global_view_cart'
			},
			trackCheckout: {
				linkName: 'global_checkout'
			},
			trackHomeIcon: {
				linkName: 'global_home_icon'
			},
			trackCollections: {
				linkName: 'global_collections'
			},
			trackPerformance: {
				linkName: 'global_performance'
			},
			trackSearch: {
				linkName: 'global_search'
			},
			// *****************************************************************************
			// static links
			trackShopArtistSeries: {
				linkName: 'collections_oakley_artist_series_shop_collection'
			},
			trackBulgariLearnMore: {
				linkName: 'special_offers_bulgari_learn_more'
			},
			trackPrintCoupon: {
				linkName: 'special_offers_print_coupon'
			},
			trackFreeShippingOffers: {
				linkName: 'special_offers_free_shipping_details'
			}
		},
		// the rel attribute of form fields should be used to access the 'errors' constants
		// the class attribute is used to assign a 'regex' to a field
		constants: {
			template: {
				locatorDirections: '<li><span class="number">${number}</span><span class="direction">${direction}</span><span class="distance">${distance}</span>',
				address: '<span class="row locatorAddress"><span class="row">${name}</span><span class="row"><span class="address1">${address1}</span><span class="row">${city}${sep} ${state} ${zip}</span></span></span>'
			},
			error: {
				firstName: 				'Please provide your first name.',
				lastName: 				'Please provide your last name.',
				fromName:				'Please provide your name.',
				email: 					'Please provide a valid email address.',
				address1: 				'Please provide a valid address.',
				city: 					'Please provide a valid city.',
				state: 					'Please provide a valid state.',
				zip: 					'Please enter a valid zip code.',
				zipCode: 				'Please enter a valid zip code.',
				phone1: 				'Please provide a valid phone number.',
				securityAnswer:			'Please provide a security answer.',
				invalidPassword: 		'Invalid password.',
				confirmPassword: 		'Password does not match.',
				oldPassword:			'Your password does not match our records.',
				newPassword:			'Your password must be between 6 and 12 characters long and is case sensitive.',
				notFound:				'The %page you have requested does not exist.',
				ajax:					'Sorry, we were unable to complete your request at this time. Please try again later.',
				addToCart:				'We were unable to add this product to your shopping cart. Please try again later.',
				product: 				'There was an error requesting information for that product. Please try again.',
				locatorZip:				'A zip code must be provided to locate this product in nearby stores.',
				locatorMissingField:	'You must either enter your zip code, or your full address with city and state.',
				searchForm:				'Please type either the brand or style to perform your search.',
				searchUnavailable: 		'We were not able to perform your search at this time. Please try again later.',
				ie6: 					'<p class="ie6">Did you know that your Internet Explorer is out of date? To get the best possible experience on SunglassHut.com, we recommend that you upgrade to a newer version.</p><p><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx" target="_blank">Click here</a> to get the latest version of Internet Explorer with a free download directly from Microsoft.</p>',
				oldPw: 					'Your old password did not match our records.',
				shortPw: 				'Your password is too short.',
				confirmPw: 				'Please confirm your password correctly. Remember that your password is case-sensitive.',
				subject:				'Please provide a subject line for your email.',
				recipientEmail:			"You must provide your friend's email address.",
				senderEmail:			'Please provide your email address.',
				msg:					'A message is required, under 250 characters.',
				messageBody:			'A message is required, under 250 characters.',
				logonIdInUse:			'This email address is already in use; please try another.',
				logonFail:				'Your email and/or password did not match our records. Please try entering them again.',
				logonSuccess:			'Login successful. Welcome.',
				registerFail:			'We could not register you with the information you provided. This email address may already be in use, or there may be an error with one or more of the fields.',
				registerEmailMatch:		'Please retype your email address.',
				optIn18yrs:				'Please certify that you are 18 years old or older by checking the box.',
				resetQuestion:			'That answer did not match our records.',
				resetPw: 				'An error occurred while trying to change your password. Please double check your password and try again.',
				resetPwConfirm:			'Your password has been reset.  Please check your email for instructions.',
				timeout:				"We're sorry, but your request has timed out. Please try again.",
				optin18:				'Please certify that you are 18 years old or older by checking the box.',
				optinMail:				'Please certify that you would like to receive emails, and other marketing updates from Sunglass Hut by checking the box.',
				genericError:			'An error has occurred. Please try again and contact Customer Service if you continue to have problems.',
				timedOut:				'Your session has timed out or you have been accidentally logged off. Please login again.',
				giftCardMin:			'Sorry, you must select to add at least one gift card to your cart.',
				alreadySubscribed:		'The email address you provided is already subscribed.',
				alreadySubscribedCatalog:	'You have already requested a catalog',
				collection:				'The collections you are trying to view does not exist.'
			},
			success: {
				// TODO:REPLACE - WITH REAL SUCCESS MESSAGES
				save: 'Your changes have been successfully saved.',
				resetQuestion: 'Your password has been successfully reset. Please check your email inbox.'
			},
			regex: {
				phone: 		/^(1\s*[-\/\.]?)?(\((\d{3})\)|(\d{3}))\s*[-\/\.]?\s*(\d{3})\s*[-\/\.]?\s*(\d{4})\s*(([xX]|[eE][xX][tT])\.?\s*(\d+))*$/,
				email: 		/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/,
//				zip: 		/(^\d{5}$)|(^\d{5}-\d{4}$)/,
//				zipCode: 		/(^\d{5}$)|(^\d{5}-\d{4}$)/,
				name:		/^([a-zA-Z0-9-.\s])+$/,
				city: 		/^([a-zA-Z0-9-.\s])+$/,
				address: 	/^([a-zA-Z0-9-.\s])+$/ 
			},
			messages: {
				emailSent: 'Your email has been successfully sent.',
				addToFav: 'UPC# %upc has been added to your Favorites. You may review these at any time by clicking here.',
				resetPw: 'Your password has been successfully changed.',
				subscribed: 'You have been successfully subscribed.'
			}
		},
		config: {
			delays: {
				notificationMin: 4000,
				notificationMax: 10000,
				ajaxTimeout: 300000
			}
		}
	});
})(jQuery);
// end:defines.js