$(function() { $( "#tabs, .subtabs" ).tabs(); }); $(document).ready(function(){ $('.code-wrap').hide(); $('.category').click(function() { $('.category').not(this).removeClass('category-active'); $(this).toggleClass('category-active'); elm = $(this).attr('href'); $('.hidden').not(elm).hide(); $(elm).toggle('slow'); return false; }); $('.select-all').click(function() { $(this).parent().children('code').selectText(); return false; }); $('#tabs').bind('tabsshow', function(event, ui) { if (ui.panel.id == "tabs-2") { jQuery('#tabs-2 .copy').each(function() { elm = $(this); elm.zclip('show'); elm.zclip({ path: "/z_js/earnings/ZeroClipboard.swf", copy: elm.prev('code').text() }); }); } if (ui.panel.id == "tabs-3") { jQuery('#tabs-3 .copy').each(function() { elm = $(this); elm.zclip('show'); elm.zclip({ path: "/z_js/earnings/ZeroClipboard.swf", copy: elm.prev('code').text() }); }); } }); $('.generate').click(function() { elm = $(this).parent().children('.code-wrap'); elm.show(); elm.children('.copy').zclip('show'); elm.children(".copy").zclip({ path: "/z_js/earnings/ZeroClipboard.swf", copy: elm.children('code').text() }); return false; }); $("#tabs-4 a.thumb").prettyPhoto({ overlay_gallery: false, social_tools: '' }); });