// --------- EM//96z8rbtl////main
var propelEmbed2182190 = function(){
var pid = '2182190';
var imgUrl = 'http://core.propelplus.com/Propel_Large_600x338.png';
var defaultWidth = "300";
var defaultHeight = "250";
var _sizes = {
AUTO: [640,360],
TXT: [400,225],
XL: [800,450],
L: [600,338],
M: [530,300],
S: [460,260],
REC: [300,250],
LREC: [336,280],
LRM: [400,251],
GOOGM: [400,300]
};
function getAdDimensions(adSize) {
return {width:_sizes[adSize][0], height:_sizes[adSize][1]};
};
function iframeCheck() {
return (window.location != window.parent.location) ? true : false;
};
function loadScript(url, callback) {
// adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// then bind the event to the callback function
// there are several events for cross browser compatibility
if(script.addEventListener) {
script.addEventListener("load",callback,false);
}
else if(script.readyState && typeof callback !== 'undefined') {
script.onreadystatechange = callback;
}
//script.onreadystatechange = callback;
//script.onload = callback;
// fire the loading
head.appendChild(script);
};
function loadPropel() {
loadScript('http://core.propelplus.com/js/propel-client.js', requireScript);
};
function validateOverrideParams(COMMON){
if (COMMON.OVERRIDE_CONTENT_HEIGHT.length===0 || parseInt(COMMON.OVERRIDE_CONTENT_HEIGHT) === 0
||COMMON.OVERRIDE_CONTENT_WIDTH.length===0 || parseInt(COMMON.OVERRIDE_CONTENT_WIDTH) === 0){
COMMON.OVERRIDE_CONTENT_HEIGHT = defaultHeight;
COMMON.OVERRIDE_CONTENT_WIDTH = defaultWidth;
}
if (COMMON.OVERRIDE_AD_SIZE.length === 0) {
COMMON.OVERRIDE_AD_SIZE = "REC";
}
};
function requireScript() {
require.config({
baseUrl: "//core.propelplus.com/js",
shim: {
'swfobject': {
exports: 'swfobject'
}
},
paths: {
"jquery": "//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min",
"swfobject": "//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject",
"play": "//core.propelplus.com/js"
}
});
require(['jquery','swfobject', 'Propel', 'play/DisplayAdController', 'play/SizeController'], function (jQuery, swfobject, Propel, DisplayAdController, SizeController) {
var loadBkgndImg = function(height, width) {
jQuery('#adIn'+pid).css({
'background-size': 'cover',
'background-image': 'url('+imgUrl+')',
'height': height+'px',
'width': width+'px'
});
};
var lifeScript = function() {
jQuery('#adIn'+pid).remove();
jQuery('#page1 .show').html(jQuery('#page1 .show').html().replace('
','
'));
};
var checkCustomizedSite = function(){
if (CustomizedFunctionMap.hasOwnProperty(location.hostname)){
CustomizedFunctionMap[location.hostname]();
}
};
var CustomizedFunctionMap = {
//'www.lifescript.com' : lifeScript
};
var introRun = function(intro_code, container_height, propelEmbedNode){
if (intro_code === 'ON_SCROLL_VERTICAL_INSERT') {
expandPropel(container_width, container_height, propelEmbedNode);
return;
}
if (introConfigMap.hasOwnProperty(intro_code)) {
var introFixedPlayerEle = new FixedPositionIntroHandler(pid,
introConfigMap[intro_code].v_position,
introConfigMap[intro_code].h_position,
introConfigMap[intro_code].isExpand,
introConfigMap[intro_code].hasBanner,
propelEmbed2182190.config.COMMON.OVERRIDE_CONTENT_HEIGHT,
propelEmbed2182190.config.COMMON.OVERRIDE_CONTENT_WIDTH);
introFixedPlayerEle.run();
loadPropelPlayer();
}
};
var expandPropel = function(width, height, propelEmbedNode) {
var intro = new IntroHandler();
intro.init('adIn'+pid,pipecode, propelEmbedNode, width, height, 'propelEmbed'+pid);
};
var introConfigMap = {
'TOP_LEFT_INSERT' : {'v_position':'top', 'h_position':'left', 'isExpand' : 0, 'hasBanner':0},
'TOP_RIGHT_INSERT' : {'v_position':'top', 'h_position':'right', 'isExpand' : 0, 'hasBanner':0},
'BOTTOM_LEFT_INSERT' : {'v_position':'bottom', 'h_position':'left', 'isExpand' : 0, 'hasBanner':0},
'BOTTOM_RIGHT_INSERT': {'v_position':'bottom', 'h_position':'right', 'isExpand' : 0, 'hasBanner':0},
'TOP_LEFT_INSERT_V_EXPAND' : {'v_position':'top', 'h_position':'left', 'isExpand' : 1, 'hasBanner':0},
'TOP_RIGHT_INSERT_V_EXPAND' : {'v_position':'top', 'h_position':'right', 'isExpand' : 1, 'hasBanner':0},
'BOTTOM_LEFT_INSERT_V_EXPAND' : {'v_position':'bottom', 'h_position':'left', 'isExpand' : 1, 'hasBanner':0},
'BOTTOM_RIGHT_INSERT_V_EXPAND' : {'v_position':'bottom', 'h_position':'right', 'isExpand' : 1, 'hasBanner':0},
};
var loadPropelWrap = function(embedWidth, embedHeight, propelEmbedNode){
if (propelInitialized) return; // Prevent Propel player from being initialized twice
propelInitialized = true;
propelEmbedNode.adConnector.start();
jQuery('#EmbedContainer'+pid)
.height(outer_container_height)
.width(outer_container_width);
if ((propelEmbed2182190.config.COMMON.OVERRIDE_CONTENT_HEIGHT !== embedHeight)||(propelEmbed2182190.config.COMMON.OVERRIDE_CONTENT_WIDTH !== embedWidth))
{
jQuery('#adIn'+pid).css({
height: embedHeight,
width: embedWidth,
'position': 'absolute'
});
if ((jQuery('#EmbedContainer'+pid).parent().css('text-align').indexOf("center") !== -1) && (jQuery('#EmbedContainer2182190').parent().width() < embedWidth ))
{
jQuery('#EmbedContainer'+pid).css('text-align', 'left');
}
}
jQuery('#propelEmbed'+pid+'_wrap').width(embedWidth).height(embedHeight);
jQuery('#propelEmbed'+pid+'_mega_wrap').width(embedWidth).height(embedHeight);
};
var loadPropelPlayer = function(){
if ( document.readyState == 'interactive' && interactive == 1 ){
loadPropelWrap(container_width, container_height, propelEmbedNode);
}
jQuery(document).ready(
function()
{
loadPropelWrap(container_width, container_height, propelEmbedNode);
}
);
};
var propelEmbedNode = new Propel('propelEmbed'+pid);
var conf = JSON.parse("{\"COMMON\":{\"FORCED_PLAYER_MODE\":\"\",\"RESPONSIVE\":\"\",\"ADNX_LINK\":\"\",\"AD_INTERVAL\":\"1\",\"DISABLE_PREROLL\":\"\",\"FRAME_BUST_ENABLE\":\"OFF\",\"INTRO\":\"NONE\",\"PREVIEW_IMAGE\":\"http:\\/\\/d3hsxdr04hxe62.cloudfront.net\\/Images\\/bon_avocado2.JPG\",\"DISABLE_PLAYER\":\"\",\"AUTO_MODE\":\"ON\",\"AD_SERVER_PRIORITY\":\"LR\",\"MOBILE_AD_SERVER_PRIORITY\":\"\",\"AD_SIZE\":\"M\",\"CONTENT_WIDTH\":\"530\",\"CONTENT_HEIGHT\":\"300\",\"OVERRIDE_AD_SIZE\":\"GOOGM\",\"OVERRIDE_CONTENT_WIDTH\":\"400\",\"OVERRIDE_CONTENT_HEIGHT\":\"300\",\"AD_AUDIO\":\"1\",\"AD_AUDIO_VOLUME\":\"\",\"SOUND_CONTROL\":\"ON\",\"CONTENT_URL\":\"http:\\/\\/s1.puzzlezonegames.com\\/assets\\/EgyptJewels_secure.swf\",\"CONTENT_TITLE\":\"\",\"BUMPER_URL\":\"\",\"VIDEO_PLAYER_SOURCE\":\"http:\\/\\/api.propelplus.com\\/feeds\\/feed_generator.php?name=BetterFood\",\"IS_VIDEO\":\"TRUE\",\"LOADER_BAR\":\"OFF\",\"AD_EVENT_CALLBACKS\":\"1\",\"TRACK_GA\":\"\",\"AD_DEBUG\":\"\",\"COMSCORE\":\"true\",\"PASSIVE_PREROLL\":\"\",\"APP\":\"EM\",\"DOMAIN\":\"-\",\"PIPECODE\":\"96Z8RBTL\",\"PAGE_TYPE\":\"-\",\"CONTENT\":\"-\",\"SUB\":\"-\",\"POSITION\":\"MAIN\"},\"LR\":{\"LR_URL\":\"http:\\/\\/embed.propelplus.com\\/96z8rbtl?entId=02106598c3975d4528d6ef62c414a54200084794\",\"LR_VIDEO_URL\":\"http:\\/\\/embed.propelplus.com\\/96z8rbtl?entId=02106598c3975d4528d6ef62c414a54200084794\",\"LR_VIDEO_ID\":\"-_MAIN\",\"LR_VIDEO_POSITION\":\"0\",\"LR_PUBLISHER_ID\":\"70878\",\"LR_ADMAP\":\"in::0;ov::2,50%;ov::50%,100%;\",\"LR_AUTOPLAY\":\"1\",\"LR_CONTENT\":\"\",\"LR_TITLE\":\"\",\"LR_DESCRIPTION\":\"\",\"LR_LAYOUT_SKIN_ID\":\"1\",\"LR_LAYOUT_SKIN_MESSAGE\":\" will start in {COUNTDOWN} seconds.\",\"LR_MUTED\":\"0\",\"LR_COMPANIONS\":\"300:250:lr_companion:propel_companion_default:true\",\"LR_ALLOW_RETRY\":\"2\",\"LR_VERTICALS\":\"-_MAIN,96Z8RBTL,\"},\"VIDEOPLAYER\":{\"DATE_FILTERING\":\"\",\"AUDIO_SOFT_VOLUME\":\"\",\"AUDIO_CONTROL\":\"ENABLE\",\"PLAY_CONTROL\":\"AUTO-PLAY\",\"AUDIO_STATE\":\"ON-ROLLOVER\",\"PLAYER_SIZE\":\"GOOGM\",\"VIDEO_PLAYER_MODE\":\"FEED\",\"VERTICAL_LIST_ENABLED\":\"\",\"SUGGESTION_SCREEN_ENABLED\":\"TRUE\",\"BRANDING_ENABLED\":\"\",\"LOADED_STATE_SELECTOR\":\"\",\"PLAYING_STATE_SELECTOR\":\"\",\"PAUSED_STATE_SELECTOR\":\"\",\"END_STATE_SELECTOR\":\"SIXPACK\",\"CONTROL_BAR_ENABLED\":\"\",\"CONTINUOUS_MODE_ENABLED\":\"TRUE\",\"CONTINUOUS_MODE_DELAY\":\"5\",\"FACEBOOK_BUTTON_ENABLED\":\"\",\"TWITTER_BUTTON_ENABLED\":\"\",\"UP_NEXT_ENABLED\":\"\",\"UP_NEXT_DELAY\":\"\"},\"LR_BACKFILL\":{\"LR_URL\":\"http:\\/\\/embed.propelplus.com\\/96z8rbtl?entId=02106598c3975d4528d6ef62c414a54200084794\",\"LR_VIDEO_URL\":\"http:\\/\\/embed.propelplus.com\\/96z8rbtl?entId=02106598c3975d4528d6ef62c414a54200084794\",\"LR_VIDEO_ID\":\"-_MAIN\",\"LR_VIDEO_POSITION\":\"0\",\"LR_PUBLISHER_ID\":\"\",\"LR_ADMAP\":\"in::0;ov::2,50%;ov::50%,100%;\",\"LR_AUTOPLAY\":\"\",\"LR_CONTENT\":\"\",\"LR_TITLE\":\"\",\"LR_DESCRIPTION\":\"\",\"LR_LAYOUT_SKIN_ID\":\"1\",\"LR_LAYOUT_SKIN_MESSAGE\":\" will start in {COUNTDOWN} seconds.\",\"LR_MUTED\":\"0\",\"LR_COMPANIONS\":\"\",\"LR_ALLOW_RETRY\":\"\",\"LR_VERTICALS\":\"-_MAIN,96Z8RBTL,\"}}") ;
validateOverrideParams(conf.COMMON);
var url = (window.location !== window.parent.location) ? document.referrer: document.location.href;
var embedAdSize = getAdDimensions(conf.COMMON.OVERRIDE_AD_SIZE);
var container_width = embedAdSize.width;
var container_height = embedAdSize.height;
var sizeHandler = new SizeController(pid, conf, container_width, container_height);
outer_container_height = conf.COMMON.OVERRIDE_CONTENT_HEIGHT;
outer_container_width = conf.COMMON.OVERRIDE_CONTENT_WIDTH;
conf.LR.LR_URL = url;
conf.LR.LR_VIDEO_URL = url;
var propelInitialized = false;
var interactive = 0;
propelEmbedNode.adConnector.enigmaInit("propelEmbed"+pid, conf, sizeHandler) ;
if (conf.COMMON.FRAME_BUST_ENABLE.trim().toUpperCase() === 'ON'){
var inIframe = iframeCheck();
if (inIframe){
loadBkgndImg(container_height, container_width);
return;
}
}
checkCustomizedSite();
if (conf.COMMON.INTRO !== 'NONE') {
pipecode = conf.COMMON.PIPECODE;
introRun(conf.COMMON.INTRO, container_height, propelEmbedNode);
return;
}
loadPropelPlayer();
});
};
return {
init: function() {
loadScript('http://core.propelplus.com/js/require.js', loadPropel);
}
};
}();
document.write("");
propelEmbed2182190.init();