﻿$j = $.noConflict();

$j(document).ready(function() {

    //replaceFonts();
    //Cufon.now();
    //sizeModules();
    $j('#content_0_main_0_lvPhotos_DataPager1 a:first-child, #content_0_lvResults_DataPager1 a:first-child').addClass("first");
    // wffm custom
    replaceSubmitButtonWithImage($j('.custom-scfForm1 .scfSubmitButtonBorder'), '/assets/images/send-button.gif');
    replaceSubmitButtonWithImage($j('.custom-scfForm2 .scfSubmitButtonBorder'), '/assets/images/blue-send.gif');
    replaceSubmitButtonWithImage($j('.custom-scfForm3 .scfSubmitButtonBorder'), '/assets/images/submit.gif');
    $j('.custom-scfForm3 h1.scfTitleBorder').html('<image src="/assets/images/form-background.gif" />');
    //$j('.custom-scfForm4 .scfSubmitButtonBorder').html('<input type="image" src="/assets/images/blue-send.gif" onclick="" />');
    replaceSubmitButtonWithImage($j('.custom-scfForm4 .scfSubmitButtonBorder'), '/assets/images/blue-send.gif');
    replaceSubmitButtonWithImage($j('.custom-scfForm5 .scfSubmitButtonBorder'), '/assets/images/send-button-es.gif');
    replaceSubmitButtonWithImage($j('.custom-scfForm6 .scfSubmitButtonBorder'), '/assets/images/send-button-es.gif');
    replaceSubmitButtonWithImage($j('.custom-scfForm7 .scfSubmitButtonBorder'), '/assets/images/leadform1btn.gif');


});

replaceSubmitButtonWithImage = function (btn, imgSrc) {

    if (btn) {

//        var name = btn.find('input').css('display', 'none').attr('name');

//        var onclick = btn.find('input').attr('onclick');

//        var id = btn.find('input').attr('id');

//        btn.append('<input type="image" value="Submit" src="' + imgSrc + '" onclick="' + onclick + '" name="' + name + '" id="' + id + '" />');
    }
}
/*
function replaceFonts() {
Cufon.replace('#mainnav ul li a', {
hover: true, fontFamily: 'HelveticaNeue75Bold'

});
}

function sizeModules() {
$j('.module').each(function(index) {
if ($j(this).children('div').length != 0) {
$j(this).width($j('div', this).width());
$j(this).addClass('twoColModule');
}
});
}
*/

