Team:BNU-China

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
{{Team:BNU-China/CSS/main}}
{{Team:BNU-China/CSS/main}}
-
{{Team:BNU-China/javascripts}}
 
-
 
<html>
<html>
<head>
<head>
Line 8: Line 6:
<script type="text/javascript" src="https://2014.igem.org/Team:BNU-China/js/jquery.jcarousel.js?action=raw"></script>
<script type="text/javascript" src="https://2014.igem.org/Team:BNU-China/js/jquery.jcarousel.js?action=raw"></script>
<script type="text/javascript" src="https://2014.igem.org/Team:BNU-China/js/jquery.prettyPhoto.js?action=raw"></script>
<script type="text/javascript" src="https://2014.igem.org/Team:BNU-China/js/jquery.prettyPhoto.js?action=raw"></script>
 +
 +
<!--ddsmoothmenu-->
 +
<script type="text/javascript">
 +
var ddsmoothmenu={
 +
arrowimages: {down:[], right:[]},
 +
transition: {overtime:300, outtime:300},
 +
shadow: {enable:false, offsetx:5, offsety:5},
 +
showhidedelay: {showdelay: 100, hidedelay: 200},
 +
detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,
 +
detectie6: document.all && !window.XMLHttpRequest,
 +
 +
getajaxmenu:function($, setting){
 +
var $menucontainer=$('#'+setting.contentsource[0])
 +
$menucontainer.html("Loading Menu...")
 +
$.ajax({
 +
url: setting.contentsource[1],
 +
async: true,
 +
error:function(ajaxrequest){
 +
$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)
 +
},
 +
success:function(content){
 +
$menucontainer.html(content)
 +
ddsmoothmenu.buildmenu($, setting)
 +
}
 +
})
 +
},
 +
buildmenu:function($, setting){
 +
var smoothmenu=ddsmoothmenu
 +
var $mainmenu=$("#"+setting.mainmenuid+">ul")
 +
$mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu"
 +
var $headers=$mainmenu.find("ul").parent()
 +
$headers.hover(
 +
function(e){
 +
$(this).children('a:eq(0)').addClass('selected')
 +
},
 +
function(e){
 +
$(this).children('a:eq(0)').removeClass('selected')
 +
}
 +
)
 +
$headers.each(function(i){
 +
var $curobj=$(this).css({zIndex: 100-i})
 +
var $subul=$(this).find('ul:eq(0)').css({display:'block'})
 +
$subul.data('timers', {})
 +
this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
 +
this.istopheader=$curobj.parents("ul").length==1? true : false
 +
$subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0})
 +
$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: smoothmenu.arrowimages.down[2]} : {})
 +
if (smoothmenu.shadow.enable){
 +
this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)}
 +
if (this.istopheader)
 +
$parentshadow=$(document.body)
 +
else{
 +
var $parentLi=$curobj.parents("li:eq(0)")
 +
$parentshadow=$parentLi.get(0).$shadow
 +
}
 +
this.$shadow=$('<div class="ddshadow'+(this.istopheader? ' toplevelshadow' : '')+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'})
 +
}
 +
$curobj.hover(
 +
function(e){
 +
var $targetul=$subul
 +
var header=$curobj.get(0)
 +
clearTimeout($targetul.data('timers').hidetimer)
 +
$targetul.data('timers').showtimer=setTimeout(function(){
 +
header._offsets={left:$curobj.offset().left, top:$curobj.offset().top}
 +
var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w
 +
menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft
 +
if ($targetul.queue().length<=1){
 +
$targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime)
 +
if (smoothmenu.shadow.enable){
 +
var shadowleft=header.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft
 +
var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : header._shadowoffset.y
 +
if (!header.istopheader && ddsmoothmenu.detectwebkit){
 +
header.$shadow.css({opacity:1})
 +
}
 +
header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime)
 +
}
 +
}
 +
}, ddsmoothmenu.showhidedelay.showdelay)
 +
},
 +
function(e){
 +
var $targetul=$subul
 +
var header=$curobj.get(0)
 +
clearTimeout($targetul.data('timers').showtimer)
 +
$targetul.data('timers').hidetimer=setTimeout(function(){
 +
$targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime)
 +
if (smoothmenu.shadow.enable){
 +
if (ddsmoothmenu.detectwebkit){
 +
header.$shadow.children('div:eq(0)').css({opacity:0})
 +
}
 +
header.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime)
 +
}
 +
}, ddsmoothmenu.showhidedelay.hidedelay)
 +
}
 +
)
 +
})
 +
