//============================================================================
// CONSTANTS (DON'T CHANGE!) |||||||||||||||||||||||||||||||||||||||||||||||||
//============================================================================
// define the content types
var CONTENT_TYPE_SP_RINGTONE 	= 1;
var CONTENT_TYPE_RINGTONE 		= 2;
var CONTENT_TYPE_WALLPAPER 		= 3;
var CONTENT_TYPE_VIDEO 			= 4;
var CONTENT_TYPE_SP_ALERT		= 5;
var CONTENT_TYPE_ALERT			= 6;
var CONTENT_TYPE_SP_GREETING	= 7;
var CONTENT_TYPE_GREETING		= 8;

// store all of the content types in a convenient array to traverse when needed
var CONTENT_TYPES = [CONTENT_TYPE_SP_RINGTONE,CONTENT_TYPE_RINGTONE,CONTENT_TYPE_WALLPAPER,CONTENT_TYPE_VIDEO,CONTENT_TYPE_SP_ALERT,CONTENT_TYPE_ALERT,CONTENT_TYPE_SP_GREETING,CONTENT_TYPE_GREETING];

// define various greeting delivery modes. some content types have multiple vectors for distribution
var GREETING_DELIV_MODE_OBC 	= 1; // outbound phone call
var GREETING_DELIV_MODE_EMAIL	= 2; // DO NOT USE! NOT IMPLEMENTED YET
var GREETING_DELIV_MODE_URL	 	= 3; // generate a URL to embed/copy-paste

// store all of the greeting delivery modes in a convenient array to traverse when needed
var GREETING_DELIV_MODES = [GREETING_DELIV_MODE_OBC,GREETING_DELIV_MODE_EMAIL,GREETING_DELIV_MODE_URL];

// define labels that describe each greeting delivery mode. These are used to build the user interface for the 'greeting_modes' screen.
var GREETING_DELIV_MODE_LABELS = {};
GREETING_DELIV_MODE_LABELS[GREETING_DELIV_MODE_OBC] 	= 'Send A Phone Call';
GREETING_DELIV_MODE_LABELS[GREETING_DELIV_MODE_EMAIL] 	= 'Send An E-mail';
GREETING_DELIV_MODE_LABELS[GREETING_DELIV_MODE_URL] 	= 'Get A Link To Copy & Paste';

// define a set of labels for each content type to display as path tracking in Google Analytics
var CONTENT_TYPE_TRACKING_LABEL = {};
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_SP_RINGTONE] 	= 'sp_ringtone';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_RINGTONE] 		= 'ringtone';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_WALLPAPER] 	= 'mobile_wallpaper';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_VIDEO] 		= 'mobile_video';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_SP_ALERT]	 	= 'sp_alert';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_ALERT] 		= 'alert';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_SP_GREETING] 	= 'sp_greeting';
CONTENT_TYPE_TRACKING_LABEL[CONTENT_TYPE_GREETING] 		= 'greeting';

// define two different data structures for pricing. One for display to the user, and the other for the price tracked
var PRICING_DISPLAY = {};
var PRICING_TRACKED = {};

// object where we sort content objects into content types (keys)
var CONTENT_SIFT = {};

//============================================================================
// GLOBAL VARIABLES ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//============================================================================
// Google Analytics tracking info
var GA_TRACKING_ID = "UA-4944953-16";
var ENABLE_TRACKING = 1;

