$(document).ready(function() {
var defaultWidth = 320;
var defaultHeight = 240;
$('a.iframe').each(function() { // for each a tag with class iframe
var customWidth = false;
var customHeight = false;
var classes = $(this).attr("class").split(" ");
for (var i = 0; i < classes.length; i++) { // for each class
var thisClass = classes[i];
var splitClass = thisClass.split("_");
var customValue = Number(splitClass[1]); 
switch (splitClass[0]) { // check for w or h
case 'w':
customWidth = customValue;
break;
case 'h':
customHeight = customValue;
break;
} // end check for w or h
} // end for each class
var boxWidth = (!isNaN(customWidth)) ? customWidth : defaultWidth;
var boxHeight = (!isNaN(customHeight)) ? customHeight : defaultHeight;
$(this).fancybox({
width: boxWidth,
height: boxHeight,
overlayColor: '#000',
overlayOpacity: 0.7,
type: 'iframe'
});
}); // end for each a tag with class iframe

$("a.lookbook").fancybox({
overlayColor: '#000',
overlayOpacity: 0.7
});

});	
