//window resizer function resizeContainer() { var x = $('.main_wrapper'); var header_x = $('.header'); var w = $(window).width(); if(w < 650 && w > 0) { x.css("width", "306px");header_x.css("width", "306px");} else if(w < 950 && w > 650) { x.css("width", "612px");header_x.css("width", "612px");} else if(w < 1300 && w > 1000) { x.css("width", "918px");header_x.css("width", "918px");} else if(w < 1600 && w > 1300) { x.css("width", "1224px");header_x.css("width", "1224px");} else if(w < 2000 && w > 1600) { x.css("width", "1530px");header_x.css("width", "1530px");} else if(w < 5000 && w > 2000) { x.css("width", "1836px");header_x.css("width", "1836px");} }; $(document).ready(resizeContainer); $(window).resize(resizeContainer); $(document).ready(function() { $(".main_tn").css({ 'opacity': 0 }); $(".main_tn").each(function(index) { $(this).find("img").load(function(){ $(this).parent().parent().delay(500).animate({opacity: 1}, 500) }); }); $(".main_tn", this).hover( function() { $("img.a", this).stop().animate({'opacity': 0}, 300); $(".slider", this).stop().animate({ 'top': 244 ,'opacity': 0.7}, 300); $(".text", this).stop().animate({ 'opacity': 1 }, 300); }, function() { $("img.a", this).stop().animate({'opacity': 1}, 300); $(".slider", this).stop().animate({ 'top': 0 , 'opacity': 0.3 }, 300); $(".text", this).stop().animate({ 'opacity': 0 }, 300); } ); bottom }); $( window ).load(function() { if ($(".main_tn").css('opacity') == 0) { $(".main_tn").animate({opacity: 1}, 500) } });