$mainmenu.find("ul").css({display:'none', visibility:'visible'})
 +
},
 +
 +
init:function(setting){
 +
if (typeof setting.customtheme=="object" && setting.customtheme.length==2){
 +
var mainmenuid='#'+setting.mainmenuid
 +
var mainselector=(setting.orientation=="v")? mainmenuid : mainmenuid+', '+mainmenuid
 +
document.write('<style type="text/css">\n'
 +
+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'
 +
+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'
 +
+'</style>')
 +
}
 +
this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable
 +
jQuery(document).ready(function($){
 +
if (typeof setting.contentsource=="object"){
 +
ddsmoothmenu.getajaxmenu($, setting)
 +
}
 +
else{
 +
ddsmoothmenu.buildmenu($, setting)
 +
}
 +
})
 +
}
 +
 +
}
 +
 +
 +
</script>
 +
 +
<!--jquery.superbgimage.min-->
 +
<script type="text/javascript">
 +
(function($){jQuery.fn.superbgimage=function(loadingoptions){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options,loadingoptions);$.superbg_inAnimation=false;$.superbg_slideshowActive=false;$.superbg_imgIndex=1;$.superbg_imgActual=1;$.superbg_imgLast=-1;$.superbg_imgSlide=0;$.superbg_interval=0;$.superbg_preload=0;$.superbg_direction=0;$.superbg_max_randomtrans=7;$.superbg_lasttrans=-1;$.superbg_isIE6=false;$.superbg_firstLoaded=false;$.superbg_saveId=$(this).attr('id');if($('#'+options.id).length===0){$('body').prepend('<div id="'+options.id+'" style="display:none;"></div>');}else{$('body').prepend($('#'+options.id));}$('#'+options.id).css('display','none').css('overflow','hidden').css('z-index',options.z_index);if(options.inlineMode===0){$('#'+options.id).css('position','fixed').css('width','100%').css('height','100%').css('top',0).css('left',0);}if(options.reload){$('#'+options.id+' img').remove();}$('#'+options.id+' img').hide().css('position','absolute');$('#'+options.id).children('img').each(function(){$(this).attr('rel',$.superbg_imgIndex++);if(!options.showtitle){$(this).attr('title','');}});$(this).children('a').each(function(){$(this).attr('rel',$.superbg_imgIndex++).click(function(){$(this).superbgShowImage();return false;}).addClass('preload');});$.superbg_imgIndex--;$(window).bind('load',function(){$(this).superbgLoad();});$(window).bind('resize',function(){$(this).superbgResize();});$.superbg_isIE6=/msie|MSIE 6/.test(navigator.userAgent);if($.superbg_isIE6&&(options.inlineMode===0)){$('#'+options.id).css('position','absolute').width($(window).width()).height($(window).height());$(window).bind('scroll',function(){$(this).superbgScrollIE6();});}if(options.reload){$(this).superbgLoad();}return this;};jQuery.fn.superbgScrollIE6=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);$('#'+options.id).css('top',document.documentElement.scrollTop+'px');};jQuery.fn.superbgLoad=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);if(($('#'+options.id).children('img').length>0)||($('#'+$.superbg_saveId).children('a').length>0)){$('#'+options.id).show();}if((typeof options.showimage!='undefined')&&(options.showimage>=0)){$.superbg_imgActual=options.showimage;}if(options.randomimage===1){$.superbg_imgActual=(1+parseInt(Math.random()*($.superbg_imgIndex-1+1),10));}$(this).superbgShowImage($.superbg_imgActual);};jQuery.fn.superbgimagePreload=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);clearInterval($.superbg_preload);if(!$.superbg_firstLoaded&&($('#'+$.superbg_saveId).children('a').length>0)){$.superbg_preload=setInterval("$(this).superbgimagePreload()",111);return;}$('#'+$.superbg_saveId).children('a.preload:first').each(function(){var imgrel=$(this).attr('rel');var imgtitle=$(this).attr('title');var img=new Image();$(img).load(function(){$(this).css('position','absolute').hide();if($('#'+options.id).children('img'+"[rel='"+imgrel+"']").length===0){$(this).attr('rel',imgrel);if(options.showtitle===1){$(this).attr('title',imgtitle);}$('#'+options.id).prepend(this);}img.onload=function(){};}).error(function(){img.onerror=function(){};}).attr('src',$(this).attr('href'));$.superbg_preload=setInterval("$(this).superbgimagePreload()",111);}).removeClass('preload');};jQuery.fn.startSlideShow=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);$.superbg_imgSlide=$.superbg_imgActual;if($.superbg_interval!==0){clearInterval($.superbg_interval);}$.superbg_interval=setInterval("$(this).nextSlide()",options.slide_interval);$.superbg_slideshowActive=true;return false;};jQuery.fn.stopSlideShow=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);clearInterval($.superbg_interval);$.superbg_slideshowActive=false;return false;};jQuery.fn.nextSlide=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);if($.superbg_inAnimation)return false;if($.superbg_slideshowActive){clearInterval($.superbg_preload);}$.superbg_direction=0;$.superbg_imgSlide++;if($.superbg_imgSlide>$.superbg_imgIndex){$.superbg_imgSlide=1;}if(options.randomimage===1){$.superbg_imgSlide=(1+parseInt(Math.random()*($.superbg_imgIndex-1+1),10));while($.superbg_imgSlide===$.superbg_imgLast){$.superbg_imgSlide=(1+parseInt(Math.random()*($.superbg_imgIndex-1+1),10));}}$.superbg_imgActual=$.superbg_imgSlide;return $(this).superbgShowImage($.superbg_imgActual);};jQuery.fn.prevSlide=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);if($.superbg_inAnimation)return false;$.superbg_direction=1;$.superbg_imgSlide--;if($.superbg_imgSlide<1){$.superbg_imgSlide=$.superbg_imgIndex;}if(options.randomimage===1){$.superbg_imgSlide=(1+parseInt(Math.random()*($.superbg_imgIndex-1+1),10));while($.superbg_imgSlide===$.superbg_imgLast){$.superbg_imgSlide=(1+parseInt(Math.random()*($.superbg_imgIndex-1+1),10));}}$.superbg_imgActual=$.superbg_imgSlide;return $(this).superbgShowImage($.superbg_imgActual);};jQuery.fn.superbgResize=function(){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);var thisimg=$('#'+options.id+' img.activeslide');var dimensions=$(this).superbgCalcSize($(thisimg).width(),$(thisimg).height());var newwidth=dimensions[0];var newheight=dimensions[1];var newleft=dimensions[2];var newtop=dimensions[3];$(thisimg).css('width',newwidth+'px');$(thisimg).css('height',newheight+'px');if($.superbg_isIE6&&(options.inlineMode===0)){$('#'+options.id).width(newwidth).height(newheight);$(thisimg).width(newwidth);$(thisimg).height(newheight);}$(thisimg).css('left',newleft+'px');if(options.vertical_center===1){$(thisimg).css('top',newtop+'px');}else{$(thisimg).css('top','0px');}};jQuery.fn.superbgCalcSize=function(imgw,imgh){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);var browserwidth=$(window).width();var browserheight=$(window).height();if(options.inlineMode===1){browserwidth=$('#'+options.id).width();browserheight=$('#'+options.id).height();}var ratio=imgh/imgw;var newheight=0;var newwidth=0;if((browserheight/browserwidth)>ratio){newheight=browserheight;newwidth=Math.round(browserheight/ratio);}else{newheight=Math.round(browserwidth*ratio);newwidth=browserwidth;}var newleft=Math.round((browserwidth-newwidth)/2);var newtop=Math.round((browserheight-newheight)/2);var rcarr=[newwidth,newheight,newleft,newtop];return rcarr;};jQuery.fn.superbgShowImage=function(img){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);$.superbg_imgActual=$(this).attr('rel');if(typeof img!=='undefined'){$.superbg_imgActual=img;}if($('#'+options.id+' img.activeslide').attr('rel')===$.superbg_imgActual){return false;}if($.superbg_inAnimation){return false;}else{$.superbg_inAnimation=true;}var imgsrc='';var imgtitle='';if($('#'+options.id).children('img'+"[rel='"+$.superbg_imgActual+"']").length===0){imgsrc=$('#'+$.superbg_saveId+' a'+"[rel='"+$.superbg_imgActual+"']").attr('href');imgtitle=$('#'+$.superbg_saveId+' a'+"[rel='"+$.superbg_imgActual+"']").attr('title');}else{imgsrc=$('#'+options.id).children('img'+"[rel='"+$.superbg_imgActual+"']").attr('src');}if((typeof options.onHide==='function')&&(options.onHide!==null)&&($.superbg_imgLast>=0)){options.onHide($.superbg_imgLast);}$('#'+options.id+' img.activeslide').superbgLoadImage(imgsrc,imgtitle);$('#'+$.superbg_saveId+' a').removeClass('activeslide');$('#'+$.superbg_saveId).children('a'+"[rel='"+$.superbg_imgActual+"']").addClass('activeslide');$.superbg_imgSlide=$.superbg_imgActual;$.superbg_imgLast=$.superbg_imgActual;return false;};jQuery.fn.superbgLoadImage=function(imgsrc,imgtitle){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);if($('#'+options.id).children('img'+"[rel='"+$.superbg_imgActual+"']").length===0){var img=new Image();$(img).load(function(){$(this).css('position','absolute').hide();if($('#'+options.id).children('img'+"[rel='"+$.superbg_imgActual+"']").length===0){$(this).attr('rel',$.superbg_imgActual);if(options.showtitle===1){$(this).attr('title',imgtitle);}$('#'+options.id).prepend(this);}var thisimg=$('#'+options.id).children('img'+"[rel='"+$.superbg_imgActual+"']");var dimensions=$(this).superbgCalcSize(img.width,img.height);$(this).superbgTransition(thisimg,dimensions);if(!$.superbg_firstLoaded){if(options.slideshow===1){$(this).startSlideShow();}if((options.preload===1)&&($('#'+$.superbg_saveId).children('a').length>0)){$.superbg_preload=setInterval("$(this).superbgimagePreload()",250);}}$.superbg_firstLoaded=true;img.onload=function(){};}).error(function(){$.superbg_inAnimation=false;img.onerror=function(){};}).attr('src',imgsrc);}else{var thisimg=$('#'+options.id).children('img'+"[rel='"+$.superbg_imgActual+"']");var dimensions=$(this).superbgCalcSize($(thisimg).width(),$(thisimg).height());$(this).superbgTransition(thisimg,dimensions);if(!$.superbg_firstLoaded){if(options.slideshow===1){$(this).startSlideShow();}if((options.preload===1)&&($('#'+$.superbg_saveId).children('a').length>0)){$.superbg_preload=setInterval("$(this).superbgimagePreload()",250);}$.superbg_firstLoaded=true;}}};jQuery.fn.superbgTransition=function(thisimg,dimensions){var options=$.extend($.fn.superbgimage.defaults,$.fn.superbgimage.options);var newwidth=dimensions[0];var newheight=dimensions[1];var newleft=dimensions[2];var newtop=dimensions[3];$(thisimg).css('width',newwidth+'px').css('height',newheight+'px').css('left',newleft+'px');if((typeof options.onClick==='function')&&(options.onClick!==null)){$(thisimg).unbind('click').click(function(){options.onClick($.superbg_imgActual);});}if((typeof options.onMouseenter==='function')&&(options.onMouseenter!==null)){$(thisimg).unbind('mouseenter').mouseenter(function(){options.onMouseenter($.superbg_imgActual);});}if((typeof options.onMouseleave==='function')&&(options.onMouseleave!==null)){$(thisimg).unbind('mouseleave').mouseleave(function(){options.onMouseleave($.superbg_imgActual);});}if((typeof options.onMousemove==='function')&&(options.onMousemove!==null)){$(thisimg).unbind('mousemove').mousemove(function(e){options.onMousemove($.superbg_imgActual,e);});}if(options.randomtransition===1){var randomtrans=(0+parseInt(Math.random()*($.superbg_max_randomtrans-0+1),10));while(randomtrans===$.superbg_lasttrans){randomtrans=(0+parseInt(Math.random()*($.superbg_max_randomtrans-0+1),10));}options.transition=randomtrans;}if(options.vertical_center===1){$(thisimg).css('top',newtop+'px');}else{$(thisimg).css('top','0px');}var akt_transitionout=options.transitionout;if((options.transition===6)||(options.transition===7)){akt_transitionout=0;}if(akt_transitionout===1){$('#'+options.id+' img.activeslide').removeClass('activeslide').addClass('lastslide').css('z-index',0);}else{$('#'+options.id+' img.activeslide').removeClass('activeslide').addClass('lastslideno').css('z-index',0);}$(thisimg).css('z-index',1);options.transition=parseInt(options.transition,10);$.superbg_lasttrans=options.transition;var theEffect='';var theDir='';if(options.transition===0){$(thisimg).show(1,function(){if((typeof options.onShow==='function')&&(options.onShow!==null))options.onShow($.superbg_imgActual);$.superbg_inAnimation=false;if($.superbg_slideshowActive){$('#'+options.id).startSlideShow();}}).addClass('activeslide');}else if(options.transition===1){$(thisimg).fadeIn(options.speed,function(){if((typeof options.onShow==='function')&&(options.onShow!==null))options.onShow($.superbg_imgActual);$('#'+options.id+' img.lastslideno').hide(1,null).removeClass('lastslideno');$.superbg_inAnimation=false;if($.superbg_slideshowActive){$('#'+options.id).startSlideShow();}}).addClass('activeslide');}else{if(options.transition===2){theEffect='slide';theDir='up';}if(options.transition===3){theEffect='slide';theDir='right';}if(options.transition===4){theEffect='slide';theDir='down';}if(options.transition===5){theEffect='slide';theDir='left';}if(options.transition===6){theEffect='blind';theDir='horizontal';}if(options.transition===7){theEffect='blind';theDir='vertical';}if(options.transition===90){theEffect='slide';theDir='left';if($.superbg_direction===1){theDir='right';}}if(options.transition===91){theEffect='slide';theDir='down';if($.superbg_direction===1){theDir='up';}}$(thisimg).show(theEffect,{direction:theDir},options.speed,function(){if((typeof options.onShow==='function')&&(options.onShow!==null))options.onShow($.superbg_imgActual);$('#'+options.id+' img.lastslideno').hide(1,null).removeClass('lastslideno');$.superbg_inAnimation=false;if($.superbg_slideshowActive){$('#'+options.id).startSlideShow();}}).addClass('activeslide');}if(akt_transitionout===1){var outspeed=options.speed;if(options.speed=='slow'){outspeed=600+200;}else if(options.speed=='normal'){outspeed=400+200;}else if(options.speed=='fast'){outspeed=400+200;}else{outspeed=options.speed+200;}if(options.transition===0){$('#'+options.id+' img.lastslide').hide(1,null).removeClass('lastslide');}else if(options.transition==1){$('#'+options.id+' img.lastslide').fadeOut(outspeed).removeClass('lastslide');}else{if(options.transition===2){theEffect='slide';theDir='down';}if(options.transition===3){theEffect='slide';theDir='left';}if(options.transition===4){theEffect='slide';theDir='up';}if(options.transition===5){theEffect='slide';theDir='right';}if(options.transition===6){theEffect='';theDir='';}if(options.transition===7){theEffect='';theDir='';}if(options.transition===90){theEffect='slide';theDir='right';if($.superbg_direction===1){theDir='left';}}if(options.transition===91){theEffect='slide';theDir='up';if($.superbg_direction===1){theDir='down';}}$('#'+options.id+' img.lastslide').hide(theEffect,{direction:theDir},outspeed).removeClass('lastslide');}}else{$('#'+options.id+' img.lastslide').hide(1,null).removeClass('lastslide');}};jQuery.fn.superbgimage.defaults={id:'superbgimage',z_index:0,inlineMode:0,showimage:1,vertical_center:1,transition:1,transitionout:1,randomtransition:0,showtitle:0,slideshow:0,slide_interval:5000,randomimage:0,speed:'slow',preload:1,onShow:null,onClick:null,onHide:null,onMouseenter:null,onMouseleave:null,onMousemove:null};})(jQuery);
 +