// Define paths to our gateways and proxies
var BASE_URL 					= "http://jameslipton.youtalk.com/"; 				// base url to our microsite
var BASE_ASSET_URL 				= "http://cdn.jameslipton.youtalk.com/"; 			// base url to our microsite's assets (css files, images, js files)
var AUDIO_GATEWAY_URL 			= BASE_URL+"gateway/preview_audio.php"; 			// url where audio should be fetched
var RT_WP_MV_GATEWAY_URL 		= BASE_URL+"gateway/rt_wp_mv_proxy.php"; 			// url where ringtone/wallpaper/video requests are sent
var OBC_GATEWAY_URL 			= BASE_URL+"gateway/obc_gateway.php"; 				// url where obc (outbound phone call) requests are sent
var OPT_IN_GATEWAY_URL 			= BASE_URL+"gateway/opt_in_gateway.php"; 			// url where sign up opt-in requests are sent
var OPT_OUT_GATEWAY_URL 		= BASE_URL+"gateway/opt_out_gateway.php"; 			// url where opt-out requests are sent
var USER_FEEDBACK_GATEWAY_URL 	= BASE_URL+"gateway/user_feedback_gateway.php"; 	// url where user feedback requests are sent
var PICKUP_DATA_GATEWAY_URL		= BASE_URL+"gateway/audio_pickup_data_gateway.php"; // url where pickup keys are sent fetch audio info
var PICKUP_KEY_GATEWAY_URL		= BASE_URL+"gateway/audio_pickup_key_gateway.php"; 	// url where audio info is sent in exchange for a pickup key
var RENDERER_DS_GATEWAY_URL 	= BASE_URL+'ds/[APP_ID].php'; 						// url to the gateway used to fetch JSON content data structures

// define the locations of the Flash audio players
var FLASH_PLAYER_SMALL_URL 		= BASE_ASSET_URL+'flash/audio_player_small.swf';
var FLASH_PLAYER_LARGE_URL 		= BASE_ASSET_URL+'flash/audio_player_large.swf';

// only used if all content is the same price
var PRICING_DISPLAY_GLOBAL					= 1.99;

// the price the end user sees (for display only)
PRICING_DISPLAY[CONTENT_TYPE_SP_RINGTONE]	= 1.99;
PRICING_DISPLAY[CONTENT_TYPE_RINGTONE]		= 1.99;
PRICING_DISPLAY[CONTENT_TYPE_SP_ALERT]		= 1.99;
PRICING_DISPLAY[CONTENT_TYPE_ALERT]			= 1.99;
PRICING_DISPLAY[CONTENT_TYPE_WALLPAPER]		= 1.99;
PRICING_DISPLAY[CONTENT_TYPE_VIDEO]			= 1.99;
PRICING_DISPLAY[CONTENT_TYPE_SP_GREETING]	= 0.00;
PRICING_DISPLAY[CONTENT_TYPE_GREETING]		= 0.00;

// the price that is tracked (only for tracking)
PRICING_TRACKED[CONTENT_TYPE_SP_RINGTONE]	= 1.99;
PRICING_TRACKED[CONTENT_TYPE_RINGTONE]		= 1.99;
PRICING_TRACKED[CONTENT_TYPE_SP_ALERT]		= 1.99;
PRICING_TRACKED[CONTENT_TYPE_ALERT]			= 1.99;
PRICING_TRACKED[CONTENT_TYPE_WALLPAPER]		= 1.99;
PRICING_TRACKED[CONTENT_TYPE_VIDEO]			= 1.99;
PRICING_TRACKED[CONTENT_TYPE_SP_GREETING]	= {GREETING_DELIV_MODE_OBC:-0.055, GREETING_DELIV_MODE_URL:0.0};
PRICING_TRACKED[CONTENT_TYPE_GREETING]		= {GREETING_DELIV_MODE_OBC:-0.055, GREETING_DELIV_MODE_URL:0.0};

