// JavaScript Document function replace_font() { Cufon.replace('#main_menu a,.text_only .head', {fontFamily: 'GothamVnu', hover:true}); Cufon.replace('.article h1,#reply-title,.entry h1,.about_col h1, .about_col h2, .about_col p,.post_image p,.widgettitle,#work_content .entry p,#comments-title,.widget li a ', {fontFamily: 'GothamVnu'}); } function popup() { $.colorbox({width: "685px", inline: true, href: "#order_form" }); } $(document).ready(function(){ //replace_font(); $('#home_slide').nivoSlider({ effect:'random', //Specify sets like: 'fold,fade,sliceDown' slices:7, animSpeed:1000, //Slide transition speed pauseTime:5000, startSlide:0, //Set starting Slide (0 index) directionNav:false, //Next & Prev directionNavHide:true, //Only show on hover controlNav:false, //1,2,3... controlNavThumbs:false, //Use thumbnails for Control Nav controlNavThumbsFromRel:false, //Use image rel for thumbs controlNavThumbsSearch: '.jpg', //Replace this with... controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src keyboardNav:true, //Use left & right arrows pauseOnHover:false, //Stop animation while hovering manualAdvance:false, //Force manual transitions captionOpacity:0.8, //Universal caption opacity beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){}, //Triggers after all slides have been shown lastSlide: function(){}, //Triggers when last slide is shown afterLoad: function(){} //Triggers when slider has loaded }); /* $('.collection_slider').nivoSlider({ effect:'fade', //Specify sets like: 'fold,fade,sliceDown' animSpeed:200, //Slide transition speed pauseTime:900, startSlide:0, //Set starting Slide (0 index) directionNav:false, //Next & Prev directionNavHide:true, //Only show on hover controlNav:true, //1,2,3... controlNavThumbs:false, //Use thumbnails for Control Nav controlNavThumbsFromRel:false, //Use image rel for thumbs controlNavThumbsSearch: '.jpg', //Replace this with... controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src keyboardNav:true, //Use left & right arrows pauseOnHover:false, //Stop animation while hovering manualAdvance:true, //Force manual transitions captionOpacity:0.8, //Universal caption opacity beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){}, //Triggers after all slides have been shown lastSlide: function(){}, //Triggers when last slide is shown afterLoad: function(){} //Triggers when slider has loaded }); */ $('.collection_div:first').show(); $(".product_list a").click(function(){ $('.collection_div').hide(); $('#'+$(this).attr('link')).show().find('img').hide(); $('#'+$(this).attr('link')).find('.collection_slider').find('img:first').show(); $('#'+$(this).attr('link')).find('.nivo-controlNav').find('a.active').removeClass('active'); $('#'+$(this).attr('link')).find('.nivo-controlNav').find('a:first').addClass('active'); return false; }); //$('a.technical').colorbox(); if ($('#collection_page_name').is('h2')) { document.title = document.title + " "+ $('#collection_page_name').html(); } if ($('.collection_slider').is('div')) { $('.collection_slider img:first').show(); $('.collection_slider').each(function(){ var number = $(this).find('img').size(); for (var i =0;i12345 var j = i+1; $(this).parent('.collection_cat_img').find('.nivo-controlNav').append(''+j+''); } $(this).parent('.collection_cat_img').find('.nivo-controlNav').find('a:first').addClass('active'); }); $('.nivo-controlNav a').click(function(){ var current = $('.collection_slider:visible'); var index = $(this).index(); if (!$(this).hasClass('active')) { $(this).parent('.nivo-controlNav').find('.active').removeClass('active'); $(this).addClass('active'); $(current).find('img:visible').hide(); $(current).find('img:eq('+index+')').fadeIn(1000); } }); } pos=0; le = Math.ceil($('.product_list').length/2)*350; $('#product_lists').width(le); $('#collection_back').css('visibility','hidden'); $("#collection_next").click(function(){ var le = Math.ceil($('.product_list').length/2)*350; pos2 = pos - 350; if (pos2 > -le+1) { pos = pos2; $('#product_lists').animate({left:pos},400); $('#collection_back').css('visibility','visible'); } if (pos2-350 > -le+1) { $('#collection_next').css('visibility','visible'); } else { $('#collection_next').css('visibility','hidden'); } }); $("#collection_back").click(function(){ var le = Math.ceil($('.product_list').length/2)*350; pos2 = pos + 350; if (pos2 <= 0){ pos = pos2; $('#product_lists').animate({left:pos},400); $('#collection_next').css('visibility','visible'); } if (pos2+350 <=0) { $('#collection_back').css('visibility','visible'); } else { $('#collection_back').css('visibility','hidden'); } }); $('#galleryjs a').touchGallery(); $('#contact_form').submit(function(){ if (($('input[name=cname]').val()=="")||($('input[name=email]').val()=="")) { alert("please fill name and email address"); return false; } }); }); $(window).load(function() { $('#up_image').slideDown(2000); $('#down_image').slideDown(2000); });