</script>
 +
 +
<!--jQuery Masonry -->
 +
<script type="text/javascript">
 +
 +
(function(e){var n=e.event,o;n.special.smartresize={setup:function(){e(this).bind("resize",n.special.smartresize.handler)},teardown:function(){e(this).unbind("resize",n.special.smartresize.handler)},handler:function(j,l){var g=this,d=arguments;j.type="smartresize";o&&clearTimeout(o);o=setTimeout(function(){jQuery.event.handle.apply(g,d)},l==="execAsap"?0:100)}};e.fn.smartresize=function(j){return j?this.bind("smartresize",j):this.trigger("smartresize",["execAsap"])};e.fn.masonry=function(j,l){var g=
 +
{getBricks:function(d,b,a){var c=a.itemSelector===undefined;b.$bricks=a.appendedContent===undefined?c?d.children():d.find(a.itemSelector):c?a.appendedContent:a.appendedContent.filter(a.itemSelector)},placeBrick:function(d,b,a,c,h){b=Math.min.apply(Math,a);for(var i=b+d.outerHeight(true),f=a.length,k=f,m=c.colCount+1-f;f--;)if(a[f]==b)k=f;d.applyStyle({left:c.colW*k+c.posLeft,top:b},e.extend(true,{},h.animationOptions));for(f=0;f<m;f++)c.colY[k+f]=i},setup:function(d,b,a){g.getBricks(d,a,b);if(a.masoned)a.previousData=
 +
d.data("masonry");a.colW=b.columnWidth===undefined?a.masoned?a.previousData.colW:a.$bricks.outerWidth(true):b.columnWidth;a.colCount=Math.floor(d.width()/a.colW);a.colCount=Math.max(a.colCount,1)},arrange:function(d,b,a){var c;if(!a.masoned||b.appendedContent!==undefined)a.$bricks.css("position","absolute");if(a.masoned){a.posTop=a.previousData.posTop;a.posLeft=a.previousData.posLeft}else{d.css("position","relative");var h=e(document.createElement("div"));d.prepend(h);a.posTop=Math.round(h.position().top);
 +
a.posLeft=Math.round(h.position().left);h.remove()}if(a.masoned&&b.appendedContent!==undefined){a.colY=a.previousData.colY;for(c=a.previousData.colCount;c<a.colCount;c++)a.colY[c]=a.posTop}else{a.colY=[];for(c=a.colCount;c--;)a.colY.push(a.posTop)}e.fn.applyStyle=a.masoned&&b.animate?e.fn.animate:e.fn.css;b.singleMode?a.$bricks.each(function(){var i=e(this);g.placeBrick(i,a.colCount,a.colY,a,b)}):a.$bricks.each(function(){var i=e(this),f=Math.ceil(i.outerWidth(true)/a.colW);f=Math.min(f,a.colCount);
 +
if(f===1)g.placeBrick(i,a.colCount,a.colY,a,b);else{var k=a.colCount+1-f,m=[];for(c=0;c<k;c++){var p=a.colY.slice(c,c+f);m[c]=Math.max.apply(Math,p)}g.placeBrick(i,k,m,a,b)}});a.wallH=Math.max.apply(Math,a.colY);d.applyStyle({height:a.wallH-a.posTop},e.extend(true,[],b.animationOptions));a.masoned||setTimeout(function(){d.addClass("masoned")},1);l.call(a.$bricks);d.data("masonry",a)},resize:function(d,b,a){a.masoned=!!d.data("masonry");var c=d.data("masonry").colCount;g.setup(d,b,a);a.colCount!=c&&
 +
g.arrange(d,b,a)}};return this.each(function(){var d=e(this),b={};b.masoned=!!d.data("masonry");var a=b.masoned?d.data("masonry").options:{},c=e.extend({},e.fn.masonry.defaults,a,j),h=a.resizeable;b.options=c.saveOptions?c:a;l=l||function(){};g.getBricks(d,b,c);if(!b.$bricks.length)return this;g.setup(d,c,b);g.arrange(d,c,b);!h&&c.resizeable&&e(window).bind("smartresize.masonry",function(){g.resize(d,c,b)});h&&!c.resizeable&&e(window).unbind("smartresize.masonry")})};e.fn.masonry.defaults={singleMode:false,
 +
columnWidth:undefined,itemSelector:undefined,appendedContent:undefined,saveOptions:true,resizeable:true,animate:false,animationOptions:{}}})(jQuery);
 +