// all of the content available on the site
var CONTENT = [
	// Super Personalized Ringtones
	{'content_type':CONTENT_TYPE_SP_RINGTONE, 	'title':'Lipton Directs You to Answer',	'program_id':29, 'product_id':737, 'app_id':1004, 'retail_app_id':1303, 'thumbnail_url':null, 'modes':[]},
	{'content_type':CONTENT_TYPE_SP_RINGTONE, 	'title':'Call Time is Now!',			'program_id':29, 'product_id':736, 'app_id':999, 'retail_app_id':1302, 'thumbnail_url':null, 'modes':[]},
	{'content_type':CONTENT_TYPE_SP_RINGTONE, 	'title':'James Lipton Announces Caller','program_id':29, 'product_id':735, 'app_id':1006, 'retail_app_id':1304, 'thumbnail_url':null, 'modes':[]},
	// Static Ringtones
	// Personalized Alerts
	// Static Alerts
	// Wallpapers
	// Videos
	// Personalized Greetings 
	{'content_type':CONTENT_TYPE_SP_GREETING,	'title':'Personalized Message From James',	'program_id':null, 'product_id':null,'app_id':995, 'retail_app_id':996, 'thumbnail_url':null, 'modes':[GREETING_DELIV_MODE_URL,GREETING_DELIV_MODE_OBC]}
	// Static Greetings 
];

// this data structure is used to populate the list of links that appear in the main menu under 'character'. leave a url blank to make it appear disabled
var CHARACTER_LINKS = [
	{'label':'Inside the Actors Studio',		'url':''}
];

// a list of valid carriers allowed for ringtone/alert/wallpaper/video delivery with vendor specific id's
var RT_WP_MV_DELIVERY_CARRIERS = [
	{'value':'42',					'label':'AT&T'},
	{'value':'72',					'label':'Sprint'},
	{'value':'41',					'label':'T-Mobile®'},
	{'value':'87',					'label':'Verizon Wireless'}
];

// a list of carriers used to populate the sign up section's carrier pulldown menu
var SIGN_UP_CARRIERS = [
	{'value':'att_mobility',		'label':'AT&T Mobility'},
	{'value':'verizon',				'label':'Verizon Wireless'},
	{'value':'sprint_nextel',		'label':'Sprint/Nextel'},
	{'value':'t_mobile',			'label':'T-Mobile®'},
	{'value':'alltel',				'label':'Alltel'},
	{'value':'tracfone_wireless',	'label':'Tracfone Wireless'},
	{'value':'us_cellular',			'label':'US Cellular'},
	{'value':'virgin_mobile',		'label':'Virgin Mobile'},
	{'value':'metropcs',			'label':'MetroPCS'},
	{'value':'cricket',				'label':'Cricket'},
	{'value':'other',				'label':'Other'}
];

// a list of topics to display in the pulldown menu on the "Contact Us" screen.
var CONTACT_US_TOPICS = [
	{'value':'customer_service',	'label':'Customer Service'},
	{'value':'compliment',			'label':'Compliment'},
	{'value':'question',			'label':'Question'},
	{'value':'suggestion',			'label':'Suggestion'},
	{'value':'marriage_proposal',	'label':'Marriage Proposal'},
	{'value':'business_inquiry',	'label':'Business Inquiry'},
	{'value':'other',				'label':'Other'}
];

// terms and conditions for various content offerings
var RT_WP_MV_TERMS = "Available to AT&amp;T, Verizon Wireless, Sprint &amp; T-Mobile&reg; customers. All ringtones, wallpaper, and videos are [PRICE_GLOBAL] each. The one-time charge will appear on your wireless bill or be deducted from your prepaid account. Standard/other charges may apply. Requires a compatible handset and data plan. You must be at least 13 years of age. Minors must have parent's permission. For Full Terms of Use, visit <a href=\"http://www.modtones.com\" target=\"terms\">www.modtones.com</a>. For questions, email <a href=\"mailto:help@modtones.com\">help@modtones.com</a>. Send \"STOP\" to 66399 to opt-out.";
var PROMO_TERMS = "Available to all land line and wireless phones. Promotional phone calls are free of charge*. Phone calls may be sent between 8am and 9pm in the recipient's time zone. A limit of one phone call per day and two phone calls per week to a recipient is imposed. You must be at least 13 years of age. Minors must have parent's permission. See our <a href=\"javascript:void(0);\" onmouseup=\"show_faq_privacy_terms_popup('terms_and_conditions');\">Full Terms &amp; Conditions</a> for more info. For questions, please <a href=\"javascript:void(0);\" onmouseup=\"modal_close_bttn_onmouseup(); contact_us_onmouseup();\">Contact Us</a>.<br /><br />* Regular cellular voice rates may apply for your recipient.";
var PROMO_TERMS_URL = "The unique URL created will never expire. You must be at least 13 years of age. Minors must have parent's permission. See our <a href=\"javascript:void(0);\" onmouseup=\"show_faq_privacy_terms_popup('terms_and_conditions');\">Full Terms &amp; Conditions</a> for more info. For questions, please <a href=\"javascript:void(0);\" onmouseup=\"modal_close_bttn_onmouseup(); contact_us_onmouseup();\">Contact Us</a>.<br />";

