﻿jQuery(document).ready(function () {
    var str = "Please select a file to upload. <br /><br /> <b>Photo Tips:</b> <br /><br />&bull; Know the approximate size of the areas to be decorated, in either feet or meters <br /><br />&bull; Remove excess clutter <br /><br /> &bull; Make sure the area to be photographed has plenty of light. If taking the picture outdoors, try having the sun at your back <br /><br /><img src='/templates/Crane/Images/streightonExample.png' style='float:right;padding-left:5px;'/> &bull; Take the photo straight-on, this will make mapping the regions to be decorated easier <br /><br /><br /><br /> &bull; Photos should be high quality; between 300KB and 2MB in size to ensure good results <br /><br /> &bull; Accepted file types: jpg, jpeg, png, gif, bmp";
    $('#ctl00_cphMain_FileErrors').html(str);
	$('#row-minimum-size-1, .ma-cl-table-td-2 input').mouseenter(function(){$(".new-error-tooltip-1").show().fadeTo("fast", 1.0);}).mouseleave(function(){$(".new-error-tooltip-1").hide().fadeTo("fast", 0.0);});
	
	

    $('#vtipHolder').addClass("vtip").attr('title', 'To view an accurate representation of our products, please enter the measurements of the traced region.<br />You can use other areas of your house to help you calculate the size.<br />For example a standard entry door is 3\' x 7\' and a standard 2-car garage is 16’ x 7’.<br />A standard window is 2\' x 4\'.');
    vtip();
    $('#vtipHolder').trigger('showIt', { delay: 5000 });
    
});

function setViewable() {
    $(".new-error-tooltip-1").css('display', 'none');
}

jQuery(document).ready(function ($) {
    var today = new Date();
    $('#copyright').html('Copyright ' + today.getFullYear() + ' Exterior Portfolio');


    $('.LogoAnchor1').wrap('<a href="http://exteriorportfolio.chameleonpower.com/"></a>');
    $('.LogoAnchor1').css("cursor", "pointer");

    var $t = $(".new-error-tooltip-1");

    $t.fadeTo("fast", 0.33);
    $t.fadeTo("fast", 0.15);
    $t.fadeTo("fast", 0.33);
    $t.fadeTo("fast", 0.75);
    $t.fadeTo("fast", 0.5);
    $t.fadeTo("slow", 1.0);

    $t.fadeTo(8000, 1.0);
    $t.fadeTo("fast", 0.67);
    $t.fadeTo("fast", 0.85);
    $t.fadeTo("fast", 0.67);
    $t.fadeTo("fast", 0.25);
    $t.fadeTo("fast", 0.50);
    $t.fadeTo("slow", 0.0);
    setTimeout("setViewable()", 12000);



    var $c = $("#crop-help-hide-c-w-4");
    $c.fadeTo("fast", 0.33);
    $c.fadeTo("fast", 0.15);
    $c.fadeTo("fast", 0.33);
    $c.fadeTo("fast", 0.75);
    $c.fadeTo("fast", 0.5);
    $c.fadeTo("slow", 1.0);





    //this is for the help file window
    showHelp.width = 860;
    showHelp.height = 340;


    if ($('#hide-product-1-persp').length > 0) {  //if we r on presective page, implement fake checkboxes
        $('#hide-product-1-persp').attr('onclick', ''); //remove current onclick
        $('#hide-product-1-persp').click(function (e) {
            ToggleProductSample();
            if ($('#hide-product-1-persp').attr('chk') == 'true') {
                var src = $('#hide-product-1-persp').attr('src');
                $('#hide-product-1-persp').attr('src', src.replace(/ShowHideproduct-check/i, 'ShowHideProduct'));
                $('#hide-product-1-persp').attr('chk', 'false');
            }
            else {
                var src = $('#hide-product-1-persp').attr('src');
                $('#hide-product-1-persp').attr('src', src.replace(/ShowHideproduct/i, 'ShowHideproduct-check'));
                $('#hide-product-1-persp').attr('chk', 'true');
            }
            return false;
        });

        $('#hide-perspective-1-persp').attr('onclick', ''); //remove current onclick
        $('#hide-perspective-1-persp').click(function (e) {

            TogglePerspective();
            if ($('#hide-perspective-1-persp').attr('chk') == 'true') {
                var src = $('#hide-perspective-1-persp').attr('src');
                $('#hide-perspective-1-persp').attr('src', src.replace(/Showhideperspective-check/i, 'Showhideperspective'));
                $('#hide-perspective-1-persp').attr('chk', 'false');
            }
            else {
                var src = $('#hide-perspective-1-persp').attr('src');
                $('#hide-perspective-1-persp').attr('src', src.replace(/Showhideperspective/i, 'Showhideperspective-check'));
                $('#hide-perspective-1-persp').attr('chk', 'true');
            }
            return false;
        });
    }

});




function crophelpclose()

{
 
  document.getElementById("crop-help-hide-c-w-4").style.display="block";
  document.getElementById("crop-help-hide-c-w-4").style.display="none";
 };



function crophelproll()

{
  document.getElementById("crop-help-hide-c-w-4").style.display="none";
  document.getElementById("crop-help-hide-c-w-4").style.display="block";
 };



function openusermanual()

{
window.open("Templates/Crane/Help/ENG/Help.pdf")
 };


function crophelprollout()

{
 


 };


 jQuery(document).ready(function ($) {
     var zIndexNumber = 1000;
     // Put your target element(s) in the selector below!
     $("#crop-help-hide-c-w-4").each(function () {
         $(this).css('zIndex', zIndexNumber);
         zIndexNumber -= 10;
     });

     if ($.browser.safari) {
         $('#usermanual').css('margin-top', '16px');
     }
 });


var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-89365-61']);
_gaq.push(['_trackPageview']);

(function () {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