</script>
 +
 +
 +
<!--jQuery Slick Forms-->
 +
<script type="text/javascript">
 +
(function($){
 +
 +
//define the plugin
 +
$.fn.dcSlickForms = function(options) {
 +
 +
//set default options
 +
var defaults = {
 +
classError: 'error',
 +
classForm: 'slick-form',
 +
align: 'left',
 +
animateError: true,
 +
animateD: 10,
 +
ajaxSubmit: true
 +
};
 +
 +
//call in the default otions
 +
var options = $.extend(defaults, options);
 +
 +
//act upon the element that is passed into the design   
 +
return this.each(function(options){
 +
 +
// Declare the function variables:
 +
var formAction = $(this).attr('action');
 +
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
 +
var textError = $('#v-error', this).val();
 +
var textEmail = $('#v-email', this).val();
 +
var $error = $('<span class="error"></span>');
 +
var $form = this;
 +
var $loading = $('<div class="loading"><span></span></div>');
 +
var errorText = '* Required Fields';
 +
$('input',$form).focus(function(){
 +
$(this).addClass('focus');
 +
});
 +
$('input',$form).blur(function(){
 +
$(this).removeClass('focus');
 +
});
 +
$('.nocomment').hide();
 +
$('.defaultText',this).dcDefaultText();
 +
$('.'+defaults.classForm+' label').hide();
 +
 +
// Form submit & Validation
 +
$(this).submit(function(){
 +
 +
formReset($form);
 +
$('.defaultText',$form).dcDefaultText({action: 'remove'});
 +
 +
// Validate all inputs with the class "required"
 +
$('.required',$form).each(function(){
 +
var label = $(this).attr('title');
 +
var inputVal = $(this).val();
 +
var $parentTag = $(this).parent();
 +
if(inputVal == ''){
 +
$parentTag.addClass('error').append($error.clone().text(textError));
 +
}
 +
 +
// Run the email validation using the regex for those input items also having class "email"
 +
if($(this).hasClass('email') == true){
 +
if(!emailReg.test(inputVal)){
 +
$parentTag.addClass('error').append($error.clone().text(textEmail));
 +
}
 +
}
 +
});
 +
 +
// All validation complete - Check if any errors exist
 +
// If has errors
 +
if ($('.error',$form).length) {
 +
$('.btn-submit',this).before($error.clone().text(textError));
 +
} else {
 +
if(defaults.ajaxSubmit == true){
 +
var $response = $(this).next();
 +
$(this).addClass('submit').after($loading.clone());
 +
$('.defaultText',$form).dcDefaultText({action: 'remove'});
 +
$.post(formAction, $(this).serialize(),function(data){
 +
$('.loading').fadeOut().remove();
 +
$response.html(data).fadeIn();
 +
$('fieldset',this).slideUp();
 +
});
 +
} else {
 +
$form.submit();
 +
}
 +
}
 +
// Prevent form submission
 +
return false;
 +
});
 +
 +
// Fade out error message when input field gains focus
 +
$('input, textarea').focus(function(){
 +
var $parent = $(this).parent();
 +
$parent.addClass('focus');
 +
$parent.removeClass('error');
 +
 +
});
 +
$('input, textarea').blur(function(){
 +
var $parent = $(this).parent();
 +
var checkVal = $(this).attr('title');
 +
if (!$(this).val() == checkVal){
 +
$(this).removeClass('defaulttextActive');
 +
}
 +
$parent.removeClass('error focus');
 +
$('span.error',$parent).hide();
 +
});
 +
 +
function formReset(obj){
 +
$('li',obj).removeClass('error');
 +
$('span.error',obj).remove();
 +
}
 +
});
 +
};
 +
})(jQuery);
 +
