(function(){ var bootstrap = {"advertising":{"adinterval":0,"adserverurl":null,"adtimeout":2000,"enabled":false,"maxads":100},"analytics":true,"api_base_url":"//api.tvpage.com/v1","arrow_background_color":"#fff","arrow_background_color_hover":"whitesmoke","arrow_border":"none","arrow_border_radius":"initial","arrow_height_480":"40px","arrow_icon_color":"#333","arrow_icon_color_hover":"#000","arrow_inactive_background_color":"whitesmoke","arrow_inactive_icon_color":"#333","arrow_next_right":"0","arrow_prev_left":"0","arrow_size":"16%","arrow_width_480":"40px","autonext":true,"autoplay":true,"background":"white","box_shadow":"none","carousel_center_padding":"0","channelid":"111152720","codebook":{"bedroom":{"query":"video_type=bedroom"},"cookware":{"query":"video_type=cookware"},"dining_entertaining":{"query":"video_type=dining_entertaining"},"entertainment":{"query":"video_type=entertainment"},"featured":{"query":"video_type=featured"},"food_preparation":{"query":"video_type=food_preparation"},"for_her":{"query":"video_type=for_her"},"for_him":{"query":"video_type=for_him"},"gardening":{"query":"video_type=gardening"},"gift_ideas":{"query":"video_type=gifting"},"kitchen":{"query":"video_type=kitchen"},"living_room":{"query":"video_type=living_room"},"outdoor_living":{"query":"video_type=outdoor_living"},"popular_gifts":{"query":"video_type=popular_gifts"},"recipes":{"query":"video_type=recipes"},"timesavers":{"query":"video_type=timesavers"}},"component":"modal","content_background":"white","content_border":"none","draft":false,"fix_page_scroll":true,"fonts":["//fonts.googleapis.com/css?family=Open+Sans:600,700,800"],"height_offset":"0","iframe_carousel_body_padding":"0","iframe_modal_body_padding":"10px","iframe_width":"100%","infinite":true,"iscjklanguage":false,"item_background_image_size":"cover","item_border":"0","item_image_overlay_color":"rgba(0, 0, 0, 0.2)","item_margin_left":"0","item_margin_right":"0","item_meta_data":false,"item_metadata_font_color":"#333","item_metadata_font_family":"Helvetica","item_metadata_font_size":"55%","item_metadata_padding":"7px 7px 0 7px","item_padding_left":"5px","item_padding_right":"5px","item_play_button_background_color":"#fff","item_play_button_border":"0","item_play_button_border_radius":"50%","item_play_button_height":"45px","item_play_button_hover_color":"#e57211","item_play_button_icon_color":"#333","item_play_button_icon_hover_color":"#fff","item_play_button_show_on_hover":false,"item_play_button_width":"45px","item_title_font_color":"#333","item_title_font_family":"Helvetica","item_title_font_size":"12px","item_title_font_weight":"initial","item_title_margin":"10px 0","item_title_padding":"0 7px","item_title_text_align":"left","items_per_page":"25","items_to_scroll":"1","items_to_show":"3","lastmod":"0001-01-01T00:00:00Z","layout":"bootstrap","loginid":"1758166","mainSections":["v"],"mainsections":["v"],"margin":"0","merchandise":true,"mobile_holder_margin":"0","mobile_modal_body_padding":"10px","mobile_modal_close_button_height":"24px","mobile_modal_close_button_right":0,"mobile_modal_close_button_top":0,"mobile_modal_close_button_width":"24px","mobile_navigation_bullets":false,"mobile_product_container_border":0,"mobile_product_container_margin":0,"mobile_product_cta_background":"#333","mobile_product_cta_border":"none","mobile_product_cta_border_bottom":"none","mobile_product_cta_border_radius":0,"mobile_product_cta_border_right":"none","mobile_product_cta_bottom":0,"mobile_product_cta_font_color":"#fff","mobile_product_cta_font_family":"Helvetica","mobile_product_cta_font_weight":"normal","mobile_product_cta_height":"22px","mobile_product_cta_padding":0,"mobile_product_cta_right":0,"mobile_product_cta_text_align":"center","mobile_product_cta_width":"108px","mobile_product_price_font_color":"initial","mobile_product_price_font_family":"Helvetica","mobile_product_price_font_size":"16px","mobile_product_price_font_weight":"initial","mobile_product_price_line_height":"normal","mobile_product_price_margin":"5px 0","mobile_product_price_text_align":"left","mobile_product_price_text_color":"#333","mobile_product_price_text_transform":"none","mobile_product_title_font_color":"#333","mobile_product_title_font_family":"Helvetica","mobile_product_title_font_size":"12px","mobile_product_title_font_weight":"initial","mobile_product_title_height":"29px","mobile_product_title_line_height":"initial","mobile_product_title_margin":"0","mobile_product_title_text_align":"left","mobile_product_title_text_transform":"none","mobile_products_headline_font_family":"Helvetica","mobile_products_headline_font_size":"12px","mobile_products_headline_font_weight":"normal","mobile_products_headline_text_align":"left","mobile_products_headline_text_color":"#333","mobile_products_headline_text_transform":"none","mobile_products_max_navigation_bullets":"5","mobile_products_message_arrow_position":"105px","mobile_products_message_width":"100%","mobile_products_navigation_bullets":true,"mobile_slider_active_dots_color":"#333","mobile_slider_dots_color":"#BEBEBE","mobile_slider_dots_size":"24px","modal_background":"#fff","modal_body_font_family":"Helvetica","modal_body_padding":"0","modal_border":"none","modal_border_radius":0,"modal_box_shadow":"0 2px 18px 0 rgba(0,0,0,0.5)","modal_close_button_background_color":"#333","modal_close_button_background_color_hover":"#000","modal_close_button_background_image_url":"","modal_close_button_border":"none","modal_close_button_border_radius":"50%","modal_close_button_box_shadow":"none","modal_close_button_height":"27px","modal_close_button_opacity":1,"modal_close_button_opacity_hover":1,"modal_close_button_padding":"3px","modal_close_button_right":"-6px","modal_close_button_svg_display":"block","modal_close_button_svg_icon_color":"white","modal_close_button_svg_icon_stroke_width":"1px","modal_close_button_top":"-6px","modal_close_button_width":"27px","modal_header_border_bottom":"1px solid #e5e5e5","modal_header_padding":"25px 30px 5px 15px","modal_title_font_color":"#333","modal_title_font_family":"Helvetica","modal_title_font_size":"16px","modal_title_font_weight":"initial","modal_title_position":"top","name":"magnolia-home","navigation_active_bullet_background_color":"#333333","navigation_active_bullet_background_image_url":"","navigation_active_bullet_background_position":"0px 0px","navigation_active_bullet_border":"none","navigation_bullet_background_color":"#777777","navigation_bullet_background_image_url":"","navigation_bullet_background_position":"0px 0px","navigation_bullet_border":"none","navigation_bullet_border_radius":"50%","navigation_bullet_font_color":"black","navigation_bullet_font_size":"6px","navigation_bullet_margin":"0 5px","navigation_bullet_padding":"0","navigation_bullet_size":"20px","navigation_bullets":false,"navigation_bullets_append_to":"","navigation_bullets_bottom":"-25px","navigation_bullets_margin":"0","navigation_bullets_margin_bottom":"30px","navigation_bullets_position":"absolute","navigation_bullets_text_align":"center","no_products_banner":"","no_products_banner_height":"0","no_products_banner_margin":"0","no_products_banner_padding":"0","no_products_banner_width":"inherit","player_version":"3.1.2","preload":false,"product_border":"1px solid black","product_popup_arrow_indicator_border_color":"#000","product_popup_background":"#fff","product_popup_border":"1px solid black","product_popup_border_radius":0,"product_popup_box_shadow":"none","product_popup_cta_background":"#333","product_popup_cta_background_hover":"#000","product_popup_cta_border":"none","product_popup_cta_border_bottom":"none","product_popup_cta_border_radius":"0","product_popup_cta_border_radius_480":"0","product_popup_cta_font_color":"#fff","product_popup_cta_font_color_hover":"#fff","product_popup_cta_font_family":"Helvetica","product_popup_cta_font_size":"14px","product_popup_cta_font_size_480":"12px","product_popup_cta_font_weight":"initial","product_popup_cta_height":"40px","product_popup_cta_height_480":"22px","product_popup_cta_margin":"10px 0 0 0","product_popup_cta_text":"View Details","product_popup_cta_text_transform":"uppercase","product_popup_cta_width_480":"110px","product_popup_padding":"10px","product_popup_thumbnail_border":0,"product_popup_width":"235px","product_price_font_color":"#333","product_price_font_family":"Helvetica","product_price_font_size":"16px","product_price_font_weight":"initial","product_price_margin":"0 0 10px 0","product_price_text_align":"left","product_rate_height":"20px","product_rate_width":"20px","product_rating_attribute":"rating","product_rating_background_image_url":"product_rating_icons.png","product_rating_empty_background_image_position":"0 -20px","product_rating_full_background_image_position":"0 0","product_rating_half_background_image_position":"0 -41px","product_review_attribute":"review_count","product_reviews_font_color":"#333","product_reviews_font_family":"Helvetica","product_reviews_font_size":"12px","product_reviews_font_weight":"initial","product_reviews_margin_left":"10px","product_reviews_top":"-5px","product_sku_font_color":"#333","product_sku_font_color_mobile":"#333","product_sku_font_family":"Helvetica","product_sku_font_family_mobile":"Helvetica","product_sku_font_size":"16px","product_sku_font_size_mobile":"14px","product_sku_font_weight":"initial","product_sku_font_weight_mobile":"initial","product_sku_margin":"10px 0","product_sku_margin_mobile":"5px 0 8px 0","product_sku_prefix":"Part:","product_sku_show":false,"product_sku_text_align":"left","product_sku_text_align_mobile":"left","product_thumbnail_background_image_size":"cover","product_thumbnail_border":"1px solid black","product_thumbnail_image_overlay_color":"rgba(0, 0, 0, 0.2)","product_thumbnail_margin":"0 10px 10px 0","product_thumbnail_margin_mobile":"0 10px 10px 0","product_thumbnail_padding_mobile":"5px","product_thumbnail_zindex_mobile":"9999","product_title_font_color":"#333","product_title_font_family":"Helvetica","product_title_font_size":"14px","product_title_font_weight":"initial","product_title_margin":"10px 0","product_title_text_align":"left","product_title_text_decoration":"none","product_title_text_decoration_hover":"underline","product_title_text_transform":"uppercase","products_background":"#fff","products_headline_display":"block","products_headline_font_color":"#333","products_headline_font_family":"Helvetica","products_headline_font_size":"16px","products_headline_font_weight":"initial","products_headline_right":"3px","products_headline_text":"Related Products","products_headline_top":"3px","products_info_icon_color":"#333","products_info_icon_size":"16px","products_info_tooltip":false,"products_message":"","products_message_background_color":"#FFFFFF","products_message_border":"#BEBEBE","products_message_box_shadow":"0 5px 15px 0 rgba(0, 0, 0, 0.2)","products_message_font_family":"Helvetica","products_message_font_size":"12px","products_message_font_weight":"initial","products_message_line_height":"normal","products_message_padding":"10px","products_message_text_align":"left","products_message_text_color":"#333","products_message_text_transform":"none","products_message_width":"336px","products_scrollbar_border_radius":"100px","products_scrollbar_color":"#c7c7c7","products_scrollbar_width":"5px","subfolder":null,"title":"Magnolia Home","title_background":"none","title_color":"#333","title_font_size":"16px","title_padding":"15px 0","title_text":"Recommended Videos","title_text_align":"left","title_text_font_family":"Helvetica","title_text_font_weight":"initial","type":"carousel"}; bootstrap.baseUrl = "https://video.bedbathandbeyond.com"; bootstrap.templates = { carousel:'' + '' + '' + '', "carousel-item":'
' + '
' + '' + '
' + '
Length: {mediaDuration}
Published: {publishedDate}
' + '

{title}

' + '
', modal:{ 'modal': '
' + '
' + '
' + '
' + '
' + '
' + '' + '' + '' + '' + '
' + '

' + '
' + '
' + '
' + '
' + '
' + '
' + '
', 'tooltip': '' + '' + '' + '' }, "modal-content":{ 'body': '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
', 'product':'' + '
' + '
' + '
' + '
', 'popup':'' + '
'+ '

{title}

' + '

{price}

' + '{ratingReviews}' + '' + '
' }, "modal-content-mobile":{ 'body': '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
'+ '

' + '
' + '
' + '
', 'products': ''+ '
' + '
'+ '

{title}

' + '

{price}

' + '' + '
' + '
', 'tooltip': '' + '' + '' + '' }}; bootstrap.css = { host: "@import url('//fonts.googleapis.com/css?family=Open+Sans:600,700,800');" + "*[class^=tvp-] {" + "box-sizing: border-box;" + "}" + ".tvp-carousel-holder {" + "position: relative;" + "visibility: hidden;" + "opacity: 0;" + "}" + ".tvp-carousel-holder.initialized {" + "visibility: visible;" + "opacity: 1;" + "}" + ".tvp-carousel-holder > iframe {" + "top: 0;" + "left: 0;" + "width: 100%;" + "height: 100%;" + "position: absolute;" + "}" + ".tvp-hidden {" + "display: none;" + "}" + ".tvp-modal-open {" + "overflow: hidden;" + "}" + ".tvp-modal-overlay {" + "position: fixed;" + "top: 0;" + "right: 0;" + "bottom: 0;" + "left: 0;" + "z-index: 1040;" + "background-color: #000;" + "opacity: .5;" + "}" + ".tvp-modal {" + "position: fixed;" + "top: 0;" + "right: 0;" + "bottom: 0;" + "left: 0;" + "z-index: 1050;" + "-webkit-overflow-scrolling: touch;" + "outline: 0;" + "overflow: hidden;" + "overflow-x: hidden;" + "overflow-y: auto;" + "opacity: 1;" + "visibility: visible;" + "}" + ".tvp-modal-wrapper {" + "position: relative;" + "width: auto;" + "margin: 10px;" + "}" + "@media (min-width :900px) {" + ".tvp-modal-wrapper {" + "width: 890px;" + "margin: 30px auto;" + "}" + "}" + ".tvp-modal-content {" + "position: relative;" + "background-clip: padding-box;" + "outline: 0;" + "}" + ".tvp-iframe-modal {" + "margin: 0;" + "border: 0;" + "width: 100%;" + "height: 100%;" + "opacity: 0;" + "position: absolute;" + "top: 0;" + "left: 0;" + "}" + ".mobile .tvp-iframe-modal {" + "position: relative;" + "top: auto;" + "left: auto;" + "}" + ".no-products .tvp-iframe-modal," + ".products .tvp-iframe-modal {" + "opacity: 1;" + "}" + ".tvp-modal-header:after {" + 'content: "";' + "display: table;" + "clear: both;" + "}" + ".tvp-modal-title {" + "margin: 0;" + "float: left;" + "}" + ".tvp-modal-title.bottom {" + "float: none;" + "padding: 0 0 30px 10px;" + "}" + ".tvp-products-headline {" + "float: right;" + "margin: 0;" + "position: relative;" + "}" + ".tvp-modal-iframe-holder {" + "height: 0;" + "width: 100%;" + "position: relative;" + "padding-bottom: 46.47%;" + "}" + ".tvp-modal-iframe-holder.no-products {" + "padding-bottom: 57.4%;" + "}" + ".mobile .tvp-modal-iframe-holder.products {" + "padding-bottom: 0;" + "height: auto;" + "}" + ".mobile .tvp-modal-iframe-holder.no-products {" + "padding-bottom: 59.5%;" + "}" + ".tvp-title {" + "height: 22px;" + "}" + ".tvp-modal-body {" + "position: relative;" + "}" + ".tvp-modal-close-svg > path:nth-child(2){ " + "fill: none;" + "}" + ".tvp-modal-close {" + "cursor: pointer;" + "-webkit-appearance: none;" + "position: absolute;" + "-webkit-transition: all .05s ease-in-out;" + "transition: all .05s ease-in-out;" + "background-position: 0 0;" + "background-repeat: no-repeat;" + "background-size: contain;" + "}", "host-mobile": "@import url('//fonts.googleapis.com/css?family=Open+Sans:600,700,800');" + "*[class^=tvp-] {" + "box-sizing: border-box;" + "}" + ".tvp-carousel-holder {" + "position: relative;" + "visibility: hidden;" + "opacity: 0;" + "}" + ".tvp-carousel-holder.initialized {" + "visibility: visible;" + "opacity: 1;" + "}" + ".tvp-carousel-holder > iframe {" + "top: 0;" + "left: 0;" + "width: 100%;" + "height: 100%;" + "position: absolute;" + "}" + ".tvp-hidden {" + "display: none;" + "}" + ".tvp-modal-open {" + "overflow: hidden;" + "}" + ".tvp-modal-overlay {" + "position: fixed;" + "top: 0;" + "right: 0;" + "bottom: 0;" + "left: 0;" + "z-index: 1040;" + "background-color: #000;" + "opacity: .5;" + "}" + ".tvp-modal {" + "position: fixed;" + "top: 0;" + "right: 0;" + "bottom: 0;" + "left: 0;" + "z-index: 1050;" + "-webkit-overflow-scrolling: touch;" + "outline: 0;" + "overflow: hidden;" + "overflow-x: hidden;" + "overflow-y: auto;" + "opacity: 1;" + "visibility: visible;" + "}" + ".tvp-modal-wrapper {" + "position: relative;" + "width: auto;" + "margin: 10px;" + "}" + "@media (min-width :900px) {" + ".tvp-modal-wrapper {" + "width: 890px;" + "margin: 30px auto;" + "}" + "}" + ".tvp-modal-content {" + "position: relative;" + "background-clip: padding-box;" + "outline: 0;" + "}" + ".tvp-iframe-modal {" + "margin: 0;" + "border: 0;" + "width: 100%;" + "height: 100%;" + "opacity: 0;" + "position: relative;" + "top: auto;" + "left: auto;" + "}" + ".no-products .tvp-iframe-modal," + ".products .tvp-iframe-modal {" + "opacity: 1;" + "}" + ".tvp-modal-header:after {" + 'content: "";' + "display: table;" + "clear: both;" + "}" + ".tvp-modal-title {" + "margin: 0;" + "float: left;" + "}" + ".tvp-modal-title.bottom {" + "float: none;" + "padding: 0 0 30px 10px;" + "}" + ".tvp-products-headline {" + "float: right;" + "margin: 0;" + "position: relative;" + "}" + ".tvp-modal-iframe-holder {" + "height: 0;" + "width: 100%;" + "position: relative;" + "padding-bottom: 46.47%;" + "}" + ".tvp-modal-iframe-holder.no-products {" + "padding-bottom: 59.5%;" + "}" + ".tvp-modal-iframe-holder.products {" + "padding-bottom: 0;" + "height: auto;" + "}" + ".tvp-title {" + "height: 22px;" + "}" + ".tvp-modal-body {" + "position: relative;" + "padding: 0;" + "}" + ".tvp-modal-close-svg > path:nth-child(2){ " + "fill: none;" + "}" + ".tvp-modal-close {" + "cursor: pointer;" + "-webkit-appearance: none;" + "position: absolute;" + "-webkit-transition: all .05s ease-in-out;" + "transition: all .05s ease-in-out;" + "background-position: 0 0;" + "background-repeat: no-repeat;" + "background-size: contain;" + "}", "host-custom":".tvp-carousel-holder {" + "background: white;" + "margin: 0;" + "box-shadow: none;" + "}" + ".tvp-modal-wrapper {" + "box-shadow: 0 2px 18px 0 rgba(0,0,0,0.5);" + "}" + ".tvp-modal-header {" + "padding:25px 30px 5px 15px;" + "border-bottom:1px solid #e5e5e5;" + "}" + ".tvp-modal-content {" + "background:#fff;" + "border:none;" + "}" + ".tvp-modal-title {" + "color: #333;" + "font-family: Helvetica;" + "font-weight: initial;" + "font-size: 16px;" + "}" + ".tvp-modal-body {" + "padding: 0;" + "}" + ".tvp-products-headline {" + "display: block;" + "color: #333;" + "font-size: 16px;" + "font-weight: initial;" + "font-family: Helvetica;" + "top: 3px;" + "right: 3px;" + "}" + ".tvp-modal-close {" + "width: 27px;" + "height: 27px;" + "padding: 3px;" + "background-color: #333;" + "border: none;" + "border-radius: 50%;" + "box-shadow: none;" + "right: -6px;" + "top: -6px;" + "opacity: 1;" + "}" + ".tvp-modal-close-svg {" + "display: block;" + "}" + ".tvp-modal-close-svg > path:nth-child(1){ " + "stroke-width: 1px;" + "stroke: white;" + "fill: white;" + "}" + ".tvp-modal-close:hover {" + "background-color: #000;" + "opacity: 1;" + "}", "host-custom-mobile": "@import url('//fonts.googleapis.com/css?family=Open+Sans:600,700,800');" + ".tvp-modal-body {" + "padding: 10px;" + "}" + ".tvp-carousel-holder {" + "background: white;" + "margin: 0;" + "}" + ".tvp-modal-overlay {" + "background-color: ;" + "opacity: ;" + "}" + ".tvp-modal-header {" + "padding:25px 30px 5px 15px;" + "border-bottom:1px solid #e5e5e5;" + "}" + ".tvp-modal-content {" + "background:#fff;" + "border:none;" + "border-radius:0;" + "}" + ".tvp-modal-title {" + "color: #333;" + "font-family: Helvetica;" + "font-weight: initial;" + "font-size: 16px;" + "}" + ".tvp-modal-title.bottom {" + "padding: 0 0 30px 10px;" + "}" + ".tvp-products-headline {" + "display: block;" + "color: #333;" + "font-size: 16px;" + "font-family: Helvetica;" + "font-weight: initial;" + "top: 3px;" + "right: 3px;" + "}" + ".tvp-no-products-banner{" + "height: 0;" + "width: inherit;" + "padding: 0;" + "margin: 0;" + "}" + ".tvp-modal-close {" + "width: 24px;" + "height: 24px;" + "padding: 3px;" + "background-color: #333;" + "border: none;" + "border-radius: 50%;" + "box-shadow: none;" + "right: 0;" + "top: 0;" + "opacity: 1;" + "}" + ".tvp-modal-close-svg {" + "display: block;" + "}" + ".tvp-modal-close-svg > path:nth-child(1){ " + "stroke-width: 1px;" + "stroke: white;" + "fill: white;" + "}" + ".tvp-modal-close:hover {" + "background-color: #000;" + "opacity: 1;" + "}" + "@media screen and (min-width: 480px) {" + ".tvp-carousel-holder {" + "margin: 0;" + "}" + "}", carousel: "@import url('//fonts.googleapis.com/css?family=Open+Sans:600,700,800');" + "body {" + "padding: 0;" + "}" + ".tvp-carousel-title{" + "font-family: Helvetica;" + "font-weight: initial;" + "font-size:16px;" + "text-align:left;" + "color:#333;" + "padding: 15px 0;" + "background:none;" + "}" + ".tvp-carousel-title > span {" + "text-transform: ;" + "font-family: ;" + "}" + ".tvp-video {" + "padding-left:5px;" + "padding-right:5px;" + "margin-left:0;" + "margin-right:0;" + "}" + ".tvp-video-play {" + "background-color:#fff;" + "width:45px;" + "height:45px;" + "border: 0;" + "border-radius:50%;" + "}" + ".tvp-video-play > polygon {" + "fill:#333;" + "}" + ".tvp-video-title {" + "font-family: Helvetica;" + "font-weight: initial;" + "font-size:12px;" + "text-align:left;" + "color:#333;" + "margin:10px 0;" + "padding:0 7px;" + "}" + ".tvp-video-image {" + "background-size: cover;" + "border: 0;" + "}" + ".tvp-video-metadata {" + "font-family:Helvetica;" + "font-size:55%;" + "color:#333;" + "}" + ".tvp-video-metadata > div {" + "padding:7px 7px 0 7px;" + "}" + ".tvp-video-image-overlay {" + "background:rgba(0, 0, 0, 0.2);" + "}" + ".tvp-carousel-content {" + "background:white;" + "border:none;" + "}" + ".tvp-carousel-arrow {" + "width:16%;" + "border:none;" + "}" + ".tvp-carousel-arrow > svg {" + "width:40px;" + "height: 40px;" + "background:#fff;" + "fill:#333;" + "border-radius:initial;" + "}" + ".tvp-carousel-arrow.inactive > svg {" + "background: whitesmoke;" + "fill: #333;" + "}" + ".tvp-carousel-arrow.inactive:hover > svg {" + "pointer-events: none;" + "background: whitesmoke;" + "fill: #333;" + "}" + ".tvp-carousel-arrow:hover > svg {" + "background:whitesmoke;" + "fill:#000;" + "}" + ".tvp-carousel-arrow.prev {" + "fill: #333;" + "}" + ".tvp-carousel-arrow.prev {" + "left:0;" + "}" + ".tvp-carousel-arrow.next {" + "right:0;" + "}" + ".slick-dotted.slick-slider {" + "margin-bottom: 30px;" + "}" + ".slick-dots {" + "position: absolute;" + "bottom: -25px;" + "text-align: center;" + "margin: 0;" + "}" + ".slick-dots li {" + "width: 20px;" + "height: 20px;" + "margin: 0 5px;" + "}" + ".slick-dots li button {" + "width: 20px;" + "height: 20px;" + "padding: 0;" + "background-color: #777777;" + "border: none;" + "border-radius: 50%;" + "}" + ".slick-dots li button:hover {" + "background-position: 0px 0px;" + "background-color: #333333;" + "border: none;" + "}" + ".slick-dots li.slick-active button {" + "background-position: 0px 0px;" + "background-color: #333333;" + "border: none;" + "}" + ".tvp-video:hover .tvp-video-play {" + "background-color:#e57211;" + "}" + ".show-on-hover .tvp-video:hover .tvp-video-play {" + "background-color:#e57211;" + "opacity: 1;" + "visibility: visible;" + "}" + ".tvp-video:hover .tvp-video-play > polygon {" + "fill:#fff;" + "}" + "@media screen and (min-width: 448px){"+ ".tvp-carousel-arrow {" + "width:40px;" + "height: 40px;" + "}" + "}"+ "@media screen and (max-width: 667px){" + ".slick-center .tvp-video-play {" + "background-color:#e57211 !important;" + "}" + ".slick-center .tvp-video-play, .tvp-video-image-overlay {" + "opacity: 1;" + "visibility: visible;" + "}" + ".slick-center .tvp-video-play > polygon {" + "fill:#fff !important;" + "}" + ".tvp-video:hover .tvp-video-play {" + "background-color:#fff;" + "}" + ".tvp-video:hover .tvp-video-play > polygon {" + "fill:#333;" + "}" + "}", "modal-content": "@import url('//fonts.googleapis.com/css?family=Open+Sans:600,700,800');" + "body {" + "padding: 10px;" + "font-family: Helvetica;" + "}" + ".tvp-products-holder {" + "padding-left: 1.3%;" + "padding-right: 1.3%;" + "right: -10px;" + "}" + ".tvp-product {" + "border: 1px solid black;" + "margin: 0 10px 10px 0;" + "}" + ".tvp-product-title {" + "font-family: Helvetica;" + "font-weight: initial;" + "font-size: 14px;" + "color: #333;" + "text-transform: uppercase;" + "text-decoration: none;" + "text-align: left;" + "margin: 10px 0;" + "}" + ".tvp-product-title:hover {" + "text-decoration: underline;" + "}" + ".tvp-product-sku {" + "color: #333;" + "font-size: 16px;" + "font-family: Helvetica;" + "font-weight: initial;" + "text-align: left;" + "margin: 10px 0;" + "}" + ".tvp-product-price {" + "color: #333;" + "font-size: 16px;" + "font-family: Helvetica;" + "font-weight: initial;" + "text-align: left;" + "margin: 0 0 10px 0;" + "}" + ".tvp-reviews {" + "color: #333;" + "font-size: 12px;" + "font-family: Helvetica;" + "font-weight: initial;" + "margin-left: 10px;" + "top: -5px;" + "}" + ".tvp-rate {" + "width: 20px;" + "height: 20px;" + "background-image: url('https://video.bedbathandbeyond.com/carousel/img/product_rating_icons.png');" + "background-size: cover;" + "}" + ".tvp-rate.full {" + "background-position: 0 0;" + "}" + ".tvp-rate.half {" + "background-position: 0 -41px;" + "}" + ".tvp-rate.empty {" + "background-position: 0 -20px;" + "}" + ".tvp-product-image {" + "background-size: cover;" + "}" + ".tvp-product-image-overlay {" + "background-color: rgba(0, 0, 0, 0.2);" + "}" + ".tvp-product-popup {" + "width: 235px;" + "background: #fff;" + "padding: 10px;" + "border: 1px solid black;" + "border-radius: 0;" + "box-shadow: none;" + "}" + ".tvp-product-popup-image {" + "background-size: cover;" + "border: 0;" + "}" + ".tvp-product-cta {" + "background: #333;" + "border: none;" + "border-radius: 0;" + "border-bottom: none;" + "color: #fff;" + "text-transform: uppercase;" + "font-size: 14px;" + "font-family: Helvetica;" + "font-weight: initial;" + "height: 40px;" + "margin: 10px 0 0 0;" + "}" + ".tvp-product-cta:hover {" + "background: #000;" + "color: #fff;" + "}" + ".tvp-arrow-indicator:after {" + "border: 1px solid black;" + " box-shadow: none;" + "background: #fff;" + "}", "modal-content-mobile": "@import url('//fonts.googleapis.com/css?family=Open+Sans:600,700,800');" + "body {" + "padding: 10px;" + "}" + ".tvp-products-holder {" + "padding-left: 1.8%;" + "}" + ".tvp-product {" + "border: 1px solid black;" + "margin: 0 10px 10px 0;" + "padding: 5px;" + "z-index: 9999;" + "}" + ".tvp-reviews {" + "color: #333;" + "font-size: 12px;" + "font-family: Helvetica;" + "font-weight: initial;" + "margin-left: 10px;" + "top: -5px;" + "}" + ".tvp-rate {" + "width: 20px;" + "height: 20px;" + "background-image: url('https://video.bedbathandbeyond.com/carousel/product_rating_icons.png');" + "background-size: cover;" + "}" + ".tvp-rate.full {" + "background-position: 0 0;" + "}" + ".tvp-rate.half {" + "background-position: 0 -41px;" + "}" + ".tvp-rate.empty {" + "background-position: 0 -20px;" + "}" + ".tvp-product-image {" + "background-size: cover;" + "}" + ".tvp-product-image-overlay {" + "background-color: rgba(0, 0, 0, 0.2);" + "}" + ".tvp-product-popup {" + "width: 235px;" + "background: #fff;" + "padding: 10px;" + "border: 1px solid black;" + "box-shadow: none;" + "}" + ".tvp-product-popup-image {" + "background-size: cover;" + "}" + ".tvp-product-data .tvp-product-title {" + "height: 29px;" + "overflow: hidden;" + "margin: 0;" + "font-size: 12px;" + "font-weight: initial;" + "font-family: Helvetica;" + "color: #333;" + "text-align: left;" + "text-transform: none;" + "line-height: initial;" + "}" + ".tvp-product-data .tvp-product-price {" + "margin: 5px 0;" + "font-size: 16px;" + "font-weight: initial;" + "font-family: Helvetica;" + "color: initial;" + "text-align: left;" + "color: #333;" + "}" + ".tvp-product-data .tvp-product-sku {" + "color: #333;" + "font-size: 14px;" + "font-family: Helvetica;" + "font-weight: initial;" + "text-align: left;" + "margin: 5px 0 8px 0;" + "}" + ".tvp-product-cta {" + "width: 110px;" + "border-radius: 0;" + "background: #333;" + "border: none;" + "border-bottom: none;" + "color: #fff;" + "text-transform: uppercase;" + "font-size: 12px;" + "font-family: Helvetica;" + "font-weight: initial;" + "height: 22px;" + "}" + ".tvp-product-cta:hover {" + "background: #000;" + "}" + ".tvp-arrow-indicator:before {" + "border-left: 13px solid #000;" + "}" + ".tvp-info-icon{" + "fill: #333;" + "width:16px;" + "height:16px;" + "}" + ".tvp-products-message {" + "width: 100%;" + "color: #333;" + "font-size: 12px;" + "text-align: left;" + "text-transform: none;" + "font-family: Helvetica;" + "font-weight: initial;" + "line-height: normal;" + "background-color: #FFFFFF;" + "box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.2);" + "padding: 10px;" + "border: 1px solid #BEBEBE;" + "}" + ".tvp-products-message:before {" + "border-top-color: #BEBEBE !important;" + "margin-left: -13px;" + "}" + ".tvp-info-icon{" + "position: absolute;" + "top: 50%;" + "transform: translateY(-50%);" + "z-index: 9999;" + "margin-left: 5px; " + "}" + ".tvp-products-headline .tvp-products-message {" + "position: absolute;" + "z-index: 2147483647;" + "opacity: 0;" + "visibility: hidden;" + "left: 0;" + "bottom: 200%;" + "transition: opacity 0.5s ease; " + "}" + ".tvp-products-text.active .tvp-products-message {" + "opacity: 1;" + "visibility: visible;" + "}" + ".tvp-products-message:after, .tvp-products-message:before {" + "top: 100%;" + "left: 105px;" + "border: 13px solid transparent;" + "content: '';" + "height: 0;" + "width: 0;" + "position: absolute;" + "pointer-events: none;" + "}" + ".tvp-products-message:after {" + "border-color: rgba(136, 183, 213, 0);" + "border-top-color: #fff;" + "border-width: 12px;" + "margin-left: -12px;" + "}" + ".tvp-products-text {" + "font-family:Helvetica;" + "font-size:12px;" + "font-weight:normal;" + "text-transform:none;" + "color:#333;" + "text-align:left;" + "}" + ".tvp-slider-dots li button:before {" + "font-size:24px;" + "color: #BEBEBE;" + "}" + ".tvp-slider-dots li.slick-active button:before {" + "color: #333;" + "}" + "}"};var utils = { isFirefox: /Firefox/i.test(navigator.userAgent), isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isIOS: /iPad|iPhone|iPod|iPhone Simulator|iPad Simulator/.test(navigator.userAgent) && !window.MSStream, isset: function(o,p){ var val = o; if (p) val = o[p]; return "undefined" !== typeof val; }, getIframeHtml: function(options) { var html = ''; var content = options.html || ''; if ('function' === typeof content) { html += content(); } else if (content.trim().length) { html += content; } return html; }, addClass: function(obj,c){ if (!obj || !c) return; if ('string' === typeof obj) { document.getElementById(obj).classList.add(c); } else { obj.classList.add(c); } }, removeClass: function(obj,c){ if (!obj || !c) return; if ('string' === typeof obj) { document.getElementById(obj).classList.remove(c); } else { obj.classList.remove(c); } }, extend: function(out) { out = out || {}; for (var i = 1; i < arguments.length; i++) { if (!arguments[i]) continue; for (var key in arguments[i]) { if (arguments[i].hasOwnProperty(key)) out[key] = arguments[i][key]; } } return out; } }; if (typeof bootstrap !== "object" || !bootstrap.hasOwnProperty('name') || bootstrap.name.length<=0 ) { throw new Error('Must pass bootstrap and boostrap.name'); } var id = bootstrap.name; //If there's config object for this specific widget, then we merged in... extend? window.__TVPage__ = window.__TVPage__ || {}; __TVPage__.config = __TVPage__.config || {}; if ("object" === typeof __TVPage__.config[id]) { __TVPage__.config[id] = utils.extend(bootstrap, __TVPage__.config[id]); } else { __TVPage__.config[id] = bootstrap; } var __windowCallbackFunc__ = null; if ( __TVPage__.config[id].hasOwnProperty('onChange') && typeof __TVPage__.config[id].onChange == "function" ) { __windowCallbackFunc__ = __TVPage__.config[id].onChange; delete __TVPage__.config[id].onChange; } var config = utils.isset(window.__TVPage__) && utils.isset(__TVPage__,"config") && utils.isset(__TVPage__.config,id) ? __TVPage__.config[id] : {}; var hostCssTagId = "tvp-carousel-host-css"; var hostCssTag = ""; if (!document.getElementById(hostCssTagId)) { hostCssTag = ''; } var targetElement; if ( !config.hasOwnProperty('targetEl') || !document.getElementById(config.targetEl) ) { throw new Error ( "Must provide a targetEl"); } var targetElement = document.getElementById(config.targetEl); targetElement.insertAdjacentHTML('beforebegin', hostCssTag + ''); targetElement.parentNode.removeChild(targetElement); config.id = id; config.staticPath = config.baseUrl + "/carousel"; config.mobilePath = utils.isMobile ? 'mobile/' : ''; config.distPath = config.debug ? '/' : '/dist/'; config.cssPath = config.staticPath + config.distPath + 'css/'; config.jsPath = config.staticPath + config.distPath + 'js/'; config.eventPrefix = ("tvp_" + config.id).replace(/-/g,'_'); var modalContainer = document.createElement("div"); modalContainer.innerHTML = config.templates['modal'].modal; document.body.appendChild(modalContainer); var modal = document.getElementById("tvp-modal-" + config.id); modal.classList.add(utils.isMobile ? "mobile" : "desktop"); if (config.modal_title_position.trim().length && "bottom" === config.modal_title_position) { var modalTitle = modal.querySelector("#tvp-modal-title-" + config.id); modalTitle.classList.add("bottom"); modal.querySelector(".tvp-modal-body").appendChild(modalTitle); } var holder = document.getElementById(config.id + "-holder"); var iframe = holder.querySelector("iframe"); var iframeDocument = iframe.contentWindow.document; var iframeContent = utils.getIframeHtml({ id: config.id, className: "dynamic", domain: config.baseUrl, style: config.css.carousel, js: [ config.debug ? config.jsPath + "vendor/jquery.js" : "", config.debug ? config.jsPath + "libs/utils.js" : "", config.debug ? config.jsPath + "carousel.js" : "", config.debug ? config.jsPath + "index.js" : "", config.debug ? "" : config.jsPath + "scripts.min.js" ], css: [ config.debug ? config.cssPath + "styles.css" : "", config.debug ? config.cssPath + "vendor/slick.css" : "", config.debug ? "" : config.cssPath + "styles.min.css" ] }); //Firefox does not add the iframe content using the onload method. //https://bugzilla.mozilla.org/show_bug.cgi?id=728151 if (utils.isFirefox) { iframe.contentWindow.contents = iframeContent; iframe.src = 'javascript:window["contents"]'; } else { var iframeDocument = iframe.contentWindow.document; iframeDocument.open().write(iframeContent); iframeDocument.close(); } var isEvent = function (e, type) { return (e && utils.isset(e, "data") && utils.isset(e.data, "event") && config.eventPrefix + type === e.data.event); }; var updateModalTitle = function(title){ document.getElementById('tvp-modal-title-' + config.id).innerHTML = title || ""; }; window.addEventListener("message", function(e){ if (!isEvent(e, ":resize")) return; holder.style.height = e.data.height; }); var clickData = {}; var iframeModalHolder = document.getElementById('tvp-modal-iframe-holder-' + config.id); var iframeModal = null; var iframeModalDocument = null; var getEventType = function (e) { var evt = null if (e && utils.isset(e, "data") && utils.isset(e.data, "event") ) { evt= e.data.event; } if (evt && evt.length && evt.substr(0, config.eventPrefix.length) === config.eventPrefix) { return evt.substr(config.eventPrefix.length + 1); } return null; }; function handlePostMessages(e){ var eventType = getEventType(e); switch (eventType) { case 'video_click': handleVideoClick(e); break; case 'modal_initialized': handleModalInitialized(e); break; case 'modal_no_products': handleModalNoProducts(e); break; case 'modal_products': handleModalProducts(e); break; case 'player_next': handlePlayerNext(e); break; case 'modal_resize': handleModalResize(e); break; case 'render': handleRender(e); break; default: // do nothing } handleCallback(e); }; function handleCallback(e){ if (__windowCallbackFunc__) __windowCallbackFunc__(e); } window.addEventListener("message", function(e){ handlePostMessages(e); }); function handleRender(e){ holder.classList.add("initialized"); } function handleVideoClick(e){ var eventData = e.data; //performant way to clone object http://jsben.ch/#/bWfk9 var configCopy = JSON.parse(JSON.stringify(config)); delete configCopy.no_products_banner; clickData = { data: eventData.videos, selectedVideo: eventData.selectedVideo, runTime: configCopy }; updateModalTitle(eventData.selectedVideo.title); utils.removeClass('tvp-modal-' + config.id,'tvp-hidden'); utils.removeClass('tvp-modal-overlay-' + config.id,'tvp-hidden'); if (config.fix_page_scroll) { utils.addClass(document.body, 'tvp-modal-open'); } iframeModalHolder.innerHTML = ''; iframeModal = iframeModalHolder.querySelector('.tvp-iframe-modal'); iframeModalDocument = iframeModal.contentWindow.document; //Some logic to include the player library.. we support diff things. var playerUrl = "https://cdnjs.tvpage.com/tvplayer/tvp-" + config.player_version + ".min.js"; if (config.player_url && (config.player_url + "").trim().length) { playerUrl = config.player_url; } iframeModalDocument.open().write(utils.getIframeHtml({ id: config.id, domain: config.baseUrl, style: config.css["modal-content" + (utils.isMobile ? "-mobile" : "")], className: utils.isMobile ? "mobile" : "", html: config.templates["modal-content" + (utils.isMobile ? "-mobile" : "")].body, js: [ "//a.tvpage.com/tvpa.min.js", '//imasdk.googleapis.com/js/sdkloader/ima3.js', playerUrl, config.debug && utils.isMobile ? config.jsPath + "/vendor/jquery.js" : "", config.debug && !utils.isMobile ? config.jsPath + "/vendor/perfect-scrollbar.min.js" : "", config.debug ? config.jsPath + "/libs/utils.js" : "", config.debug ? config.jsPath + "/libs/analytics.js" : "", config.debug ? config.jsPath + "/libs/player.js" : "", config.debug ? config.jsPath + "/" + config.mobilePath + "modal/index.js" : "", config.debug ? "" : config.jsPath + config.mobilePath + "modal/scripts.min.js" ], css: [ config.debug ? config.cssPath + "/" + config.mobilePath + "modal/styles.css" : "", config.debug && utils.isMobile ? config.cssPath + "/vendor/slick.css" : "", config.debug && !utils.isMobile ? config.cssPath + "/vendor/perfect-scrollbar.min.css" : "", config.debug ? "" : config.cssPath + "/" + config.mobilePath + "modal/styles.min.css" ] })); iframeModalDocument.close(); }; function handleModalInitialized(e){ if (iframeModal.contentWindow) { iframeModal.contentWindow.postMessage({ event: config.eventPrefix + ':modal_data', data: clickData.data, selectedVideo: clickData.selectedVideo, runTime: clickData.runTime }, '*'); } var onOrientationChange = function () { if (utils.isIOS && iframeModal && iframeModal.contentWindow) { var width = iframeModal.parentNode.offsetWidth; iframeModal.contentWindow.window.postMessage({ event: config.eventPrefix + ':modal_holder_resize', size: [width, Math.floor(width * (9 / 16))] },'*'); } }; var orientationChangeEvent = 'onorientationchange' in window ? 'orientationchange' : 'resize'; window.removeEventListener(orientationChangeEvent,onOrientationChange, false); window.addEventListener(orientationChangeEvent,onOrientationChange, false); }; function handlePlayerNext(e) { updateModalTitle(e.data.next.assetTitle); removeBannerEl(); }; function handleModalNoProducts(e) { if (!utils.isMobile) { var label = document.getElementById('tvp-products-headline-' + config.id); if (label) { label.parentNode.removeChild(label); } } if (config.no_products_banner && config.merchandise) { var bannerHtml = ""; if ("function" === typeof config.no_products_banner) { bannerHtml = config.no_products_banner(); } else if (String(config.no_products_banner).trim().length) { bannerHtml = config.no_products_banner.trim(); } var bannerDiv = document.createElement('div'); utils.addClass(bannerDiv,'tvp-no-products-banner'); bannerDiv.innerHTML = bannerHtml; modal.querySelector('.tvp-modal-content').appendChild(bannerDiv); } utils.removeClass(iframeModalHolder,'products'); utils.addClass(iframeModalHolder,'no-products'); }; function handleModalResize(e){ iframeModal.style.height = e.data.height; }; function handleModalProducts(e) { if (!utils.isMobile && !document.getElementById('tvp-products-headline-' + config.id) && config.products_headline_display) { var label = document.createElement('div'); label.className = 'tvp-products-headline'; label.id = 'tvp-products-headline-' + config.id; label.innerHTML = config.products_headline_text; if (config.products_info_tooltip && config.products_message.trim().length) { var tooltipHtml = config.templates['modal'].tooltip; var tooltipDiv = document.createElement('div'); tooltipDiv.classList.add('tvp-tooltip'); tooltipDiv.innerHTML = tooltipHtml; tooltipDiv.getElementsByClassName('tvp-products-message')[0].innerHTML = config.products_message; label.appendChild(tooltipDiv); } label.onclick = function(){ this.classList.contains('active') ? this.classList.remove('active') : this.classList.add('active'); }; var modalHeader = document.getElementById('tvp-modal-header-' + config.id); modalHeader.appendChild(label); } utils.removeClass(iframeModalHolder,'no-products'); utils.addClass(iframeModalHolder,'products'); }; var removeBannerEl = function() { var noProductsBanner = modal.querySelector('.tvp-no-products-banner'); if (noProductsBanner) { modal.querySelector('.tvp-modal-content').removeChild(noProductsBanner); } }; var closeModal = function () { utils.addClass('tvp-modal-' + config.id,'tvp-hidden'); utils.addClass('tvp-modal-overlay-' + config.id,'tvp-hidden'); if (config.fix_page_scroll) { utils.removeClass(document.body,'tvp-modal-open'); } var prodHeadline = document.getElementById('tvp-products-headline-' + config.id); if (prodHeadline) { utils.removeClass(prodHeadline,'active'); } removeBannerEl(); utils.removeClass(iframeModalHolder,'products'); utils.removeClass(iframeModalHolder,'no-products'); iframeModal.parentNode.removeChild(iframeModal); }; document.getElementById("tvp-modal-close-" + config.id).addEventListener('click', closeModal, false); var modalEl = document.getElementById("tvp-modal-" + config.id); modalEl.addEventListener('click', function(e){ if (e.target === modalEl || !modalEl.contains(e.target)) { closeModal(); } }, false); }());