// user feedback messages
var RT_WP_MV_INSTRUCTIONS = "You're almost done. Here are the next steps: A text message will be sent to your phone shortly. Follow the instructions in it to get your content.  If your phone isn't supported or you don't download your content, you won't be billed.";
var CONTACT_US_THANKS_MSG = "Thank you for taking the time out to fill out our contact form!  We'll get back to you soon!";
var MSG_GENERIC_OBC_ERROR = "Sorry!  We were unable to send your phone call. The system may be experiencing difficulties. Please try again later.";
var MSG_OPT_OUT_THANKS_MSG = "Thank you for taking the time to opt-out.  You will not receive messages from this system in the future.";
var MSG_DELIV_URL_SUCCESS = "Your link for a personalized James Lipton message was created. The link will never expire, so you may share it as often as you like.<br /><br />[PICKUP_URL]<br />";
var MSG_DELIV_URL_GENERIC_ERROR = "Sorry!  We were unable to create your link. The system may be experiencing difficulties. Please try again later.";
var MSG_PICKUP_URL_GENERIC_ERROR = "We were unable to locate your audio. Please make sure you copy and pasted the entire audio URL.";

var PROMO_SUCCESS_MSG = "Your personalized phone call from James Lipton was sent. Delivery is immediate.  Send as many as you like!";
var PROMO_SOLICIT1 = "Would you like to send a personalized message from James Lipton to a friend for <b>free</b>*?<br /><br /><span>* Regular cellular voice rates may apply for your recipient.</span>";
var PROMO_SOLICIT2_OBC = "Would you like to send another personalized James Lipton call to a friend for <b>free</b>*?<br /><br /><span>* Regular cellular voice rates may apply for your recipient.</span>";
var PROMO_SOLICIT2_URL = "Would you like to create another personalized James Lipton link for <b>free</b>?";

var MSG_AUDIO_PICKUP_MSG = "Someone you know created this personalized James Lipton message just for you.";
var MSG_AUDIO_PICKUP_SOLICIT = "Would you like to send your own personalized message from James Lipton to a friend for <b>free</b>?";
var MSG_AUDIO_PICKUP_SOLICIT_OBC = "Would you like to send your own personalized message from James Lipton to a friend for <b>free</b>*?<br /><br /><span>* Regular cellular voice rates may apply for your recipient.</span>";

var TAB_LABEL_PERSONALIZED = "MAKE YOUR OWN";
var TAB_LABEL_STATIC = "CLASSIC";
var HEADER_LOGO_URL = "http://www.bravotv.com/inside-the-actors-studio";
var HEADER_LOGO_ALT = "Inside the Actors Studio";
var SISTER_SITE_URL = "";
var SISTER_SITE_ALT = "Create Your Own Personalized Vicki Ringtone!";

// create a global reusable animation instance used for hiliting errors
var ANIM_PULSE_ERRORS = (typeof VTAnimation == 'function') ? new VTAnimation(60,1500,0,2,'linear',[],pulse_error_onenterframe) : null;
