Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($){
- Drupal.behaviors.woodify = function (context) {
- $('.view-hbf2011-kleinanzeige-main:not(.woodify-gallery-processed)', context).each(function(){
- var gal_el = $(this);
- gal_el.addClass('woodify-gallery-processed');
- var display_mode_el = gal_el.find('.woodify-view-display-mode');
- display_mode_el.show();
- // find buttons...
- var gal_button = gal_el.find('.woodify-gallery-mode').children('a');
- var list_button = gal_el.find('.woodify-list-mode').children('a');
- // bind buttons...
- gal_button.bind('click', function(){
- gal_el.removeClass('woodify-list');
- gal_el.addClass('woodify-gallery');
- $('.row-group').equalHeights();
- return false;
- });
- list_button.bind('click', function(){
- gal_el.removeClass('woodify-gallery');
- gal_el.addClass('woodify-list');
- $('.row-group .views-row').css('min-height',0);
- return false;
- });
- });
- };
- /**
- * init iconfont
- */
- function initIconFont(object,newText) {
- if ($('html').hasClass('fontface')) { //check if browser supports @fontface
- for (var i = 0; i < object.length; i++) {
- object[i].text(newText[i]); // exchange text
- }
- }
- }
- $(function() {
- $('.row-group').equalHeights();
- SI.Files.stylizeAll();
- // array containing a list of elements for exchange to icons
- var iconFontObject = new Array($('#block-menu-menu-mainmenu li.home a'));
- // array containing a list of the icon trigger letter
- var iconFontObjectNewText = new Array('H');
- initIconFont(iconFontObject,iconFontObjectNewText); // init iconfont
- });
- })(jQuery);
Add Comment
Please, Sign In to add comment