(function($) { $.teeko.app.container = function(parms, method) { return this.queue(function() { if( $(this).attr('rotate') ) { $(this).rotate( parseInt($(this).attr('rotate')) ); } if($(this).attr('fancybox')) { var src = $(this).css('background-image').replace('/thumbnail/','/large/').replace('url(','').replace(')','').replace('"',''); src = src.replace(new RegExp("\/\\w+\:[0-9]{1,5}x[0-9]{1,5}"),'/'); src = src.replace(new RegExp("\/\\w+\:[0-9]{1,5}x[0-9]{1,5}x[0-9]{1,5}\/"),'/'); if( $(this).attr('fancyboxUrl') ) src = $(this).attr('fancyboxUrl'); if($(this).parent().attr('tagName') !== 'A') { $(this).wrap(''); } else { $(this).parent().attr('rel',$(this).attr('fancybox')); } var fparms = {centerOnScroll: true, overlayShow: true, hideOnOverlayClick: true, transitionIn:'elastic',transitionOut:'elastic',hideOnContentClick:false,easingIn:'easeOutBack',easingOut:'easeInBack'}; if($(this).attr('fancyboxwidth')) fparms.width = parseInt($(this).attr('fancyboxwidth')); if($(this).attr('fancyboxheight')) fparms.height = parseInt($(this).attr('fancyboxheight')); if(typeof $(this).attr('fancyboxtype') !== 'undefined') { fparms.type = $(this).attr('fancyboxtype'); $(this).removeAttr('fancyboxtype'); } $(this).parent().fancybox(fparms); $(this).removeAttr('fancybox'); } $(this).addClass('teeko-element-container-ready'); $(this).dequeue(); }); } })(jQuery);(function($) { $.teeko.app.image = function(parms, method) { return this.queue(function() { if(typeof $(this).attr('preload') !== 'undefined') { $(this).addClass('teeko-image-preload');} switch(method) { case 'change': $(this).attr('src', parms); break; default: if($(this).attr('fancybox')) { var src = $(this).attr('src').replace('/thumbnail/','/large/'); src = src.replace(new RegExp("\/\\w+\:[0-9]{1,5}x[0-9]{1,5}\/"),'/'); src = src.replace(new RegExp("\/\\w+\:[0-9]{1,5}x[0-9]{1,5}"),'/'); src = src.replace(new RegExp("\/\\w+\:[0-9]{1,5}x[0-9]{1,5}x[0-9]{1,5}\/"),'/'); if( $(this).attr('fancyboxUrl') ) src = $(this).attr('fancyboxUrl'); if($(this).parent().attr('tagName') !== 'A') { $(this).wrap(''); } else { $(this).parent().attr('rel',$(this).attr('fancybox')); } var fparms = {centerOnScroll: true, overlayShow: true, hideOnOverlayClick: true, transitionIn:'elastic',transitionOut:'elastic',hideOnContentClick:false,easingIn:'easeOutBack',easingOut:'easeInBack'}; if($(this).attr('fancyboxwidth')) fparms.width = parseInt($(this).attr('fancyboxwidth')); if($(this).attr('fancyboxheight')) fparms.height = parseInt($(this).attr('fancyboxheight')); if(typeof $(this).attr('fancyboxtype') !== 'undefined') { fparms.type = $(this).attr('fancyboxtype'); $(this).removeAttr('fancyboxtype'); } $(this).parent().fancybox(fparms); $(this).removeAttr('fancybox'); } if($(this).attr('tooltip')) { if($(this).attr('tooltip').substring(0,1) === '{') { if($(this).parent().attr('tagName') !== 'A') { $(this).wrap(''); } else { $(this).parent().attr('title',$(this).attr('title')); } var tparms = eval('('+$(this).attr('tooltip')+')'); if(typeof tparms.hide !== 'undefined') { $(this).parent().bind(tparms.hide, function() { $(this).poshytip('hide'); }); } $(this).removeAttr('title').removeAttr('tooltip'); $(this).parent().poshytip(tparms); } } } $(this).addClass('teeko-element-image-ready'); $(this).dequeue(); }); } })(jQuery);