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 (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
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
function getQueryVariable(variable) | |
{ | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); | |
if(pair[0] == variable){return pair[1];} | |
} | |
return(false); | |
} |
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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-width : 320px) | |
and (max-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
$('.scrollto').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') | |
|| location.hostname == this.hostname) { | |
var hashStr = this.hash.slice(1); | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + hashStr +']'); | |
if (target.length) { | |
$('html,body').animate({ scrollTop: target.offset().top - 20}, 500); | |
window.location.hash = hashStr; |
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
(function ($) { | |
$.fn.vAlign = function() { | |
return this.each(function(i){ | |
var h = $(this).height(); | |
var oh = $(this).outerHeight(); | |
var mt = (h + (oh - h)) / 2; | |
$(this).css("margin-top", "-" + mt + "px"); | |
$(this).css("top", "50%"); | |
$(this).css("position", "absolute"); | |
}); |
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
body, | |
.pure-g [class *= "pure-u"], | |
.pure-g-r [class *= "pure-u"] { | |
/* Set your content font stack here: */ | |
font-family: Georgia, Times, "Times New Roman", serif; | |
} |
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
var html = jQuery('#html-element').val(); | |
if (html != '') { | |
html = jQuery(html).get(0); | |
var xhtml = getXHTML(html); | |
jQuery(this).val(jQuery(xhtml).get(0).outerHTML); | |
} | |
function getXHTML(node) { |
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
<xsl:for-each select="publishers-countries/entry"> | |
<xsl:variable name="c" select="country/@handle" /> | |
<xsl:if test="not(preceding-sibling::*/country/@handle = $c)"> | |
<option> | |
<xsl:value-of select="country/."/> | |
</option> | |
</xsl:if> | |
</xsl:for-each> |
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
// Encode/decode htmlentities | |
function encodeEntities(s){ | |
return $("<div/>").text(s).html(); | |
} | |
function dencodeEntities(s){ | |
return $("<div/>").html(s).text(); | |
} |
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
function fancyAlert(msg) { | |
jQuery.fancybox({ | |
'modal' : true, | |
'content' : "<div style=\"margin:1px;width:240px;\">"+msg+"<div style=\"text-align:right;margin-top:10px;\"><input style=\"margin:3px;padding:0px;\" type=\"button\" onclick=\"jQuery.fancybox.close();\" value=\"Ok\"></div></div>" | |
}); | |
} | |
function fancyConfirm(msg,callback) { | |
var ret; | |
jQuery.fancybox({ |