This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cable Field Required | |
$('#email_optin').click(function() { | |
if ($('#email_optin').prop('checked')) { | |
$('#cable_provider').attr('required', true); | |
$('#cable_provider_label').addClass('required-label'); | |
} | |
if (!$('#email_optin').prop('checked')) { | |
$('#cable_provider').removeAttr('required'); | |
$('#cable_provider_label').removeClass('required-label'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media only screen and (-webkit-min-device-pixel-ratio: 2) { | |
#header { background: url('/themes/site_themes/site/img/header-image-retina.jpg'); } | |
} | |
@media only screen and (min--moz-device-pixel-ratio: 2) { | |
#header { background: url('/themes/site_themes/site/img/header-image-retina.jpg'); } | |
} | |
@media only screen and (-o-min-device-pixel-ratio: 2/1) { | |
#header { background: url('/themes/site_themes/site/img/header-image-retina.jpg'); } | |
} | |
@media only screen and (min-device-pixel-ratio: 2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Blog Grid Center Fix | |
function centerBlockGrid(listID){ | |
$window = $(window); | |
var windowWidth = $window.width(); | |
var listWidth = $(listID).width(); | |
var smallGrid; | |
var mediumGrid; | |
var largeGrid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$window = $(window); | |
var targetHeight = $window.height(); | |
var viewportWidth = $window.width(); | |
if (viewportWidth > 640) { | |
$('#targetID').css({ height: targetHeight }); | |
} | |
}); | |
$(window).bind('resize', function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Email Submit Disable | |
function isValidEmailAddress(emailAddress) { | |
var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i); | |
return pat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Vote Submit | |
function voteShare (pageURL,title,w,h) { | |
var left = (window.screen.width/2)-(w/2); | |
var top = (window.screen.height/2)-(h/2); | |
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); | |
var pollTimer = window.setInterval(function() { | |
if (targetWin.closed !== false) { | |
window.clearInterval(pollTimer); | |
setTimeout(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scroll Top Iframe Hack | |
$(document).ready(function() { | |
if($('#focus-field').length ) { | |
setTimeout(function () { | |
$('#focus-field').focus(); | |
$('#focus-field').blur(); | |
}, 300); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#focus-field { | |
position: absolute; | |
height: 0!important; | |
width: 0!important; | |
margin-top: -500px; | |
z-index: -999; | |
} | |
#focus-field.sub-focus { | |
margin-top: 500px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pagination Links Fix | |
$('#pagination a').each(function() { | |
var href = $(this).attr('href'); | |
if (href.indexOf('http:') > -1) { | |
href = href.replace('http:', 'https:'); | |
$(this).attr('href', href); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 8')) { | |
// IE 8 Stuff | |
} | |
else { | |
// Default Stuff | |
} | |
?> |