/*
 +
* DC jQuery Default Text - jQuery Default Text
 +
* Copyright (c) 2011 Design Chemical
 +
* http://www.designchemical.com
 +
*/
 +
 +
(function($){
 +
 +
//define the plugin
 +
$.fn.dcDefaultText = function(options) {
 +
 +
//set default options
 +
var defaults = {
 +
action: 'add', // alternative 'remove'
 +
classActive: 'defaultTextActive'
 +
};
 +
 +
//call in the default otions
 +
var options = $.extend(defaults, options);
 +
 
 +
return this.each(function(options){
 +
 +
if(defaults.action == 'add'){
 +
 +
$(this).focus(function(srcc) {
 +
if ($(this).val() == $(this)[0].title) {
 +
$(this).removeClass(defaults.classActive);
 +
$(this).val('');
 +
}
 +
});
 +
 +
$(this).blur(function() {
 +
if ($(this).val() == "") {
 +
$(this).addClass(defaults.classActive);
 +
$(this).val($(this)[0].title);
 +
}
 +
});
 +
$(this).addClass(defaults.classActive).blur();
 +
}
 +
 +
if(defaults.action == 'remove'){
 +
 +
var checkVal = $(this).attr('title');
 +
if ($(this).val() == checkVal){
 +
$(this).val('');
 +
}
 +
 +
}
 +
});
 +
};
 +
})(jQuery);
 +
