if (typeof(jQuery) == 'undefined') document.write(''); //include on category page if(PageName()=='searchresults.asp' ){ document.write(''); } //include on product page if(PageName()=='productdetails.asp' ){ document.write(''); } //include on shopping cart page if(PageName()=='shoppingcart.asp' ){ document.write(''); } //include on shopping cart page if(PageName()=='one-page-checkout.asp' ){ document.write(''); } document.write(''); function vCustomOnready(){ } // Call this function at the end of the closing tag. function optimizeYouTubeEmbeds() { // Get all iframes var frames = document.getElementsByTagName( 'iframe' ); // Loop through each iframe in the page. for ( var i = 0; i < frames.length; i++ ) { // Find out youtube embed iframes. if ( frames[ i ].src && frames[ i ].src.length > 0 && frames[ i ].src.match(/http(s)?:\/\/www\.youtube\.com/)) { // For Youtube iframe, extract src and id. var src=frames[i].src; var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/; var id=(src.match(p) ? RegExp.$1 : false); if(id == false) { continue;} // Get width and height. var w=frames[i].width; var h=frames[i].height; if(src == '' || w=='' || h=='') {continue;} // Thease are to position the play button centrally. var pw=Math.ceil(w/2-38.5); var ph=Math.ceil(h/2+38.5); // The image+button overlay code. var code='
'; // Replace the iframe with a the image+button code. var div = document.createElement('div'); div.innerHTML=code; div=div.firstChild; frames[i].parentNode.replaceChild(div, frames[i]); i--; } } } // Replace preview image of a video with it's iframe. function LoadYoutubeVidOnPreviewClick(id,w ,h) { var code=''; var iframe = document.createElement('div'); iframe.innerHTML=code; iframe=iframe.firstChild; var div=document.getElementById("skipser-youtubevid-"+id); div.parentNode.replaceChild( iframe, div) var playb=document.getElementById("play-"+id); playb.style.display="none"; } this.expDesc = function(state, type) { var bottomRestForTop, hideFullForTop, showFullForTop; bottomRestForTop = $("#top_rest"); showFullForTop = $("#show_full_for_top"); hideFullForTop = $("#hide_full_for_top"); if (state === "expand") { $(showFullForTop).css('display', 'none'); $(hideFullForTop).css('display', 'inline'); $(bottomRestForTop).css('display', 'inline'); } else { $(showFullForTop).css('display', 'inline'); $(hideFullForTop).css('display', 'none'); $(bottomRestForTop).css('display', 'none'); } }