Recent Posts
Home >Unlabelled > canada.com - Sports - Baseball on Astini News
canada.com - Sports - Baseball on Astini News
Posted on Wednesday, September 14, 2011 by astini
', container = $(' drop-panel-container'), contents = $(container).html(); if (isIE8) { $(container).replaceWith(f+contents+b) } } function dropPanelSetUp(data) { /* buttons should be a dataobject of strings representing IDs the hide and show functions are expecting IDs so passing a class will result in a failure. click as the action is assumed for now the data object should look like this: { masterlistener:(string[dom id]), panel:(string[dom id]), eventgroup1:{ button:(string[dom id]), content:(string[dom id]), offset:{x:(int),y:(int)}, on_state_class: ''(string) }, eventgroup2:{ button:(string[dom id]), content:(string[dom id]), offset:{x:(int),y:(int)}, on_state_class: ''(string) } ... etc } The drop panel nodes should be placed so they share the same offset parent as the buttons that activate it. NOTE: IE8 Got-chya: the ID for the panel is hard coded into the IE8 rouned corners code. If you have changed the ID for the drop panel and are having trouble with IE8 change the ID in the template string in this function: ie8DropPanel() */ var speed = 300, panel = $(' '+data.panel), buttons = []; for (var i=1,eg; eg=data[('eventgroup'+i)]; i++) { var bp = $(' '+eg.button).position(), //button position ph = $(' '+eg.button).height(), //button height panelPos = [bp.top+ph, bp.left, eg.offset]; on_state_class = eg.on_state_class; buttons.push([$(' '+eg.button),$(' '+eg.content),panelPos,eg.button,on_state_class]); } $(' '+data.masterlistener).bind('click',{speed:speed,panel:panel,buttons:buttons},function(event){ var org = event.target, speed = event.data.speed, panel = event.data.panel, buttons = event.data.buttons, panel_open = isPanelOpen(panel); for (var i=buttons.length-1, b; b=buttons[i]; i--) { /* * b[0] = button DOM object * b[1] = content DOM object * b[2] = the display co-ord object: * [0] = top (int) * [1] = left (int) * [2] = offset object * {x,y}(int,int) * b[3] = button ID (string) * b[4] = button 'on' class */ var button_id = b[3], same_content = isSameContent(panel,b[1]); if ( $(org).attr('id') === button_id || $(org).parents(' '+button_id).attr('id')){ if(!same_content) { hideAllContent(buttons); movePanel(panel,b[2]); if (panel_open) { showContent(b[1],b[0],b[4]); } else { showContent(b[1],b[0],b[4]); showPanel(panel,speed); } } else { hidePanel(panel,speed,b[4]); } } } function isPanelOpen(panel) { return ($(panel).css('display').toLowerCase() === 'block'); } function isSameContent (panel,content) { return ($(content, panel).css('display').toLowerCase() === 'block'); } function movePanel(panel,b) { // b[0] top, b[1] left, b[2] {x,y} $(panel).css({ 'top': (b[0] + b[2].x) }); $(panel).css({ 'left': (b[1] + b[2].y) }); } function showPanel(panel,speed) { $(panel).slideDown(speed); } function hidePanel(panel,speed) { $(panel).slideUp(speed, function() {hideAllContent(buttons);}); } function showContent(content, button, btn_class) { $(content).show(); $(button).addClass(btn_class); } function hideContent(content) { $(content).hide(); } function hideAllContent(buttons) { for (var i = buttons.length-1, b; b=buttons[i]; i--) { $(b[1]).hide(); $(b[0]).removeClass(b[4]); } } }) } return { ieRoundedCorners:ieRoundedCorners, ie8DropPanel:ie8DropPanel, dropPanelSetUp:dropPanelSetUp } })(); var headerNavication = (function($,cw) { var nav_item_list = $('.cw-header .main-nav ul.main > li'), channel_id_list = '', channel, sub_channel; var findChannel = function () { var winloc = isIE ? document.URL.split('/') : document.documentURI.split('/') , channel_id = winloc[3], sub_chanel_id = winloc.length > 5 ? '/'+winloc[4]+'/' : '', reg_sub_find_id = new RegExp(sub_chanel_id,'ig'), reg_removed_id = /^nav-/i; for (var i=nav_item_list.length-1,n; n=nav_item_list[i]; i--) { if ( channel_id === $(n).children('a').attr('id').replace(reg_removed_id,'') ) { var list = $(n).children('ul').children('li'); if (sub_chanel_id.length > 0) { for (var j=list.length-1,l; l=list[j]; j--) { if (reg_sub_find_id.test($(l).children('a').attr('href'))) { break; } else { l = false; } } } break; } } findChannel = function () { return [n,l]; } return [n,l]; } var init = (function() { channel = findChannel()[0] || nav_item_list[0]; sub_channel = findChannel()[1]; if (sub_channel) { highlightSubChannel(); } clearNav(); if(isIE) { cw.ieRoundedCorners(); if(isIE8) { cw.ie8DropPanel(); } } if ($(' handle-header').attr('id')) { cw.dropPanelSetUp({ masterlistener: 'handle-header', panel: ('drop-panel-container'), eventgroup1: { button: 'btn-newspapers', content: 'panel-newspapers', offset: { x: 5, y: 0 }, on_state_class: 'newspapers-dropdown-on' }, eventgroup2: { button: 'btn-networks', content: 'panel-networks', offset: { x: 5, y: 0 }, on_state_class: 'networks-dropdown-on' } }); } //need to check state of search radio buttons since firefox doesn't reset to the default checked radio button if($('.cw-header radio-btn-yp:checked').attr('id') != null){ $('.cw-header header-search-form').attr('action','http://telecomadvisors.biz/canadacom.yellowpages.ca/search/'); $('.cw-header header-search-string').attr('name','what'); $('.cw-header radio-btn-yp').siblings('label').removeClass('selected'); $('.cw-header radio-btn-yp').next().addClass('selected'); } eventSetUp(); }()) function highlightSubChannel() { if((document.location+"").indexOf("/sports/football/cfl/") > -1) $(".mainnav-item .cfl").addClass('sub-nav-highlight'); else if((document.location+"").indexOf("/sports/football/nfl/") > -1) $(".mainnav-item .nfl").addClass('sub-nav-highlight'); else $(sub_channel).addClass('sub-nav-highlight'); } function clearNav() { clearTabs(); $(channel).children('ul').show(); $(channel).css('background-position', 'bottom right'); } function eventSetUp() { $('.cw-header .main-nav ').bind('mouseleave', function(event){ if (isIE) { if ($(event.relatedTarget).parents('.main-nav').length 0)?"" + value.substring(0,pos) + "" + value.substring(pos, term.length) + "" + value.substring(pos + term.length) + "":value.substring(0, term.length) + "" + value.substring(pos + term.length) + ""; }, scroll: false, selectFirst: false }); });
Blog Archive
-
▼
2011
(2934)
-
▼
September
(682)
- This familyâs favourite kitchen tool is a comput...
- News - The Neshoba Democrat on Astini News
- News: Mozambique proposes law to axe VAT on animal...
- Try Thanksgiving in Belize, Says The Lodge at Chaa...
- The Origin Of The Word 'Epilepsy' : NPR on Astini ...
- Arizona to host GOP presidential debate in Decembe...
- Schizophrenia - Pipeline Review, H2 2011 on Astini...
- Nicolas Cage on 'The Expendables 2' and 'Ghost Rid...
- Who deserves 2011 PGA Tour Player of the Year hono...
- Lille midfielder Joe Cole targets England recall o...
- What is Sonic the Hedgehog Without a Sega Console?...
- Salespeople at three Bob's Discount Furniture stor...
- on Astini News
- Stocks ending gloomy 3rd quarter on a weak note - ...
- BLABBERMOUTH.NET on Astini News
- Does it work? Can maca increase sexual appetite? -...
- Giants trying to avoid 'trap' vs. Cardinals on Ast...
- Sharpshooting Fairfield detective places 11th on H...
- Obama's race problem is black and white -- and gre...
- Premier League football news from the Barclays Pre...
- HBO Marketing Chief Courteney Monroe to Step Down ...
- 750 pieces of John Wayne's life on the block - Loc...
- Present-Day Republican Rage Pre-Dates the Tea Part...
- Frances Bean Cobain | Frances Bean Cobain Turns To...
- OS X Lion / Snow Leopard Now Required to play 'Cit...
- Nassau County detective quitting over allegation s...
- Daniel Radcliffe A 'Star Wars' Virgin - Entertainm...
- Google Fights German Lawsuit Over âSex-Club Bill...
- New ACDSee Photo Editing and Management Products D...
- ROM â @nickmcminn60 MIUI SS-8 âLG 2X Editionâ...
- George Clooney Defends Ex Elisabetta Canalis From ...
- IRONCLAD (2011) on Astini News
- Actors Who Should Win And Who Will Win (PHOTOS) on...
- Young Canadians are creating a better world on Ast...
- Nine Named Semifinalists For 2012 Kentucky Teacher...
- Be Trafalgarâs guest by watching Better Homes & ...
- Grocery stores expanding generic brands on Astini ...
- Summer over, Cape road work abounds on Astini News
- Charles Manson and Me: A Memoir on Astini News
- Your Kidâs Brain, SpongeBob-ed | NewAmerica.net ...
- Extreme Weather Leads To Spike In Sales on Astini ...
- Australia ruling in Apple vs Samsung case expected...
- Titan Medical Inc. Announces Memorandum of Underst...
- DAILY YOMIURI ONLINE (The Daily Yomiuri) on Astini...
- A gluten-free for all drives product sales | Reute...
- Space Shuttle Enterprise Unveiled 35 Years Ago to ...
- Prime Limousine, Audi sign deal on 100 Audis for E...
- South Africa ponders issuing visa for Dalai Lama o...
- 'We the People' captures American spirit | MyCentr...
- on Astini News
- Neil Youngâs book deal sparks hunt for Canadian ...
- The Sweet Smell of Easier Weight Loss? on Astini News
- Living | Angry Birds game may top holiday toy sale...
- SEC probes RBS,Credit Suisse over bad mortgage loa...
- Top 100 ALA Banned Books: Harry Potter | The Back ...
- I-Team 10 investigation: Pizzeria employee accused...
- US scientists testing earthquake early warning - T...
- Holy Land 9/3/11 - Celebrity Review by tigershark1...
- J. Cole on His Albumâs Eleventh-Hour Jay-Z Verse...
- Bowling for a Cause - Yahoo! Finance on Astini News
- Car Charging Group to Provide EV Charging Services...
- PR-USA.net on Astini News
- Arkham City Xbox 360 Bundle Shows Up on German Ama...
- Braylon Edwards has knee procedure, out a while - ...
- Tea Party Group to Form Super PAC on Astini News
- New Jersey Mining Company Intersects 5.07 g/t Gold...
- 'Your Highness' is supposed to be stupid; it succe...
- Analyzing The Price-To-Cash-Flow Ratio - Yahoo! Fi...
- : Movies :: News :: Paste on Astini News
- ASIC to review broker capital rules: report | News...
- Portuguese Man o' War threat underestimated by swi...
- UK professor 'reconstructs' lost Beethoven piece |...
- Award-winning producer Jon Blair joins Aljazeera o...
- Diablo 3 Community Site Offers Peak at Game's Trea...
- Valencia vs. Chelsea: Champions League Match Will ...
- Tinker, Tailor, Soldier, Spy would have been so mu...
- Anna Faris answers film question "What's Your Numb...
- Guild Wars 2 Closed Beta Still Coming This Year --...
- Listen To The Weeknd Remix Of Florence + The Machi...
- Blackberry Mom: Shel Silverstein truly inspiring o...
- Deal watch: Norwegian Cruise Line launches another...
- AQM Announces the Discovery of the New Victoria Po...
- Ludacris, Bay City Rollers hit town in November on...
- Kim Kardashian leaves wedding ring home - Entertai...
- Voting important for youth - EEC on Astini News
- Buy Dish TV; target price raised, stock is getting...
- Weather Underground Launches Its New Weather API P...
- A victory for common sense on Astini News
- The top Typing Games Every Kid Have to Have! â E...
- Game: "Martians Vs. Goblins" F. Tyler The Creator ...
- Column: With Bielema playing ârespectâ card, N...
- East Valley Tribune - Arizona Local News on Astini...
- Pan-Seared Chicken with Chicory, Bacon & Figs on A...
- Tax filing relief to those hurt by Hurricane Irene...
- DTS and Huawei Showcase Superior Audio Technologie...
- 'Paradise Lost' director Joe Berlinger sought just...
- Samsung Mobile Announces New Expansion of Galaxy F...
- 'Revolutionary,' Controversial Idea : NPR on Astin...
- J. Cole Is a Storyteller in 'Daddy's Little Girl' ...
- IIS 7.0 Detailed Error - 503.4 on Astini News
-
▼
September
(682)