</script>
 +
 +
 +
 +
<!--transify-->
 +
<script type="text/javascript">
 +
(function($){
 +
$.fn.transify = function(options) {
 +
var defaults = {
 +
opacityOrig:.33, 
 +
fadeSpeed:600
 +
  },
 +
  settings = $.extend({}, defaults, options);
 +
 
 +
this.each(function() {
 +
var $this = $(this);
 +
$this.append('<div class="transify"></div>');
 +
var transBG = $this.find('.transify');
 +
transBG.css({
 +
backgroundColor:$this.css('backgroundColor'),
 +
backgroundImage:$this.css('backgroundImage'),
 +
backgroundRepeat:$this.css('backgroundRepeat'),
 +
borderTopColor:$this.css('borderTopColor'),
 +
borderTopWidth:$this.css('borderTopWidth'),
 +
borderTopStyle:$this.css('borderTopStyle'),
 +
borderRightColor:$this.css('borderRightColor'),
 +
borderRightWidth:$this.css('borderRightWidth'),
 +
borderRightStyle:$this.css('borderRightStyle'),
 +
borderBottomColor:$this.css('borderBottomColor'),
 +
borderBottomWidth:$this.css('borderBottomWidth'),
 +
borderBottomStyle:$this.css('borderBottomStyle'),
 +
borderLeftColor:$this.css('borderLeftColor'),
 +
borderLeftWidth:$this.css('borderLeftWidth'),
 +
borderLeftStyle:$this.css('borderLeftStyle'),
 +
position:'absolute',
 +
top:0,
 +
left:0,
 +
zIndex:-1,
 +
width:$this.width()+parseInt($this.css("padding-left"), 10) + parseInt($this.css("padding-right"), 10),
 +
height:$this.height()+parseInt($this.css("padding-top"), 10) + parseInt($this.css("padding-bottom"), 10),
 +
opacity:settings.opacityOrig});
 +
if (settings.percentWidth) {
 +
transBG.css('width',settings.percentWidth);
 +
}
 +
if (settings.percentHeight) {
 +
transBG.css('height',settings.percentHeight);
 +
}
 +
$this.css({
 +
position:'relative',
 +
background:'none',
 +
border:'none'})
 +
 +
if (settings.opacityNew) {
 +
$this.hover(function() {
 +
transBG.stop().animate({opacity:settings.opacityNew}, settings.fadeSpeed);
 +
}, function() {
 +
transBG.stop().animate({opacity:settings.opacityOrig}, settings.fadeSpeed);
 +
});
 +
}
 +
});
 +
return this;
 +
}
 +
})(jQuery);
 +
