/* Author: Oancea Dragos */ head(function() { var $nav = $('#nav'); //baseUrl = $.url.attr('protocol') + '://'+$.url.attr('host')+ '/'; //log(baseUrl + $.url.segment(0)); if($nav.find('a[href="'+ baseUrl + $.url.segment(0)+'"]').length > 0) { $nav.find('a[href="'+ baseUrl + $.url.segment(0)+'"]').addClass('selected'); } else { $nav.find('a:first').addClass('selected'); } if($.url.segment(0) == 'arhiva-promotii') { $nav.find('a:first').removeClass('selected'); $nav.find('a[href="'+ baseUrl +'dero-si-cosmote"]').addClass('selected'); } /* |-------------------------------------------------------------------------- | MY Plugin example |-------------------------------------------------------------------------- */ //$("#container").plugin(); /* |-------------------------------------------------------------------------- | Address plugin example |-------------------------------------------------------------------------- */ /* // Address handler $.address.init(function(event) { ///log(event); }).change(function(event) { //log(event.value); }); */ }); if (head.browser.ie) { head.js( baseUrl + "scripts/libs/PIE.js"); } head.js( //adding jquery {jquery : baseUrl + "scripts/libs/jquery-1.5.min.js"}, //Adding plugins {jquery_url: baseUrl + "scripts/plugins/jquery.url.js"}, function() { //log("all files are loaded"); } ); // usage: log('inside coolFunc',this,arguments); // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ window.log = function(){ log.history = log.history || []; // store logs to an array for reference log.history.push(arguments); if(this.console){ console.log( Array.prototype.slice.call(arguments) ); } }; // catch all document.write() calls (function(doc){ var write = doc.write; doc.write = function(q){ log('document.write(): ',arguments); if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments); }; })(document);