</script>
<script type="text/javascript">
<script type="text/javascript">

Revision as of 11:03, 16 July 2014

1 2 3 4 5 6
1
2
Nulla vitae elit libero, a pharetra augue. Nullam id dolor id nibh ultricies vehicula ut id elit.
3
Nulla vitae elit libero, a pharetra augue. Nullam id dolor id nibh ultricies vehicula ut id elit.
4
4
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
Aenean fringilla aliquam est, a porttitor arcu euismod et. Maecenas rutrum erat at arcu porta interdum. Cras convallis ligula ac risus imperdiet placerat.

What We Do

Vivamus sodales pharetra libero, a tincidunt nisi condimentum a. Quisque non sodales nislero. Integer a tellus eget arcu fringilla molestie quis vel eros. Praesent fermentum vulputate purusa ornare. Vivamus imperdiet, quam et adipiscing placerat, nibh odio scelerisque risus, vitaere accumsan mi justo et quam. Pellentesque quis felis quis tortor porttitor lobortis nec ac risus.





Web Design

Vivamus soder pharetra libero atincidunt, nisi condimentum Quisque non sodales nislero.


Photography

Vivamus soder pharetra libero atincidunt, nisi condimentum Quisque non sodales nislero.


Motion Graphic

Vivamus soder pharetra libero atincidunt, nisi condimentum Quisque non sodales nislero.


Optimization

Vivamus soder pharetra libero atincidunt, nisi condimentum Quisque non sodales nislero.

Latest Works